:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --ink: #15202f;
  --ink-2: #3d4a5c;
  --muted: #6d7889;
  --line: #e2e7ee;
  --line-2: #eef1f5;
  --brand: #1b4d89;
  --brand-2: #2f6db3;
  --brand-soft: #eaf1f9;
  --accent: #b4621a;
  --accent-soft: #fdf3e7;
  --nav-ink: #0b5b53;
  --nav-soft: #e8f4f2;
  --nav-line: #cfe6e2;
  --ok: #0f766e;
  --warn: #b45309;
  --danger: #b3261e;
  --shadow: 0 1px 2px rgba(21, 32, 47, .05), 0 4px 16px rgba(21, 32, 47, .05);
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------ 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

/* 顶栏导航：青色分段控件，与全站蓝色元素区分开，左上角一眼能看见 */
.nav {
  display: flex;
  gap: 3px;
  margin-left: 0;
  padding: 3px;
  border-radius: 10px;
  background: var(--nav-soft);
  border: 1px solid var(--nav-line);
}

.nav a {
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--nav-ink);
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav a:hover { background: #fff; color: var(--nav-ink); box-shadow: 0 1px 3px rgba(15, 118, 110, .16); }
.nav a.active {
  background: linear-gradient(180deg, #14988c, #0f766e);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 7px rgba(15, 118, 110, .3);
}
/* 外链导航项（配件BOM明细直接跳金山文档），右上角一个小箭头提示会开新标签 */
.nav a.nav-ext .nav-ext-ico {
  margin-left: 3px;
  font-size: 10px;
  font-style: normal;
  vertical-align: 1.5px;
  opacity: .65;
}
.nav a.nav-ext:hover .nav-ext-ico { opacity: 1; }

.topbar-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: flex;
  gap: 14px;
  align-items: center;
}
.topbar-meta b { color: var(--ink); font-weight: 650; }

/* ------------------------------------------------ 布局 */
.view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 28px 60px;
  min-height: calc(100vh - 160px);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 16px 28px;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .2px;
}
.footer .dot { margin: 0 8px; }
.footer .foot-brand em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  color: #7b8798;
  background: #f1f4f8;
  border: 1px solid #e3e9f1;
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 3px;
  vertical-align: 1px;
}

/* ------------------------------------------------ 搜索页 */
.hero { padding: 54px 0 26px; text-align: center; }

/* 主页只剩一个搜索框，让它落在视口中线上，避免下方留一大片空白 */
.hero-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 240px);
  padding: 24px 0 40px;
}
.hero-home .search-wrap { width: 100%; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 680;
  letter-spacing: -.6px;
}
.hero p { margin: 0 0 30px; color: var(--muted); font-size: 14.5px; }

.search-wrap {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 8px 0 18px;
  height: 58px;
  box-shadow: var(--shadow);
  transition: border-color .18s, box-shadow .18s;
}
.search-box:focus-within {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(47, 109, 179, .1), var(--shadow);
}

.search-box svg { flex-shrink: 0; color: var(--muted); }

.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: .4px;
  min-width: 0;
}
.search-box input::placeholder {
  font-family: inherit;
  letter-spacing: 0;
  font-size: 15px;
  color: #a4adb9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--line-2); border-color: #d3dae4; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 12.5px; }
/* 返回首页：浅蓝底，与主色同族但更淡，置于档案页右上角 */
.btn-back {
  height: 31px;
  padding: 0 15px;
  background: #eaf2fd;
  border: 1px solid #c6dcf4;
  color: #1b4d89;
  font-weight: 600;
  letter-spacing: .2px;
}
.btn-back:hover { background: #dcebfb; border-color: #a9c9ec; color: #143f6f; }

/* 建议下拉 */
.suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(21, 32, 47, .13);
  overflow: hidden;
  z-index: 30;
  display: none;
  text-align: left;
}
.suggest.open { display: block; }

.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--line-2);
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.sel { background: var(--brand-soft); }

