/* ==========================================================================
   Design Tokens · 勤天工作台概览
   三套主题：graphite(默认) / night(深色) / sand(暖砂)
   仅通过覆盖变量切换，不改任何组件结构。
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  color-scheme: light;

  /* 画布与表面 */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f1f3f7;
  --surface-inset: #f7f8fa;

  /* 描边 */
  --border: #e5e7ee;
  --border-strong: #d4d8e1;
  --border-faint: #eef0f5;

  /* 文字 */
  --text: #0e1116;
  --text-2: #565e6d;
  --text-3: #8a92a2;
  --text-inverse: #ffffff;

  /* 品牌与主行为 */
  --brand: #3355ff;
  --brand-ink: #2543d8;
  --brand-soft: #eef1ff;
  --brand-line: #ccd6ff;

  --primary: #14161b;
  --primary-hover: #2a2f3a;
  --primary-active: #000000;
  --on-primary: #ffffff;

  /* 语义色 */
  --ok: #0d7a54;
  --ok-soft: #e7f6f0;
  --ok-line: #b9e6d6;

  --warn: #95600a;
  --warn-soft: #fdf3e0;
  --warn-line: #f3ddb2;

  --danger: #c73636;
  --danger-soft: #fdeeee;
  --danger-line: #f4c8c8;

  --info: #1f5fbf;
  --info-soft: #eaf1fd;

  /* 圆角 */
  --r-xs: 5px;
  --r-sm: 7px;
  --r-md: 9px;
  --r-lg: 13px;
  --r-xl: 16px;
  --r-full: 999px;

  /* 阴影 */
  --sh-xs: 0 1px 2px rgba(14, 17, 22, 0.05);
  --sh-sm: 0 1px 2px rgba(14, 17, 22, 0.04), 0 3px 10px -4px rgba(14, 17, 22, 0.08);
  --sh-md: 0 10px 28px -8px rgba(14, 17, 22, 0.14);
  --sh-lg: 0 32px 64px -20px rgba(14, 17, 22, 0.28);

  --ring: 0 0 0 3px rgba(51, 85, 255, 0.16);
  --ring-danger: 0 0 0 3px rgba(199, 54, 54, 0.14);

  /* 尺寸 */
  --sidebar-w: 246px;
  --topbar-h: 58px;
  --content-max: 1180px;
  --field-h: 40px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ── 深色 ─────────────────────────────────────────────────────────────── */
:root[data-theme="night"] {
  color-scheme: dark;

  --bg: #0a0c10;
  --surface: #11141a;
  --surface-2: #151922;
  --surface-3: #1b2029;
  --surface-inset: #0e1116;

  --border: #232936;
  --border-strong: #333b4b;
  --border-faint: #1a1f29;

  --text: #e9ecf2;
  --text-2: #a3acbd;
  --text-3: #6f7889;
  --text-inverse: #0a0c10;

  --brand: #7d95ff;
  --brand-ink: #a3b4ff;
  --brand-soft: #1a2240;
  --brand-line: #2c3a6b;

  --primary: #eef1f7;
  --primary-hover: #ffffff;
  --primary-active: #dbe0ea;
  --on-primary: #0d1017;

  --ok: #56d6a8;
  --ok-soft: #10281f;
  --ok-line: #1d4436;

  --warn: #e5b565;
  --warn-soft: #2a2113;
  --warn-line: #4a3a1c;

  --danger: #ff8b8b;
  --danger-soft: #2d1618;
  --danger-line: #4c2427;

  --info: #8ab6ff;
  --info-soft: #131f33;

  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 3px 12px -4px rgba(0, 0, 0, 0.5);
  --sh-md: 0 12px 32px -10px rgba(0, 0, 0, 0.65);
  --sh-lg: 0 36px 72px -24px rgba(0, 0, 0, 0.8);

  --ring: 0 0 0 3px rgba(125, 149, 255, 0.24);
}

/* ── 暖砂（旧配色重做版：米白 + 赭石，降低饱和度、提高对比层次）─────────── */
:root[data-theme="sand"] {
  color-scheme: light;

  --bg: #f6f2ea;
  --surface: #fffdf9;
  --surface-2: #fbf7ef;
  --surface-3: #f1eade;
  --surface-inset: #f8f4ec;

  --border: #e6dccb;
  --border-strong: #d3c4ab;
  --border-faint: #efe7d9;

  --text: #201b14;
  --text-2: #5d5548;
  --text-3: #8d8271;

  --brand: #96601c;
  --brand-ink: #7a4d13;
  --brand-soft: #f6ead7;
  --brand-line: #e3cba5;

  --primary: #201b14;
  --primary-hover: #362e23;
  --primary-active: #000000;

  --ok: #17694c;
  --ok-soft: #e6f3ec;
  --ok-line: #bfdfd0;

  --warn: #8d5a06;
  --warn-soft: #fbefd9;
  --warn-line: #eed9b2;

  --danger: #b23a2f;
  --danger-soft: #fbeae7;
  --danger-line: #f0c9c3;

  --info: #2a5b9a;
  --info-soft: #e9f0f9;

  --sh-xs: 0 1px 2px rgba(60, 44, 20, 0.06);
  --sh-sm: 0 1px 2px rgba(60, 44, 20, 0.05), 0 3px 10px -4px rgba(60, 44, 20, 0.1);
  --sh-md: 0 10px 28px -8px rgba(60, 44, 20, 0.16);

  --ring: 0 0 0 3px rgba(150, 96, 28, 0.16);
}
