/* ════════════════════════════════════════════════════════════════
   ChemLinked Toolbox · 化学品合规查询 — 演示原型样式
   ─────────────────────────────────────────────────────────────────
   设计风格参考 chemical.chemlinked.com：
   · 白 / 浅灰（#F7F7F7）门户底色，品牌绿 #66CC00 强调
   · 系统字体 + 粗细对比，大写小标签
   · 直角矩形语言（按钮 2px / 卡片 4px），细边框 + 浅阴影
   · 双层导航：白底品牌栏 + 浅灰主导航栏
   · 绿色实心标题栏卡片（Quick Navigation 式模块切换器）
   · 状态语义色：已列入=绿 / 限制=琥珀 / 禁止=红 / 未列入=灰
   ════════════════════════════════════════════════════════════════ */

:root {
  /* 品牌色 */
  --green: #66CC00;          /* 品牌绿（装饰色块 / 图标底 / 描边） */
  --green-bar: #4EA101;      /* 实心绿条 / 文字 CTA 底色（保证白字对比度） */
  --green-bar-deep: #428C01; /* 实心绿条 hover */
  --green-text: #3D8B00;     /* 文字级绿（链接 / 强调，保证对比度） */
  --green-tint: #EAF8D2;     /* 浅绿底（选中态） */
  --green-tint-2: #F6FDEB;   /* 更浅绿底 */

  /* 中性色 */
  --paper: #F7F7F7;
  --surface: #FFFFFF;
  --ink: #282828;
  --ink-2: #555555;
  --ink-3: #999999;
  --line: #E5E5E5;
  --line-strong: #D9D9D9;

  /* 状态语义色 */
  --ok: #1B7A3D;      --ok-tint: #E8F6EE;      --ok-line: #C4E8D0;
  --warn: #9A6B00;    --warn-tint: #FBF1DC;    --warn-line: #EDD5A0;
  --danger: #C81E1E;  --danger-tint: #FCEAEA;  --danger-line: #F2C4C4;
  --none: #8C8C8C;    --none-tint: #F2F2F2;    --none-line: #E0E0E0;

  /* 形状 */
  --radius: 4px;
  --radius-s: 2px;
  --shadow-1: 0 1px 2px rgba(40, 40, 40, 0.04);
  --shadow-2: 0 4px 12px rgba(40, 40, 40, 0.08);

  /* 字体（系统栈，参考 ChemLinked） */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --w-main: 1128px;
}

/* ─────────── 基础 ─────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--surface);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.35; }
p { margin: 0; }
a { color: var(--green-text); text-decoration: none; }
a:hover { color: var(--green-bar); }
img, svg { display: block; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

::selection { background: var(--green-tint); color: var(--ink); }

.mono { font-family: var(--mono); }

/* ════════════════ 双层顶部导航 ════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 3px solid var(--green);
  box-shadow: 0 1px 0 var(--line);
}

/* 上层品牌栏 */
.brandbar { border-bottom: 1px solid var(--line); background: var(--surface); }

.brandbar-inner {
  max-width: var(--w-main);
  margin: 0 auto;
  padding: 0 24px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-sq {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-s);
  background: var(--green);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-sq svg { width: 17px; height: 17px; }
.brand-name {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-name em {
  font-style: normal;
  color: var(--green);
}
.brand-sub {
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-3);
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  letter-spacing: 0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

/* 语言切换组（中 / EN / 日） */
.lang-switch {
  display: flex;
  border: 1.5px solid var(--green);
  border-radius: var(--radius-s);
  overflow: hidden;
  flex-shrink: 0;
}
.lang-btn {
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-text);
  background: var(--surface);
  line-height: 1.5;
}
.lang-btn + .lang-btn { border-left: 1.5px solid var(--green); }
.lang-btn:hover { background: var(--green-tint-2); }
.lang-btn.active { background: var(--green-bar); color: #fff; }

/* 面包屑（详情页内联） */
.nav-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  flex-wrap: wrap;
}
.nav-crumb a { color: var(--ink-2); font-weight: 500; }
.nav-crumb a:hover { color: var(--green-text); }
.nav-crumb .sep { color: var(--line-strong); }
.nav-crumb .cur { color: var(--ink); font-weight: 700; }
.nav-crumb .cur.mono { font-weight: 500; }

.detail-crumb { margin: 20px 0 0; }

/* ─────────── 演示提示条 ─────────── */
.demo-strip {
  background: var(--green-tint-2);
  border-bottom: 1px solid var(--line);
}
.demo-strip-inner {
  max-width: var(--w-main);
  margin: 0 auto;
  padding: 7px 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-2);
}
.demo-strip-inner svg { width: 15px; height: 15px; color: var(--green-text); flex-shrink: 0; }
.demo-strip-inner strong { color: var(--green-text); }
.demo-strip-close {
  margin-left: auto;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-2);
  padding: 2px 7px;
  border-radius: var(--radius-s);
}
.demo-strip-close:hover { background: var(--none-tint); color: var(--ink); }

