/* ══════════════════════════════════════════════════════════════════════════════
   style.css — Hoja de estilos global LAESH uipv1
   ══════════════════════════════════════════════════════════════════════════════

   TABLA DE CONTENIDO (orden de fuente = prioridad ascendente)
   ──────────────────────────────────────────────────────────────────────
   1. §BASE           — Reset global, body, utilidades, componentes
                        compartidos (nav, botones, tarjetas, mapa,
                        footer, sidebar, dropdowns, fieldset).
                        Cargado por TODOS los portales y la landing.

   2. style-website.css — Estilos exclusivos de landing page (archivo
                          separado, cargado por index.php únicamente).

   3. §PORTAL-UTILS   — P-LAESH-01 Form Controls & Portal Utilities
                        Controles de formulario, utilities, Phase3,
                        modal de login. Cargado por portales y landing.
                        Clases portal-only (badges, nav-item, bell,
                        form-legend) → ahora en portal.css.

   4. §MEDIA QUERIES  — Media queries globales. Al final del archivo
                        → máxima prioridad dentro de style.css.

   JERARQUÍA DE CASCADE (mayor → menor prioridad):
     portal.css / landing.css (cargados al final) > §PORTAL-UTILS > §BASE

   ARCHIVOS QUE CARGAN style.css:
     Portales (medicos/labadmin/gestion-web): style.css + portal.css
     Landing (index.html):  style.css + style-website.css + landing.css
   ──────────────────────────────────────────────────────────────────────
   2026-08-17: MAINT-01 L1+L2+L3 split completo
   2026-09-07: Eliminados @layer base/portal-utils/website — compatibilidad
               Chrome 49+ sin polyfill; cascada preservada por orden de fuente.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   Reset global mínimo — afecta TODOS los portales y landing.
   landing.css sobreescribe body con su propio display/align/etc.
   ───────────────────────────────────────────────────────────────── */
html {
    overflow-x: clip;   /* impide que el documento crezca más ancho que el viewport;
                           'clip' (≠ hidden) NO crea scroll-container: position:fixed
                           sigue anclado al viewport real, no al documento. */
}
/* CSS-09: propiedades de reset fusionadas en el bloque principal (línea ~100) */

/* ── BLINDAJE-IMG-01 ──────────────────────────────────────────────────────────
   Razón: si <img width="N" height="M"> tiene solo CSS height sin CSS width, el
   browser usa el atributo HTML width como layout-width, rompiendo el layout.
   Bug detectado 2026-08-15: logo con width="2634" ocupaba 2634px → nav off-screen.
   Solución preventiva: width:auto es forzado en todos los logos e imágenes de navbar.
   Las reglas específicas en landing.css y responsive.css refuerzan este default.
   ─────────────────────────────────────────────────────────────────────────── */
.hero-logo,
.navbar-sticky .logo img { width: auto; }

/* ── Utilidades de visibilidad global ── */
/* d-none: oculta el elemento. Disponible en TODOS los HTML que carguen style.css.
   portal.css tiene su propia copia; aquí se garantiza para landing e index. */
.d-none { display: none; }

/* Tokens de diseño globales migrados a tokens.css */

/* Accessibility: skip-to-content link (visible solo al recibir foco de teclado).
   index.html tiene su propia copia en el <style> inline; este bloque la cubre
   para TODOS los demás pages que cargan style.css directamente. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* A-02: Estado de foco visible global — WCAG 2.1 SC 2.4.7 */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Utilidad: encabezado semántico h1 dentro de portales (nav breadcrumb)
   Resetea los estilos de bloque del navegador para que h1 se vea igual
   que un <span> en ese contexto. */
.portal-h1 {
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    margin: 0;
    padding: 0;
    display: inline;
    line-height: inherit;
    letter-spacing: inherit;
}

/* Utilidad accesibilidad: oculta visualmente un elemento pero lo mantiene
   disponible para lectores de pantalla. */
