/* ────────────────────────────────────────────────────────────────────────────
   RaPid — Kanooniline disainisüsteem (Sprint 24 — UI Unification)
   Üks tõeallikas värvidele, varjudele, raadiustele ja tüpograafiale.
   Kõik HTML-lehed peaksid laadima just selle faili — mitte dubleerima tokeneid.

   Vokabulaar:
     --bg, --surface, --surface-2, --surface-3   pinnad
     --border, --border-strong                   piirjooned
     --text, --text-2, --text-3                  tekstihierarhia
     --accent, --accent-h, --accent-soft         brändi-aktsent (indigo)
     --green, --red, --amber + *-soft            staatusvärvid
     --r-sm, --r, --r-lg                         raadiused
     --sh-sm, --sh, --sh-lg                      varjud

   Tumeda režiimi aktiveerib `body.dark` (vt rp_dark localStorage võti).
   ──────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ── Pinnad ── */
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --surface-3: #ececea;

  /* ── Piirjooned ── */
  --border: #e7e5e4;
  --border-strong: #d6d3d1;

  /* ── Tekst ── */
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #a1a1aa;

  /* ── Aktsent (indigo) ── */
  --accent: #4f46e5;
  --accent-h: #4338ca;
  --accent-soft: #eef2ff;

  /* ── Staatusvärvid ── */
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --amber: #d97706;
  --amber-soft: #fef3c7;

  /* ── Raadiused ── */
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;

  /* ── Varjud ── */
  --sh-sm: 0 1px 2px rgba(0,0,0,.05);
  --sh: 0 1px 4px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --sh-lg: 0 12px 32px -8px rgba(0,0,0,.14);

  /* ── Tagasiühilduvus-aliased (admin/inbox.html, admin/integrations.html) ──
     Vana vokabulaar enne unifitseerimist. Uus kood peaks kasutama põhinimesid. */
  --fg: var(--text);
  --muted: var(--text-2);
  --primary: var(--accent);
  --primary-fg: #ffffff;
  --warn: var(--amber);
}

body.dark {
  --bg: #111113;
  --surface: #1a1a1d;
  --surface-2: #222226;
  --surface-3: #2c2c31;
  --border: #2e2e33;
  --border-strong: #3d3d44;
  --text: #f0f0f2;
  --text-2: #9898a6;
  --text-3: #5a5a6a;
  --accent: #818cf8;
  --accent-h: #6366f1;
  --accent-soft: #1e1b4b;
  --green: #4ade80;
  --green-soft: #14532d;
  --red: #f87171;
  --red-soft: #450a0a;
  --amber: #fbbf24;
  --amber-soft: #451a03;
  --sh-sm: 0 1px 3px rgba(0,0,0,.35);
  --sh: 0 2px 8px rgba(0,0,0,.4);
  --sh-lg: 0 16px 48px -12px rgba(0,0,0,.6);

  /* aliased uuenduvad automaatselt läbi var() ahela */
}

/* ── Baastüpograafia + reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}
code, pre, .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