/* ─────────── 布局容器 ─────────── */
.page {
  max-width: var(--w-main);
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* ─────────── 按钮体系（绿色 CTA / 白底绿框） ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-s);
  padding: 9px 18px;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--green-bar); color: #fff; }
.btn-primary:hover { background: var(--green-bar-deep); color: #fff; }

.btn-outline {
  background: var(--surface);
  color: var(--green-text);
  border: 1.5px solid var(--green);
}
.btn-outline:hover { background: var(--green-tint-2); color: var(--green-text); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green-text); }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ════════════════ 首页 Hero ════════════════ */
.hero-band {
  background: linear-gradient(180deg, var(--green-tint-2) 0%, var(--surface) 82%);
}

.hero {
  padding: 44px 0 24px;
  text-align: center;
  animation: rise-in 0.45s ease-out both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--green-text);
  text-transform: uppercase;
}
.eyebrow::before, .eyebrow::after {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--green);
}
.eyebrow::before { transform: rotate(-18deg); }
.eyebrow::after { transform: rotate(18deg); }

.hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(28px, 4.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: normal; color: var(--green); }

.hero-sub {
  font-size: 15.5px;
  color: var(--ink-3);
  max-width: 560px;
  margin: 0 auto;
}

/* ─────────── 搜索框（绿色方形按钮） ─────────── */
.search-zone { max-width: 660px; margin: 28px auto 0; position: relative; }

.search-box {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(102, 204, 0, 0.15), var(--shadow-2);
}
.search-box .search-icon {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  margin: auto 2px auto 15px;
  flex-shrink: 0;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  padding: 13px 12px;
  background: transparent;
}
.search-box input::placeholder { color: var(--ink-3); }

.search-go {
  width: 52px;
  flex-shrink: 0;
  background: var(--green);
  display: grid;
  place-items: center;
  color: #21280B;
  border-left: 1.5px solid var(--line-strong);
  transition: background 0.12s;
}
.search-go:hover { background: var(--green-bar); color: #fff; }
.search-go svg { width: 19px; height: 19px; }

.search-kbd {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 1px 7px;
  margin: auto 12px;
  flex-shrink: 0;
}

/* 搜索建议下拉 */
.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  z-index: 30;
  text-align: left;
  animation: pop-in 0.15s ease-out;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
  text-align: left;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: var(--green-tint-2); }
.suggest-item .s-cas { font-family: var(--mono); font-size: 13px; color: var(--green-text); width: 92px; flex-shrink: 0; }
.suggest-item .s-name { font-size: 14px; color: var(--ink); font-weight: 700; }
.suggest-item .s-en { font-size: 12.5px; color: var(--ink-3); }
.suggest-item .s-arrow { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.suggest-empty { padding: 14px 16px; font-size: 13.5px; color: var(--ink-3); }

.hot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-3);
}
.hot-chip {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 3px 12px;
  transition: all 0.12s;
}
.hot-chip:hover { border-color: var(--green); color: var(--green-text); background: var(--surface); }

/* 数据库模块区块（紧接 hero 渐变带） */
.db-block { margin-top: 26px; }

/* ════════════════ 数据库模块卡（Quick Navigation 式） ════════════════ */
.qn-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.qn-head {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--green-bar);
  color: #fff;
  padding: 9px 16px;
}
.qn-head .qn-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.qn-head .qn-en {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  opacity: 0.9;
  text-transform: uppercase;
}
.qn-head .qn-hint { margin-left: auto; font-size: 12px; font-weight: 600; }

.qn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

