/* ============================================================
   EZ-C Design Tokens
   Drop-in replacement for the existing index.css token block.
   ------------------------------------------------------------
   Direction: warm minimalism. One deep ink-slate accent for CTA,
   one warm copper accent reserved for AI-suggested affordances.
   All semantic tones desaturated. Cyrillic-tuned type via Inter.
   ============================================================ */

:root {
  /* ---------- Surfaces (3 levels) ---------- */
  --color-canvas:        #FBFAF7;  /* page background, slightly warm */
  --color-surface:       #FFFFFF;  /* cards, tables, modals */
  --color-elevated:      #FFFFFF;  /* popovers (with shadow-card) */

  /* ---------- Lines ---------- */
  --color-line-subtle:   #ECEAE4;  /* hairlines, dividers, default borders */
  --color-line-strong:   #DAD6CD;  /* table headers, separators */

  /* ---------- Ink (text scale) ---------- */
  --color-ink-900:       #1A1814;  /* page titles */
  --color-ink-700:       #3D3A35;  /* body */
  --color-ink-500:       #7A766F;  /* secondary, captions */
  --color-ink-400:       #A8A39A;  /* placeholder */
  --color-ink-300:       #C7C2B8;  /* disabled */

  /* ---------- Accent — deep ink slate-blue (CTA, focus, active) ---------- */
  --color-accent-50:     #EEF1F6;
  --color-accent-100:    #DBE1EC;
  --color-accent-500:    #2C3A57;
  --color-accent-700:    #1C2640;

  /* ---------- AI accent — warm copper, reserved use only ---------- */
  --color-ai-50:         #F6EEDF;
  --color-ai-500:        #A87236;
  --color-ai-700:        #7A4F1C;

  /* ---------- Semantic — all desaturated, 50 / 500 / 700 ---------- */
  --color-success-50:    #EDF2EE;
  --color-success-500:   #4F7A5C;
  --color-success-700:   #2F5A3E;

  --color-warning-50:    #FAF2E2;
  --color-warning-500:   #B0863C;
  --color-warning-700:   #7A5916;

  --color-danger-50:     #F5E9E7;
  --color-danger-500:    #B14A3F;
  --color-danger-700:    #862F26;

  --color-info-50:       #ECEFF4;
  --color-info-500:      #5C7493;
  --color-info-700:      #344A6B;

  /* ---------- Muted (neutral chip / hover surface) ---------- */
  --color-muted-50:      #F3F1EC;
  --color-muted-500:     #7A766F;  /* alias of ink-500 */
  --color-muted-700:     #3D3A35;  /* alias of ink-700 */

  /* ---------- Type ---------- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* 5-step scale */
  --text-xs:   12px;   /* captions, table headers, codes */
  --text-sm:   13px;   /* body default */
  --text-md:   15px;   /* important body, card titles */
  --text-lg:   20px;   /* page subtitles */
  --text-xl:   28px;   /* page titles */

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.5;

  /* ---------- Spacing (extends existing scale with 48) ---------- */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-6:   24px;
  --space-8:   32px;
  --space-12:  48px;

  /* ---------- Radii ---------- */
  --radius-input:  6px;   /* fields */
  --radius-card:   8px;   /* cards, buttons, chips */
  --radius-modal:  12px;  /* modals, large surfaces */
  --radius-pill:   999px;

  /* ---------- Shadow (only two; capped per brief) ---------- */
  --shadow-card:   0 1px 2px 0 rgb(20 18 14 / 0.04), 0 1px 3px 0 rgb(20 18 14 / 0.05);
  --shadow-modal:  0 10px 25px -5px rgb(20 18 14 / 0.10), 0 8px 10px -6px rgb(20 18 14 / 0.05);

  /* ---------- Focus ring ---------- */
  --ring: 0 0 0 3px rgb(44 58 87 / 0.18);

  /* ---------- Status dot map (use as ::before background) ---------- */
  --dot-planned:  var(--color-info-500);
  --dot-paid:     var(--color-success-500);
  --dot-overdue:  var(--color-danger-500);
  --dot-draft:    var(--color-ink-400);
}

/* High-density font feature flags — better Cyrillic + lining figures */
html, body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01', 'tnum';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
