/* nload — design tokens (source of truth: DESIGN_SPEC.md §3) */
:root {
  /* Brand */
  --color-primary-50:  #eef4ff;
  --color-primary-100: #dbe7ff;
  --color-primary-500: #3b6cf6;
  --color-primary-600: #2a56d8;
  --color-primary-700: #1f43ad;
  --color-accent-500:  #0fb5a6;

  /* Neutrals */
  --color-bg:        #f6f7fb;
  --color-surface:   #ffffff;
  --color-surface-2: #f0f2f7;
  --color-border:    #dde1ea;
  --color-text:      #151a2d;
  --color-text-muted:#5a6278;
  --color-text-inverse: #ffffff;

  /* Semantic */
  --color-success: #12805c;  --color-success-bg: #e3f6ee;
  --color-warning: #a35f00;  --color-warning-bg: #fff3dc;
  --color-danger:  #c42b2b;  --color-danger-bg:  #fde8e8;
  --color-info:    #1f6fb2;  --color-info-bg:    #e4f1fb;

  /* Chart series */
  --chart-1: #3b6cf6; --chart-2: #0fb5a6; --chart-3: #f29d38; --chart-4: #c42b2b; --chart-grid: #e6e9f0;

  /* Typography */
  --font-sans: "Vazirmatn", "IRANSansX", "Tahoma", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Vazirmatn Code", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.375rem; --fs-2xl: 1.75rem; --fs-3xl: 2.25rem; --fs-4xl: 2.875rem;
  --fw-regular: 400; --fw-medium: 500; --fw-bold: 700; --fw-black: 800;
  --lh-tight: 1.35; --lh-body: 1.8;

  /* Spacing (4px grid) */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.25rem;
  --sp-6: 1.5rem; --sp-8: 2rem; --sp-10: 2.5rem; --sp-12: 3rem; --sp-16: 4rem;

  /* Radius / shadow / motion */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(21,26,45,.06);
  --shadow-md: 0 4px 16px rgba(21,26,45,.08);
  --shadow-lg: 0 12px 32px rgba(21,26,45,.12);
  --focus-ring: 0 0 0 3px rgba(59,108,246,.45);
  --dur-fast: 120ms; --dur-base: 200ms; --ease: cubic-bezier(.2,.7,.2,1);

  /* Layout */
  --container: 1200px; --sidebar-w: 248px; --topbar-h: 60px; --tap-min: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f1324; --color-surface: #171c31; --color-surface-2: #1f2540;
    --color-border: #2c3352; --color-text: #e9ecf5; --color-text-muted: #a3abc4;
    --color-primary-50: #1a2350; --color-primary-100: #22306b;
    --color-success-bg: #10352a; --color-warning-bg: #3a2a0c; --color-danger-bg: #3d1717; --color-info-bg: #12304a;
    --color-success: #4fd1a1; --color-warning: #f2b552; --color-danger: #ff7b7b; --color-info: #6cb8f2;
    --chart-grid: #2c3352;
  }
}
@media (prefers-reduced-motion: reduce) { :root { --dur-fast: 0ms; --dur-base: 0ms; } }
