/* SICENNA 1.0 — tokens de diseño (fuente única de color, tipografía, espaciado y movimiento).
 * Lo usan todas las plantillas. Referencia: Docs/diseno/guia-de-diseno.md */

:root {
  /* Marca Chacao (contractual) */
  --brand: #F58220;
  --brand-hover: #D86E12;
  --brand-tint: #FFF3E9;
  --brand-tint-2: #FFE4CC;
  --brand-ink: #A9520B;           /* naranja legible como texto: 5.4:1 sobre blanco, 5.0:1 sobre --brand-tint */
  --on-signal: #FFFFFF;           /* borde de pines y texto sobre rojo de alerta */
  --logo-plate: #F6F5F2;
  --flag-bg: #FFE9A8; --flag-fg: #3B2A00; --flag-dot: #8A6100;
  --ink: #1A1A1A;
  --ink-2: #262422;
  --ink-3: #34312D;

  /* Crédito Easy Intelligence (discreto) */
  --ei-navy: #161766;
  --ei-deep: #151835;
  --ei-cyan: #00a9ff;

  /* Superficies (neutros teñidos hacia el naranja) */
  --paper: #F6F5F2;
  --surface: #FFFEFC;
  --surface-2: #FAF9F6;
  --sunken: #EFEDE8;
  --overlay: rgba(26, 26, 26, 0.6);

  /* Texto */
  --text: #1A1A1A;
  --text-muted: #5E5A55;
  --text-subtle: #6F6A63;
  --on-ink: #F4F2EE;
  --on-ink-muted: #B9B3AA;
  --on-brand: #1A1A1A;            /* texto sobre naranja: negro Chacao (6.7:1) */

  /* Líneas */
  --rule: #E4E1DB;
  --rule-strong: #CFCAC2;
  --rule-ink: #34312D;

  /* Foco */
  --focus: #D86E12;

  /* Severidad (significados fijos) */
  --sev-leve: #179726;     --sev-leve-ink: #0F6A1A;    --sev-leve-bg: #E8F5EA;
  --sev-riesgo: #d48b40;   --sev-riesgo-ink: #8A4F12;  --sev-riesgo-bg: #FBF0E3;
  --sev-critico: #d11714;  --sev-critico-ink: #A3120F; --sev-critico-bg: #FDECEB;

  /* Estado neutro */
  --info-bg: #EEF0F3; --info-ink: #3D4450;

  /* Tipografía */
  --font-sans: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --text-xs: 0.8125rem;   /* 13px  meta */
  --text-sm: 0.875rem;    /* 14px  controles */
  --text-base: 0.9375rem; /* 15px  cuerpo panel */
  --text-md: 1.0625rem;   /* 17px */
  --text-lg: 1.25rem;     /* 20px */
  --text-xl: 1.5rem;      /* 24px */
  --text-2xl: 1.875rem;   /* 30px */
  --text-3xl: 2.375rem;   /* 38px  cifras KPI */
  --text-4xl: 3rem;       /* 48px  login */
  --leading: 1.55;
  --leading-tight: 1.15;

  /* Espaciado 4 pt */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;

  /* Radios */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;

  /* Sombras (cálidas, cortas) */
  --shadow-1: 0 1px 2px rgba(26, 22, 18, 0.06);
  --shadow-2: 0 6px 14px -6px rgba(26, 22, 18, 0.20);
  --shadow-3: 0 28px 72px -28px rgba(26, 22, 18, 0.45);

  /* Movimiento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;
  --stagger: 50ms;

  /* Layout */
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 76px;
}

:root[data-theme="dark"], html.dark {
  --paper: #121110;
  --surface: #1B1A18;
  --surface-2: #211F1D;
  --sunken: #282623;
  --overlay: rgba(0, 0, 0, 0.62);
  --text: #F2EFEA;
  --text-muted: #C4BEB5;
  --text-subtle: #A39D94;
  --rule: #2E2B28;
  --rule-strong: #403C38;
  --brand-ink: #F8922F;
  --brand-tint: #2A1D12;
  --brand-tint-2: #3A2615;
  --focus: #F8922F;
  --sev-leve-ink: #6CCB78;    --sev-leve-bg: #15261A;
  --sev-riesgo-ink: #E8AE6E;  --sev-riesgo-bg: #2B2016;
  --sev-critico-ink: #F27C79; --sev-critico-bg: #2E1716;
  --info-bg: #23262B; --info-ink: #C9CFD8;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 6px 14px -6px rgba(0, 0, 0, 0.6);
  --shadow-3: 0 28px 72px -28px rgba(0, 0, 0, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-micro: 0ms; --dur-short: 150ms; --dur-long: 150ms; --stagger: 0ms; }
  *, *::before, *::after { animation-duration: 150ms !important; animation-iteration-count: 1 !important; transition-duration: 150ms !important; }
}
