/* tokens.css — única fuente de verdad del diseño (portal y panel).
   Los componentes solo usan tokens semánticos; el tema oscuro los redefine. */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Marca */
  --red-primary: #b91c1c;
  --red-hover: #991b1b;
  --red-soft: #fef2f2;
  --red-line: #fecaca;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --amber-line: #fde68a;
  --amber-text: #78350f;
  --ink: #0f172a;
  --focus: #f59e0b;

  /* Superficies y texto (tema claro) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --field-bg: #ffffff;
  --ghost-bg: #ffffff;
  --pill-bg: #f8fafc;
  --monogram-bg: var(--ink);

  /* Estados */
  --ok-bg: #ecfdf5;
  --ok-text: #065f46;
  --ok-line: #a7f3d0;
  --err-bg: #fef2f2;
  --err-text: #b91c1c;
  --err-line: #fecaca;

  /* Datos del panel */
  --st-ok: #059669;
  --st-warn: #d97706;
  --st-bad: #dc2626;
  --st-info: #0284c7;
  --blood: #dc2626;
  --salary: #047857;
  --accordion-bg: rgba(15, 23, 42, 0.03);
  --accordion-hover: rgba(15, 23, 42, 0.07);

  /* Forma y profundidad */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-pill: 999px;
  --shadow-accent: 0 4px 14px rgba(185, 28, 28, 0.3);
  --shadow-modal: 0 25px 50px rgba(15, 23, 42, 0.35);
  --scrim: rgba(15, 23, 42, 0.75);

  /* Capas */
  --z-bar: 50;
  --z-modal: 1000;
  --z-toast: 1100;

  /* Anchos */
  --w-site: 74rem;
  --w-panel: 60rem;
}

/* Tema oscuro (panel interno): <html class="theme-dark"> */
.theme-dark {
  --bg-page: #090b0e;
  --bg-surface: #111827;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #9ca3af;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --field-bg: rgba(255, 255, 255, 0.06);
  --ghost-bg: rgba(255, 255, 255, 0.08);
  --pill-bg: rgba(255, 255, 255, 0.05);
  --monogram-bg: var(--red-primary);

  --ok-bg: rgba(6, 95, 70, 0.35);
  --ok-text: #6ee7b7;
  --ok-line: rgba(52, 211, 153, 0.35);
  --err-bg: rgba(127, 29, 29, 0.4);
  --err-text: #fca5a5;
  --err-line: rgba(248, 113, 113, 0.3);

  --blood: #f87171;
  --salary: #34d399;
  --accordion-bg: rgba(255, 255, 255, 0.04);
  --accordion-hover: rgba(255, 255, 255, 0.09);

  --shadow-modal: 0 25px 50px rgba(0, 0, 0, 0.8);
  --scrim: rgba(0, 0, 0, 0.82);
  color-scheme: dark;
}
