/* ============================================================================
   太华智主创管 Agent · 设计系统
   深色导航 + 明亮工作区，面向研发管理的高密度数据界面
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 品牌 */
  --brand-600: #2A55E8;
  --brand-500: #3B6BFF;
  --brand-400: #6C8CFF;
  --brand-300: #A9BEFF;
  --brand-050: #EDF2FF;
  --brand-ink: #0B1220;

  --cyan-600: #0091C2;
  --cyan-500: #00B8D9;
  --amber-600: #C2760A;
  --amber-500: #E8A33D;
  --amber-050: #FFF7E8;
  --rose-600: #D92D20;
  --rose-500: #E5484D;
  --rose-050: #FEF1F1;
  --green-600: #0E9F6E;
  --green-500: #16A34A;
  --green-050: #EAF8F1;
  --violet-500: #7C5CFF;
  --violet-050: #F2EEFF;
  --slate-500: #64748B;

  /* 中性（浅色主题） */
  --bg: #F1F4F9;
  --bg-grad: radial-gradient(1200px 600px at 12% -8%, #E6EDFB 0%, rgba(241,244,249,0) 62%),
             radial-gradient(900px 500px at 96% 4%, #EAF2F6 0%, rgba(241,244,249,0) 58%);
  --panel: #FFFFFF;
  --panel-alt: #FAFBFD;
  --panel-sunken: #F5F7FB;
  --ink: #0B1220;
  --ink-2: #263449;
  --muted: #61708A;
  --muted-2: #8A97AC;
  --line: #E4E9F2;
  --line-2: #EEF1F7;
  --rail: #0B1220;
  --rail-2: #121B2C;
  --rail-line: rgba(255, 255, 255, .09);
  --rail-ink: #E8EDF7;
  --rail-muted: #8798B4;

  /* 语义 */
  --success: var(--green-600);
  --warn: var(--amber-600);
  --danger: var(--rose-600);
  --info: var(--brand-600);
  --success-bg: var(--green-050);
  --warn-bg: var(--amber-050);
  --danger-bg: var(--rose-050);
  --info-bg: var(--brand-050);

  /* 阴影 */
  --sh-1: 0 1px 2px rgba(11, 18, 32, .05), 0 1px 3px rgba(11, 18, 32, .04);
  --sh-2: 0 2px 4px rgba(11, 18, 32, .04), 0 10px 26px -14px rgba(11, 18, 32, .18);
  --sh-3: 0 4px 10px rgba(11, 18, 32, .06), 0 24px 54px -22px rgba(11, 18, 32, .26);
  --sh-pop: 0 18px 50px -12px rgba(11, 18, 32, .32), 0 2px 8px rgba(11, 18, 32, .08);

  /* 形状 */
  --r-xs: 6px;
  --r-sm: 9px;
  --r: 13px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  --rail-w: 242px;
  --top-h: 62px;

  --fs: 13.5px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
          "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

[data-theme="dark"] {
  --bg: #070C15;
  --bg-grad: radial-gradient(1100px 560px at 10% -10%, #14203A 0%, rgba(7,12,21,0) 60%),
             radial-gradient(900px 480px at 98% 2%, #0E2430 0%, rgba(7,12,21,0) 55%);
  --panel: #0F1724;
  --panel-alt: #131C2B;
  --panel-sunken: #0B1220;
  --ink: #E9EFF9;
  --ink-2: #C6D2E4;
  --muted: #93A2BA;
  --muted-2: #74849E;
  --line: #1E293B;
  --line-2: #172234;
  --rail: #070C15;
  --rail-2: #0E1626;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .4), 0 12px 30px -16px rgba(0, 0, 0, .7);
  --sh-3: 0 6px 16px rgba(0, 0, 0, .5), 0 28px 60px -24px rgba(0, 0, 0, .8);
  --sh-pop: 0 20px 56px -14px rgba(0, 0, 0, .8), 0 2px 10px rgba(0, 0, 0, .5);
  --brand-050: #16233F;
  --amber-050: #2C2213;
  --rose-050: #2E1719;
  --green-050: #10291F;
  --violet-050: #1E1A38;
  --brand-600: #6C8CFF;
  --amber-600: #E8A33D;
  --rose-600: #FF6B6B;
  --green-600: #34D399;
}

/* ---------- 2. 基础 ---------- */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 660; letter-spacing: -.014em; line-height: 1.3; }
p { margin: 0; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
svg { display: block; }
::selection { background: var(--brand-300); color: var(--brand-ink); }

.num, .tab { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 34%, transparent); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); background-clip: content-box; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3. 布局骨架 ---------- */
#app { min-height: 100%; }

.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }
.shell.collapsed { --rail-w: 74px; }

/* 侧边导航 */
.rail {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--rail) 0%, var(--rail-2) 100%);
  color: var(--rail-ink);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--rail-line);
  z-index: 40;
  overflow: hidden;
}
.rail-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 17px 18px 15px;
  border-bottom: 1px solid var(--rail-line);
  min-height: var(--top-h);
}
.rail-logo {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--brand-500), #1B3AC4 60%, #0C1D6B);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px -2px rgba(59, 107, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.rail-brand-txt { min-width: 0; }
.rail-brand-txt b { display: block; font-size: 14px; letter-spacing: -.01em; font-weight: 700; white-space: nowrap; }
.rail-brand-txt span { display: block; font-size: 11px; color: var(--rail-muted); white-space: nowrap; letter-spacing: .04em; }
.shell.collapsed .rail-brand-txt, .shell.collapsed .nav-group-title, .shell.collapsed .nav-item span,
.shell.collapsed .rail-foot-txt { display: none; }
.shell.collapsed .rail-brand { justify-content: center; padding-inline: 0; }
.shell.collapsed .nav-item { justify-content: center; }