.visually-hidden,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* W3: Scroll suave global (movido desde atributo HTML inline — más correcto en CSS).
   W4: Se anula si el usuario tiene configurada accesibilidad de movimiento reducido. */
html { scroll-behavior: smooth; }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Reset */
    margin: 0;           /* anula el margin:8px por defecto del navegador */
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    overflow-x: clip;    /* iOS Safari: impide desbordamiento horizontal en body */
    /* Estilo */
    font-family: 'Gill Sans', 'Gill Sans MT', 'Cabin', Calibri, 'Trebuchet MS', sans-serif;
    background-color: #e2e8f0;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    padding: env(safe-area-inset-top, 2.5rem) env(safe-area-inset-right, 1rem) env(safe-area-inset-bottom, 2.5rem) env(safe-area-inset-left, 1rem);
    min-height: 100dvh;
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Mosquito Std Black', 'Arial Black', Impact, sans-serif;
}

/* Public Nav */
.navbar {
    background: var(--bg-surface);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--primary);
}



.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}@media (hover: hover) and (pointer: fine) {
    .nav-links a:hover {
        color: var(--primary); /* A6-fix: green text on white = 1.99:1 → blue WCAG AA 4.6:1 */
    }
}

/* ── Catálogo Público de Precios (index.html) — filas estudio + precio ── */
.precio-cat-item {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 4px 0; font-size: 0.79rem; line-height: 1.4;
    border-bottom: 1px dashed #e2e8f0; color: var(--text-main); gap: 8px;
}
.precio-cat-item:last-child { border-bottom: none; }
.precio-cat-nombre { flex: 1; }

/* UI Elements */
.card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    margin-bottom: 1.75rem;
}

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background: var(--primary-green);
    color: #0B1830; /* A6-fix: dark text on #71CA11 = 8.38:1 WCAG AAA; white was 1.99:1 */
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(113, 202, 17, 0.2);
}@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover {
        background: var(--primary);
    color: #fff; /* A6-fix: white on blue #0052B7 = 8.59:1 WCAG AAA */
    box-shadow: 0 6px 14px rgba(0, 82, 183, 0.3);
    transform: translateY(-1px);
    }
}

.btn-secondary { 
    background: var(--secondary-green); 
    color: var(--primary); 
}@media (hover: hover) and (pointer: fine) {
    .btn-secondary:hover {
        background: #B3DCF2; 
    transform: translateY(-1px);
    }
}

.btn-dark {
    background: #475569;
    color: #ffffff;
    border: 1px solid #334155;
}@media (hover: hover) and (pointer: fine) {
    .btn-dark:hover {
        background: #334155;
        color: #ffffff;
        transform: translateY(-1px);
    }
}

.btn-cancelar-close {
    background: #e2e8f0;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    padding: 0;
    flex-shrink: 0;
}@media (hover: hover) and (pointer: fine) {
    .btn-cancelar-close:hover {
        background: #cbd5e1;
        color: #0f172a;
    }
}

input:not([type="radio"]):not([type="checkbox"]), select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    box-sizing: border-box;
}

/* C7-fix: outline visible para teclado (WCAG 2.4.7). Mouse/touch: solo border+shadow sin outline. */
input:focus, select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 183, 0.12);
}
input:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;   /* mouse/touch: limpio visualmente, sin perder accesibilidad de teclado */
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* Data Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
}

td {
    font-size: 0.95rem;
}@media (hover: hover) and (pointer: fine) {
    tr:hover td {
        background: #fdfdfd;
    }
}

/* Modal */
/* ── Ventanas emergentes LAESH — estilo corporativo homologado ───
   Paleta oficial: #71CA11 verde · #0052B7 azul · #A3C912 verde sec.
   Las ventanas son MOVIBLES (drag por cabecera) y REDIMENSIONABLES
   (resize nativo en esquina inferior derecha — ver initModalDrag() en app.js).
   ─────────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45); /* pizarra oscuro transparente — mantiene el contraste sin difuminar */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}
.modal.show { display: flex; }