/* 模块卡片 = 全站唯一的模块切换器（主从结构的主方） */
.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  padding: 17px 16px 14px;
  text-align: left;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.12s, box-shadow 0.12s;
}
.module-card:hover { background: var(--green-tint-2); }
.module-card.active {
  background: var(--green-tint);
  box-shadow: inset 0 0 0 2px var(--green);
}
.module-card.active .mc-icon { background: var(--green); color: #fff; }

.module-card .mc-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-s);
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--green-text);
  display: grid;
  place-items: center;
  transition: background 0.12s, color 0.12s;
}
.module-card .mc-icon svg { width: 18px; height: 18px; }
.module-card h3 { font-size: 14.5px; font-weight: 700; }
.module-card p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ════════════════ 模块上下文面板（主从结构的从方） ════════════════ */
.module-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.mc-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
}
.mc-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green-text);
  margin-bottom: 12px;
}
.mc-eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--green);
}
.mc-panel-desc {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  background: var(--paper);
  border-radius: var(--radius-s);
  padding: 13px 16px;
  border-left: 3px solid var(--green);
}

.dir-groups { display: grid; gap: 20px; margin-top: 18px; }
.dir-group h4 {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.dir-group h4::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--green);
}
.dir-group h4::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.dir-list { display: grid; gap: 1px; }
.dir-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  font-size: 13.5px;
  color: var(--ink-2);
  transition: background 0.1s;
}
.dir-item:hover { background: var(--green-tint-2); }
.dir-item .dir-date { font-family: var(--mono); font-size: 12px; color: var(--ink-3); flex-shrink: 0; }

/* 最近更新侧栏（绿色标题栏卡） */
.update-panel { position: sticky; top: 110px; padding: 0; overflow: hidden; }
.update-panel .up-head {
  background: var(--green-bar);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 9px 16px;
}
.update-list { padding: 10px 16px 14px; }
.update-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.update-item:last-child { border-bottom: none; }
.update-item .u-date { font-family: var(--mono); font-size: 12px; color: var(--green-text); flex-shrink: 0; }
.update-item .u-text { color: var(--ink-2); }

/* ─────────── 详情页顶部搜索（通栏） ─────────── */
.detail-search { margin: 22px 0 16px; }
.detail-search .search-zone { max-width: none; margin: 0; }
.detail-search .search-box { box-shadow: var(--shadow-1); }
.detail-search .search-box input { padding: 10px 12px; font-size: 14.5px; }
.detail-search .search-box .search-icon { margin: auto 2px auto 13px; width: 16px; height: 16px; }
.detail-search .search-go { width: 48px; }
.detail-search .search-go svg { width: 17px; height: 17px; }
.detail-search .search-kbd { display: none; }

/* ════════════════ 物质档案卡 ════════════════ */
.specimen {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
  animation: rise-in 0.35s ease-out both;
}

.molecule {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}
.molecule svg { width: 150px; height: 110px; }
.molecule .m-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}

.spec-id h1 {
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.spec-id h1 .alt-name { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.spec-en { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.spec-alias { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.spec-alias .al-toggle { color: var(--green-text); font-weight: 500; cursor: pointer; }
.spec-summary { font-size: 13.5px; margin-top: 10px; line-height: 1.7; }

.id-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.id-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 4px 10px;
  font-size: 12.5px;
}
.id-tag .k { color: var(--ink-3); }
.id-tag .v { font-family: var(--mono); color: var(--ink); font-size: 12.5px; }
.id-tag .copy-btn {
  color: var(--ink-3);
  display: grid;
  place-items: center;
  border-radius: var(--radius-s);
  padding: 1px;
}
.id-tag .copy-btn:hover { color: var(--green-text); }
.id-tag .copy-btn svg { width: 13px; height: 13px; }
.id-tag.copied .copy-btn { color: var(--ok); }

.spec-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
}

/* 状态点通用（状态标签使用） */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.ok { background: var(--ok); }
.dot.warn { background: #D9940B; }
.dot.danger { background: var(--danger); }
.dot.none { background: var(--none); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.5px var(--none); }

/* ════════════════ Tab 体系（绿色下划线） ════════════════ */
.dtabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--line);
  margin: 18px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
  animation: rise-in 0.4s 0.05s ease-out both;
}
.dtabs::-webkit-scrollbar { display: none; }
.dtab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 15px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 0.12s;
}
.dtab:hover { color: var(--ink); }
.dtab.active { color: var(--green-text); }
.dtab.active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -2px;
  height: 3px;
  background: var(--green);
}
.dtab .t-count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--none-tint);
  color: var(--ink-3);
  border-radius: var(--radius-s);
  padding: 1px 7px;
}
.dtab.active .t-count { background: var(--green-tint); color: var(--green-text); }

