/* Cópia de packages/ui/src/tokens.css (fonte da verdade). Ressincronize ao mudar os tokens. */
/* =====================================================================
   Zello V2 · tokens.css (refresh V3 "B ampliada", 2026-11-19)  (F0, congelado: mudanças passam pelo dono de F0)
   Paleta da V1 mantida; superfícies mais neutras; escala tipográfica V2.
   Só custom properties: nenhum seletor de componente aqui.
   ===================================================================== */
:root {
  /* Marca */
  --green-900: #0b463d;
  --green-700: #0e5a4e;
  --green-500: #2f7a6c;
  --green-200: #b9d6cf;
  --green-50: #e9f2f0;
  --amber-500: #e8a33d;
  --amber-100: #fbebd0;

  /* Texto */
  --ink: #1c2422;
  --ink-2: #3a4441;
  --muted: #5a6460;
  --subtle: #646e6a; /* ≥4,5:1 em surface, bg, sunken e sidebar */

  /* Superfícies */
  --bg: #f7f6f3;
  --surface: #ffffff;
  --sunken: #f1efea;
  --sidebar: #f2f1ec;
  --line: #e7e4dd;
  --line-strong: #d9d5cc;
  --grid-line: #efece6;
  --hover: rgb(28 36 34 / 0.05);
  --hover-strong: rgb(28 36 34 / 0.06);
  --topbar-bg: rgb(247 246 243 / 0.85);
  --overlay: rgb(19 32 29 / 0.32);

  /* Semânticas (status: sempre com texto ou ícone, nunca só cor) */
  --success: #1e7a4a;
  --success-bg: #e7f4ec;
  --warning: #8a5a00;
  --warning-bg: #fdf1dc;
  --error: #b42318;
  --error-bg: #fdecea;
  --info: #1d5fa8;
  --info-bg: #e8f0fa;

  /* Escala sequencial de atraso (aging), âmbar → vermelho */
  --aging-1: #f3c987;
  --aging-2: #e8a33d;
  --aging-3: #c9752a;
  --aging-4: #b42318;

  /* Tooltip escuro de gráfico */
  --tip-bg: #1c2422;
  --tip-k: #b8c2be;

  /* Tipografia */
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --fs-meta: 12px;
  --fs-sm: 13px;
  --fs-body: 14px;
  --fs-lg: 16px;
  --fs-h2: 22px;
  --fs-h1: 30px;
  --fs-kpi: 34px;

  /* Espaço (ritmo 4/8/12/16/20/24/32) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;

  /* Raios, sombras, movimento */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --shadow-1: none;
  --shadow-pop: 0 24px 60px -16px rgb(19 32 29 / 0.25), 0 0 0 1px rgb(19 32 29 / 0.06);
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --t-fast: 150ms;
  --t-med: 240ms;

  /* Layout */
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 56px;
  --page-max: 1160px;
  --row-h: 60px;
  --touch: 48px;
  --touch-portaria: 56px;

  /* Overlays (DS-02/DS-03): larguras do drawer e camadas (escala do plano-design §3) */
  --drawer-sm: 400px;
  --drawer-md: 520px;
  --drawer-lg: 720px;
  --z-pop: 40;
  --z-cmdk: 50;
  --z-drawer: 60;
  --z-modal: 70;
  --z-toast: 80;
}

/* Modo escuro: apenas na portaria (turno da noite). Ativado por <html data-tema="escuro">. */
[data-tema="escuro"] {
  --ink: #ecf1ef;
  --ink-2: #c9d3cf;
  --muted: #9aa7a2;
  --subtle: #8e9b96;
  --bg: #101917;
  --surface: #17221f;
  --sunken: #1e2b28;
  --sidebar: #131e1b;
  --line: #26332f;
  --line-strong: #33433e;
  --grid-line: #22302c;
  --hover: rgb(255 255 255 / 0.05);
  --hover-strong: rgb(255 255 255 / 0.07);
  --topbar-bg: rgb(16 25 23 / 0.85);
  --green-50: #16302a;
  --green-200: #2e5b51;
  --success: #5bc38a;
  --success-bg: #16301f;
  --warning: #f0b85a;
  --warning-bg: #33270f;
  --error: #f07b70;
  --error-bg: #3a1b18;
  --info: #7eb0ea;
  --info-bg: #15263a;
  --amber-100: #3a2a10;
  color-scheme: dark;
}
