/* ============================================================
   Ledger Design Tokens — Material 3 dark
   来源：EE 提供的 UI 视觉稿（5 页），B 方案——原生 CSS 复刻。
   所有页面复用这一套变量，视觉保持一致。
   ============================================================ */

:root {
  /* ---- Color: Material 3 dark surface 层级 ---- */
  --bg: #131313;
  --surface: #131313;
  --surface-lowest: #0e0e0e;
  --surface-low: #1b1b1b;
  --surface-container: #1f1f1f;
  --surface-high: #2a2a2a;
  --surface-highest: #353535;
  --surface-bright: #393939;
  --surface-variant: #353535;
  --surface-dim: #131313;

  /* ---- Color: 前景 / 文本 ---- */
  --on-surface: #e2e2e2;
  --on-surface-variant: #c4c7c8;
  --on-background: #e2e2e2;

  /* ---- Color: 主色（白，dark 下的高对比主色） ---- */
  --primary: #ffffff;
  --on-primary: #2f3131;
  --primary-container: #e2e2e2;
  --on-primary-container: #636565;

  /* ---- Color: 边框 ---- */
  --outline: #8e9192;
  --outline-variant: #444748;

  /* ---- Color: 语义（收入绿 / 支出红） ---- */
  --income: #22c55e;
  --expense: #ef4444;

  /* ---- Color: 错误 / 警告 ---- */
  --error: #ffb4ab;
  --error-container: #93000a;
  --on-error: #690005;
  --on-error-container: #ffdad6;

  /* ---- Typography: 字体族 ---- */
  --font-headline: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-label: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist', ui-monospace, 'SF Mono', monospace;

  /* ---- Typography: 字号 / 行高 / 字重 ---- */
  --fs-headline-xl: 48px;
  --lh-headline-xl: 56px;
  --fw-headline-xl: 700;

  --fs-headline-lg: 32px;
  --lh-headline-lg: 40px;
  --fw-headline-lg: 600;

  --fs-headline-mobile: 24px;
  --lh-headline-mobile: 32px;
  --fw-headline-mobile: 600;

  --fs-body: 16px;
  --lh-body: 24px;
  --fw-body: 400;

  --fs-label: 13px;
  --lh-label: 16px;
  --fw-label: 500;

  --fs-mono: 14px;
  --lh-mono: 20px;
  --fw-mono: 400;

  /* ---- Spacing ---- */
  --space-unit: 8px;
  --space-gutter: 16px;
  --space-container: 24px;
  --space-section: 48px;

  /* ---- Radius ---- */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* ---- Layout ---- */
  --container-max: 1280px;
  --sidebar-w: 256px;
  --topbar-h: 64px;
}

/* ---- 基础样式 ---- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-headline);
  color: var(--primary);
  font-weight: var(--fw-headline-lg);
}

a {
  color: inherit;
  text-decoration: none;
}

/* 等宽数字（金额）统一用 mono */
.mono,
.amount {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  line-height: var(--lh-mono);
  font-variant-numeric: tabular-nums;
}