.rail-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.rail-nav::-webkit-scrollbar { width: 6px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-group-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--rail-muted); text-transform: uppercase;
  padding: 6px 12px 7px; white-space: nowrap;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 2px;
  border-radius: var(--r-sm);
  color: #C3CEE2; font-size: 13px; font-weight: 520;
  white-space: nowrap; position: relative;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav-item svg { flex: none; width: 17px; height: 17px; opacity: .82; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.on {
  background: linear-gradient(94deg, rgba(59, 107, 255, .30), rgba(59, 107, 255, .10));
  color: #fff; font-weight: 620;
  box-shadow: inset 0 0 0 1px rgba(108, 140, 255, .34);
}
.nav-item.on svg { opacity: 1; }
.nav-item.on::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 19px; border-radius: 0 3px 3px 0; background: var(--brand-400);
}
.nav-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: var(--r-pill);
  background: var(--rose-500); color: #fff; font-variant-numeric: tabular-nums;
}
.nav-badge.soft { background: rgba(255, 255, 255, .16); color: #DCE5F5; }

.rail-foot { padding: 11px 10px 13px; border-top: 1px solid var(--rail-line); }
.rail-foot-btn {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--rail-muted); font-size: 12px;
}
.rail-foot-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.shell.collapsed .rail-foot-btn { justify-content: center; }

/* 主区 */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--top-h); flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-burger { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); color: var(--muted); }
.topbar-burger:hover { background: var(--panel-sunken); color: var(--ink); }
.crumbs { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.crumbs b { color: var(--ink); font-weight: 640; font-size: 14.5px; }
.crumbs .sep { opacity: .45; }
.topbar-spacer { flex: 1; }

.searchbox {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px 0 11px;
  min-width: 244px;
  background: var(--panel-sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--muted); font-size: 12.5px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.searchbox:hover { border-color: color-mix(in srgb, var(--brand-500) 45%, var(--line)); }
.searchbox kbd {
  margin-left: auto; font-family: var(--font); font-size: 10.5px; font-weight: 640;
  padding: 2px 6px; border-radius: 5px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted-2);
}

.iconbtn {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: var(--r-sm); color: var(--muted);
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.iconbtn:hover { background: var(--panel-sunken); color: var(--ink); border-color: var(--line); }

.whoami {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 10px 4px 4px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--panel);
  transition: box-shadow .16s, border-color .16s;
}
.whoami:hover { box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--brand-500) 35%, var(--line)); }
.whoami-txt { text-align: left; line-height: 1.25; }
.whoami-txt b { display: block; font-size: 12.5px; font-weight: 640; }
.whoami-txt span { display: block; font-size: 10.5px; color: var(--muted); }

.avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: #fff;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.xl { width: 56px; height: 56px; font-size: 19px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }

.page { padding: 22px 24px 60px; flex: 1; min-width: 0; max-width: 1680px; width: 100%; }

/* 页面头 */
/* 页面头：左侧竖向强调条 + 更舒展的标题层级 */
.pagehead { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.pagehead-main { min-width: 0; flex: 1; padding-left: 15px; position: relative; }
.pagehead-main::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 3px; height: 26px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-400) 55%, transparent);
}
.pagehead h1 { font-size: 24px; font-weight: 680; letter-spacing: -.028em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; line-height: 1.25; }
.pagehead .sub { color: var(--muted); font-size: 12.9px; line-height: 1.72; margin-top: 6px; max-width: 92ch; }
.pagehead-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 2px; }

