/* =============================================================================
 * 模型网关管理平台 · 设计系统
 * 令牌 → 基础 → 壳层 → 组件 → 动效 → 响应式
 * ========================================================================== */
:root {
  /* 品牌与语义 */
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-weak: #eef2ff;
  --ok: #16a34a;        --ok-bg: #ecfdf5;
  --warn: #d97706;      --warn-bg: #fffbeb;
  --danger: #dc2626;    --danger-bg: #fef2f2;
  --info: #2563eb;      --info-bg: #eff6ff;
  --neutral: #6b7280;   --neutral-bg: #f4f4f5;

  /* 中性 */
  --bg: #f8f8fb;
  --surface: #ffffff;
  --surface-2: #f4f4f7;
  --line: #ececf1;
  --line-strong: #dfdfe6;
  --text: #111318;
  --text-2: #5b6270;
  --text-3: #9aa1ad;

  /* 形状 */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(16, 18, 27, .04);
  --shadow-sm: 0 1px 3px rgba(16, 18, 27, .06), 0 1px 2px rgba(16, 18, 27, .04);
  --shadow-md: 0 8px 24px rgba(16, 18, 27, .08);
  --shadow-lg: 0 24px 64px rgba(16, 18, 27, .14);

  /* 尺寸 */
  --sidebar-w: 232px;
  --sidebar-w-collapsed: 72px;
  --header-h: 60px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
::selection { background: #ddd9ff; }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: #d6d8de transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #d6d8de; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #c2c5cc; }

/* ------------------------------------------------------------------ 壳层 */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: width .24s var(--ease), flex-basis .24s var(--ease);
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.app.is-collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); }

