.buscador-grande {
    width: 100%;
    max-width: 500px !important; /* Ajusta el ancho máximo que quieres */
    min-width: 350px !important; /* Asegura que nunca se quede pequeño */
}

/* ======================================================
   📄 PÁGINAS LEGALES – ESTILO CORPORATIVO
   ====================================================== */

/* ===== TARJETA LEGAL ===== */

    .legal-card {
        max-width: 900px;
        width: 100%;
        background: #eef3f1;
        border-radius: 18px;
        padding: 50px 48px;
        box-shadow: 0 10px 30px rgba(0,0,0,.08);
        border-left: 4px solid #198754;
        border-right: 4px solid #198754;
    }

    .legal-card h1 {
        font-size: 32px;
        margin-bottom: 45px;
        color: #111F27;
    }

    .legal-card h2 {
        font-size: 30px;
        font-weight: 700;
        margin-bottom: 45px;
        color: #111F27;
        text-align: center;
    }


        .legal-card h4 {
            margin-top: 30px;
            font-size: 18px;
            color: #111F27;
        }

        .legal-card p {
            color: #444;
            line-height: 1.6;
            margin-top: 10px;
        }

    .footer-legal {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 78px; /* 👈 separación real */
        padding: 18px 12px;
        background: #111F27;
        color: white;
        font-size: 14px;
        flex-wrap: wrap; /* móvil OK */
    }

    .footer-links a {
        color: #ffffff; /* 👈 alto contraste */
        text-decoration: none;
        font-weight: 500;
        opacity: 0.9;
        transition: color .2s ease, opacity .2s ease;
    }

    .footer-links a:hover {
        color: #198754; /* 👈 verde corporativo */
        opacity: 1;
        text-decoration: underline;
    }

/* ===========================
   LAYOUT PÁGINAS LEGALES
   =========================== */

.legal-header {
    background: #111F27;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

    .legal-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 24px;
    }

    .legal-header .logo {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .legal-header img {
        height: 46px;
    }

    .legal-header nav a {
        color: white;
        font-weight: 600;
        margin-left: 20px;
        text-decoration: none;
    }

    .legal-main {
        background: linear-gradient(135deg, #eef1f4, #f8fafc);
        min-height: calc(100vh - 140px);
        padding: 80px 20px;
        display: flex;
        justify-content: center;
    }

    .legal-section h2 {
        margin-bottom: 40px;
    }

    .legal-section h4 {
        margin-top: 32px;
    }

    .legal-section p {
        margin-top: 10px;
    }

    .nav-acceder {
        background: #198754;
        color: white !important;
        padding: 8px 14px;
        border-radius: 6px;
        font-weight: 600;
        text-decoration: none;
        transition: background .2s ease;
    }

    .nav-acceder:hover {
        background: #157347;
    }

    /* ===========================
       FIX COLORES HEADER / FOOTER EN MÓVIL
       =========================== */

    @media (max-width: 768px) {

        .legal-header {
            background-color: #111F27 !important;
        }

        .footer-legal {
            background-color: #111F27 !important;
        }
    }

/* ======================================================
   📱 LEGALES – FIX RESPONSIVE HEADER / FOOTER
   ====================================================== */

.legal-header .container,
.footer-legal {

    margin: 0 auto;
}

/* Header legal como Landing */
.legal-header nav {
    display: flex;
    align-items: center;
}

/* Botón Acceder más compacto en legales */
.legal-header .nav-acceder {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
}

/* Padding real en móvil */
@media (max-width: 768px) {

    .legal-header {
        background: #111F27;
    }

        .legal-header .container {
            flex-direction: column;
            gap: 10px;
            padding: 16px 14px;
            text-align: center;
        }

        .legal-header nav {
            justify-content: center;
            gap: 12px;
        }

    .legal-main {
        padding: 40px 16px;
    }

    .legal-card {
        padding: 32px 22px;
    }

    .footer-legal {
        background: #111F27;
        padding: 16px 14px;
        text-align: center;
    }
}

body.offline::before {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    z-index: 99999;
}

@media (pointer: fine) {
    body.offline::before {
        content: "⚠️ Se ha perdido la conexión a Internet. Pulsa F5 para recargar la página.";
    }
}

@media (pointer: coarse) {
    body.offline::before {
        content: "⚠️ Se ha perdido la conexión a Internet. Recarga la página o cierra y vuelve a abrir la aplicación.";
        font-size: 18px;
    }
}


.conexion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conexion-card {
    background: white;
    border-radius: 14px;
    padding: 30px 28px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,.35);
}

    .conexion-card .icono {
        font-size: 42px;
        margin-bottom: 10px;
    }

.conexion-caida-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.conexion-caida-card {
    background: white;
    border-radius: 16px;
    padding: 30px 36px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,.35);
}

    .conexion-caida-card .icono {
        font-size: 48px;
        margin-bottom: 12px;
    }

/* =========================================
   MODALES GRANDES (tipo Calendario)
   ========================================= */

.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
}

/* Modal por delante de todo */
.modal-front {
    z-index: 1050;
}

/* Tamaño grande tipo calendario */
.modal-dialog-xl-custom {
    max-width: 95vw;
    width: 95vw;
    height: 90vh;
    margin: auto;
}

/* Contenido completo */
.modal-content-xl {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Cabecera verde homogénea */
.modal-header-verde {
    background-color: #198754;
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

/* Cuerpo con scroll interno */
.modal-body-scroll-xl {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

/* Footer fijo */
.modal-footer-fixed {
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
}

/* MÓVIL */
@media (max-width: 768px) {
    .modal-dialog-xl-custom {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        margin: 0;
    }

    .modal-content-xl {
        border-radius: 0;
    }
}

/* ======================================================
   🔌 BLazor – Conexión perdida (UI corporativa)
   ====================================================== */

#blazor-error-ui {
    background: #111F27;
    color: #ffffff;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 24px;
    display: none;
    z-index: 9999;
    box-shadow: 0 -4px 15px rgba(0,0,0,.4);
    font-size: 15px;
}

    #blazor-error-ui a,
    #blazor-error-ui button {
        color: #ffffff;
        background: #198754;
        border: none;
        padding: 8px 14px;
        border-radius: 6px;
        margin-left: 12px;
        cursor: pointer;
        text-decoration: none;
        font-weight: 600;
    }

        #blazor-error-ui button:hover {
            background: #157347;
        }

        .kpi-link {
    display: inline-block;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.kpi-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}