/* ---------- 4. 通用组件 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  transition: border-color .18s var(--ease);
}
.card.pad { padding: 18px 19px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  min-height: 50px;
}
.card-head > svg { flex: none; color: var(--muted); }
.card-head h3 { font-size: 13.6px; font-weight: 660; letter-spacing: -.008em; }
.card-head .sub { font-size: 11.5px; color: var(--muted); }
.card-head-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 0; }
/* 卡片内嵌子卡统一走同一边距，避免嵌套后留白不一致 */
.card .card.pad { padding: 14px 15px; }

.grid { display: grid; gap: 15px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.row { display: flex; align-items: center; gap: 9px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 9px; }
.spacer { flex: 1; }
.mt0 { margin-top: 0 !important; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 15px; } .mt3 { margin-top: 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2);
  font-size: 12.8px; font-weight: 600; white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s, box-shadow .15s, transform .06s, color .15s;
}
.btn:hover { background: var(--panel-sunken); border-color: color-mix(in srgb, var(--muted) 32%, var(--line)); }
.btn:active { transform: translateY(.5px); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.primary {
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  border-color: var(--brand-600); color: #fff;
  box-shadow: 0 1px 2px rgba(42, 85, 232, .28), 0 6px 16px -8px rgba(42, 85, 232, .5);
}
.btn.primary:hover { background: linear-gradient(180deg, #4A78FF, #2A55E8); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--rose-500) 34%, var(--line)); background: var(--danger-bg); }
.btn.danger:hover { background: color-mix(in srgb, var(--rose-500) 14%, var(--panel)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-sunken); color: var(--ink); border-color: var(--line); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--r-xs); }
.btn.sm svg { width: 13px; height: 13px; }
.btn.lg { height: 40px; padding: 0 17px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--panel-sunken); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.seg button {
  padding: 5px 11px; border-radius: var(--r-xs);
  color: var(--muted); font-size: 12.3px; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--sh-1); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 9px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 620; line-height: 1.5;
  background: var(--panel-sunken); color: var(--muted);
  border: 1px solid transparent; white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { background: var(--success-bg); color: var(--success); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--danger-bg); color: var(--danger); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.mute { background: var(--panel-sunken); color: var(--muted); }
.pill.violet { background: var(--violet-050); color: var(--violet-500); }
.pill.line { background: transparent; border-color: var(--line); color: var(--muted); }

.chipline { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2);
  font-size: 12.3px; font-weight: 560;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: color-mix(in srgb, var(--brand-500) 42%, var(--line)); color: var(--ink); }
.chip.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.chip.on:hover { color: #fff; }
.chip .n { font-size: 11px; opacity: .72; font-variant-numeric: tabular-nums; }

.bar { height: 7px; border-radius: 99px; background: var(--panel-sunken); overflow: hidden; position: relative; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-500), #4F86FF); transition: width .5s var(--ease-out); }
.bar.ok > i { background: linear-gradient(90deg, var(--green-500), #34C98A); }
.bar.warn > i { background: linear-gradient(90deg, var(--amber-500), #F2BC63); }
.bar.bad > i { background: linear-gradient(90deg, var(--rose-500), #FF7A7A); }
.bar.thin { height: 5px; }
.bar.thick { height: 10px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 11.5px; font-weight: 640; color: var(--muted); letter-spacing: .01em; }
.field .hint { font-size: 11px; color: var(--muted-2); }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 82px; padding: 9px 11px; resize: vertical; line-height: 1.58; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--muted) 38%, var(--line)); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent);
}
.select { appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A97AC' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input.mini, .select.mini { height: 28px; font-size: 12px; padding: 0 8px; }
.select.mini { padding-right: 26px; background-position: right 8px center; }
.input.bare {
  height: 26px; padding: 0 7px; border-color: transparent; background: transparent;
  font-size: 12.5px; border-radius: var(--r-xs);
}
.input.bare:hover { background: var(--panel-sunken); border-color: var(--line); }
.input.bare:focus { background: var(--panel); border-color: var(--brand-500); }

.checkline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
input[type="checkbox"].cbx {
  appearance: none; width: 16px; height: 16px; flex: none;
  border: 1.5px solid color-mix(in srgb, var(--muted) 55%, var(--line));
  border-radius: 4.5px; background: var(--panel);
  display: grid; place-items: center; transition: background .14s, border-color .14s;
}
input[type="checkbox"].cbx:hover { border-color: var(--brand-500); }
input[type="checkbox"].cbx:checked { background: var(--brand-600); border-color: var(--brand-600); }
input[type="checkbox"].cbx:checked::after {
  content: ""; width: 9px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ---------- 5. 数据表 ---------- */
.tw { overflow: auto; border-radius: 0 0 var(--r) var(--r); }
.tw.bordered { border: 1px solid var(--line); border-radius: var(--r); }
table.dt { font-size: 12.7px; }
table.dt thead th {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, var(--panel-alt), color-mix(in srgb, var(--panel-alt) 92%, var(--muted)));
  text-align: left; font-weight: 660; color: var(--muted);
  font-size: 11.4px; letter-spacing: .022em;
  padding: 10px 13px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
  text-transform: none;
}
table.dt thead th.sortable { cursor: pointer; user-select: none; }
table.dt thead th.sortable:hover { color: var(--ink); }
table.dt tbody td {
  padding: 11px 13px; border-bottom: 1px solid var(--line-2);
  vertical-align: middle; line-height: 1.55;
}
table.dt tbody tr:last-child td { border-bottom: 0; }
table.dt tbody tr { transition: background .13s var(--ease); }
table.dt tbody tr:hover td { background: color-mix(in srgb, var(--brand-050) 66%, var(--panel)); }
table.dt tbody tr.sel td { background: color-mix(in srgb, var(--brand-050) 90%, var(--panel)); }
table.dt tbody tr.clickable { cursor: pointer; }
table.dt td.num, table.dt th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dt td.nowrap, table.dt th.nowrap { white-space: nowrap; }
table.dt .sub { font-size: 11.4px; color: var(--muted); line-height: 1.55; margin-top: 2px; }
table.dt tbody td b { font-weight: 620; }
/* 斑马纹改为极淡，避免大表格视觉噪声 */
table.dt.zebra tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--panel-sunken) 30%, var(--panel)); }
table.dt.zebra tbody tr:nth-child(even):hover td { background: color-mix(in srgb, var(--brand-050) 66%, var(--panel)); }
table.dt.compact tbody td { padding: 8px 11px; }
table.dt.compact thead th { padding: 8px 11px; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 46px 20px; color: var(--muted-2); text-align: center;
}
.empty svg { width: 34px; height: 34px; opacity: .5; }
.empty b { color: var(--muted); font-weight: 620; font-size: 13px; }

.skel { position: relative; overflow: hidden; background: var(--panel-sunken); border-radius: var(--r-xs); }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--muted) 12%, transparent), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---------- 6. KPI 卡 ---------- */
.kpi {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 16px 14px;
  box-shadow: var(--sh-1);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s;
}
.kpi::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2.5px;
  background: linear-gradient(90deg, var(--brand-500), transparent 78%);
  opacity: .85;
}
.kpi.accent-amber::after { background: linear-gradient(90deg, var(--amber-500), transparent 78%); }
.kpi.accent-rose::after { background: linear-gradient(90deg, var(--rose-500), transparent 78%); }
.kpi.accent-green::after { background: linear-gradient(90deg, var(--green-500), transparent 78%); }
.kpi.accent-violet::after { background: linear-gradient(90deg, var(--violet-500), transparent 78%); }
.kpi:hover { box-shadow: var(--sh-2); transform: translateY(-1.5px); border-color: color-mix(in srgb, var(--brand-500) 24%, var(--line)); }
.kpi-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.kpi-label { font-size: 11.8px; font-weight: 620; color: var(--muted); letter-spacing: .01em; }
.kpi-ico {
  margin-left: auto; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brand-050); color: var(--brand-600);
}
.kpi-ico svg { width: 15px; height: 15px; }
.kpi.accent-amber .kpi-ico { background: var(--warn-bg); color: var(--warn); }
.kpi.accent-rose .kpi-ico { background: var(--danger-bg); color: var(--danger); }
.kpi.accent-green .kpi-ico { background: var(--success-bg); color: var(--success); }
.kpi.accent-violet .kpi-ico { background: var(--violet-050); color: var(--violet-500); }
.kpi-val { font-size: 27px; font-weight: 700; letter-spacing: -.03em; line-height: 1.08; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 4px; }
.kpi-val small { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi-foot { margin-top: 8px; display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.kpi-spark { margin-top: 9px; height: 26px; }

/* KPI 多值分栏：用于「进行中 6 / 暂停 2」这类组合指标，比 "6 / 2" 更清晰 */
.kpi-segs { display: flex; align-items: flex-end; gap: 16px; margin-top: 1px; }
.kpi-seg { display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; padding-right: 16px; }
.kpi-seg:last-child { padding-right: 0; }
.kpi-seg + .kpi-seg::before {
  content: ""; position: absolute; left: -8px; top: 4px; bottom: 4px;
  width: 1px; background: var(--line);
}
.kpi-seg-n {
  font-size: 24px; font-weight: 700; line-height: 1.05; letter-spacing: -.028em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.kpi-seg-n.ok { color: var(--success); }
.kpi-seg-n.warn { color: var(--warn); }
.kpi-seg-n.bad { color: var(--danger); }
.kpi-seg-l { font-size: 10.8px; color: var(--muted); white-space: nowrap; letter-spacing: .01em; }

/* 数值为「无数据」时的中性样式，避免看起来像出错 */
.kpi-val.is-empty, .kpi-seg-n.is-empty { color: var(--muted-2); font-weight: 600; }

/* ---------- 7. 图表 ---------- */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.lg-item { display: flex; align-items: center; gap: 8px; font-size: 12.2px; }
.lg-item .sw { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.lg-item .nm { color: var(--muted); }
.lg-item .vl { margin-left: auto; font-weight: 660; font-variant-numeric: tabular-nums; }

.heat { display: grid; grid-template-columns: 34px repeat(5, 1fr); gap: 5px; align-items: center; }
.heat .hl { font-size: 10.5px; color: var(--muted-2); text-align: right; padding-right: 3px; white-space: nowrap; }
.heat .hc {
  aspect-ratio: 1.55; border-radius: var(--r-xs);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s var(--ease), box-shadow .14s;
}
.heat .hc:hover { transform: scale(1.06); box-shadow: var(--sh-2); z-index: 2; }
.heat .hc small { font-size: 9.5px; font-weight: 600; opacity: .75; }

.stageflow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 0 8px; }
.stageflow::-webkit-scrollbar { height: 6px; }
.sf-item {
  flex: 1 0 148px; min-width: 148px; position: relative;
  padding: 12px 14px 13px 22px;
  background: var(--panel-sunken);
  border-block: 1px solid var(--line);
  cursor: pointer; transition: background .16s;
}
.sf-item:first-child { border-left: 1px solid var(--line); border-radius: var(--r-sm) 0 0 var(--r-sm); padding-left: 15px; }
.sf-item:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.sf-item::before, .sf-item::after {
  content: ""; position: absolute; top: 50%; width: 15px; height: 15px;
  background: inherit; border-top: 1px solid var(--line); border-right: 1px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}
.sf-item::before { right: -7.5px; z-index: 1; }
.sf-item:last-child::before { display: none; }
.sf-item::after { left: 8px; z-index: 0; }
.sf-item:first-child::after { display: none; }
.sf-item:hover { background: color-mix(in srgb, var(--brand-050) 70%, var(--panel)); }
.sf-item.on { background: linear-gradient(180deg, var(--brand-500), var(--brand-600)); border-color: var(--brand-600); color: #fff; }
.sf-item.on * { color: #fff !important; }
.sf-item.on .sf-meta { color: rgba(255, 255, 255, .82) !important; }
.sf-item .sf-t { font-size: 12px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.sf-item .sf-meta { font-size: 10.8px; color: var(--muted); margin-top: 3px; }
.sf-item .sf-bar { margin-top: 8px; height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 22%, transparent); overflow: hidden; }
.sf-item .sf-bar > i { display: block; height: 100%; background: var(--brand-500); border-radius: 99px; }

.gantt { overflow-x: auto; }
.gantt-inner { min-width: 100%; }
.gantt-hd, .gantt-rw { display: grid; align-items: center; }
.gantt-hd { position: sticky; top: 0; z-index: 3; background: var(--panel-alt); border-bottom: 1px solid var(--line); }
.gantt-hd .hcell { font-size: 10.5px; font-weight: 640; color: var(--muted); padding: 7px 0; text-align: center; border-left: 1px solid var(--line-2); }
.gantt-hd .hcell.today { color: var(--brand-600); background: color-mix(in srgb, var(--brand-050) 70%, var(--panel-alt)); }
.gantt-lbl {
  font-size: 12.2px; padding: 7px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 6px;
}
.gantt-rw:hover .gantt-lbl { background: color-mix(in srgb, var(--brand-050) 55%, var(--panel)); }
.gantt-track { position: relative; height: 30px; border-bottom: 1px solid var(--line-2); }
.gantt-grid { position: absolute; inset: 0; display: grid; }
.gantt-grid i { border-left: 1px solid var(--line-2); }
.gantt-grid i.today { background: color-mix(in srgb, var(--brand-500) 7%, transparent); }
.gbar {
  position: absolute; top: 7px; height: 15px; border-radius: 5px;
  background: linear-gradient(180deg, var(--brand-400), var(--brand-600));
  box-shadow: 0 1px 2px rgba(42, 85, 232, .3);
  overflow: hidden; display: flex; align-items: center;
  transition: filter .15s;
}
.gbar:hover { filter: brightness(1.09); }
.gbar > u { display: block; height: 100%; background: rgba(4, 18, 60, .42); }
.gbar.done { background: linear-gradient(180deg, #35C98A, var(--green-500)); box-shadow: 0 1px 2px rgba(22, 163, 74, .3); }
.gbar.late { background: linear-gradient(180deg, var(--amber-500), var(--amber-600)); box-shadow: 0 1px 2px rgba(194, 118, 10, .3); }
.gbar.blk { background: linear-gradient(180deg, var(--rose-500), #C22B30); box-shadow: 0 1px 2px rgba(217, 45, 32, .3); }
.gbar.plan { background: repeating-linear-gradient(115deg, var(--brand-300) 0 5px, #C8D6FF 5px 10px); box-shadow: none; }
.gbar-ms {
  position: absolute; top: 6px; width: 15px; height: 15px;
  background: var(--rose-500); border: 2px solid var(--panel);
  transform: rotate(45deg); border-radius: 3px; z-index: 2;
}

.gantt-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); padding: 9px 2px 0; }
.gantt-legend i { display: inline-block; width: 13px; height: 8px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- 8. 时间线 / 动态 ---------- */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.feed-item:last-child { border-bottom: 0; }
.feed-ico {
  width: 27px; height: 27px; flex: none; border-radius: 8px;
  display: grid; place-items: center; background: var(--panel-sunken); color: var(--muted); font-size: 13px;
}
.feed-body { min-width: 0; flex: 1; }
.feed-body .t { font-size: 12.5px; line-height: 1.5; }
.feed-body .m { font-size: 11px; color: var(--muted-2); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.feed-body .m b { color: var(--muted); font-weight: 600; }

.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -19.5px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--panel); border: 2.5px solid var(--line);
}
.tl-item.done::before { background: var(--green-500); border-color: var(--green-500); }
.tl-item.on::before { background: var(--brand-600); border-color: var(--brand-600); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand-500) 20%, transparent); }
.tl-item.bad::before { background: var(--rose-500); border-color: var(--rose-500); }

/* ---------- 9. 抽屉 / 弹窗 / 命令面板 ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in srgb, var(--brand-ink) 42%, transparent);
  backdrop-filter: blur(2.5px);
  animation: fadein .18s var(--ease-out);
}
@keyframes fadein { from { opacity: 0; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 101;
  width: min(720px, 94vw); display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: var(--sh-pop);
  animation: slidein .28s var(--ease-out);
}
.drawer.wide { width: min(1080px, 96vw); }
.drawer.narrow { width: min(520px, 94vw); }
@keyframes slidein { from { transform: translateX(26px); opacity: .4; } }

.modal {
  position: fixed; z-index: 101; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(620px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-pop);
  animation: popin .24s var(--ease-out);
}
.modal.wide { width: min(940px, 95vw); }
.modal.narrow { width: min(470px, 94vw); }
@keyframes popin { from { transform: translate(-50%, -47%) scale(.975); opacity: .3; } }

.panel-head {
  display: flex; align-items: center; gap: 11px;
  padding: 15px 18px; border-bottom: 1px solid var(--line); flex: none;
}
.panel-head h3 { font-size: 15px; font-weight: 660; }
.panel-head .sub { font-size: 11.8px; color: var(--muted); margin-top: 1px; }
.panel-body { flex: 1; overflow-y: auto; padding: 18px; }
.panel-body.flush { padding: 0; }
.panel-foot {
  flex: none; display: flex; align-items: center; gap: 9px;
  padding: 13px 18px; border-top: 1px solid var(--line); background: var(--panel-alt);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.drawer .panel-foot { border-radius: 0; }

.cmdk {
  position: fixed; z-index: 102; top: 12vh; left: 50%; transform: translateX(-50%);
  width: min(660px, 94vw); max-height: 70vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-pop);
  overflow: hidden; animation: popin .2s var(--ease-out);
}
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.cmdk-in input { flex: 1; border: 0; background: none; outline: none; font-size: 15px; }
.cmdk-list { overflow-y: auto; padding: 7px; }
.cmdk-grp { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted-2); padding: 8px 11px 4px; text-transform: uppercase; }
.cmdk-it {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 11px; border-radius: var(--r-sm); text-align: left;
}
.cmdk-it .ci { width: 26px; height: 26px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--panel-sunken); font-size: 13px; }
.cmdk-it .cb { min-width: 0; flex: 1; }
.cmdk-it .ct { font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-it .cs { font-size: 11px; color: var(--muted); }
.cmdk-it.on, .cmdk-it:hover { background: var(--brand-050); }
.cmdk-foot { padding: 8px 13px; border-top: 1px solid var(--line); background: var(--panel-alt); font-size: 11px; color: var(--muted-2); display: flex; gap: 14px; }

.toasts { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 9px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 244px; max-width: 420px; padding: 11px 15px;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--brand-500);
  border-radius: var(--r-sm); box-shadow: var(--sh-3);
  font-size: 12.8px; animation: slidein .24s var(--ease-out);
}
.toast.ok { border-left-color: var(--green-500); }
.toast.bad { border-left-color: var(--rose-500); }
.toast.warn { border-left-color: var(--amber-500); }

.menu {
  position: absolute; z-index: 110; min-width: 196px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-pop); padding: 5px;
  animation: popin .14s var(--ease-out);
}
.menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border-radius: var(--r-xs);
  font-size: 12.7px; color: var(--ink-2); text-align: left;
}
.menu button:hover { background: var(--panel-sunken); }
.menu button.danger { color: var(--danger); }
.menu button.danger:hover { background: var(--danger-bg); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 3px; }
.menu .mlabel { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; color: var(--muted-2); padding: 7px 10px 4px; text-transform: uppercase; }

/* ---------- 10. 登录 ---------- */
.login { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 100vh; }
.login-brand {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #0A1430 0%, #112252 46%, #0A1430 100%);
  color: #fff; padding: 46px 52px; display: flex; flex-direction: column;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .09) 1px, transparent 0);
  background-size: 26px 26px; opacity: .5;
}
.login-brand::after {
  content: ""; position: absolute; width: 720px; height: 720px; right: -280px; bottom: -330px;
  background: radial-gradient(circle, rgba(59, 107, 255, .40), transparent 66%);
}
.login-brand-in { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
.login-logo { display: flex; align-items: center; gap: 13px; }
.login-logo .mk {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(140deg, var(--brand-400), #1B3AC4);
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(59, 107, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.login-logo b { font-size: 17px; letter-spacing: -.015em; display: block; }
.login-logo span { font-size: 11.5px; color: #9CB0D8; letter-spacing: .1em; text-transform: uppercase; }
.login-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 38px 0; }
.login-hero h1 { font-size: 38px; line-height: 1.24; letter-spacing: -.03em; font-weight: 700; }
.login-hero h1 em { font-style: normal; background: linear-gradient(96deg, #7CA0FF, #44E0D0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { color: #A9BCDD; font-size: 13.6px; margin-top: 13px; max-width: 44ch; line-height: 1.72; }
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-feat {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 13px; border-radius: var(--r);
  background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(6px);
}
.login-feat svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: #7CA0FF; }
.login-feat b { display: block; font-size: 12.4px; font-weight: 640; }
.login-feat span { display: block; font-size: 11.2px; color: #94A9CE; line-height: 1.5; margin-top: 2px; }
.login-foot { position: relative; z-index: 1; font-size: 11.2px; color: #7A8EB4; display: flex; gap: 16px; flex-wrap: wrap; }

.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 42px 40px; background: var(--panel); }
.login-form { width: 100%; max-width: 372px; }
.login-form h2 { font-size: 24px; letter-spacing: -.026em; }
.login-form > p { color: var(--muted); font-size: 13px; margin-top: 7px; }
.login-form form { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.demo-users { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.demo-users .t { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.demo-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--panel-alt);
  font-size: 11.6px; text-align: left; transition: border-color .15s, background .15s;
}
.demo-btn:hover { border-color: var(--brand-400); background: var(--brand-050); }
.demo-btn .nm { font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-btn .rl { color: var(--muted-2); font-size: 10.4px; }

/* ---------- 11. 杂项 ---------- */
.kv { display: grid; grid-template-columns: minmax(84px, 132px) 1fr; gap: 8px 14px; font-size: 12.6px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); word-break: break-word; }

.stat-strip { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.stat-cell { padding: 0 17px; border-left: 1px solid var(--line); }
.stat-cell:first-child { padding-left: 0; border-left: 0; }
.stat-cell .l { font-size: 11px; color: var(--muted); }
.stat-cell .v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 1px; }

.note {
  display: flex; gap: 9px; padding: 11px 13px; border-radius: var(--r-sm);
  background: var(--panel-sunken); border: 1px solid var(--line);
  font-size: 12.3px; color: var(--ink-2); line-height: 1.62;
}
.note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--brand-600); }
.note.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--amber-500) 30%, var(--line)); }
.note.warn svg { color: var(--warn); }
.note.bad { background: var(--danger-bg); border-color: color-mix(in srgb, var(--rose-500) 30%, var(--line)); }
.note.bad svg { color: var(--danger); }

.rule { height: 1px; background: var(--line); margin: 15px 0; border: 0; }
.pre {
  font-family: var(--mono); font-size: 12px; line-height: 1.72;
  background: var(--panel-sunken); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 13px 15px; white-space: pre-wrap; word-break: break-word;
  color: var(--ink-2);
}
.taglist { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--panel-sunken); color: var(--muted); border: 1px solid var(--line);
}
.tag.brand { background: var(--brand-050); color: var(--brand-600); border-color: transparent; }

.tree-toggle {
  width: 18px; height: 18px; flex: none; display: grid; place-items: center;
  border-radius: 4px; color: var(--muted-2); transition: transform .17s var(--ease), background .14s;
}
.tree-toggle:hover { background: var(--panel-sunken); color: var(--ink); }
.tree-toggle svg { width: 11px; height: 11px; }
.tree-toggle.open { transform: rotate(90deg); }

.matrix { display: grid; gap: 3px; font-size: 11.5px; }
.mx-h { font-size: 10.5px; color: var(--muted-2); text-align: center; padding: 3px 0; font-weight: 640; }
.mx-rh { font-size: 10.5px; color: var(--muted-2); display: flex; align-items: center; justify-content: flex-end; padding-right: 7px; white-space: nowrap; font-weight: 640; }
.mx-c {
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: var(--r-xs); font-weight: 700; font-size: 12.5px;
  border: 1px solid transparent; transition: transform .13s;
}
.mx-c.a { background: var(--green-050); color: var(--green-600); }
.mx-c.b { background: var(--amber-050); color: var(--amber-600); }
.mx-c.c { background: var(--danger-bg); color: var(--danger); }
.mx-c.z { background: var(--panel-sunken); color: var(--muted-2); }
.mx-c:hover { transform: scale(1.09); border-color: color-mix(in srgb, var(--muted) 30%, transparent); }

.big-tbl-note { font-size: 11.5px; color: var(--muted); padding: 9px 12px; border-top: 1px solid var(--line-2); background: var(--panel-alt); }

.section-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 11px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 标签页：胶囊式高亮 + 悬停底色，排版更舒展 */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line);
  overflow-x: auto; padding-bottom: 0; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { height: 0; }
.tab {
  padding: 9px 14px 10px; font-size: 12.9px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.tab svg { opacity: .78; transition: opacity .15s; }
.tab:hover { color: var(--ink); background: var(--panel-sunken); }
.tab:hover svg { opacity: 1; }
.tab.on { color: var(--brand-600); border-bottom-color: var(--brand-600); background: linear-gradient(180deg, var(--brand-050), transparent 78%); }
.tab.on svg { opacity: 1; }
.tab .cnt {
  font-size: 10.5px; font-weight: 700; padding: 1.5px 6.5px; border-radius: var(--r-pill);
  background: var(--panel-sunken); color: var(--muted); font-variant-numeric: tabular-nums;
  transition: background .15s, color .15s;
}
.tab:hover .cnt { background: var(--panel); }
.tab.on .cnt { background: var(--brand-600); color: #fff; }

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1400px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1160px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3-2, .g-2-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}
@media (max-width: 900px) {
  .shell, .shell.collapsed { --rail-w: 0px; grid-template-columns: 0 1fr; }
  .rail { position: fixed; left: 0; width: 242px; transform: translateX(-100%); transition: transform .26s var(--ease); }
  .shell.nav-open .rail { transform: none; box-shadow: var(--sh-pop); }
  .shell.nav-open .rail-brand-txt, .shell.nav-open .nav-group-title, .shell.nav-open .nav-item span { display: block; }
  .shell.nav-open .nav-item { justify-content: flex-start; }
  .page { padding: 16px 15px 50px; }
  .g3, .g4, .g5, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .crumbs b { font-size: 13.5px; }
  .searchbox { min-width: 0; width: 38px; padding-inline: 11px; }
  .searchbox span, .searchbox kbd { display: none; }
}
@media (max-width: 620px) {
  .g3, .g4, .g5, .g6 { grid-template-columns: minmax(0, 1fr); }
  .login-form-wrap { padding: 30px 20px; }
  .demo-grid { grid-template-columns: 1fr; }
}

/* ---------- 13. 无障碍 / 打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .rail, .topbar, .pagehead-actions, .panel-foot, .toasts, .tabs, .no-print { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .shell { grid-template-columns: 1fr; }
}