.tab-panel { animation: rise-in 0.3s ease-out both; }

/* ─────────── 筛选条 ─────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0 6px;
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-group .f-label { font-size: 12.5px; color: var(--ink-3); margin-right: 4px; }
.f-chip {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-s);
  padding: 3px 12px;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.f-chip:hover { border-color: var(--green); color: var(--green-text); }
.f-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.f-chip .chip-dot { width: 7px; height: 7px; }

.result-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px 12px;
  font-size: 13px;
  color: var(--ink-3);
}
.result-meta b { color: var(--ink); font-weight: 700; }
.result-meta .meta-actions { margin-left: auto; display: flex; gap: 8px; }

/* ─────────── 数据表 ─────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 780px;
}
table.data thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
  padding: 9px 16px;
  white-space: nowrap;
}
table.data tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background 0.1s; }
table.data tbody tr:hover { background: var(--green-tint-2); }

td .cell-main { color: var(--ink); font-weight: 600; line-height: 1.5; }
td .cell-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
td.t-mono { font-family: var(--mono); font-size: 12.5px; }
td.t-date { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }

.region-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}
.region-tag .r-code {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--green-text);
  background: var(--green-tint);
  border-radius: var(--radius-s);
  padding: 1px 6px;
}

/* 状态标签（矩形 tag） */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-s);
  padding: 2px 10px;
  white-space: nowrap;
  border: 1px solid;
}
.pill .dot { width: 6px; height: 6px; }
.pill.ok { color: var(--ok); background: var(--ok-tint); border-color: var(--ok-line); }
.pill.ok .dot { background: var(--ok); }
.pill.warn { color: var(--warn); background: var(--warn-tint); border-color: var(--warn-line); }
.pill.warn .dot { background: #D9940B; }
.pill.danger { color: var(--danger); background: var(--danger-tint); border-color: var(--danger-line); }
.pill.danger .dot { background: var(--danger); }
.pill.none { color: var(--none); background: var(--none-tint); border-color: var(--none-line); }
.pill.none .dot { background: var(--none); }

.link-btn {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-text);
  white-space: nowrap;
}
.link-btn:hover { text-decoration: underline; }

/* 表格空态 */
.empty-state {
  padding: 44px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
}
.empty-state .e-icon { font-size: 26px; margin-bottom: 8px; opacity: 0.5; }
.empty-state b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; font-weight: 700; }

/* ─────────── GHS 象形图 ─────────── */
.pict-row { display: flex; gap: 5px; flex-wrap: wrap; }
.pict {
  width: 31px;
  height: 31px;
  flex-shrink: 0;
}
.pict svg { width: 100%; height: 100%; }

.pict-lg { width: 46px; height: 46px; }

.pict-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 14px;
}
.pict-legend .pl-item { display: inline-flex; align-items: center; gap: 7px; }
.pict-legend .pict { width: 20px; height: 20px; }

/* TDG 运输信息卡 */
.tdg-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  margin-bottom: 16px;
}
.tdg-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tdg-cell .k { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.04em; margin-bottom: 5px; }
.tdg-cell .v {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tdg-cell .v.mono-v { font-family: var(--mono); font-weight: 600; font-size: 16px; }
.tdg-cell .v small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.tdg-note {
  grid-column: 1 / -1;
  padding: 11px 16px;
  background: var(--paper);
  font-size: 12.5px;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
}

/* ─────────── 提示框（左侧彩条） ─────────── */
.callout {
  display: flex;
  gap: 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-s);
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 14px 0 16px;
}
.callout svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--green-text); margin-top: 3px; }
.callout b { color: var(--ink); }

