/* ============ 物资管理系统 · 设计系统 ============ */
:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-2: #eef0f3;
  --brand: #0f766e;
  --brand-600: #0d9488;
  --brand-soft: #ecfdf5;
  --brand-line: #b7e4d8;
  --amber: #b54708;
  --amber-soft: #fffaeb;
  --red: #b42318;
  --red-soft: #fef3f2;
  --blue: #175cd3;
  --blue-soft: #eff8ff;
  --violet: #6941c6;
  --violet-soft: #f4f3ff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12), 0 4px 8px rgba(16, 24, 40, 0.04);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --sidebar-w: 226px;
  --topbar-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
a { color: var(--brand); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.ico { width: 18px; height: 18px; display: block; }

/* ============ 启动 / 登录 ============ */
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; gap: 14px;
  justify-items: center; color: var(--muted); background: var(--bg); z-index: 60;
}
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; background: var(--panel); }
.login-visual {
  position: relative; padding: 56px 60px; display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 10% 0%, #0f766e 0%, #0b4f4a 44%, #08312f 100%);
  color: #fff; overflow: hidden;
}
.login-visual::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -140px; bottom: -180px;
  border-radius: 50%; background: radial-gradient(circle, rgba(45, 212, 191, 0.28), transparent 62%);
}
.login-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: 0.02em; }
.brand-mark { width: 40px; height: 40px; }
.login-visual h1 { margin-top: auto; font-size: 40px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }
.login-sub { margin-top: 14px; max-width: 430px; color: rgba(255, 255, 255, 0.76); font-size: 15px; }
.login-points { list-style: none; padding: 0; margin: 34px 0 auto; display: grid; gap: 13px; }
.login-points li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, 0.86); font-size: 14px; }
.login-points span {
  flex: none; font-size: 11px; font-weight: 600; color: #7fe3cd; padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.login-foot { margin-top: 28px; font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.login-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: 100%; max-width: 350px; display: grid; gap: 16px; }
.login-form h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.login-form .muted { margin-top: -10px; margin-bottom: 6px; font-size: 13px; }
.login-version { text-align: center; font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.form-error {
  background: var(--red-soft); color: var(--red); border: 1px solid #fecdca;
  padding: 9px 12px; border-radius: var(--r-sm); font-size: 13px;
}

/* ============ 布局 ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--panel);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 30;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; }
.sidebar-brand .brand-mark { width: 34px; height: 34px; }
.sidebar-brand strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.sidebar-brand em { display: block; font-style: normal; font-size: 11px; color: var(--muted-2); letter-spacing: 0.06em; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px 18px; }
.nav-group { margin-top: 12px; }
.nav-group-title {
  font-size: 11px; color: var(--muted-2); letter-spacing: 0.08em;
  padding: 6px 10px; font-weight: 500;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--ink-2); font-size: 13.5px; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; transition: background 0.12s, color 0.12s;
}
.nav-item .ico { width: 17px; height: 17px; color: var(--muted); }
.nav-item:hover { background: var(--panel-2); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item.active .ico { color: var(--brand); }
.nav-badge {
  margin-left: auto; background: var(--amber-soft); color: var(--amber);
  font-size: 11px; padding: 0 6px; border-radius: 20px; font-variant-numeric: tabular-nums;
  border: 1px solid #fedf89;
}
.sidebar-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); }
.sidebar-foot .ver { font-size: 11px; color: var(--muted-2); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 26px; background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar-title h1 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.topbar-title p { font-size: 12px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line); }
.menu-btn { display: none; }

.user-chip { position: relative; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; }
.user-chip:hover { background: var(--panel-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
}
.user-meta strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.user-meta span { display: block; font-size: 11px; color: var(--muted); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 5px; min-width: 150px; z-index: 40;
}
.user-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; font-size: 13px;
  border: none; background: none; border-radius: 6px; cursor: pointer; color: var(--ink-2);
}
.user-menu button:hover { background: var(--panel-2); }
.user-menu button.danger { color: var(--red); }

.view { padding: 22px 26px 60px; max-width: 1400px; width: 100%; }

/* ============ 通用组件 ============ */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 14.5px; font-weight: 600; }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 0; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink-2);
  cursor: pointer; transition: all 0.12s; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: #d0d5dd; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #0b5f59; border-color: #0b5f59; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #912018; border-color: #912018; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--panel-2); color: var(--ink); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; height: 40px; }