/* Contenedor redimensionable */
.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 650px;
    box-shadow: 0 24px 50px -8px rgba(0,82,183,0.24),
                0 0 0 1px rgba(0,82,183,0.1);
    /* Habilitar resize nativo del navegador */
    resize: both;
    overflow: auto;
    min-width: 300px;
    min-height: 140px;
    /* El padding lo ponemos en el modal-body para que el header sea flush */
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ── Cabecera homologada: fondo azul LAESH + acento verde ── */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);          /* #0052B7 */
    color: #fff;
    padding: 0.85rem 1.1rem 0.85rem 1.4rem;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid var(--primary-green); /* #71CA11 */
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}
.modal-header:active { cursor: grabbing; }

.modal-header h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.01em;
}

/* Botón ✕ en cabecera — blanco sobre azul */
.close-modal {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}@media (hover: hover) and (pointer: fine) {
    .close-modal:hover {
        background: rgba(255,255,255,0.32); color: #fff;
    }
}

/* Cuerpo del modal — reemplaza el antiguo padding en modal-content */
.modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    flex: 1;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-green) 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    border-radius: 12px;
    margin: 2rem;
}

/* ── fin §BASE ── */



/* ── §PORTAL-UTILS ── */

/* ════════════════════════════════════════════════════════════════════════════
   P-LAESH-01 — Form Controls & Portal Utilities
   Extraído de inline styles en medicos.html y labadmin.html (2026-08-13)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Etiquetas de formulario ── */
.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}
.form-label--sm {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}
.req { color: #ef4444; }          /* asterisco campo requerido */

/* ── Inputs y selects ── */
.form-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.93rem;
    color: var(--text-main);
}
.form-input--bg {
    background: var(--bg-surface);
    transition: border-color .2s;
}
.form-select { appearance: none; -webkit-appearance: none; }

