﻿
/*
    Design tokens de SpiderHood.
    Cambiar el "look and feel" de toda la app pasa por editar estos valores,
    no por tocar color por color en cada página.

    Rediseño, fase 1 (decisión del dueño, 27/10/2026): azul marino de marca,
    dorado como acento (la opción activa del menú y la acción principal que se
    quiere destacar) y un color por significado -- verde azulado = bien
    (pagado, conciliado), rosa = riesgo (deuda, vencido), ámbar = atención
    (pendiente), celeste = parcial o informativo, gris pizarra = neutro
    (cerrada, condonada). El color siempre significa algo: nunca verde para un
    valor negativo. Bootstrap toma estos mismos colores por sus variables
    (--bs-*, al final del bloque), así que las pantallas que todavía no se
    rediseñan cambian de tonalidad solas.
*/

:root {
    /* Paleta principal */
    --sh-primary: #0b1d33;
    --sh-primary-dark: #163457;
    --sh-primary-light: #e8edf4;
    --sh-secondary: #64748b;
    --sh-success: #0d9488;
    --sh-success-light: #f0fdfa;
    --sh-success-ring: #ccfbf1;
    --sh-success-text: #115e59;
    --sh-warning: #d97706;
    --sh-warning-light: #fffbeb;
    --sh-warning-ring: #fef3c7;
    --sh-warning-text: #92400e;
    --sh-danger: #e11d48;
    --sh-danger-light: #fff1f2;
    --sh-danger-ring: #ffe4e6;
    --sh-danger-text: #9f1239;
    --sh-info: #0369a1;
    --sh-info-light: #f0f9ff;
    --sh-info-ring: #e0f2fe;
    --sh-info-text: #075985;
    /* Acento dorado: lo activo y la acción que se quiere destacar (Confirmar, Pagar).
       --sh-accent-text es el dorado legible como texto sobre fondo claro. */
    --sh-accent: #e8b23a;
    --sh-accent-dark: #d9a226;
    --sh-accent-text: #b07e10;
    --sh-accent-light: #f5c64f;
    --sh-accent-soft: #fdf6e3;
    --sh-accent-ring: rgba(232, 178, 58, 0.25);
    --sh-link: #b07e10;
    --sh-link-hover: #8a6209;
    /* Neutrales (gris pizarra) */
    --sh-body-bg: #f4f6f9;
    --sh-surface: #ffffff;
    --sh-surface-muted: #f8fafc;
    --sh-border: #e2e8f0;
    --sh-border-soft: #f1f5f9;
    --sh-border-strong: #cbd5e1;
    --sh-text: #334155;
    --sh-text-muted: #64748b;
    --sh-text-heading: #0f172a;
    /* Texto más tenue: encabezados de tabla y la línea de arriba del título (rediseño, fase 2). */
    --sh-text-subtle: #94a3b8;
    /* Espaciado (escala de 4px) */
    --sh-space-1: 0.25rem;
    --sh-space-2: 0.5rem;
    --sh-space-3: 0.75rem;
    --sh-space-4: 1rem;
    --sh-space-5: 1.5rem;
    --sh-space-6: 2rem;
    --sh-space-8: 3rem;
    /* Bordes y radios: 12px en controles (botones, campos), 16px en tarjetas */
    --sh-radius-sm: 8px;
    --sh-radius-md: 12px;
    --sh-radius-lg: 16px;
    --sh-radius-ctrl: 12px;
    --sh-radius-card: 16px;
    --sh-radius-pill: 50rem;
    --sh-radius-circle: 50%;
    /* Sombras: suaves, la tarjeta se distingue por su borde */
    --sh-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --sh-shadow-md: 0 6px 16px -6px rgba(15, 23, 42, 0.12);
    --sh-shadow-lg: 0 16px 40px -12px rgba(15, 23, 42, 0.22);
    /* Tipografía: Geist (alojada en /fonts/geist, ver base.css) con Inter de respaldo */
    --sh-font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sh-fs-h1: 1.75rem;
    --sh-fs-h2: 1.5rem;
    --sh-fs-h3: 1.25rem;
    --sh-fs-body: 1rem;
    --sh-fs-small: 0.875rem;
    --sh-fs-min: 12px;
    /* Transición estándar para hover/focus en tarjetas y botones */
    --sh-transition: all 0.15s ease-in-out;
    /* Colores de marca: el menú lateral, el login y el sitio público. */
    --sh-brand-navy: #132339;
    --sh-brand-navy-dark: #0b1d33;
    /* El azul marino claro del degradado del chip de ícono del encabezado (rediseño, fase 2). */
    --sh-brand-navy-light: #163457;
    --sh-brand-gold: #e8b23a;
    --sh-brand-gold-dark: #d9a226;
    /* Paleta extendida: usada para distinguir tipos/categorías donde los 5 colores
       semánticos de arriba (primary/success/warning/danger/info) ya están tomados
       por otro significado en la misma pantalla (ej. badges de "tipo de cuota",
       tarjetas de resumen de Home). */
    --sh-purple: #6f42c1;
    --sh-purple-dark: #4a1d96;
    --sh-orange: #fd7e14;
    --sh-orange-dark: #d9480f;
    --sh-teal: #20c997;
    --sh-teal-dark: #099268;
    /* Escala de "mapa de calor" (de menor a mayor gravedad) -- usada hoy en el
       reporte de Morosidad para resaltar filas por monto de deuda relativo. */
    --sh-heat-1: #fff8f9;
    --sh-heat-2: #fff1f3;
    --sh-heat-3: #ffe9ed;
    --sh-heat-4: #ffdfe5;
    --sh-heat-5: #ffd5dd;
    /* Bootstrap con la paleta: botones, alertas, textos (text-success...), fondos
       (bg-danger...), enlaces y campos. Los *-rgb van como número porque Bootstrap
       arma rgba() con ellos. */
    --bs-primary: var(--sh-primary);
    --bs-primary-rgb: 11, 29, 51;
    --bs-secondary: var(--sh-secondary);
    --bs-secondary-rgb: 100, 116, 139;
    --bs-success: var(--sh-success);
    --bs-success-rgb: 13, 148, 136;
    --bs-danger: var(--sh-danger);
    --bs-danger-rgb: 225, 29, 72;
    --bs-warning: var(--sh-warning);
    --bs-warning-rgb: 217, 119, 6;
    --bs-info: var(--sh-info);
    --bs-info-rgb: 3, 105, 161;
    --bs-primary-bg-subtle: var(--sh-primary-light);
    --bs-primary-border-subtle: var(--sh-border-strong);
    --bs-primary-text-emphasis: var(--sh-primary);
    --bs-success-bg-subtle: var(--sh-success-light);
    --bs-success-border-subtle: var(--sh-success-ring);
    --bs-success-text-emphasis: var(--sh-success-text);
    --bs-danger-bg-subtle: var(--sh-danger-light);
    --bs-danger-border-subtle: var(--sh-danger-ring);
    --bs-danger-text-emphasis: var(--sh-danger-text);
    --bs-warning-bg-subtle: var(--sh-warning-light);
    --bs-warning-border-subtle: var(--sh-warning-ring);
    --bs-warning-text-emphasis: var(--sh-warning-text);
    --bs-info-bg-subtle: var(--sh-info-light);
    --bs-info-border-subtle: var(--sh-info-ring);
    --bs-info-text-emphasis: var(--sh-info-text);
    /* Bootstrap pinta con --bs-body-bg los campos, modales, menús y listas: va la
       superficie (blanca). El fondo de la página lo pone base.css con --sh-body-bg. */
    --bs-body-bg: var(--sh-surface);
    --bs-body-color: var(--sh-text);
    --bs-body-font-family: var(--sh-font-sans);
    --bs-secondary-color: var(--sh-text-muted);
    --bs-tertiary-bg: var(--sh-surface-muted);
    --bs-border-color: var(--sh-border);
    --bs-border-radius: var(--sh-radius-ctrl);
    --bs-border-radius-lg: var(--sh-radius-card);
    --bs-link-color: var(--sh-link);
    --bs-link-color-rgb: 176, 126, 16;
    --bs-link-hover-color: var(--sh-link-hover);
    --bs-link-hover-color-rgb: 138, 98, 9;
    --bs-focus-ring-color: var(--sh-accent-ring);
}

