:root {
    --azul-900: #061b43;
    --azul-700: #1457c8;
    --azul-500: #1e7bff;
    --azul-100: #eaf4ff;
    --borde: #d8e7fb;
    --muted: #657494;
    --texto: #071d49;
    --blanco: #ffffff;
    --sombra: 0 25px 70px rgba(7, 29, 73, 0.18);
}

/* Configuración general */
* {
    box-sizing: border-box;
}

/* Cuerpo principal de la página */
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: linear-gradient(135deg, #061b43 0%, #08285f 45%, #2b73e8 100%);
    color: var(--texto);
    overflow-x: hidden;
}

/* Pantalla de carga inicial */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--azul-900), var(--azul-700));
    color: var(--blanco);
    transition: 0.35s ease;
}

.preloader.hide {
    opacity: 0;
    visibility: hidden;
}

/* Caja del preloader */
.preloader-box {
    position: relative;
    text-align: center;
}

.preloader-box img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    animation: pulse 1.4s infinite;
}

/* Aro giratorio del preloader */
.preloader-ring {
    position: absolute;
    top: 28%;
    left: 50%;
    width: 112px;
    height: 112px;
    margin: -56px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--blanco);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animación de giro */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animación suave del logo */
@keyframes pulse {
    50% {
        transform: scale(1.08);
    }
}

/* Contenedor general del login */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 28px);
}

/* Caja principal: formulario + banner */
.login-shell {
    width: min(1180px, 94vw);
    min-height: min(720px, 90vh);
    max-height: 92vh;
    display: grid;
    grid-template-columns: minmax(330px, 390px) 1fr;
    overflow: hidden;
    background: var(--blanco);
    border-radius: 28px;
    box-shadow: var(--sombra);
}

/* Panel izquierdo del formulario */
.login-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 4vh, 48px) clamp(24px, 3vw, 34px);
    overflow-y: auto;
}

/* Contenedor de logos */
.logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}

/* Estilo de cada logo */
.logos img {
    height: clamp(42px, 6vh, 56px);
    max-width: 135px;
    padding: 7px;
    object-fit: contain;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 13px;
}

/* Título principal */
h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 2.2vw, 28px);
    line-height: 1.12;
}

/* Subtítulo */
h3 {
    margin: 0 0 14px;
    color: #0058c8;
    font-size: 15px;
}

/* Texto descriptivo */
.lead {
    margin-bottom: 22px;
    color: var(--muted);
    font-size: clamp(13px, 1.2vw, 14px);
    line-height: 1.55;
}

/* Etiquetas del formulario */
label {
    display: block;
    margin: 12px 0 7px;
    font-size: 13px;
    font-weight: 800;
}

/* Campos de texto */
input {
    width: 100%;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid var(--borde);
    border-radius: 14px;
    outline: none;
    font-size: 14px;
}

/* Efecto al seleccionar un campo */
input:focus {
    border-color: var(--azul-500);
    box-shadow: 0 0 0 4px rgba(30, 123, 255, 0.12);
}

/* Caja de contraseña */
.passbox {
    position: relative;
}

/* Botón del ojo de contraseña */
.passbox button {
    position: absolute;
    top: 7px;
    right: 8px;
    padding: 8px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* Botón principal de ingreso */
.btn-login {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #0d4fb8, #1d7cf2);
    color: var(--blanco);
    border: 0;
    border-radius: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.25s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(13, 79, 184, 0.25);
}

/* Botón de recuperar contraseña */
.recover-link {
    margin: 16px auto;
    background: none;
    border: 0;
    color: #0b4eb3;
    font-weight: 900;
    cursor: pointer;
}

/* Pie de página del formulario */
footer {
    margin-top: auto;
    color: #71809c;
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
}

/* Panel derecho del banner */
.login-banner {
    position: relative;
    min-height: 100%;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: 0 48px 58px;
    background-color: #0b2f75;
    background-size: cover;
    background-position: center;
    color: var(--blanco);
}

/* Capa azul encima de la imagen del banner */
.login-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(6, 27, 67, 0.78),
        rgba(20, 87, 200, 0.48)
    );
}

/* Cada slide del carrusel */
.slide {
    position: absolute;
    right: 48px;
    bottom: 58px;
    left: 48px;
    z-index: 2;
    opacity: 0;
    transform: translateY(18px);
    transition: 0.7s ease;
}

/* Slide visible */
.slide.active {
    opacity: 1;
    transform: translateY(0);
}

/* Etiqueta superior del slide */
.slide span {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-weight: 900;
}

/* Título del slide */
.slide h2 {
    margin: 0 0 14px;
    max-width: 720px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.08;
}

/* Texto del slide */
.slide p {
    max-width: 650px;
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.5;
}

/* Flechas del carrusel */
.arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.25);
    color: var(--blanco);
    border: 0;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    transition: 0.25s ease;
}

.arrow:hover {
    background: rgba(255, 255, 255, 0.38);
}

.arrow.left {
    left: 24px;
}

.arrow.right {
    right: 24px;
}

/* Puntos del carrusel */
.dots {
    position: absolute;
    right: 38px;
    bottom: 22px;
    z-index: 3;
}

.dots i {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin: 4px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    transition: 0.25s ease;
}

.dots i.active {
    width: 28px;
    background: var(--blanco);
    border-radius: 99px;
}

/* Alerta de error */
.alert {
    margin-bottom: 10px;
    padding: 10px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 12px;
    font-size: 13px;
}

