/* Fuente única de colores, tipografías y radios. Tailwind los toma en resources/css/app.css (@theme).
   Cada color se define una sola vez con light-dark(claro, oscuro); el modo lo fija `color-scheme`:
   html[data-theme="system"] sigue al dispositivo, "light" y "dark" lo fuerzan.

   Contrastes WCAG (texto sobre panel / superficie; AA = 4.5):
     rol          claro            oscuro
     ink          15.6 / 14.6      13.4 / 15.0
     muted         5.4 /  5.1       6.6 /  7.4
     primary       8.7 /  8.1       5.5 /  6.1
     accent        5.7 /  5.3       7.3 /  8.2
     danger        6.5 /  6.1       5.4 /  6.0
     success       5.1 /  4.8       6.9 /  7.7
     on-primary sobre primary 8.7 (claro) / 6.2 (oscuro)
     circuitos oscuro sobre panel: ci 4.8, cr 7.3, fi 5.0, fr 7.7
     circuitos claro (líneas, no texto): cr y fr ~2.9 sobre panel */
:root {
    color-scheme: light dark;

    --dhc-surface: light-dark(#f6f7f9, #11161d);
    --dhc-panel: light-dark(#ffffff, #19212b);
    --dhc-line: light-dark(#d9dde3, #2c3745);
    --dhc-ink: light-dark(#1c2430, #e6eaf0);
    --dhc-muted: light-dark(#5f6b7a, #9aa6b5);
    --dhc-primary: light-dark(#1f4e79, #5a9bd5);
    --dhc-on-primary: light-dark(#ffffff, #0b1520);
    --dhc-accent: light-dark(#0a7373, #3cc0c0);
    --dhc-danger: light-dark(#b3261e, #ef6b62);
    --dhc-success: light-dark(#2e7d32, #66bb6a);

    /* Circuitos: impulsión/retorno de calor (CI, CR) y de frío (FI, FR). */
    --dhc-ci: light-dark(#c8372d, #ef5a4f);
    --dhc-cr: light-dark(#e07b1a, #f39a3d);
    --dhc-fi: light-dark(#2563b8, #5b8fe0);
    --dhc-fr: light-dark(#0ea5c6, #3fc1de);

    /* Visor: fases (categórica) y DN (de menor a mayor). Bandas bajo las tuberías, no texto. */
    --dhc-series-1: light-dark(#7b4fd6, #a585f0);
    --dhc-series-2: light-dark(#2f8f4e, #5cc47e);
    --dhc-series-3: light-dark(#b5642a, #e0935b);
    --dhc-series-4: light-dark(#c2387f, #e86aa8);
    --dhc-series-5: light-dark(#5d6b7a, #a0acb9);
    --dhc-series-6: light-dark(#a08a00, #d6c04a);
    --dhc-seq-1: light-dark(#bcd7ee, #2b4a6b);
    --dhc-seq-2: light-dark(#86b3dc, #3d6fa0);
    --dhc-seq-3: light-dark(#4f88c4, #5a95cc);
    --dhc-seq-4: light-dark(#2a5f9e, #86b8e6);
    --dhc-seq-5: light-dark(#0f3a6e, #bcdaf7);

    /* «Obra hoy»: estado de ejecución en el mapa (líneas y puntos, no texto). */
    --dhc-exec-pending: light-dark(#8a94a3, #6b7684);
    --dhc-exec-assembled: light-dark(#c98500, #f0b429);
    --dhc-exec-welded: light-dark(#2e7d32, #66bb6a);
    --dhc-exec-kit: light-dark(#7b4fd6, #a585f0);
    --dhc-exec-annulled: light-dark(#b3261e, #ef6b62);
    /* Ensayos: ensayada (pendiente de informe), apta y pendiente de reparación. */
    --dhc-exec-tested: light-dark(#0277bd, #4fc3f7);
    --dhc-exec-pass: light-dark(#00695c, #4db6ac);
    --dhc-exec-repair: light-dark(#d84315, #ff8a50);

    --dhc-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --dhc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --dhc-radius-sm: 4px;
    --dhc-radius-md: 8px;
    --dhc-radius-lg: 12px;
}

:root[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}