.suggest-no {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 650;
  color: var(--brand);
  min-width: 48px;
}
.suggest-main { flex: 1; font-size: 13px; color: var(--ink-2); }
.suggest-sub { font-size: 11.5px; color: var(--muted); }

.hint-row {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  align-items: center;
}
.chip {
  padding: 5px 11px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--card);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--brand-2); color: var(--brand); background: var(--brand-soft); }

/* ------------------------------------------------ 通用卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 640;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-body { padding: 20px; }

/* ------------------------------------------------ 详情页 */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
}
.crumb a:hover { color: var(--brand); }
.crumb span { color: #c3cad4; }

/* 档案页顶部条：左侧面包屑，右侧「返回首页」 */
.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.masthead {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #fbfcfe 0%, #f4f7fb 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}
.masthead-main { flex: 1; min-width: 0; }

.masthead-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.serial-big {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.1;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.serial-big .hash { color: #b9c3d0; font-weight: 400; }

.masthead-sub {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.masthead-sub b { color: var(--ink-2); font-weight: 600; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-model { background: #e8effa; color: #1e4e8c; border-color: #d3e0f2; }
/* 超级管理员：金棕底，跟管理员（蓝）、仓管（青）区分开 */
.badge-super { background: #fdf1dd; color: #8a5a00; border-color: #f0dfc0; }
.badge-ok { background: #e6f4f1; color: var(--ok); border-color: #cbe7e1; }
.badge-warn { background: var(--accent-soft); color: var(--warn); border-color: #f5e0c8; }
.badge-mute { background: var(--line-2); color: var(--muted); border-color: var(--line); }

/* 信息网格 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 16px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.info-cell {
  background: var(--card);
  padding: 14px 18px;
  min-height: 72px;
}
.info-cell.wide { grid-column: span 2; }
.info-cell.full { grid-column: 1 / -1; }
.info-label {
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.info-value {
  font-size: 14.5px;
  font-weight: 560;
  color: var(--ink);
  word-break: break-word;
  line-height: 1.45;
}
.info-value.mono { font-family: var(--mono); font-size: 13.5px; letter-spacing: .2px; }
.info-value.dim { color: #a8b1be; font-weight: 400; }

/* 配置标签组 */
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f6f8fb;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
}
.tag b { font-weight: 620; color: var(--ink); }
.tag.hl { background: var(--brand-soft); border-color: #d3e2f4; color: var(--brand); }

/* 时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1.5px;
  background: linear-gradient(180deg, var(--line) 0%, var(--line) 100%);
}
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -26px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0;
}
.tl-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c3ccd8;
}
.tl-item.core .tl-dot { border-color: #cfe0d8; }
.tl-item.core .tl-dot::after { background: #4b8b76; }
.tl-item.final .tl-dot { border-color: #cfdcf0; }
.tl-item.final .tl-dot::after { background: #4878bd; }
.tl-item.pack .tl-dot { border-color: #f0dcc3; }
.tl-item.pack .tl-dot::after { background: var(--accent); }
.tl-item.issue .tl-dot { border-color: #f2cdc9; }
.tl-item.issue .tl-dot::after { background: var(--danger); }

.tl-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.tl-date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tl-title { font-size: 13.5px; font-weight: 620; color: var(--ink); }
.tl-who { font-size: 12px; color: var(--muted); }
.tl-body {
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fafbfd;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 9px 12px;
  margin-top: 7px;
  line-height: 1.6;
  word-break: break-word;
}
.tl-body .k { color: var(--muted); }
.tl-body .sep { color: #d5dce5; margin: 0 7px; }
.tl-body.warn { background: #fdf6ee; border-color: #f3e3cf; }

/* 原始数据折叠 */
details.fold { border-top: 1px solid var(--line); }
details.fold summary {
  padding: 13px 20px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 11px;
  transition: transform .15s;
}
details.fold[open] summary::before { transform: rotate(90deg); }
details.fold summary:hover { background: #fafbfd; }
.fold-body { padding: 0 20px 18px; }

/* 数据表 */
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
table.data th {
  text-align: left;
  padding: 9px 12px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .3px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.data td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
  color: var(--ink-2);
}
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fafbfd; }
table.data td.mono { font-family: var(--mono); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ 电路板与程序版本 */
.plat-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  background: #e8effa;
  color: #1e4e8c;
  border: 1px solid #d3e0f2;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
}

.hw-soft {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 11px 14px;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #f7fafd, #edf3fb);
  border: 1px solid #e0e9f4;
  border-radius: 8px;
}
.hw-soft-k { font-size: 11.5px; color: var(--muted); letter-spacing: .3px; flex-shrink: 0; }
.hw-soft-v {
  font-size: 15.5px;
  font-weight: 700;
  color: #14406f;
  letter-spacing: .2px;
  word-break: break-word;
  line-height: 1.45;
}
.hw-soft-meta { font-size: 11.5px; color: var(--muted); margin-left: auto; flex-shrink: 0; }

table.hw-table { min-width: 660px; }
table.hw-table td { vertical-align: middle; }
.bd-name { font-weight: 620; color: var(--ink); white-space: nowrap; }
.bd-alias {
  display: inline-block;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 3px;
  background: #eaf1f9;
  border: 1px solid #d3e0ee;
  font-size: 10px;
  font-weight: 700;
  color: #4a6d94;
  letter-spacing: .4px;
  vertical-align: 1px;
}
.hw-ver {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: #eef3f8;
  border: 1px solid #dbe5ef;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #23405f;
  letter-spacing: .3px;
}
td.dim2 { color: #93a0b0; font-size: 11.5px; }
.bd-prog { min-width: 210px; }
.tl-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.tl-chips .prog-chip { font-size: 11px; }

.prog-chip {
  display: inline-flex;
  align-items: stretch;
  margin: 2px 6px 2px 0;
  border: 1px solid #dbe4ee;
  border-radius: 5px;
  overflow: hidden;
  font-size: 11.5px;
  white-space: nowrap;
  vertical-align: middle;
}
.prog-chip i {
  font-style: normal;
  padding: 2px 6px;
  background: #f4f7fa;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
}
.prog-chip b {
  padding: 2px 7px;
  font-family: var(--mono);
  font-weight: 650;
  color: #1b3f66;
  background: #fff;
}

/* 整机程序（液路时序 / 数据库 …）：逐条「名称：版本」，数值列自动对齐 */
.hw-sys-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .4px;
}
.hw-sys-note { font-size: 11px; color: #a9b6c4; }
.hw-sys {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 10px;
  row-gap: 0;
  margin-top: 7px;
  padding: 8px 14px;
  background: #fbfcfe;
  border: 1px solid #e6edf5;
  border-radius: 8px;
}
.hw-sys-row { display: contents; }
.hw-sys-k {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  padding: 5px 0;
}
.hw-sys-k::after { content: "："; }
.hw-sys-v {
  padding: 5px 0;
  font-size: 14px;
  font-weight: 700;
  color: #14406f;
  letter-spacing: .3px;
  line-height: 1.45;
  word-break: break-all;
}
.hw-sys-row + .hw-sys-row .hw-sys-k,
.hw-sys-row + .hw-sys-row .hw-sys-v { border-top: 1px solid #eef3f9; }
.hw-sys-row.secondary .hw-sys-v { font-weight: 550; font-size: 12.5px; color: #6a7a8c; }

.hw-empty {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* 配件版本：发配件话术（三种固定文本，按驱动板硬件版本 + ARM 版本三选一） */
/* 整卡浅红，和上面白色的「电路板与程序版本」区分开，一眼能定位 */
.card.card-parts {
  background: #fbe7e3;
  border-color: #e9a9a1;
  box-shadow: 0 1px 3px rgba(150, 45, 35, 0.09), 0 0 0 3px rgba(200, 75, 60, 0.07);
}
.card.card-parts > .card-head { border-bottom-color: #f1c4bd; }
.card.card-parts .parts-text {
  background: #fff;
  border-color: #efc9c3;
}
.card.card-parts .parts-badge {
  background: #f8cdc6;
  border-color: #e5a29a;
  color: #8f2b22;
}
.parts-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.parts-badge {
  padding: 2px 9px;
  border-radius: 5px;
  background: var(--brand-soft);
  border: 1px solid #cfdff2;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 640;
}
.parts-basis { font-size: 11.5px; color: var(--muted); }
.parts-warn {
  padding: 2px 8px;
  border-radius: 5px;
  background: #fdf4e3;
  border: 1px solid #f0dcb4;
  color: #8a5c15;
  font-size: 11px;
  font-weight: 620;
}
.parts-text {
  margin: 0;
  padding: 14px 16px;
  background: #f7fafd;
  border: 1px solid #e3ecf6;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
}
#copyParts.copied {
  color: var(--ok);
  border-color: #b7ddd8;
  background: #eef8f6;
}

/* 统计页：电路板型号/版本分布 */
.bvm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px 30px;
}
.bvm-block { min-width: 0; }
.bvm-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
  margin-bottom: 7px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 640;
  color: var(--ink);
}
.bvm-total { font-size: 11px; font-weight: 400; color: var(--muted); }
.bvm-row {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) 54px 60px 32px;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
}
/* 程序版本分布：只有版本号，不需要硬件版本那一列 */
.pvg-row {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) 1fr 34px;
  align-items: center;
  gap: 9px;
  padding: 3px 0;
}
.pvg-val {
  font-size: 11.5px;
  font-weight: 640;
  color: #23405f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bvm-model {
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bvm-row .hw-ver { font-size: 10.5px; padding: 0 5px; text-align: center; }
.bvm-bar {
  display: block;
  height: 7px;
  background: #f1f4f8;
  border-radius: 2px;
  overflow: hidden;
}
.bvm-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #35679f, #4d86c4);
}
.bvm-cnt {
  text-align: right;
  font-size: 11.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.bvm-more { font-size: 11px; color: var(--muted); margin-top: 5px; }

.raw-text {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--ink-2);
  background: #f8fafc;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 11px 13px;
  word-break: break-all;
}

/* 列表页 */
/* 配件BOM明细：按原表的行列还原，像在线表格 */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #fcfdfe;
}
.filter-bar input[type="text"], .filter-bar select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  font-size: 12.5px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
}
.filter-bar input[type="text"] { width: 190px; font-family: var(--mono); }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--brand-2); }
.filter-bar label { font-size: 12px; color: var(--muted); }
.filter-spacer { flex: 1; }
/* 筛选/重置绑在一起，宽度不够时整组换行，不会拆成两行 */
.filter-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.filter-bar select { max-width: 190px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.pager-btns { display: flex; gap: 6px; align-items: center; }
.pager-btns button {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 13px;
}
.pager-btns button:hover:not(:disabled) { border-color: var(--brand-2); color: var(--brand); }
.pager-btns button:disabled { opacity: .4; cursor: default; }
.pager-btns .pg {
  min-width: 32px;
  padding: 0 8px;
  font-variant-numeric: tabular-nums;
}

/* 统计页 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-value {
  font-size: 28px;
  font-weight: 680;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.chart-box { padding: 18px 20px 12px; }

/* 长列表小窗：固定高度 + 内部滚轮，滚到底也不会把整页带着滚 */
.list-scroll {
  max-height: 372px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 9px;
  scrollbar-width: thin;
  scrollbar-color: #c8d3e0 transparent;
}
.list-scroll::-webkit-scrollbar { width: 7px; }
.list-scroll::-webkit-scrollbar-track { background: transparent; }
.list-scroll::-webkit-scrollbar-thumb { background: #ccd6e2; border-radius: 4px; }
.list-scroll::-webkit-scrollbar-thumb:hover { background: #aebdcd; }
/* 双列表卡片（配置分布）跨两列并排 */
.card-span2 { grid-column: 1 / -1; }
.dual-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 34px;
}

.bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 52px;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12.5px;
}
.bar-row.ranked { grid-template-columns: 22px 84px 1fr 50px; }
.bar-rank {
  font-size: 11px;
  color: #98a5b6;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bar-name {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track { height: 16px; background: #f1f4f8; border-radius: 3px; overflow: hidden; display: block; }
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #35679f, #4d86c4);
  transition: width .5s cubic-bezier(.2, .8, .3, 1);
}
.bar-fill.alt { background: linear-gradient(90deg, #b4621a, #d18b45); }
.bar-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-weight: 600;
}

/* 空态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--line-2);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #b7c0cd;
}
.empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink-2); font-weight: 600; }
.empty p { margin: 0; font-size: 13px; }
/* 空态里的「另一张表还有 N 行」 */
.empty-alt { display: flex; align-items: center; justify-content: center; gap: 2px 6px; flex-wrap: wrap; }
.empty-alt .link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.empty-alt .link-btn:hover { color: #0b4a8f; }

.loading {
  text-align: center;
  padding: 50px;
  color: var(--muted);
  font-size: 13px;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all .22s;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .dual-list { grid-template-columns: 1fr; gap: 16px 0; }
  .list-scroll { max-height: 320px; }
  /* 窄屏不再隐藏导航，改成可横向滑动的青色胶囊条，否则平板/手机上没法切页面 */
  .nav {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: 0 0 auto; }
  .topbar { gap: 10px; }
  .hero { padding: 30px 0 20px; }
  .hero-home { min-height: auto; padding: 14px 0 10px; justify-content: flex-start; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 13px; margin-bottom: 22px; }
  .search-box { height: 52px; padding-left: 14px; }
  .search-box input { font-size: 15px; }
  .view { padding: 20px 16px 50px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-meta span + span { display: none; }
  .serial-big { font-size: 30px; }
  .info-cell.wide { grid-column: span 2; }
  .masthead { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .masthead-sub { display: block; line-height: 2; }
  .masthead-sub > * { display: inline-block; margin-right: 10px; }
  .masthead-actions { width: 100%; }
  .masthead-actions .btn { flex: 1; min-width: 0; }
  /* 窄屏优先保住"程序版本"列，板卡日期价值最低先隐藏 */
  table.hw-table { min-width: 540px; }
  table.hw-table th:nth-child(4), table.hw-table td:nth-child(4) { display: none; }
  .hw-soft-meta { margin-left: 0; }
  .filter-bar input[type="text"] { width: 100%; }
  .card-head { padding: 13px 16px; }
  .card-body { padding: 16px; }
  .timeline { padding-left: 22px; }
  .tl-dot { left: -22px; }
  .footer { padding: 14px 16px; }
}

/* 更窄的手机上，卡片头只留平台徽标，避免标题被挤成两行 */
@media (max-width: 640px) {
  .hw-badge-sec { display: none; }
  .detail-top { margin-bottom: 10px; }
}

/* ------------------------------------------------ 账户 / 登录 */
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar-right .topbar-meta { margin-left: 0; }

.topbar-user:empty { display: none; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.user-avatar {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px; font-weight: 700;
}
.user-name {
  font-size: 12.5px; color: var(--ink-2); max-width: 92px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-role {
  font-size: 10.5px; font-weight: 650; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 1px 7px;
}
.user-out {
  height: 24px; padding: 0 10px; margin-right: 2px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: 12px; cursor: pointer;
  transition: background .15s, color .15s;
}
.user-out:hover { background: #fdecea; color: var(--danger); }

.auth-wrap {
  min-height: calc(100vh - 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0 40px;
}
.auth-card {
  width: 100%;
  max-width: 398px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 26px 26px 22px;
}
.auth-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-mark {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--brand), #3a76b8);
  color: #fff; font-size: 17px; font-weight: 700;
}
.auth-head h1 { margin: 0; font-size: 17px; letter-spacing: .2px; }
.auth-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--line-2);
  border-radius: 9px;
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  height: 32px;
  border: 0; border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit; font-size: 13px; font-weight: 550;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-tab.active {
  background: #fff; color: var(--brand); font-weight: 650;
  box-shadow: 0 1px 2px rgba(21, 32, 47, .08);
}
.auth-tab:disabled { color: #b9c1cc; cursor: not-allowed; }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field > span { font-size: 12px; color: var(--muted); }
.auth-field > span i { font-style: normal; color: #aab3bf; }
.auth-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-input:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(47, 109, 179, .12);
  background: #fff;
}
.auth-input::placeholder { color: #aab3bf; }

.auth-code-row { display: flex; gap: 8px; }
.auth-send {
  flex: none;
  height: 40px;
  padding: 0 13px;
  border: 1px solid #c6dcf4;
  border-radius: 8px;
  background: #eaf2fd;
  color: #1b4d89;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.auth-send:hover:not(:disabled) { background: #dcebfb; }
.auth-send:disabled {
  color: #93a4b8; background: #f3f6fa; border-color: var(--line);
  cursor: not-allowed;
}

.auth-switch { display: flex; gap: 16px; margin: 0 0 2px; padding-left: 1px; }
.auth-switch button {
  border: 0; background: none; padding: 0;
  font-family: inherit; font-size: 12px; color: var(--muted);
  cursor: pointer; border-bottom: 1px dashed transparent;
}
.auth-switch button.active {
  color: var(--brand); font-weight: 650; border-bottom-color: var(--brand);
}

.auth-msg { min-height: 17px; font-size: 12.5px; line-height: 1.4; }
.auth-msg.err { color: var(--danger); }
.auth-msg.ok { color: var(--ok); }

.auth-submit {
  height: 42px;
  border: 0; border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: 1px;
  cursor: pointer;
  transition: background .15s;
}
.auth-submit:hover:not(:disabled) { background: #17437a; }
.auth-submit:disabled { background: #8fa9c6; cursor: not-allowed; }

.auth-foot {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: #98a2b0;
  text-align: center;
}

/* 未登录：顶栏没有导航可显示，整条隐藏，登录卡自己居中 */
body.auth-mode .topbar { display: none; }
body.auth-mode .auth-wrap { min-height: calc(100vh - 120px); }

@media (max-width: 640px) {
  .auth-card { padding: 22px 18px 18px; }
  .auth-wrap { min-height: auto; padding: 10px 0 30px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-right { gap: 10px; }
  .topbar-meta { display: none; }
  .user-name { max-width: 62px; }
  .auth-head h1 { font-size: 16px; }
}


/* 导航上的待审核角标 */
.nav a { position: relative; }
.nav-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 5px;
  border-radius: 9px;
  background: #c4372c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  vertical-align: 1px;
}

/* 手机/小平板：顶栏拆两行——上行账号，下行青色导航；导航压紧尽量一行放下，放不下自动换行而不是被裁掉 */
@media (max-width: 720px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    padding: 6px 12px 7px;
    gap: 5px;
  }
  .topbar-right {
    order: 1;
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
  .nav {
    order: 2;
    flex: 1 0 100%;
    width: 100%;
    flex-wrap: wrap;
    padding: 3px;
    gap: 3px;
  }
  .nav a { padding: 6px 9px; font-size: 12.5px; }
}

/* 用户审核 */
.review-note {
  margin: 0 20px 12px;
  padding: 10px 13px;
  background: #fdf6e8;
  border: 1px solid #f3e2c2;
  border-radius: 8px;
  font-size: 12.5px;
  color: #8a5a15;
}
.review-empty { padding: 26px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.user-table td { vertical-align: middle; }
.user-table tr.row-pending td { background: #fffdf6; }
.row-actions { white-space: nowrap; }
.row-actions .btn { height: 28px; padding: 0 11px; font-size: 12px; }
.row-actions .btn + .btn { margin-left: 6px; }
/* 「详情」与左侧的状态/危险操作拉开距离：删除紧邻停用，详情单独一侧 */
.row-actions .btn.act-far { margin-left: 18px; }
.btn-reject { color: #b3261e; border-color: #f0cfcb; background: #fff; }
.btn-reject:hover { background: #fdecea; border-color: #e8b4ae; }

/* 用户详情：权限下拉 / 登录 IP / 查询日志 */
.role-select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.role-select:hover:not(:disabled) { border-color: #c6dcf4; }
.role-select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 109, 179, .1); }
.role-select:disabled { color: var(--muted); background: #f6f8fb; cursor: default; }

.ip-cell { white-space: nowrap; font-size: 11.5px; }
.ip-cell .mono { color: var(--ink-2); }
.ip-more {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--line-2);
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
}
.dot-online {
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 7px;
  border-radius: 50%;
  background: #1a9c6a;
  box-shadow: 0 0 0 3px rgba(26, 156, 106, .15);
  vertical-align: 1px;
}
.user-link { color: var(--brand); font-weight: 600; }
.user-link:hover { text-decoration: underline; }

.user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  flex-wrap: wrap;
}
.user-head-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.user-avatar.big { width: 46px; height: 46px; font-size: 19px; flex: none; }
.user-head-info { min-width: 0; }
.user-head-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.user-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}
.user-head-meta b { color: var(--ink-2); font-weight: 600; }
.user-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-head-actions .btn { height: 30px; padding: 0 13px; font-size: 12.5px; }
.role-set { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

table.ip-table { min-width: 560px; }
table.ip-table td { vertical-align: middle; }
table.user-table { min-width: 860px; }
.user-table td:first-child { white-space: nowrap; }
table.log-table { min-width: 620px; }
table.log-table td { vertical-align: middle; }
table.data tr[hidden] { display: none; }

.log-filter {
  height: 30px;
  width: 210px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fcfdff;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.log-filter:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 109, 179, .1); background: #fff; }
.log-link { color: var(--brand); font-weight: 600; }
.log-link:hover { text-decoration: underline; }
.log-ok { color: var(--ok); font-weight: 600; }
.log-miss { color: var(--danger); font-weight: 600; }

/* 危险操作：删除账号 */
.btn-danger { color: #b3261e; border-color: #f0cfcb; background: #fff; }
.btn-danger:hover { background: #fdecea; border-color: #e8b4ae; color: #8f1d17; }

/* 确认弹窗 */
.dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 26, 41, .38);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: maskIn .14s ease-out;
}
.dialog {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .26);
  padding: 22px 22px 18px;
  animation: dialogIn .16s cubic-bezier(.2, .8, .3, 1);
}
.dialog h3 { margin: 0 0 10px; font-size: 15.5px; font-weight: 650; color: var(--ink); }
.dialog-text { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.dialog-warn { display: inline-block; margin-top: 7px; font-size: 12px; color: #b3261e; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog-actions .btn { height: 36px; padding: 0 18px; font-size: 13px; }
.dialog-actions .btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.dialog-actions .btn-danger:hover { background: #a93226; border-color: #a93226; color: #fff; }
.dialog-actions .btn:focus-visible { outline: 2px solid #9dc2ea; outline-offset: 2px; }
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: none } }

/* 仓管：继承管理员业务功能，但不管账号 */
.badge-staff { background: #e8f4f2; color: #0f766e; border-color: #cfe8e3; }
.user-role.staff { color: #0f766e; background: #e8f4f2; }
.user-role.super { color: #8a5a00; background: #fdf1dd; }

@media (max-width: 640px) {
  .user-head { padding: 15px 16px; }
  .user-head-actions { width: 100%; }
  .log-filter { width: 100%; }
  .card-head { flex-wrap: wrap; }
  .hide-sm { display: none; }
}

@media print {
  .topbar, .footer, .crumb, .btn { display: none; }
  .view { padding: 0; max-width: none; }
  .card, .masthead, .info-grid { box-shadow: none; break-inside: avoid; }
}