.btn-link { background: none; border: none; color: var(--brand); cursor: pointer; padding: 0; font-size: 13px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }

.input, .select, textarea.input {
  width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13.5px; color: var(--ink); background: var(--panel);
  outline: none; transition: border-color 0.12s, box-shadow 0.12s; font-family: inherit;
}
textarea.input { height: auto; padding: 8px 11px; resize: vertical; min-height: 64px; line-height: 1.5; }
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.input::placeholder { color: var(--muted-2); }
.input:disabled, .input[readonly] { background: var(--panel-2); color: var(--muted); }
.input.sm, .select.sm { height: 30px; font-size: 12.5px; }

.field { display: grid; gap: 5px; }
.field > span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field .hint { font-size: 11.5px; color: var(--muted-2); }
.field .req { color: var(--red); margin-left: 2px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { position: relative; min-width: 220px; flex: 0 1 260px; }
.toolbar .search .ico {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted-2);
}
.toolbar .search .input { padding-left: 32px; }
.toolbar .spacer { margin-left: auto; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button {
  border: none; background: none; padding: 5px 11px; border-radius: 6px; font-size: 12.5px;
  color: var(--muted); cursor: pointer;
}
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 500; }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
  padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr:hover td { background: #fbfcfd; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .center { text-align: center; }
table.data .actions-cell { text-align: right; white-space: nowrap; }
table.data .actions-cell .btn-link + .btn-link { margin-left: 10px; }
table.data td .btn-link + .btn-link { margin-left: 12px; }
.cell-main { font-weight: 500; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--muted-2); }
.cell-code { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.t-empty { padding: 44px 16px; text-align: center; color: var(--muted-2); font-size: 13px; }
.t-empty .ico { width: 26px; height: 26px; margin: 0 auto 8px; color: #cfd4dc; }

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.gray { background: #f2f4f7; color: #475467; }
.badge.green { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.badge.amber { background: var(--amber-soft); color: var(--amber); border-color: #fedf89; }
.badge.red { background: var(--red-soft); color: var(--red); border-color: #fecdca; }
.badge.blue { background: var(--blue-soft); color: var(--blue); border-color: #b2ddff; }
.badge.violet { background: var(--violet-soft); color: var(--violet); border-color: #d9d6fe; }
.badge.plain::before { display: none; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.pager .info { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.pager button {
  min-width: 32px; height: 30px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--ink-2);
}
.pager button:hover:not(:disabled) { background: var(--panel-2); }
.pager button:disabled { opacity: 0.45; cursor: not-allowed; }
.pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 27px; font-weight: 600; letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.kpi .sub { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.kpi .sub b { color: var(--ink-2); font-weight: 600; }
.kpi .accent { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.kpi .accent .ico { width: 16px; height: 16px; }
.kpi .accent.green { background: var(--brand-soft); color: var(--brand); }
.kpi .accent.blue { background: var(--blue-soft); color: var(--blue); }
.kpi .accent.amber { background: var(--amber-soft); color: var(--amber); }
.kpi .accent.red { background: var(--red-soft); color: var(--red); }
.kpi .accent.violet { background: var(--violet-soft); color: var(--violet); }

.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.grid-2 > *, .stack > * { min-width: 0; }
.grid-2.even { grid-template-columns: 1fr 1fr; }
.stack { display: grid; gap: 16px; }

/* 趋势图 */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 8px 4px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; align-items: flex-end; gap: 5px; height: 100%; width: 100%; justify-content: center; }
.chart .bar { width: 12px; border-radius: 4px 4px 2px 2px; min-height: 2px; transition: height 0.3s; position: relative; }
.chart .bar.in { background: var(--brand-600); }
.chart .bar.out { background: #f9b989; }
.chart .x { font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.legend .in { background: var(--brand-600); }
.legend .out { background: #f9b989; }

/* 列表行 */
.row-list { display: grid; }
.row-list .row {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-2);
}
.row-list .row:last-child { border-bottom: none; }
.row-list .row:hover { background: #fbfcfd; }
.row-list .grow { flex: 1; min-width: 0; }
.row-list .grow strong { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-list .grow span { font-size: 11.5px; color: var(--muted-2); }
.qty { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; }
.qty.pos { color: var(--brand); }
.qty.neg { color: var(--red); }

/* 空状态 */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h4 { font-size: 15px; margin-bottom: 6px; color: var(--ink-2); }
.empty p { font-size: 13px; color: var(--muted-2); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, 0.42); z-index: 80;
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px;
  overflow-y: auto; animation: fade 0.14s ease;
}
.modal-card {
  background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; animation: pop 0.16s ease; margin: auto 0;
}
.modal-card.lg { max-width: 820px; }
.modal-card.xl { max-width: 1080px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-head .icon-btn { margin-left: auto; margin-top: -4px; }
.modal-body { padding: 6px 20px 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.99); } }

/* 明细编辑表 */
table.lines { width: 100%; border-collapse: collapse; font-size: 13px; }
table.lines th {
  font-size: 11.5px; font-weight: 500; color: var(--muted); text-align: left;
  padding: 6px 8px; border-bottom: 1px solid var(--line);
}
table.lines td { padding: 5px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.lines .input, table.lines .select { height: 32px; font-size: 12.5px; }
table.lines .del { color: var(--muted-2); cursor: pointer; border: none; background: none; padding: 4px; }
table.lines .del:hover { color: var(--red); }
.line-total { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 8px 0; font-size: 13px; color: var(--muted); }
.line-total b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* 描述列表 */
dl.desc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 0 0 16px; }
dl.desc > div { min-width: 0; }
dl.desc dt { font-size: 11.5px; color: var(--muted-2); margin-bottom: 2px; }
dl.desc dd { margin: 0; font-size: 13.5px; color: var(--ink); word-break: break-all; }

/* 提示条 */
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r);
  font-size: 12.5px; line-height: 1.6; background: var(--blue-soft);
  border: 1px solid #b2ddff; color: #194185;
}
.notice .ico { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.notice.amber { background: var(--amber-soft); border-color: #fedf89; color: #93370d; }
.notice.green { background: var(--brand-soft); border-color: var(--brand-line); color: #115e56; }

/* Toast */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: pop 0.16s ease; display: flex; gap: 8px; align-items: center;
}
.toast.ok { background: #054f4a; }
.toast.err { background: #912018; }

/* 升级条 */
.update-bar {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 12px 10px 18px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px; font-size: 13px; box-shadow: var(--shadow-lg);
}
.update-bar .icon-btn { color: rgba(255, 255, 255, 0.7); width: 28px; height: 28px; }
.update-bar .icon-btn:hover { background: rgba(255, 255, 255, 0.12); }

/* 日志 */
pre.log {
  background: #0f172a; color: #cbd5e1; border-radius: var(--r); padding: 14px 16px;
  font-family: "SFMono-Regular", ui-monospace, Consolas, monospace; font-size: 12px;
  line-height: 1.65; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 0;
}

/* 标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button {
  border: none; background: none; padding: 9px 14px; font-size: 13.5px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }

/* 响应式 */
@media (max-width: 1180px) {
  .kpi-grid, .kpi-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2.even { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  table.data { min-width: 640px; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
    transition: transform 0.2s; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .view { padding: 16px 14px 60px; }
  .topbar { padding: 0 14px; }
  .login { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  dl.desc { grid-template-columns: 1fr; }
  .user-meta { display: none; }
  .kpi .value { font-size: 23px; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .page-head h2 { font-size: 18px; }
  .toolbar .search { flex: 1 1 100%; }
}
