/* Design tokens — 单一可信来源。其他 CSS 只引用 var()。
   浅色主题:白底 + 浅灰背景 + 饱和蓝 accent + 黑色文字。 */
:root {
  /* 色板：浅色主题,panel 白 / 整体浅灰 / 饱和 accent */
  --color-bg: #f3f5f8;
  --color-surface: #ffffff;
  --color-surface-1: #f8fafc;
  --color-surface-raised: #f8fafc;
  --color-surface-hover: #eef2f7;
  --color-surface-sunken: #f1f5f9;

  --color-border: #e5e7eb;
  --color-border-muted: #eef2f7;
  --color-border-strong: #cbd5e1;
  --color-border-focus: rgba(59, 130, 246, 0.5);

  --color-text: #0f172a;
  --color-text-soft: #475569;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #ffffff;

  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-active: #1d4ed8;
  --color-primary-soft: rgba(59, 130, 246, 0.08);
  --color-primary-soft-hover: rgba(59, 130, 246, 0.14);

  --color-success: #16a34a;
  --color-success-soft: rgba(22, 163, 74, 0.10);
  --color-warning: #d97706;
  --color-warning-soft: rgba(217, 119, 6, 0.10);
  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;
  --color-danger-soft: rgba(220, 38, 38, 0.08);

  /* 间距：4/8/12/16/20/24/32/48 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 48px;

  /* 字号 */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;

  /* 字重 */
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* 行高 */
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-loose: 1.7;

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* 阴影：浅色主题阴影用低 alpha 黑色 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.06), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-overlay: 0 12px 40px rgba(15, 23, 42, 0.14);

  /* 过渡 */
  --trans-fast: 120ms ease;
  --trans-base: 180ms ease;
  --trans-slow: 240ms ease;

  /* 布局 */
  --sidebar-width: 240px;
  --topbar-height: 64px;
  --content-max-width: 1600px;

  /* Z-index 层级 */
  --z-drawer: 40;
  --z-confirm: 60;
  --z-auth: 80;
  --z-toast: 100;

  /* 字体 */
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, "SFMono-Regular", monospace;
}