/* Fondo oscuro del modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(7, 29, 73, 0.55);
}

/* Modal visible */
.modal.show {
    display: flex;
}

/* Caja interna del modal */
.modal-card {
    position: relative;
    width: min(460px, 92vw);
    padding: 24px;
    background: var(--blanco);
    border-radius: 22px;
    box-shadow: 0 25px 70px rgba(7, 29, 73, 0.25);
}

/* Botón cerrar modal */
.modal-x {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    background: var(--azul-100);
    border: 0;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

/* Contactos de recuperación */
.contacts a {
    display: block;
    margin-top: 10px;
    padding: 14px;
    background: #f2f8ff;
    border: 1px solid var(--borde);
    border-radius: 15px;
    cursor: pointer;
}

/* Ajuste especial para laptops con poca altura */
@media (max-height: 760px) and (min-width: 901px) {
    .login-shell {
        max-height: 94vh;
    }

    .login-form {
        justify-content: flex-start;
    }

    .logos {
        margin-bottom: 18px;
    }

    h1 {
        font-size: 24px;
    }

    .lead {
        margin-bottom: 16px;
    }

    input {
        padding: 12px;
    }

    .btn-login {
        padding: 12px;
    }

    footer {
        margin-top: 14px;
    }
}

/* Vista tablet */
@media (max-width: 900px) {
    body {
        overflow-y: auto;
    }

    .login-screen {
        align-items: flex-start;
    }

    .login-shell {
        width: 100%;
        max-height: none;
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-form {
        overflow: visible;
        justify-content: flex-start;
        padding: 34px;
    }

    .login-banner {
        height: 430px;
        min-height: 430px;
    }
}

/* Vista celular */
@media (max-width: 520px) {
    .login-screen {
        padding: 10px;
    }

    .login-shell {
        border-radius: 20px;
    }

    .login-form {
        padding: 24px;
    }

    .logos img {
        height: 44px;
        max-width: 120px;
    }

    .login-banner {
        height: 360px;
        min-height: 360px;
        padding: 0 28px 45px;
    }

    .slide {
        right: 28px;
        bottom: 45px;
        left: 28px;
    }

    .slide h2 {
        font-size: 24px;
    }

    .slide p {
        font-size: 14px;
    }

    .arrow {
        display: none;
    }
}

@media (max-height: 680px) and (min-width: 901px) {
    .login-shell {
        width: min(1180px, 92vw);
        height: 92vh;
        height: 92dvh;
    }

    .login-form {
        padding: 18px 28px;
    }

    .logos img {
        height: 42px;
    }

    .logos {
        margin-bottom: 14px;
    }

    h1 {
        font-size: 23px;
    }

    h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .lead {
        font-size: 12px;
        margin-bottom: 12px;
    }

    label {
        font-size: 12px;
        margin: 8px 0 5px;
    }

    input {
        padding: 10px 12px;
    }

    .btn-login {
        padding: 11px;
        margin-top: 12px;
    }

    .recover-link {
        margin: 10px auto;
        font-size: 12px;
    }

    footer {
        font-size: 9.5px;
        margin-top: 6px;
    }

    .slide h2 {
        font-size: 30px;
    }

    .slide p {
        font-size: 14px;
    }
}
.modal-card {
    width: min(500px, 92vw);
    padding: 28px;
}

.modal-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.modal-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #eaf4ff, #d8e7fb);
    border: 1px solid var(--borde);
    border-radius: 16px;
    font-size: 22px;
}

.modal-card h2 {
    margin: 0 36px 8px 0;
    color: var(--azul-900);
    font-size: 26px;
    line-height: 1.1;
}

.modal-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.recover-field {
    margin-bottom: 4px;
}

.recover-field label {
    margin-top: 0;
}

.contacts {
    margin-top: 18px;
}

.contacts-title {
    margin-bottom: 10px !important;
    color: var(--azul-900) !important;
    font-size: 13px !important;
    font-weight: 900;
}

.contacts a {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding: 14px;
    background: #f6fbff;
    border: 1px solid var(--borde);
    border-radius: 16px;
    color: var(--texto);
    text-decoration: none;
    cursor: pointer;
    transition: 0.25s ease;
}

.contacts a:hover {
    transform: translateY(-1px);
    background: #eef7ff;
    border-color: #b9d8ff;
    box-shadow: 0 12px 24px rgba(7, 29, 73, 0.10);
}

.support-info {
    margin: 18px 0 12px;
    padding: 14px;
    background: #f0f7ff;
    border: 1px solid var(--borde);
    border-radius: 16px;
}

.support-info strong {
    display: block;
    color: var(--azul-900);
    font-size: 14px;
    font-weight: 900;
}

.support-info p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.support-contact{

    display:flex;
    align-items:center;
    gap:15px;

    padding:15px 18px;

    border-radius:16px;

    border:1px solid #d7e5fb;

    background:#fff;

    cursor:pointer;

    transition:.25s;

}

.support-contact:hover{

    border-color:#25D366;

    box-shadow:0 10px 22px rgba(37,211,102,.18);

    transform:translateY(-2px);

}

.wa-circle{

    width:46px;

    height:46px;

    border-radius:50%;

    background:#25D366;

    display:flex;

    align-items:center;

    justify-content:center;

    flex:none;

}

.wa-circle i{

    color:#fff;

    font-size:24px;

}

.support-data strong{

    display:block;

    font-size:15px;

    color:#0a2458;

}

.support-data small{

    color:#6d7a93;

    font-size:12px;

}