/* 设计变量（WEB-REDESIGN 第 2 期）：浅色为主，深色单独取色、不是自动反色。
   图表色取 dataviz 参考色板（slot 1 蓝、slot 2 橙），已用校验脚本在两种底色上跑过；状态色只表示状态，不当序列色用。
   切换：<html data-theme="light|dark"> 优先；没有设置时跟随系统。
   静止的面只用细边框；--shadow-pop 只给浮层（菜单、提示框、提示条、对话框）。规范见 dashboard/DESIGN.md。 */
:root {
  color-scheme: light;
  --page: #f6f6f3;
  --surface: #ffffff;
  --chart-surface: #fcfcfb;
  --sunken: #f0efec;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --hairline: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11, 11, 11, .10);
  --accent: #1c5cab;
  --accent-ink: #ffffff;
  --accent-wash: rgba(42, 120, 214, .08);
  --link: #1c5cab;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-neutral: #898781;
  --up: #006300;
  --down: #d03b3b;
  --div-pos: #2a78d6;
  --div-neg: #e34948;
  --div-mid: #f0efec;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --shadow-pop: 0 4px 16px rgba(11, 11, 11, .10), 0 1px 3px rgba(11, 11, 11, .06);
  --header-bg: rgba(246, 246, 243, .86);
  --radius: 12px;
  --radius-sm: 8px;
  --dur-fast: 120ms;
  --dur: 180ms;
  --dur-slow: 220ms;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #161615;
    --chart-surface: #1a1a19;
    --sunken: #222220;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --hairline: #2c2c2a;
    --baseline: #383835;
    --border: rgba(255, 255, 255, .10);
    --accent: #256abf;
    --accent-ink: #ffffff;
    --accent-wash: rgba(57, 135, 229, .12);
    --link: #6da7ec;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-neutral: #898781;
    --up: #0ca30c;
    --down: #e66767;
    --div-pos: #3987e5;
    --div-neg: #e66767;
    --div-mid: #383835;
    --shadow-pop: 0 6px 20px rgba(0, 0, 0, .55);
    --header-bg: rgba(13, 13, 13, .86);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #161615;
  --chart-surface: #1a1a19;
  --sunken: #222220;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --hairline: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255, 255, 255, .10);
  --accent: #256abf;
  --accent-ink: #ffffff;
  --accent-wash: rgba(57, 135, 229, .12);
  --link: #6da7ec;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-neutral: #898781;
  --up: #0ca30c;
  --down: #e66767;
  --div-pos: #3987e5;
  --div-neg: #e66767;
  --div-mid: #383835;
  --shadow-pop: 0 6px 20px rgba(0, 0, 0, .55);
  --header-bg: rgba(13, 13, 13, .86);
}

/* 系统设置“减少动态效果”：关掉全部动画与过渡 */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
