/* 光层工作台 · 独立管理后台
   结构优先：石墨导航、冷白工作面、无卡片指标带、8/4 运营布局。 */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f4;
  --green-900: #161b22;
  --green-800: #26303b;
  --green-700: #405064;
  --green-600: #5c6c7e;
  --green-500: #718094;
  --green-400: #a3afbd;
  --green-300: #cbd2da;
  --green-100: #e9edf1;
  --green-50: #f2f5f8;
  --gold: #176bff;
  --gold-dark: #0d55d7;
  --gold-soft: #eaf1ff;
  --ink: #171d25;
  --ink-2: #4e5c6c;
  --muted: #647184;
  --muted-2: #647184;
  --border: #e4e8ed;
  --border-strong: #d4dbe3;
  --danger: #c94343;
  --danger-soft: #fff0f0;
  --warn: #aa6a12;
  --ok: #18794e;
  --ok-soft: #eaf7f0;
  --brand: #176bff;
  --brand-soft: #eaf1ff;
  --admin-side-bg: #15191f;
  --admin-side-ink: #edf2f8;
  --admin-side-muted: #7f8a99;
  --admin-side-line: rgba(255,255,255,.09);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: none;
  --shadow-lg: 0 24px 70px rgba(24,34,48,.14);
  --ease: cubic-bezier(.22,1,.36,1);
}
html[data-admin-theme="dark"] {
  color-scheme: dark;
  --bg: #101419;
  --surface: #171c23;
  --surface-2: #1c222b;
  --surface-3: #242c36;
  --green-900: #ecf2f8;
  --green-800: #d5dee8;
  --green-700: #b5c2d1;
  --green-600: #9aaabc;
  --green-500: #8d9bad;
  --green-400: #68788b;
  --green-300: #3c4857;
  --green-100: #29323d;
  --green-50: #202731;
  --gold: #69a2ff;
  --gold-dark: #8ab8ff;
  --gold-soft: #1c3153;
  --ink: #edf2f8;
  --ink-2: #b8c4d1;
  --muted: #8997a8;
  --muted-2: #667587;
  --border: #29323d;
  --border-strong: #3a4654;
  --danger: #ff8b8b;
  --danger-soft: #3b2428;
  --warn: #e5b565;
  --ok: #65c99b;
  --ok-soft: #19352b;
  --brand: #69a2ff;
  --brand-soft: #1c3153;
  --admin-side-bg: #0c1015;
  --shadow-lg: 0 24px 70px rgba(0,0,0,.36);
}
* { scrollbar-color: var(--green-300) transparent; }
html, body { min-height: 100%; }
body.admin-body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand) !important;
  outline-offset: 3px;
}
::selection { background: #bcd5ff; color: #10294e; }

/* 登录：不是居中卡片，而是一块完整运营入口。 */
.login-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-shell {
  width: min(1120px, 100%);
  min-height: min(680px, calc(100vh - 60px));
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(20,30,44,.10);
}
.login-visual {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #151a21;
  color: #f3f7fb;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .5;
  background: radial-gradient(circle at 76% 30%, rgba(119,169,255,.22), transparent 58%);
  pointer-events: none;
}
.login-visual-top, .login-visual-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 3; }
.login-visual-top { justify-content: flex-start; font-size: 11px; letter-spacing: .16em; color: #aeb9c7; }
.login-brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; font: 700 18px Georgia,serif; color: #fff; }
.login-optical-stage { position: absolute; width: 440px; height: 380px; right: -38px; top: 82px; perspective: 900px; z-index: 1; pointer-events: none; }
.login-plane { position: absolute; width: 280px; height: 176px; right: 70px; top: 82px; border: 1px solid rgba(255,255,255,.22); background: rgba(126,158,201,.09); backdrop-filter: blur(12px); transform: rotateX(58deg) rotateZ(-28deg); box-shadow: 0 30px 70px rgba(0,0,0,.20); }
.login-plane::before { content: ""; position: absolute; left: 20px; right: 20px; top: 24px; height: 5px; background: #77a9ff; box-shadow: 0 22px 0 rgba(255,255,255,.16), 0 44px 0 rgba(255,255,255,.10); }
.login-plane.plane-b { transform: translate(-42px,60px) rotateX(58deg) rotateZ(-28deg); opacity: .62; }
.login-plane.plane-c { transform: translate(-84px,120px) rotateX(58deg) rotateZ(-28deg); opacity: .30; }
.login-axis { position: absolute; background: rgba(119,169,255,.55); }
.axis-x { width: 330px; height: 1px; right: 30px; top: 250px; transform: rotate(-28deg); }
.axis-y { width: 1px; height: 300px; right: 210px; top: 20px; transform: rotate(28deg); }
.login-visual-copy { margin-top: auto; position: relative; z-index: 3; padding-top: 260px; }
.login-kicker { margin: 0 0 16px; color: #85b2ff; font-size: 11px; letter-spacing: .16em; }
.login-visual-copy h1 { margin: 0; max-width: 480px; font-size: clamp(34px,4vw,52px); line-height: 1.18; letter-spacing: -.045em; font-weight: 650; text-wrap: balance; }
.login-visual-copy > p:last-child { max-width: 360px; margin: 20px 0 0; color: #aab6c5; font-size: 14px; line-height: 1.8; }
.login-visual-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #7f8b9b; font-size: 11px; }
.login-card {
  width: auto;
  max-width: none;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-radius: 0;
  padding: clamp(38px,5vw,72px);
  background: var(--surface);
  box-shadow: none;
}
.login-form-head { margin-bottom: 34px; }
.login-section-index { color: var(--brand); font: 600 11px ui-monospace,monospace; letter-spacing: .10em; }
.login-card h2 { margin: 12px 0 8px; text-align: left; font-size: 32px; letter-spacing: -.035em; }
.login-card .login-sub { margin: 0; text-align: left; color: var(--muted); line-height: 1.7; }
.login-card .field { margin-bottom: 18px; }
.login-card .field label { margin-bottom: 8px; color: var(--ink-2); font-size: 12px; }
.login-card .input { height: 48px; border-radius: 10px; background: var(--surface-2); }
.login-submit { min-height: 48px; margin-top: 8px; justify-content: space-between; padding-inline: 18px; }
.login-help { margin: 22px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; word-break: break-all; }
.login-theme-btn { position: absolute; top: 22px; right: 22px; }

/* 主骨架 */
#adminApp { display: flex; min-height: 100vh; background: var(--bg); }
.admin-side {
  width: 240px;
  height: 100vh;
  flex: 0 0 240px;
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--admin-side-ink);
  background: var(--admin-side-bg);
  border-right: 1px solid var(--admin-side-line);
}
.admin-logo { min-height: 52px; padding: 0 8px 22px; gap: 12px; border-bottom: 1px solid var(--admin-side-line); }
.admin-logo .logo { width: 38px; height: 38px; padding: 5px; background-color: rgba(255,255,255,.96) !important; border-radius: 50%; }
.admin-logo-copy { display: flex; flex-direction: column; line-height: 1.15; }
.admin-logo-copy b { color: #f2f6fb; font-size: 16px; letter-spacing: .08em; }
.admin-logo-copy small { margin-top: 5px; color: var(--admin-side-muted); font-size: 10px; font-weight: 500; letter-spacing: .12em; }
.admin-nav-close { display: none; margin-left: auto; width: 34px; height: 34px; border: 1px solid var(--admin-side-line); border-radius: 8px; background: transparent; color: #fff; font-size: 22px; }
#adminNav { padding: 14px 0 20px; }
.nav-group + .nav-group { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--admin-side-line); }
.nav-label { padding: 0 12px 7px; color: var(--admin-side-muted); font-size: 10px; font-weight: 600; letter-spacing: .10em; }
.adm-nav {
  position: relative;
  width: 100%;
  min-height: 39px;
  margin: 2px 0;
  padding: 9px 12px;
  gap: 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aab5c3;
  font-size: 13px;
  font-weight: 500;
  transition: color .18s, background .18s, transform .18s var(--ease);
}
.adm-nav svg { width: 16px; height: 16px; opacity: .82; }
.adm-nav:hover { color: #fff; background: rgba(255,255,255,.065); transform: translateX(2px); }
.adm-nav.active { color: #fff; background: #176bff; font-weight: 600; box-shadow: 0 8px 24px rgba(23,107,255,.20); }
.adm-nav.active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 2px; background: #83b3ff; }
.adm-nav.active svg { opacity: 1; }
.admin-side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--admin-side-line); }
.admin-side .admin-side-foot .btn { color: #a9b5c3; background: transparent; border-color: var(--admin-side-line); }
.admin-side .admin-side-foot .btn:hover { color: #fff; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.20); }
.admin-main { flex: 1; min-width: 0; }
.admin-head {
  height: 72px;
  padding: 0 clamp(20px,2.6vw,42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(130%);
}
.admin-head-title, .admin-head-right, .admin-head-actions { display: flex; align-items: center; gap: 14px; }
.admin-head-title > div { display: flex; align-items: baseline; gap: 12px; }
.admin-head-overline { color: var(--muted); font: 600 9px ui-monospace,monospace; letter-spacing: .15em; }
.tab-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.admin-head-right { margin-left: auto; }
#adminWho { font-size: 12px; white-space: nowrap; }
.admin-head-actions { gap: 10px; }
.admin-theme-btn { width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--ink-2); font-size: 17px; transition: transform .25s var(--ease), border-color .2s, color .2s; }
.admin-theme-btn:hover { color: var(--brand); border-color: var(--brand); transform: rotate(18deg); }
.admin-menu-btn { display: none; width: 38px; height: 38px; padding: 9px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); }
.admin-menu-btn span { display: block; height: 1px; margin: 4px 0; background: var(--ink); }
.admin-nav-scrim { display: none; }
.admin-content { width: 100%; max-width: 1600px; padding: clamp(24px,3vw,44px); }

/* 概览：无卡片指标带 + 8/4 工作面 */
.dashboard-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.dashboard-kicker { margin: 0 0 8px; color: var(--brand); font-size: 11px; letter-spacing: .10em; }
.dashboard-intro h1 { margin: 0; font-size: clamp(34px,4vw,52px); line-height: 1.05; letter-spacing: -.05em; font-weight: 650; }
.dashboard-intro > div > p:last-child { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-mode { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.dashboard-mode i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.dashboard-mode.is-demo i { background: var(--warn); box-shadow: 0 0 0 4px var(--gold-soft); }
.stat-grid, .adm-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0;
  margin: 0 0 34px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
.stat-card, .kpi {
  min-width: 0;
  min-height: 116px;
  padding: 20px 22px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}
.stat-card:nth-child(4n), .kpi:nth-child(4n) { border-right: 0; }
.stat-card:nth-last-child(-n+4), .kpi:nth-last-child(-n+4) { border-bottom: 0; }
.stat-label, .kpi-label { color: var(--muted); font-size: 11px; }
.stat-value, .kpi-value { margin: 9px 0 5px; color: var(--ink); font-size: clamp(24px,2.3vw,34px); line-height: 1; font-weight: 620; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat-sub, .kpi-sub { color: var(--muted); font-size: 10.5px; white-space: normal; line-height: 1.45; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(260px,1fr); gap: 24px; align-items: start; }
.dashboard-primary, .dashboard-status-card { min-height: 330px; }
.cardx-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cardx-head h2 { margin: 6px 0 0; font-size: 19px; letter-spacing: -.025em; }
.section-index { color: var(--brand); font: 600 9px ui-monospace,monospace; letter-spacing: .10em; }
.dashboard-aside { display: grid; gap: 18px; }
.status-ledger { margin: 8px 0 0; }
.status-ledger > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.status-ledger > div:last-child { border-bottom: 0; }
.status-ledger dt { color: var(--muted); font-size: 12px; }
.status-ledger dd { margin: 0; text-align: right; color: var(--ink); font-size: 12px; font-weight: 600; }
.dashboard-note { padding: 4px 4px 0; color: var(--muted); }
.dashboard-note span { color: var(--ink-2); font-size: 11px; font-weight: 600; }
.dashboard-note p { margin: 8px 0 0; font-size: 12px; line-height: 1.8; }
.dashboard-empty { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.dashboard-empty b { color: var(--ink-2); font-size: 13px; }
.dashboard-empty p { margin: 7px 0 0; font-size: 12px; }
.empty-line { width: 90px; height: 48px; margin-bottom: 20px; border-left: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); position: relative; }
.empty-line::after { content: ""; position: absolute; left: 12px; right: 8px; bottom: 12px; height: 1px; background: var(--brand); transform: rotate(-18deg); transform-origin: left; }
.admin-loading { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }

/* 全后台共享组件： quieter containers, precise controls */
.adm-page-head { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.adm-page-head h2 { font-size: 25px; letter-spacing: -.03em; }
.adm-page-head p { color: var(--muted); font-size: 12.5px; }
.cardx, .models-table-wrap, .facet-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: none;
}
.cardx { padding: 22px; }
.cardx + .cardx { margin-top: 18px; }
.cardx-head { margin-bottom: 16px; }
.cardx-head > b { font-size: 14px; }
/* Skill 管理：窄屏下用卡片，避免多列表格被压成竖条 */
.skill-manage-summary { margin: 0 0 12px; }
.skill-manage-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(270px,1fr)); gap: 14px; }
.skill-manage-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.skill-manage-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.skill-manage-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; min-width: 0; }
.skill-manage-title b { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.skill-manage-id { color: var(--brand); font: 600 10px ui-monospace,monospace; letter-spacing: .02em; }
.skill-manage-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 11.5px; line-height: 1.6; overflow-wrap: anywhere; }
.skill-manage-desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.4em; margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.7; }
.skill-manage-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.skill-manage-foot > span { font-size: 11px; }
.btn { min-height: 36px; padding: 8px 14px; border-radius: 8px; font-size: 12.5px; transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary, .btn-gold { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover, .btn-gold:hover { background: #0d59db; border-color: #0d59db; color: #fff; }
html[data-admin-theme="dark"] .btn-primary, html[data-admin-theme="dark"] .btn-gold { color: #0e2548; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--green-400); color: var(--ink); }
.btn-sm { min-height: 31px; padding: 5px 11px; }
.input, textarea.input, select.input {
  border-color: var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand) 13%,transparent); }
.input::placeholder { color: var(--muted-2); }
.seg { gap: 0; padding-bottom: 0; border-bottom: 1px solid var(--border); }
.seg-btn { position: relative; padding: 9px 14px; border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.seg-btn.on { background: transparent; color: var(--ink); }
.seg-btn.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--brand); }
.tag, .badge, .status { border-radius: 5px; }
.tag-blue { color: var(--brand); background: var(--brand-soft); }
.tag-green, .status.succeeded, .status.done, .status.launched, .status.active { color: var(--ok); background: var(--ok-soft); }
.tag-red, .status.failed, .status.banned, .status.canceled, .status.disabled, .status.revoked { color: var(--danger); background: var(--danger-soft); }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb,var(--ok) 20%,transparent); }
.toolbar { margin-bottom: 14px; }
.searchbox .input, .toolbar .input { height: 38px; }
.fchip, .chip { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.facet-item.on { background: var(--brand-soft); color: var(--brand); }
.switch.on { background: var(--brand); border-color: var(--brand); }
.pager-btn.on { background: var(--brand); color: #fff; }
.link-btn, .price-chip:hover, .model-name:hover, .url-btn:hover { color: var(--brand); }

/* 数据表保持业务密度，不做巨型卡片。 */
.dt-wrap { border-radius: 8px; }
.dt, .dt2 { font-variant-numeric: tabular-nums; }
.dt th, .dt2 thead th { color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 600; }
.dt td, .dt2 tbody td { border-color: var(--border); }
.dt tbody tr, .dt2 tbody tr { transition: background .15s; }
.dt tbody tr:hover, .dt2 tbody tr:hover { background: var(--surface-2); }
.dt2 tbody tr.is-selected, .dt2 tbody tr.is-selected:hover { background: var(--brand-soft); }
.dt2 .sort-ico.on { color: var(--brand); }
.models-layout { grid-template-columns: 210px minmax(0,1fr); gap: 18px; }
.facet-panel { top: 92px; }
.facet-title { color: var(--muted); }
.models-table-wrap { max-height: calc(100vh - 330px); }
.channel-card { padding: 6px 10px; }
.ratebar i, .vms-bar i { background: var(--brand); }
.health-dot.ok { background: var(--ok); }
.health-dot.bad { background: var(--danger); }
.disc-ch.on, .proto-card.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.proto-card { background: var(--surface); }
.seg2 { background: var(--surface-3); }
.seg2 button.on { background: var(--surface); color: var(--ink); }
.chip-input { background: var(--surface); }
.mside-card, .mfieldset, .probe-card, .price-preview { background: var(--surface-2); }
.adm-drawer-mask { background: rgba(6,12,20,.42); backdrop-filter: blur(5px); }
.adm-drawer { background: var(--surface); }
.adm-drawer-head { background: var(--surface); }
.adm-drawer-foot { background: var(--surface-2); }
.row-menu-list { background: var(--surface); border-color: var(--border); }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.modal-mask { background: rgba(6,12,20,.42); backdrop-filter: blur(7px); }
.modal-close { background: var(--surface-2); color: var(--ink); }
.toast { background: #151b23; border: 1px solid rgba(255,255,255,.12); }
.bulkbar { background: #151b23; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; }
.danger-zone { background: var(--danger-soft); }

/* 平板 */
@media (max-width: 1180px) {
  .admin-content { padding: 28px; }
  .stat-grid, .adm-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-card:nth-child(4n), .kpi:nth-child(4n) { border-right: 1px solid var(--border); }
  .stat-card:nth-child(2n), .kpi:nth-child(2n) { border-right: 0; }
  .stat-card:nth-last-child(-n+4), .kpi:nth-last-child(-n+4) { border-bottom: 1px solid var(--border); }
  .stat-card:nth-last-child(-n+2), .kpi:nth-last-child(-n+2) { border-bottom: 0; }
  .dashboard-grid { grid-template-columns: minmax(0,1.7fr) minmax(240px,1fr); gap: 18px; }
  .models-layout { grid-template-columns: 1fr; }
  .models-table-wrap { max-height: none; }
}

/* 手机与窄桌面：侧栏是抽屉，不再是整页横向导航。 */
@media (max-width: 900px) {
  #adminApp { display: flex; }
  .admin-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px,86vw);
    height: 100dvh;
    min-height: 100vh;
    padding: 20px 14px;
    border-right: 1px solid var(--admin-side-line);
    border-bottom: 0;
    transform: translateX(-104%);
    transition: transform .32s var(--ease);
    box-shadow: 24px 0 70px rgba(0,0,0,.24);
  }
  body.admin-nav-open { overflow: hidden; }
  body.admin-nav-open .admin-side { transform: none; }
  .admin-logo { padding: 0 6px 18px; }
  .admin-nav-close { display: inline-grid; place-items: center; }
  #adminNav { display: block; overflow: visible; padding: 12px 0; }
  #adminNav .nav-group { display: block; }
  #adminNav .nav-label { display: block; }
  #adminNav .adm-nav { width: 100%; margin: 2px 0; padding: 10px 12px; white-space: normal; font-size: 13px; }
  .admin-side-foot { display: block; margin-top: auto; }
  .admin-side-foot .btn { width: 100%; }
  .admin-nav-scrim { position: fixed; inset: 0; z-index: 70; border: 0; background: rgba(5,10,17,.45); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; display: block; transition: opacity .25s; }
  body.admin-nav-open .admin-nav-scrim { opacity: 1; pointer-events: auto; }
  .admin-main { width: 100%; }
  .admin-head { height: 62px; padding: 0 16px; }
  .admin-menu-btn { display: block; }
  .admin-head-title { gap: 10px; }
  .admin-head-title > div { display: block; }
  .admin-head-overline { display: none; }
  .tab-title { font-size: 15px; }
  #adminWho { display: none; }
  .admin-updated { display: none; }
  .admin-head-actions { gap: 6px; }
  .admin-content { padding: 22px 16px; overflow-x: hidden; }
  .dashboard-intro { align-items: flex-start; margin-bottom: 24px; }
  .dashboard-intro h1 { font-size: 38px; }
  .dashboard-intro > div > p:last-child { max-width: 280px; line-height: 1.7; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-primary, .dashboard-status-card { min-height: 0; }
  .adm-page-head { gap: 12px; }
  .adm-page-head h2 { font-size: 22px; }
  .adm-actions { width: 100%; }
  .cardx { padding: 16px; }
  .facet-panel { position: static; }
  .models-table-wrap { max-height: none; }
  .form-grid, .mform-grid, .mform-grid.tight, .price-hero { grid-template-columns: 1fr; }
  .login-page { padding: 16px; align-items: flex-start; }
  .login-shell { min-height: calc(100dvh - 32px); grid-template-columns: 1fr; border-radius: 18px; }
  .login-visual { min-height: 300px; padding: 24px; }
  .login-optical-stage { width: 300px; height: 240px; right: -70px; top: 12px; transform: scale(.72); transform-origin: right top; }
  .login-visual-copy { padding-top: 100px; }
  .login-visual-copy h1 { max-width: 360px; font-size: 32px; }
  .login-visual-copy > p:last-child { display: none; }
  .login-visual-foot { display: none; }
  .login-kicker { margin-bottom: 10px; }
  .login-card { padding: 36px 26px; }
  .login-form-head { margin-bottom: 24px; }
}
@media (max-width: 600px) {
  .stat-grid, .adm-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 24px; }
  .stat-card, .kpi { min-height: 104px; padding: 16px 12px; }
  .stat-value, .kpi-value { font-size: 25px; }
  .stat-sub, .kpi-sub { font-size: 10px; }
  .dashboard-intro { display: block; }
  .dashboard-mode { margin-top: 12px; }
  .dashboard-intro h1 { font-size: 36px; }
  .cardx-head { flex-wrap: wrap; }
  .toolbar .searchbox { min-width: 100%; }
  .admin-refresh { padding-inline: 9px; }
  .admin-theme-btn { width: 34px; height: 34px; }
  .login-visual { min-height: 260px; }
  .login-visual-copy { padding-top: 80px; }
  .login-visual-copy h1 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
