/* ==========================================================================
   设计令牌 (Design Tokens)
   深色侧边栏 + 浅色工作区的企业级仪表盘风格; 主色"深海墨蓝", 点缀香槟金。
   所有颜色 / 圆角 / 阴影 / 间距集中在此, 主题切换只改这里的变量。
   ========================================================================== */

:root {
  /* ---- 品牌色 (浅色模式: 中性灰阶, 强调色近黑) ---- */
  --brand-900: #0d0f12;
  --brand-850: #16181c;
  --brand-800: #1a1b1e;   /* 头像渐变深端 */
  --brand-700: #1a1b1e;   /* 标题 / 强调文字 */
  --brand-600: #34383f;   /* 头像渐变浅端 */
  --brand-500: #007AFF;   /* 图表蓝 (Apple systemBlue) */

  --gold-500: #1a1b1e;    /* 导航指示条 / 关键数值: 浅色模式用近黑 */
  --gold-400: #1a1b1e;
  --gold-100: rgba(26, 27, 30, .06);
  --gold-ink: #ffffff;    /* 金色按钮上的文字 (浅色模式下该按钮为近黑底) */

  --primary: #1a1b1e;
  --primary-600: #000000;
  --primary-100: rgba(26, 27, 30, .07);

  --success: #16a34a;
  --success-100: rgba(22, 163, 74, .12);
  --warn: #d97706;
  --warn-100: rgba(217, 119, 6, .12);
  --danger: #dc2626;
  --danger-100: rgba(220, 38, 38, .12);
  --info: #0ea5e9;
  --info-100: rgba(14, 165, 233, .12);

  /* ---- 表面与文字 (浅色主题) ---- */
  --bg: #f7f8fa;
  --bg-grad: none;        /* 参考配色为纯色底, 不用渐变 */
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f1f2f5;
  --border: #eceef2;
  --border-strong: #dfe2e8;
  --text: #1a1b1e;
  --text-2: #5a616b;
  --text-3: #8a909b;
  --text-inv: #ffffff;

  /* ---- 侧边栏 (浅色模式: 与页面同底色, 近黑文字; 深色模式在下方覆盖回深墨蓝) ---- */
  --side-bg: #f7f8fa;
  --side-text: #5a616b;
  --side-text-dim: #8a909b;
  --side-text-strong: #1a1b1e;   /* 当前项 / 悬浮项的强调文字色 */
  --side-active-bg: color-mix(in srgb, var(--side-text-strong) 8%, transparent);
  --side-hover-bg: color-mix(in srgb, var(--side-text-strong) 5%, transparent);
  --side-border: color-mix(in srgb, var(--side-text-strong) 10%, transparent);

  /* ---- 圆角 / 阴影 / 间距 ---- */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  /* 扁平化: 所有模块不使用投影, 层级只靠底色与描边区分 */
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --ring: 0 0 0 3px rgba(26, 27, 30, .16);   /* 焦点环: 交互反馈, 不属于模块阴影 */

  --side-w: 250px;
  --topbar-h: 62px;

  /* ---- 字体 ---- */
  --font: "Inter", "Segoe UI Variable Display", "Segoe UI", "PingFang SC",
          "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-num: "Inter", "SF Mono", "Cascadia Mono", Consolas, monospace;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c1424;
  --bg-grad: radial-gradient(1100px 560px at 10% -10%, #16294b 0%, transparent 60%),
             radial-gradient(800px 460px at 100% 0%, #2a2418 0%, transparent 55%);
  --surface: #131f37;
  --surface-2: #17253f;
  --surface-3: #1c2c49;
  --border: #25334f;
  --border-strong: #33466a;
  --text: #e8eef9;
  --text-2: #a7b5cd;
  --text-3: #7787a3;
  --text-inv: #0d1728;

  --side-bg: linear-gradient(180deg, #101c31 0%, #0a1220 100%);
  --side-text: #aebbd2;
  --side-text-dim: #6f7f9b;
  --side-text-strong: #ffffff;

  --primary: #4f82f7;
  --primary-600: #3a6ef0;
  --primary-100: rgba(79, 130, 247, .16);

  /* 深色模式保持原有品牌配色 (浅色模式已改为中性灰阶, 这里显式还原) */
  --brand-800: #16294b;
  --brand-700: #1b2a4a;
  --brand-600: #24406e;
  --brand-500: #33538c;
  --gold-500: #c8a96a;
  --gold-400: #d8bd88;
  --gold-100: rgba(200, 169, 106, .16);
  --gold-ink: #1d1508;

  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --ring: 0 0 0 3px rgba(79, 130, 247, .26);

  color-scheme: dark;
}