.callout.warn { border-left-color: #EDA426; }
.callout.warn svg { color: #B97E0F; }

.callout.pass { border-left-color: var(--ok); }
.callout.pass svg { color: var(--ok); }

/* ─────────── 特性库参数表 ─────────── */
.props-subtabs { display: flex; gap: 6px; padding: 16px 0 6px; flex-wrap: wrap; }

/* ─────────── 未找到视图 ─────────── */
.notfound {
  max-width: 560px;
  margin: 56px auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 46px 36px;
  box-shadow: var(--shadow-1);
  animation: rise-in 0.35s both;
}
.notfound .nf-code { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.15em; }
.notfound h2 { font-size: 20px; font-weight: 800; margin: 10px 0 8px; }
.notfound p { font-size: 13.5px; color: var(--ink-3); }
.notfound .nf-sug { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }

/* ─────────── 弹层 ─────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 40, 40, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.15s ease-out;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  border-top: 3px solid var(--green);
  box-shadow: var(--shadow-2);
  width: 100%;
  max-width: 520px;
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  animation: pop-in 0.18s ease-out;
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 13px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 16px; font-weight: 800; flex: 1; }
.modal-close {
  color: var(--ink-3);
  font-size: 20px;
  line-height: 1;
  padding: 4px 9px;
  border-radius: var(--radius-s);
}
.modal-close:hover { background: var(--none-tint); color: var(--ink); }
.modal-body { padding: 18px 20px; overflow-y: auto; font-size: 14px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.batch-textarea {
  width: 100%;
  min-height: 150px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  resize: vertical;
  outline: none;
}
.batch-textarea:focus { border-color: var(--green); }
.batch-hint { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

.batch-result { margin-top: 16px; }
.batch-result table { width: 100%; border-collapse: collapse; font-size: 13px; }
.batch-result td { padding: 8px 10px; border-bottom: 1px dashed var(--line); }

/* 名录详情弹层 */
.modal .dir-detail p { font-size: 13.5px; line-height: 1.8; }
.modal .kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; margin-top: 14px; font-size: 13px; }
.modal .kv-grid .k { color: var(--ink-3); white-space: nowrap; }
.modal .kv-grid .v { color: var(--ink); }

/* ─────────── Toast ─────────── */
#toast-root {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  border-radius: var(--radius-s);
  padding: 10px 22px;
  box-shadow: var(--shadow-2);
  animation: toast-in 0.22s ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(90vw, 480px);
}
.toast svg { width: 15px; height: 15px; color: var(--green); }
.toast.out { animation: toast-out 0.25s forwards; }

/* ─────────── 页脚 ─────────── */
.footer { border-top: 1px solid var(--line); background: var(--paper); margin-top: 20px; }
.footer-inner {
  max-width: var(--w-main);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.footer-logo { font-size: 17px; font-weight: 800; color: var(--ink); }
.footer-logo em { font-style: normal; color: var(--green); }
.footer-note { font-size: 12.5px; color: var(--ink-3); }
.footer-links { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }

/* ─────────── 加载骨架 ─────────── */
.skeleton-page { padding: 40px 0; display: grid; gap: 16px; }
.skel {
  background: linear-gradient(90deg, var(--line) 25%, var(--paper) 45%, var(--line) 65%);
  background-size: 240% 100%;
  animation: shimmer 1.2s infinite linear;
  border-radius: var(--radius-s);
}
.skel.s1 { height: 120px; }
.skel.s2 { height: 60px; }
.skel.s3 { height: 320px; }

/* ─────────── 动画 ─────────── */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px); }
}
@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

/* ─────────── 响应式 ─────────── */
@media (max-width: 960px) {
  .module-context { grid-template-columns: 1fr; }
  .update-panel { position: static; }
  .specimen { grid-template-columns: 150px minmax(0, 1fr); }
  .spec-actions { grid-column: 1 / -1; flex-direction: row; }
  .brand-sub { display: none; }
}

@media (max-width: 720px) {
  .brandbar-inner { padding: 0 14px; min-height: 54px; gap: 14px; }
  .navbar-inner { padding: 0 14px; }
  .page { padding: 0 14px 56px; }
  .hero { padding: 34px 0 30px; }
  .specimen { grid-template-columns: 1fr; }
  .molecule svg { width: 170px; height: 120px; }
  .brand-name { font-size: 19px; }
  .topbar-actions .btn span { display: none; }
  .search-kbd { display: none; }
  .search-go { width: 46px; }
  .detail-search { margin: 16px 0 12px; }
  .db-block { margin-top: 18px; }
}

/* ─────────── 动效偏好 ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