/* Input compacto (labadmin tablas) */
.form-input-sm {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.9rem;
}
.form-input-sm--bg  { background: #fff; }
.form-input-sm--resize { resize: vertical; }

/* Select pequeño (filtros de tabla) */
.select-sm {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}
.select-sm--bg { background: #fff; cursor: pointer; }

/* ── Wrapper select con flecha CSS ── */
.form-field { position: relative; }

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    width: 0;
    height: 0;
    display: inline-block;
}

/* ── Encabezado de sección modal ── */
.modal-sect-hd {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 10px;
}
.modal-sect-hd--plain { flex-wrap: nowrap; gap: 0; }

/* ── Barra de progreso (labadmin) ── */
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.progress-track {
    background: #e2e8f0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

/* ── Overlay Solicitud Digital — iframe embebido, sin nueva ventana ── */
.sol-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.sol-overlay iframe {
    width: min(900px, 98vw);
    height: 92vh;
    border: none;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
@media (max-width: 768px) {
    .sol-overlay {
        padding: 0 !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }
    .sol-overlay iframe {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        max-width: 100vw !important;
        max-height: 100dvh !important;
    }
}
/* Botón de cierre en el overlay padre (Poka-Yoke: garantiza salida en móviles y desktop) */
.sol-overlay-btn-close {
    position: fixed;
    top: max(8px, env(safe-area-inset-top, 8px));
    right: max(8px, env(safe-area-inset-right, 8px));
    z-index: 10005;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #ffffff;
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    padding: 0;
}
.sol-overlay-btn-close:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    transform: scale(1.05);
}
body.sol-overlay-open {
    overflow: hidden !important;
    touch-action: none;
}
/* 2026-09-30 (BUG-CSS-SELECTOR-HUERFANO-01, corregido en auditoría): a esta
   regla le faltaba el selector — las declaraciones de abajo quedaban
   flotando sin ningún selector que las agrupara, por lo que el navegador
   las descarta por completo. El fix GAP-PERF-DAC-01 descrito en el
   comentario nunca llegó a aplicarse en producción por este bug de sintaxis. */
.sol-overlay iframe {
    /* GAP-PERF-DAC-01 (2026-09-24): oculto hasta que solicitud-dac.js marca
       #sol-overlay.sol-ready (datos ya poblados) — evita el rectángulo
       blanco vacío mientras el fetch de la orden está en curso.
       Autoauditoría (mismo día): opacity:0 solo no basta —
       - pointer-events:none evita interactuar con un documento a medio
         poblar (ej. el botón Imprimir del propio iframe) mientras es
         invisible pero técnicamente seguiría siendo clicable.
       - visibility:hidden saca el iframe del árbol de accesibilidad
         mientras carga — sin esto, un lector de pantalla podría anunciar
         los placeholders "—" antes de que el documento tenga datos reales.
         visibility no anima, pero al pasar a "visible" al mismo tiempo que
         empieza el fade-in de opacity no se necesita ningún ajuste de
         transition-delay (el caso inverso — ocultar de nuevo — no ocurre
         aquí, el iframe nunca vuelve a taparse tras revelarse). */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.sol-overlay.sol-ready iframe {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.sol-overlay-spinner {
    position: absolute;
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sol-overlay-spin 0.8s linear infinite;
}
.sol-overlay.sol-ready .sol-overlay-spinner {
    display: none;
}
@keyframes sol-overlay-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .sol-overlay-spinner {
        animation: none;
    }
}
/* Al imprimir desde el overlay iframe en portales:
   Ocultar SOLO elementos del portal (.portal-access-header, .app-layout) — estas
   clases NO existen en solicitud_dac_impr.html, por lo que esta regla no afecta
   el print de la solicitud cuando imprime desde su propio contexto. */

/* ── Barras de Reportes — colores CSP-safe (sin inline style) ── */
.bar-fill           { height: 100%; }
.bar-color-green    { background: #71CA11; }
.bar-color-blue     { background: #0052B7; }
.bar-color-amber    { background: #F59E0B; }
.bar-color-purple   { background: #8B5CF6; }
.bar-color-red      { background: #EF4444; }

/* ── Estado en autocomplete expandido ── */
.autocomplete-estado { font-size: 0.75rem; font-weight: 600; color: #0284c7; }


/* ── Utilities compartidas portales ── */
.col-group          { display: flex; flex-direction: column; gap: 12px; }
.flex-ic-8          { display: flex; align-items: center; gap: 8px; }
.d-inline-flex-ac   { display: inline-flex; align-items: center; gap: 8px; }
.chevron-right      { flex-shrink: 0; transform: rotate(-90deg); transition: transform 0.2s; }
.txt-muted-sm       { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.txt-muted-xs       { font-size: 0.8rem;  color: var(--text-muted); font-weight: 600; }
.txt-muted-xs-upper { font-size: 0.8rem;  color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.txt-pgd            { color: var(--primary); }
.txt-pgd-lg         { color: var(--primary); font-size: 1.5rem; margin-bottom: 1rem; }
.txt-danger         { color: #dc2626; }
.fw-600             { font-weight: 600; }
.flex-1             { flex: 1; }
.cursor-p           { cursor: pointer; }
.mb-0               { margin: 0; }

/* ── P-LAESH-01 extra: portal shared utilities ── */
.form-checkbox  { width: auto; margin: 0; accent-color: var(--primary); }
.badge-reset    { font-size: 0.82rem; padding: 0.4rem 0.85rem;
                  background: #edf2f7; color: #475569;
                  border: 1px solid #cbd5e1; display: inline-flex; align-items: center; gap: 5px; }
.badge-reset-sm { font-size: 0.82rem; padding: 0.4rem 0.85rem; }
.stat-num       { font-size: 2rem; font-weight: 700; margin-top: 5px; }
.stat-num--pgd  { color: var(--primary); }
.stat-num--lst  { color: var(--state-listos-text); }
.stat-num--danger { color: #EF4444; }
.stat-num--atn  { font-size: 2rem; font-weight: 700; color: var(--state-atencion-text); margin-top: 5px; }
.stat-num--main { font-size: 2rem; font-weight: 700; color: var(--text-main); margin-top: 5px; }
.portal-logo    { height: 65px; width: auto; object-fit: contain; }
.form-input-ta  { margin-bottom: 0; font-size: 0.92rem; padding: 0.5rem;
                  border-radius: 6px; border: 1px solid #cbd5e1; width: 100%; }
.form-row-gap   { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.form-col-1rem  { display: flex; flex-direction: column; gap: 1rem; }
.txt-muted-4    { color: var(--text-muted); margin: 4px 0 0; }
.txt-muted-5    { color: var(--text-muted); margin: 5px 0 0 0; }
.txt-primary-fw { color: var(--primary); font-weight: 700; }
.font-mosquito  { font-family: 'Mosquito Std Black','Arial Black',Impact,sans-serif;
                  font-size: 0.95rem; letter-spacing: 0.01em; }
.portal-access-link { display: flex; align-items: center; text-decoration: none; }
.user-badge-portal  { display: flex; align-items: center; gap: 6px; font-size: 0.85rem;
                       font-weight: 600; color: var(--text-main);
                       background: rgba(0,82,183,0.06); padding: 6px 14px;
                       border-radius: 20px; border: 1px solid rgba(0,82,183,0.12); }
.btn-back-primary   { display: flex; align-items: center; gap: 6px; font-size: 0.82rem;
                       font-weight: 600; color: #0052B7; text-decoration: none;
                       background: rgba(0,82,183,0.08); padding: 6px 14px;
                       border-radius: 6px; border: 1px solid rgba(0,82,183,0.25); }
.sfs-dropdown { display: none; position: fixed; top: 0; left: 0; width: 260px;
                background: white; border: 1px solid var(--primary-green-light);
                border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
                z-index: 1050; max-height: 180px; overflow-y: auto; }
.label-flex   { font-weight: 400; display: flex; align-items: center;
                gap: 5px; cursor: pointer; font-size: 0.92rem; }
/* Especificidad (0,2,0) → supera .form-group label {display:block} (0,1,1)
   Garantiza que los label-flex dentro de d-flex-gap-row siempre sean flex
   (aplica a Sexo H/M y a cualquier otro grupo radio/checkbox en la UI) */
.d-flex-gap-row > .label-flex { display: flex; align-items: center; }

.modal-footer-btns{ display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.modal-login-box { max-width: 360px; }
.d-flex-col-gap1{ display: flex; flex-direction: column; gap: 1.1rem; }
.d-flex-gap-row { display: flex; gap: 14px; align-items: center; margin-top: 9px; }
.btn-overlay-sm { display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px;
                  font-size: 0.82rem; font-weight: 600; font-family: inherit;
                  background: rgba(0,0,0,0.25); color: #fff;
                  border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; cursor: pointer; }
.fnt-cursor     { font-size: 0.8rem; cursor: pointer; }
.header-sep-green { color: #cbd5e1; display: flex; align-items: center; }

/* ── CSS-05: duplicados eliminados — solo clases nuevas de Phase3 ── */
.txt-main      { color: var(--text-main); }
.fw-bold       { font-weight: 700; }
/* PT-03: breadcrumb label activa — azul LAESH forzado sobre herencia del grupo */
#header-bc-current { color: var(--primary); font-weight: 700; }
.txt-main.fw-600 { color: var(--text-main); font-weight: 600; }
.tab-bar-btns  { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; align-items: center; padding: 0 4px 2px 14px; }
.tab-bar-ac    { align-items: center; gap: 0; }
.mt-0          { margin-top: 0; }
.mb-sm         { margin-bottom: 0.5rem; }
.select-sm--bg { background: white; cursor: pointer; }
.strong-primary { color: var(--primary); }
/* index.html patterns */
.scroll-sm-top { scroll-margin-top: 140px; }
.sec-pad-1     { padding: 1rem 0; }
.sec-pad-1-5   { padding: 1.5rem 0; }
.sec-promo     { background: #f8fafc; padding: 0.5rem 0; }
/* .grid-1-2 definido en landing.css con proporciones mejoradas */
.grid-layout.grid-1-1-auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; align-items: start; margin-bottom: 0.75rem; }
.contact-resp-body { font-size: 0.92rem; line-height: 1.55; color: var(--text-muted); }
.resp-name     { color: var(--text-main); font-weight: 600; }
.resp-title    { color: var(--text-main); display: block; font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.acerca-h3     { color: var(--primary); margin-bottom: 0.85rem; font-size: 1rem; }
.acerca-flex   { display: flex; flex-direction: column; gap: 7px; }
.acerca-h3b    { color: var(--primary); margin-bottom: 0.75rem; font-size: 1rem; flex-shrink: 0; }
.faq-p--text   { color: var(--text-muted); font-size: 0.87rem; line-height: 1.7; margin-bottom: 0.5rem; }
.faq-p--text2  { color: var(--text-muted); font-size: 0.84rem; line-height: 1.6; margin-bottom: 0.9rem; }
.faq-p--primary { color: var(--primary); font-weight: 600; font-size: 0.87rem; margin-bottom: 0.5rem; }
.faq-p--tail   { color: var(--text-muted); font-size: 0.87rem; line-height: 1.7; margin: 0; }
.modal-scroll-h { max-height: 70vh; overflow-y: auto; }
.modal-p       { color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; margin-bottom: 1rem; }
.modal-p--main { color: var(--text-main); font-size: 0.88rem; font-weight: 700; margin-bottom: 0.35rem; }
.modal-p--sm   { color: var(--text-muted); font-size: 0.8rem; font-style: italic; margin-bottom: 1rem; }
.modal-p--pgd  { color: var(--primary); font-weight: 700; font-size: 0.88rem; margin-bottom: 0.35rem; }
.modal-p--tail  { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; margin: 0; }
.chevron-arrow-svg { flex-shrink: 0; transition: transform 0.2s; }

/* mob-user-chip avatar color por rol */
.mob-user-chip__avatar--admin { background: var(--primary); }

/* G-5: scroll-margin-top global para nav sticky */
.section {
    scroll-margin-top: 110px;
}
/* Componentes de portal (fichas, dropdowns, ops menu) migrados a portal.css */

/* ── Login Modal (index.html) ── */
#modal-login .modal-header {
    background: #475569; /* Gray (Slate 600) */
    color: #fff;
    border-bottom: 3px solid var(--accent); /* Verde Fuerte LAESH */
}
#modal-login .btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
#modal-login .btn-primary:hover {
    background: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
}




/* ── fin §PORTAL-UTILS ── */


/* --- MEDIA QUERIES ABSORBIDAS DESDE RESPONSIVE.CSS --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .animate-on-scroll { opacity: 1 !important; transform: none !important; }
    .whatsapp-float::before { animation: none !important; }
}

@media (max-width: 1024px) {
    .nav-hamburger,
        .close-modal,
        .carousel-arrow-btn {
            min-width: 44px;
            min-height: 44px;
        }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLASH MESSAGES — Mecanismo estándar de feedback server→cliente (HTMX)
   Insertados por commons/Response.php en el target del request HTMX.
   Clases: .flash  +  .flash--error | .flash--success | .flash--warn
   ═══════════════════════════════════════════════════════════════════════════ */
.flash {
    display: block;
    padding: 0.55rem 0.85rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 0.25rem;
    animation: flash-in 0.18s ease-out both;
}

@keyframes flash-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.flash--error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
}

.flash--success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #15803D;
}


/* Target vacío — colapsar sin salto de layout */
.flash:empty { display: none; }

/* ── Utilidades Básicas de Maquetación ─────────────────────────────────────── */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.pt-3 { padding-top: 1rem; }
.pb-3 { padding-bottom: 1rem; }

.border-top { border-top: 1px solid var(--border, #e2e8f0); }
.border-bottom { border-bottom: 1px solid var(--border, #e2e8f0); }
.fs-sm { font-size: 0.95rem; }
