/* Rangoê Design System 2.0 — tokens (fonte única; copiada para cada app por scripts/sync_design_system.py).
   Não edite as cópias em apps/<app>/ds/: edite aqui e rode o script.
   Escala 4/8, radius por tipo de componente, cores com significado operacional.
   Temas: light (padrão Manager/Cardápio), dark, kds (alto contraste), night. White-label: --brand-* por loja. */
:root {
  /* spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  /* radius */
  --r-input: 10px; --r-button: 12px; --r-card: 16px; --r-sheet: 22px; --r-pill: 999px;
  /* type */
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Inter", ui-sans-serif, system-ui, sans-serif;
  --t-display: 700 clamp(30px, 6vw, 40px)/1.08 var(--font);
  --t-page: 700 clamp(24px, 4vw, 28px)/1.15 var(--font);
  --t-section: 700 20px/1.25 var(--font);
  --t-card: 600 16px/1.3 var(--font);
  --t-body: 400 15px/1.5 var(--font);
  --t-caption: 500 12.5px/1.4 var(--font);
  --t-kpi: 700 30px/1.1 var(--font-num);
  /* motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --d-fast: 120ms; --d-base: 200ms; --d-slow: 320ms;
  /* elevation */
  --e-1: 0 1px 2px rgb(16 24 40 / .06), 0 1px 3px rgb(16 24 40 / .08);
  --e-2: 0 4px 12px rgb(16 24 40 / .08), 0 2px 4px rgb(16 24 40 / .05);
  --e-3: 0 18px 48px rgb(16 24 40 / .18);
  /* touch */
  --touch: 44px; --touch-lg: 56px;
  /* breakpoints (referência para media queries): 600 tablet, 960 desktop, 1280 wide */

  /* brand (white-label: a loja sobrescreve --brand) */
  --brand: #f26b1d;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);
  --brand-strong: color-mix(in srgb, var(--brand) 85%, #000);

  /* light theme (default) */
  --bg: #f6f5f3;
  --surface: #ffffff;
  --surface-2: #f1efec;
  --line: #e6e2dd;
  --text: #1b1a19;
  --text-2: #5f5a55;
  --text-3: #8b857e;
  --focus: #2563eb;
  --overlay: rgb(20 16 12 / .48);

  /* semantic */
  --success: #15803d; --success-soft: #e8f6ed;
  --warning: #b45309; --warning-soft: #fdf3e2;
  --danger: #c2410c;  --danger-soft: #fdece5;
  --info: #1d4ed8;    --info-soft: #e8efff;
  --neutral: #57534e; --neutral-soft: #efedea;
}

[data-theme="dark"], [data-theme="night"] {
  --bg: #121110; --surface: #1c1a19; --surface-2: #262321; --line: #34302d;
  --text: #f5f2ee; --text-2: #b8b1a9; --text-3: #8a837b; --focus: #7aa7ff; --overlay: rgb(0 0 0 / .6);
  --success: #4ade80; --success-soft: #16301f; --warning: #fbbf24; --warning-soft: #33270f;
  --danger: #fb7d55; --danger-soft: #3a1d14; --info: #8ab4ff; --info-soft: #1a2540; --neutral: #c9c2ba; --neutral-soft: #2c2926;
  --e-1: 0 1px 2px rgb(0 0 0 / .4); --e-2: 0 6px 16px rgb(0 0 0 / .45); --e-3: 0 20px 50px rgb(0 0 0 / .6);
}

[data-theme="night"] { --bg: #0b0a10; --surface: #15131d; --surface-2: #1f1c2a; --line: #2e2a3d; }

/* KDS: alto contraste, leitura à distância */
[data-theme="kds"] {
  --bg: #000; --surface: #0f0f10; --surface-2: #1a1a1c; --line: #3a3a3e;
  --text: #fff; --text-2: #d4d4d8; --text-3: #a1a1aa; --focus: #93c5fd;
  --success: #22c55e; --warning: #facc15; --danger: #f87171; --info: #60a5fa;
  --t-body: 500 18px/1.4 var(--font); --t-card: 700 20px/1.25 var(--font); --t-kpi: 800 40px/1 var(--font-num);
}

@media (prefers-reduced-motion: reduce) {
  :root { --d-fast: 0ms; --d-base: 0ms; --d-slow: 0ms; }
}
