/* ==========================================================================
   QuantLab design tokens
   ==========================================================================

   A command deck, not a generic SaaS dashboard. Deep navy surfaces, electric
   blue rules, dense tabular numbers, and a strict separation between brand
   chrome and P&L semantics.

   Component CSS must consume these tokens. Green and red are reserved for
   direction, P&L, and risk state; blue owns interaction and navigation.

   2026-10 中枢改版：从「墨绿账本 + 黄铜线」换成「深蓝终端 + 电光蓝」。
   页面不再各自定义颜色，只换这里的令牌；绿/红的含义没有变。
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Canvas and surfaces */
  --bg: #05080f;
  --bg-grad-1: rgba(64, 122, 255, 0.16);
  --bg-grad-2: rgba(38, 214, 224, 0.05);
  --surface-1: #080d18;
  --surface-2: #0b1220;
  --surface-3: #111c31;
  --surface-raised: #060a13;
  --bg-sunken: var(--surface-2);

  /* Rules and boundaries */
  --line: rgba(122, 165, 255, 0.14);
  --line-2: rgba(140, 180, 255, 0.24);
  --line-soft: rgba(170, 205, 255, 0.06);

  /* Text */
  --txt: #e9eefb;
  --txt-1: var(--txt);
  --txt-2: #a8b6d2;
  --dim: #7c8aa6;
  --txt-3: var(--dim);
  --txt-inverse: #05080f;

  /* Semantic color */
  --green: #35e08c;
  --red: #ff6b7a;
  --gold: #5b9bff;
  --blue: #7fb0ff;
  --orange: #ffa94d;

  --green-bg: rgba(53, 224, 140, 0.1);
  --red-bg: rgba(255, 107, 122, 0.1);
  --gold-bg: rgba(91, 155, 255, 0.12);
  --blue-bg: rgba(127, 176, 255, 0.1);

  /* Type */
  --display: "Bahnschrift", "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
  --sans: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-mono: var(--mono);

  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 27px;
  --fs-num-xl: 30px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;

  /* Form language: ledger sheets, not rounded cards */
  --radius-sm: 2px;
  --radius: 3px;
  --radius-lg: 4px;
  --radius-pill: 999px;

  /* Depth is mostly expressed with rules; shadows only lift overlays. */
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.22);
  --shadow-md: 0 16px 36px -20px rgba(0, 0, 0, 0.82);
  --shadow-lg: 0 30px 80px -34px rgba(0, 0, 0, 0.92);
  --ease: cubic-bezier(0.22, 0.72, 0.18, 1);
  --dur-fast: 110ms;
  --dur: 180ms;

  /* Layout */
  --topbar-h: 56px;
  --page-max: 1720px;
  --page-pad: 20px;
}

/* Cool blue-gray paper for daylight use. No warm cream, no terracotta. */
html[data-theme="light"] {
  color-scheme: light;

  --bg: #e9eef7;
  --bg-grad-1: rgba(47, 107, 216, 0.08);
  --bg-grad-2: rgba(23, 160, 172, 0.05);
  --surface-1: #f7f9fd;
  --surface-2: #edf2fa;
  --surface-3: #e2e9f5;
  --surface-raised: #fbfcff;
  --bg-sunken: var(--surface-2);

  --line: #cfdaec;
  --line-2: #adbed6;
  --line-soft: rgba(16, 38, 74, 0.08);

  --txt: #0d1524;
  --txt-1: var(--txt);
  --txt-2: #3f5271;
  --dim: #5f708c;
  --txt-3: var(--dim);
  --txt-inverse: #f8fbff;

  --green: #0a7d4f;
  --red: #c23c47;
  --gold: #2f6bd8;
  --blue: #2c5fa8;
  --orange: #a8631f;

  --green-bg: rgba(10, 125, 79, 0.09);
  --red-bg: rgba(194, 60, 71, 0.09);
  --gold-bg: rgba(47, 107, 216, 0.1);
  --blue-bg: rgba(44, 95, 168, 0.08);

  --shadow-sm: 0 1px 0 rgba(13, 21, 36, 0.08);
  --shadow-md: 0 16px 36px -22px rgba(13, 21, 36, 0.28);
  --shadow-lg: 0 30px 80px -36px rgba(13, 21, 36, 0.34);
}

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