/*
    Modo oscuro (se mantiene, decisión del dueño 27/10/2026): fondos azul
    noche, texto claro y los "*-light" como un velo del color sobre el fondo
    oscuro. El azul marino de marca no se lee sobre fondo oscuro, así que acá
    se usa un azul más claro como primario; el dorado y los colores por
    significado se aclaran para leerse como texto. El atributo data-bs-theme lo
    pone wwwroot/js/theme.js (Profile > Preferencias).
*/
[data-bs-theme="dark"] {
    --sh-primary: #4a6fa5;
    --sh-primary-dark: #5b82b8;
    --sh-primary-light: rgba(74, 111, 165, 0.22);
    --sh-secondary: #94a3b8;
    --sh-success-light: rgba(13, 148, 136, 0.18);
    --sh-success-ring: rgba(45, 212, 191, 0.25);
    --sh-success-text: #5eead4;
    --sh-warning-light: rgba(217, 119, 6, 0.18);
    --sh-warning-ring: rgba(251, 191, 36, 0.25);
    --sh-warning-text: #fcd34d;
    --sh-danger-light: rgba(225, 29, 72, 0.18);
    --sh-danger-ring: rgba(251, 113, 133, 0.25);
    --sh-danger-text: #fda4af;
    --sh-info-light: rgba(3, 105, 161, 0.22);
    --sh-info-ring: rgba(56, 189, 248, 0.25);
    --sh-info-text: #7dd3fc;
    --sh-accent-text: #f5c64f;
    --sh-accent-soft: rgba(232, 178, 58, 0.15);
    --sh-link: #f5c64f;
    --sh-link-hover: #fad97a;
    /* Neutrales */
    --sh-body-bg: #0f1724;
    --sh-surface: #172233;
    --sh-surface-muted: #1e2b3f;
    --sh-border: #2a3a52;
    --sh-border-soft: #223047;
    --sh-border-strong: #3a4d6a;
    --sh-text: #e2e8f0;
    --sh-text-muted: #94a3b8;
    --sh-text-heading: #f8fafc;
    --sh-text-subtle: #7c8ba1;
    /* Sombras: un poco más marcadas para que se noten sobre fondo oscuro */
    --sh-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --sh-shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
    --sh-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
    /* Heat-map: los mismos 5 pasos de arriba pero oscurecidos -- el texto de la
       fila usa --sh-text (claro en este tema), así que el fondo tiene que
       oscurecerse en vez de sólo cambiar de tono. */
    --sh-heat-1: rgba(225, 29, 72, 0.06);
    --sh-heat-2: rgba(225, 29, 72, 0.10);
    --sh-heat-3: rgba(225, 29, 72, 0.15);
    --sh-heat-4: rgba(225, 29, 72, 0.20);
    --sh-heat-5: rgba(225, 29, 72, 0.26);
    /* Bootstrap: el primario y el enlace cambian en oscuro (los *-rgb no se
       derivan solos de las variables de arriba). */
    --bs-primary-rgb: 74, 111, 165;
    --bs-secondary-rgb: 148, 163, 184;
    /* text-success/text-danger/... sobre fondo oscuro: los tonos claros de cada color */
    --bs-success-rgb: 45, 212, 191;
    --bs-danger-rgb: 251, 113, 133;
    --bs-warning-rgb: 251, 191, 36;
    --bs-info-rgb: 56, 189, 248;
    --bs-link-color-rgb: 245, 198, 79;
    --bs-link-hover-color-rgb: 250, 217, 122;
}
