/* ============================================================
   Proingesa Intranet — Design Tokens
   Referencias: sistema HH (azul) + sitio corporativo (tipografía + rojo)
   Uso: importar junto con fonts.css. Soporta modo claro/oscuro.
   ============================================================ */
:root {
  /* Marca */
  --px-red: #dd183b;        /* rojo corporativo (logo, alertas, acentos puntuales) */
  --px-red-deep: #b5122f;
  --px-red-soft: #fde7eb;

  /* Acento azul (sistema HH) */
  --px-blue: #4f7fd6;
  --px-blue-deep: #3a63bf;
  --px-blue-soft: #99bbe8;
  --px-blue-wash: #eaf0fb;

  /* Neutros */
  --px-bg: #eef1f6;
  --px-surface: #ffffff;
  --px-surface-2: #f5f6f9;
  --px-surface-3: #eceef3;
  --px-ink: #17191e;
  --px-ink-2: #3a3a3a;
  --px-ink-3: #727885;
  --px-line: #e2e5ec;
  --px-line-2: #d4d8e2;

  /* Estado (semánticos, independientes del acento) */
  --px-good: #1f9d57;  --px-good-soft: #e3f4ea;
  --px-warn: #c47d12;  --px-warn-soft: #fbefd8;
  --px-danger: #dd183b; --px-danger-soft: #fde7eb;

  /* Radios */
  --px-radius-sm: 10px;
  --px-radius: 14px;
  --px-radius-lg: 20px;

  /* Gradientes */
  --px-grad-blue: linear-gradient(135deg, #5d8ae0, #3a63bf);
  --px-grad-dark: linear-gradient(135deg, #22252d, #15171c);

  /* Sombras (5 niveles + color). Usar distintos niveles por contexto. */
  --px-sh-flat: 0 0 0 1px var(--px-line);
  --px-sh-sm: 0 1px 2px rgba(23,30,50,.05), 0 2px 6px rgba(23,30,50,.05);
  --px-sh-md: 0 2px 4px rgba(23,30,50,.04), 0 10px 24px rgba(23,30,50,.09);
  --px-sh-lg: 0 12px 24px rgba(23,30,50,.08), 0 30px 60px rgba(23,30,50,.16);
  --px-sh-blue: 0 6px 16px rgba(58,99,191,.32);
  --px-sh-red: 0 6px 16px rgba(221,24,59,.28);
  --px-sh-inset: inset 0 1px 2px rgba(23,30,50,.06);

  /* Tipografía */
  --px-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --px-body: 'Manrope', ui-sans-serif, system-ui, 'Segoe UI', Arial, sans-serif;
}

/* Modo oscuro: por preferencia del sistema o por atributo data-theme */
:root[data-theme="dark"],
:root.dark {
  --px-bg: #0c0e13; --px-surface: #171a21; --px-surface-2: #12141a; --px-surface-3: #1d212a;
  --px-ink: #edf0f6; --px-ink-2: #c3c9d4; --px-ink-3: #828b9c; --px-line: #272b35; --px-line-2: #333845;
  --px-blue: #6f96e4; --px-blue-deep: #5781d8; --px-blue-soft: #38507a; --px-blue-wash: #1a2740;
  --px-red: #f0415f; --px-red-deep: #d82746; --px-red-soft: #3a161c;
  --px-good-soft: #10291c; --px-warn-soft: #2d2410; --px-danger-soft: #3a161c;
  --px-grad-blue: linear-gradient(135deg, #5781d8, #3a5bb0);
  --px-sh-sm: 0 1px 2px rgba(0,0,0,.4);
  --px-sh-md: 0 2px 4px rgba(0,0,0,.3), 0 12px 28px rgba(0,0,0,.45);
  --px-sh-lg: 0 16px 32px rgba(0,0,0,.4), 0 36px 70px rgba(0,0,0,.6);
  --px-sh-blue: 0 6px 18px rgba(58,99,191,.5);
  --px-sh-red: 0 6px 18px rgba(221,24,59,.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]):not(.light) {
    --px-bg: #0c0e13; --px-surface: #171a21; --px-surface-2: #12141a; --px-surface-3: #1d212a;
    --px-ink: #edf0f6; --px-ink-2: #c3c9d4; --px-ink-3: #828b9c; --px-line: #272b35; --px-line-2: #333845;
    --px-blue: #6f96e4; --px-blue-deep: #5781d8; --px-blue-soft: #38507a; --px-blue-wash: #1a2740;
    --px-red: #f0415f; --px-red-deep: #d82746; --px-red-soft: #3a161c;
    --px-good-soft: #10291c; --px-warn-soft: #2d2410; --px-danger-soft: #3a161c;
    --px-grad-blue: linear-gradient(135deg, #5781d8, #3a5bb0);
    --px-sh-sm: 0 1px 2px rgba(0,0,0,.4);
    --px-sh-md: 0 2px 4px rgba(0,0,0,.3), 0 12px 28px rgba(0,0,0,.45);
    --px-sh-lg: 0 16px 32px rgba(0,0,0,.4), 0 36px 70px rgba(0,0,0,.6);
  }
}