.brand { display: flex; align-items: center; gap: 10px; height: var(--header-h); padding: 0 18px; border-bottom: 1px solid var(--line); overflow: hidden; }
.brand__mark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .35);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.brand__name { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.brand__sub { font-size: 10.5px; color: var(--text-3); }

.nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav__group { padding: 12px 10px 6px; font-size: 10.5px; color: var(--text-3); letter-spacing: .04em; }
.nav__item {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 10px; margin-bottom: 2px; border-radius: 10px;
  color: var(--text-2); cursor: pointer; user-select: none;
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.nav__item:hover { background: var(--surface-2); color: var(--text); }
.nav__item:active { transform: scale(.985); }
.nav__item.is-active { background: var(--brand-weak); color: var(--brand-600); font-weight: 500; }
.nav__item.is-active::before {
  content: ""; position: absolute; left: -10px; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
  animation: barIn .24s var(--ease);
}
.nav__item svg { flex: 0 0 17px; }
.nav__label { white-space: nowrap; overflow: hidden; }
.nav__badge { margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--danger-bg); color: var(--danger); }
.nav__foot { padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 11px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.header {
  height: var(--header-h); flex: 0 0 var(--header-h); position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; min-width: 0; }
.header__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header__spacer { flex: 1; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px;
  border: none; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), transform .12s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }

.search {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 11px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  color: var(--text-3); font-size: 12px; cursor: pointer; background: var(--surface);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.search:hover { border-color: #cdd0d8; color: var(--text-2); box-shadow: var(--shadow-xs); }
.search kbd { font-family: inherit; font-size: 10px; border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; line-height: 15px; }

.user { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border-radius: var(--r-pill); cursor: pointer; transition: background .16s var(--ease); }
.user:hover { background: var(--surface-2); }
.user__avatar {
  width: 27px; height: 27px; border-radius: 50%;
  background: linear-gradient(135deg, #818cf8, #6366f1); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #e4e2ff;
}
.user__meta { display: flex; flex-direction: column; line-height: 1.2; }
.user__name { font-size: 11.5px; font-weight: 500; }
.user__role { font-size: 10px; color: var(--text-3); }

.content { flex: 1; padding: 24px 26px 60px; min-width: 0; }

/* ------------------------------------------------------------------ 页头 */
.page { max-width: 1180px; margin: 0 auto; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page__title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.page__sub { margin: 5px 0 0; font-size: 12.5px; color: var(--text-2); }
.page__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ 卡片 */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs); overflow: hidden;
  transition: box-shadow .22s var(--ease), transform .22s var(--ease), border-color .22s var(--ease);
}
.card--hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #e3e3ec; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.card__title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.card__title::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.card__meta { font-size: 11px; color: var(--text-3); }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  position: relative; padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat__label { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat__value { margin-top: 6px; font-size: 28px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat__foot { margin-top: 8px; font-size: 11px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat__spark { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.stat--brand .stat__spark { background: var(--brand-weak); color: var(--brand-600); }
.stat--ok .stat__spark { background: var(--ok-bg); color: var(--ok); }
.stat--warn .stat__spark { background: var(--warn-bg); color: var(--warn); }
.stat--info .stat__spark { background: var(--info-bg); color: var(--info); }

/* 环形与进度 */
.ring { --pct: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--surface-2) 0); transition: background .5s var(--ease); }
.ring__inner { width: 66px; height: 66px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.bar__fill { height: 100%; border-radius: var(--r-pill); background: var(--brand); transition: width .6s var(--ease); }

/* 供应商卡 */
.prov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prov { padding: 16px 18px; }
.prov__top { display: flex; align-items: flex-start; gap: 12px; }
.prov__logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: #fff; flex: 0 0 38px; }
.prov__name { font-size: 14px; font-weight: 600; }
.prov__proto { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.prov__rows { margin-top: 14px; display: grid; gap: 8px; }
.prov__row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.prov__row span:first-child { width: 62px; color: var(--text-3); font-size: 11px; }
.prov__row strong { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500; }

/* ------------------------------------------------------------------ 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 500; white-space: nowrap;
  background: var(--neutral-bg); color: var(--neutral);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--brand { background: var(--brand-weak); color: var(--brand-600); }
.badge--plain::before { display: none; }

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease), box-shadow .16s var(--ease);
}
.btn:hover { background: #fafafc; border-color: #cfd2da; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.28); }
.btn--primary:hover { background: var(--brand-600); border-color: var(--brand-600); box-shadow: 0 4px 14px rgba(79,70,229,.3); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { color: var(--danger); border-color: #f3d3d3; background: #fff; }
.btn--danger:hover { background: var(--danger-bg); border-color: #eab8b8; }
.btn--sm { height: 27px; padding: 0 11px; font-size: 11.5px; }
.btn--icon { width: 32px; padding: 0; }
.btn__spinner {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}

/* ------------------------------------------------------------------ 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 11px; color: var(--text-3);
  padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: transparent;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .16s var(--ease); }
.tbl tbody tr:hover { background: #fafafd; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .actions { display: flex; gap: 4px; justify-content: flex-end; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }

/* 开关 */
.switch { position: relative; width: 34px; height: 20px; border-radius: var(--r-pill); background: #d8dae1; cursor: pointer; border: none; transition: background .22s var(--ease); flex: 0 0 34px; }
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18);
  transition: transform .22s var(--ease);
}
.switch.is-on { background: var(--brand); }
.switch.is-on::after { transform: translateX(14px); }
.switch:active::after { width: 18px; }

/* ------------------------------------------------------------------ 勾选区 */
.picker { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 420px; }
.picker__tree { border-right: 1px solid var(--line); padding: 10px; overflow-y: auto; max-height: 520px; }
.picker__pane { padding: 14px 16px; overflow-y: auto; max-height: 520px; }
.tree-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; cursor: pointer; transition: background .16s var(--ease); }
.tree-item:hover { background: var(--surface-2); }
.tree-item.is-active { background: var(--brand-weak); color: var(--brand-600); }
.tree-item__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.tree-item__count { margin-left: auto; font-size: 10.5px; color: var(--text-3); }

.check { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: background .16s var(--ease); }
.check:hover { background: var(--surface-2); }
.check input { appearance: none; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid #cdd0d8; background: #fff; cursor: pointer; position: relative; transition: background .16s var(--ease), border-color .16s var(--ease); }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg);
}
.check__meta { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.summary-bar {
  position: sticky; bottom: 0; margin-top: 14px; padding: 12px 16px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--r);
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------------ 状态块 */
.state { padding: 54px 20px; text-align: center; color: var(--text-3); }
.state__icon { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); }
.state__title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.state__desc { font-size: 12px; margin-top: 4px; }
.state .btn { margin-top: 14px; }

/* 骨架 */
.skeleton { background: linear-gradient(90deg, #f1f2f5 25%, #fafafc 37%, #f1f2f5 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
.sk-row { height: 13px; margin-bottom: 12px; }
.sk-row:nth-child(3n) { width: 62%; }
.sk-card { height: 92px; border-radius: var(--r-lg); }

/* ------------------------------------------------------------------ 弹层 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 19, 24, .42); backdrop-filter: blur(2px);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fadeIn .18s var(--ease-out);
}
.modal {
  width: min(480px, 100%); background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: modalIn .26s var(--ease-out);
}
.modal__head { padding: 18px 20px 6px; }
.modal__title { font-size: 15px; font-weight: 600; }
.modal__body { padding: 8px 20px 18px; color: var(--text-2); font-size: 13px; }
.modal__foot { padding: 14px 20px; background: #fafafc; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.modal-mask.is-closing { animation: fadeOut .16s var(--ease-out) forwards; }
.modal-mask.is-closing .modal { animation: modalOut .16s var(--ease-out) forwards; }

/* Toast */
.toast-root { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 9px; min-width: 200px; max-width: 360px;
  padding: 10px 14px; border-radius: var(--r); background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-md); font-size: 12.5px;
  animation: toastIn .28s var(--ease-out);
}
.toast.is-out { animation: toastOut .2s var(--ease-out) forwards; }
.toast__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: 0 0 7px; }
.toast--error .toast__dot { background: var(--danger); }
.toast--warn .toast__dot { background: var(--warn); }

/* 页面切换 */
.view { animation: viewIn .3s var(--ease-out); }
.view.is-leaving { animation: viewOut .16s var(--ease-out) forwards; }

/* 登录 */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.login__bg { position: absolute; inset: 0; background:
  radial-gradient(900px 520px at 18% 12%, #eef2ff 0%, transparent 60%),
  radial-gradient(760px 480px at 84% 82%, #f5f3ff 0%, transparent 58%),
  var(--bg); }
.login__grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(#e9eaf2 1px, transparent 1px), linear-gradient(90deg, #e9eaf2 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 68%); }
.login__card { position: relative; width: min(400px, 100%); padding: 30px 28px 26px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); animation: modalIn .4s var(--ease-out); }
.login__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.login__title { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.login__hint { margin: 6px 0 20px; font-size: 12px; color: var(--text-2); }
.field { margin-bottom: 13px; }
.field__label { display: block; font-size: 11.5px; color: var(--text-2); margin-bottom: 5px; }
.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: #fff; font-size: 13px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(79,70,229,.12); }
.login__btn { width: 100%; height: 40px; margin-top: 6px; border-radius: var(--r-pill); }

/* 工具类 */
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); font-size: 11px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.stack { display: grid; gap: 14px; }
.mb { margin-bottom: 14px; }

/* ------------------------------------------------------------------ 动效 */
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes viewOut { to { opacity: 0; transform: translateY(-4px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes modalOut { to { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(10px); } }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes barIn { from { transform: scaleY(.3); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prov-grid { grid-template-columns: 1fr; }
  .picker { grid-template-columns: 1fr; }
  .picker__tree { border-right: none; border-bottom: 1px solid var(--line); max-height: 260px; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); box-shadow: var(--shadow-md); }
  .app.is-mobile-open .sidebar { transform: none; }
  .app.is-collapsed .sidebar { width: var(--sidebar-w); flex-basis: var(--sidebar-w); transform: translateX(-100%); }
  .app.is-collapsed.is-mobile-open .sidebar { transform: none; }
  .header { padding: 0 14px; }
  .content { padding: 16px 14px 48px; }
  .page__title { font-size: 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .user__meta { display: none; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page__head { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------------ 概览补充 */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.tbl--compact td { padding: 9px 14px; }
.tbl--compact th { padding: 8px 14px; }
.kv { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.kv:last-of-type { border-bottom: none; }
.kv span:first-child { width: 82px; color: var(--text-3); flex: 0 0 82px; font-size: 11px; }
.kv code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
  background: var(--surface-2); padding: 2px 7px; border-radius: 6px; color: var(--text-2);
}
.kv strong { font-weight: 500; font-variant-numeric: tabular-nums; }

.dot-badge { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #fff; }
.icon-btn { position: relative; }

/* 搜索面板 */
.palette { max-height: 320px; overflow-y: auto; }
.palette__item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 9px; cursor: pointer; transition: background .14s var(--ease);
}
.palette__item:hover { background: var(--surface-2); }
.palette__item.is-active { background: var(--brand-weak); }
.palette__item.is-active .dim { color: #6d68c9; }

@media (max-width: 1100px) {
  .ov-grid { grid-template-columns: 1fr; }
}
