/* ============================================================
   设计令牌 — 号池控制台
   暗色为默认(:root)，亮色为 [data-theme=light] 覆盖。
   所有颜色/间距/圆角/字阶/阴影/层级/动效 集中在此，单一真值。
   ============================================================ */
:root {
  /* —— 中性层次(背景由深到浅 / 边框 / 文字) —— */
  --bg:        #0a0d13;   /* 页面底 */
  --bg-1:      #10141c;   /* 面板 */
  --bg-2:      #161b26;   /* 面板内凸起(卡片/输入) */
  --bg-3:      #1e2530;   /* hover/选中 */
  --bd:        #262e3b;   /* 边框 */
  --bd-2:      #333d4d;   /* 强边框 */
  --fg:        #e6edf3;   /* 主文字 */
  --fg-1:      #aeb9c7;   /* 次文字 */
  --fg-2:      #7a8798;   /* 弱文字/说明 */
  --fg-3:      #55606f;   /* 占位 */

  /* —— 强调 & 语义 —— */
  --accent:    #4c8dff;   --accent-fg:#fff;  --accent-weak:#12203d;
  --success:   #3fb950;   --success-weak:#0f2a19;
  --warning:   #d99a2b;   --warning-weak:#2a2410;
  --danger:    #f45b5b;   --danger-weak:#2a1416;
  --info:      #58a6ff;   --info-weak:#0f2137;
  --purple:    #bc8cff;   --purple-weak:#221733;

  /* —— 号池状态色板(徽章; 沿用并统一) —— */
  --st-ready:#3fb950;      --st-ready-bg:#0f2a1a;
  --st-pending:#8b98a8;    --st-pending-bg:#1a2029;
  --st-logging:#e3b341;    --st-logging-bg:#2a2410;
  --st-busy:#58a6ff;       --st-busy-bg:#0f2137;
  --st-exhausted:#bc8cff;  --st-exhausted-bg:#221733;
  --st-fail:#ff7b72;       --st-fail-bg:#2a1416;
  --st-verify:#f0883e;     --st-verify-bg:#2a1c10;
  --st-risk:#ff9e64;       --st-risk-bg:#2e1c10;
  --st-banned:#f45b5b;     --st-banned-bg:#2e1015;

  /* —— 分类色板(图表用; CVD 安全, dataviz 验证器过; 固定顺序 by-entity 分配, 不编码严重度) —— */
  --cat-1:#3987e5; --cat-2:#199e70; --cat-3:#c98500; --cat-4:#008300;
  --cat-5:#9085e9; --cat-6:#e66767; --cat-7:#d55181; --cat-8:#d95926;

  /* —— 间距刻度 —— */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-10:40px;

  /* —— 圆角 —— */
  --r-1:4px; --r-2:6px; --r-3:8px; --r-4:12px; --r-5:16px; --r-full:999px;

  /* —— 字阶 —— */
  --fs-xs:11px; --fs-sm:12px; --fs-md:13px; --fs-base:14px; --fs-lg:16px; --fs-xl:20px; --fs-2xl:26px; --fs-3xl:34px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Microsoft YaHei", "PingFang SC", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* —— 阴影 —— */
  --sh-1: 0 1px 2px rgba(0,0,0,.3);
  --sh-2: 0 4px 12px rgba(0,0,0,.35);
  --sh-3: 0 12px 32px rgba(0,0,0,.45);
  --ring: 0 0 0 3px rgba(76,141,255,.35);   /* 焦点环 */

  /* —— 层级 —— */
  --z-header:100; --z-drawer:400; --z-modal:500; --z-command:600; --z-toast:700;

  /* —— 动效 —— */
  --t-fast:120ms; --t-med:200ms; --t-slow:320ms;
  --ease: cubic-bezier(.2,.6,.2,1);

  /* 布局尺寸 */
  --topbar-h:52px; --nav-w:200px; --nav-w-collapsed:60px;
  color-scheme: dark;
}

:root[data-theme=light] {
  --bg:        #f4f6fa;
  --bg-1:      #ffffff;
  --bg-2:      #f7f9fc;
  --bg-3:      #eef1f6;
  --bd:        #e2e7ef;
  --bd-2:      #cdd5e0;
  --fg:        #1a2029;
  --fg-1:      #3c4757;
  --fg-2:      #667284;
  --fg-3:      #97a2b2;

  --accent:    #2f6fed;   --accent-fg:#fff;  --accent-weak:#e7f0ff;
  --success:   #1a7f37;   --success-weak:#e6f6ec;
  --warning:   #9a6700;   --warning-weak:#fdf4e3;
  --danger:    #cf222e;   --danger-weak:#fbe9e9;
  --info:      #0969da;   --info-weak:#e8f1fd;
  --purple:    #8250df;   --purple-weak:#f1eafd;

  --st-ready:#1a7f37;     --st-ready-bg:#e6f6ec;
  --st-pending:#59636e;   --st-pending-bg:#eef1f6;
  --st-logging:#9a6700;   --st-logging-bg:#fdf4e3;
  --st-busy:#0969da;      --st-busy-bg:#e8f1fd;
  --st-exhausted:#8250df; --st-exhausted-bg:#f1eafd;
  --st-fail:#cf222e;      --st-fail-bg:#fbe9e9;
  --st-verify:#bc4c00;    --st-verify-bg:#fdefe6;
  --st-risk:#bc4c00;      --st-risk-bg:#fdefe6;
  --st-banned:#cf222e;    --st-banned-bg:#fbe9e9;

  --cat-1:#2a78d6; --cat-2:#1baf7a; --cat-3:#eda100; --cat-4:#008300;
  --cat-5:#4a3aa7; --cat-6:#e34948; --cat-7:#e87ba4; --cat-8:#eb6834;

  --sh-1: 0 1px 2px rgba(16,24,40,.06);
  --sh-2: 0 4px 12px rgba(16,24,40,.10);
  --sh-3: 0 12px 32px rgba(16,24,40,.16);
  --ring: 0 0 0 3px rgba(47,111,237,.28);
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast:0ms; --t-med:0ms; --t-slow:0ms; }
}
