/* ========================================
   CONFIGURACIÓN GENERAL
======================================== */

* {
    font-family: 'Manrope', sans-serif;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background-color: #f7faff;
}


/* ========================================
   CONTENEDOR PRINCIPAL
======================================== */

.login-page {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    position: relative;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.92) 30%,
            rgba(244, 249, 255, 0.92) 100%
        );
}


/* ========================================
   ELEMENTOS DECORATIVOS GENERALES
======================================== */

.bg-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}


/* ========================================
   FRANJAS SUPERIOR IZQUIERDA
======================================== */

.bg-stripes-top {
    position: absolute;

    width: 520px;
    height: 330px;

    top: -145px;
    left: -125px;

    transform: rotate(-45deg);

    pointer-events: none;
    z-index: 0;

    background:
        repeating-linear-gradient(
            90deg,

            rgba(105, 164, 228, 0.05) 0px,
            rgba(105, 164, 228, 0.05) 62px,

            transparent 62px,
            transparent 84px,

            rgba(105, 164, 228, 0.16) 84px,
            rgba(105, 164, 228, 0.16) 146px,

            transparent 146px,
            transparent 171px
        );
}


/* ========================================
   FRANJAS INFERIOR DERECHA
======================================== */

.bg-stripes-bottom {
    position: absolute;

    width: 720px;
    height: 440px;

    right: -245px;
    bottom: -235px;

    transform: rotate(-45deg);

    pointer-events: none;
    z-index: 0;

    background:
        repeating-linear-gradient(
            90deg,

            rgba(105, 164, 228, 0.05) 0px,
            rgba(105, 164, 228, 0.05) 75px,

            transparent 75px,
            transparent 102px,

            rgba(105, 164, 228, 0.16) 102px,
            rgba(105, 164, 228, 0.16) 182px,

            transparent 182px,
            transparent 215px
        );
}


/* ========================================
   CÁPSULAS DIAGONALES
======================================== */

.bg-pill {
    position: absolute;

    height: 46px;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            rgba(108, 168, 232, 0.20),
            rgba(108, 168, 232, 0.08)
        );

    transform: rotate(-45deg);

    pointer-events: none;
    z-index: 0;
}


/* Cápsula izquierda */

.bg-pill-left {
    width: 185px;

    top: 22%;
    left: 15%;
}


/* Cápsula derecha superior */

.bg-pill-right {
    width: 165px;

    top: 32%;
    right: 13%;
}


/* Cápsula derecha inferior, más tenue */

.bg-pill-right-bottom {
    width: 205px;
    height: 52px;

    right: 15%;
    bottom: 29%;

    opacity: 0.32;
}


/* ========================================
   CÍRCULOS
======================================== */

.bg-circle {
    position: absolute;

    border-radius: 50%;

    background-color: rgba(91, 155, 227, 0.28);

    pointer-events: none;
    z-index: 0;
}


/* Círculo superior */

.bg-circle-top {
    width: 53px;
    height: 53px;

    top: 9%;
    right: 28%;
}


/* Círculo inferior izquierdo */

.bg-circle-left {
    width: 50px;
    height: 50px;

    left: 25%;
    bottom: 29%;
}


/* Círculo grande derecho muy tenue */

.bg-circle-right {
    width: 130px;
    height: 130px;

    right: 9%;
    bottom: 27%;

    background-color: rgba(110, 169, 230, 0.045);
}


/* ========================================
   MATRICES DE PUNTOS
======================================== */

.bg-dots {
    position: absolute;

    width: 145px;
    height: 145px;

    background-image:
        radial-gradient(
            circle,
            rgba(91, 155, 227, 0.28) 4px,
            transparent 4.5px
        );

    background-size: 25px 25px;

    pointer-events: none;
    z-index: 0;
}


/* Puntos superiores derechos */

.bg-dots-top {
    top: 5%;
    right: 4%;
}


/* Puntos inferiores izquierdos */

.bg-dots-bottom {
    left: 5%;
    bottom: 5%;
}


/* ========================================
   TARJETA DEL LOGIN
======================================== */

.login-card {
    width: 100%;
    max-width: 410px;

    padding: 40px 36px 28px;

    background-color: #ffffff;

    border-radius: 12px;

    box-shadow:
        0 12px 40px
        rgba(28, 46, 74, 0.10);

    position: relative;
    z-index: 10;
}


/* ========================================
   LOGO
======================================== */

.login-brand {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 22px;
}

.login-brand-logo {
    display: block;

    width: 100%;
    max-width: 165px;
    height: auto;

    object-fit: contain;
}

.login-logo {
    max-width: 85px;
    max-height: 85px;
}


/* ========================================
   TEXTOS
======================================== */

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #252525;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: #777777;
}

.login-label {
    font-size: 12px;
    font-weight: 600;
    color: #4d4d4d;
}


/* ========================================
   INPUTS
======================================== */

.login-input-group {
    background-color: #f2f4f7;
    border: 1px solid transparent;
    border-radius: 7px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.login-input-group .input-group-text,
.login-input-group .form-control,
.login-input-group .password-toggle {
    background-color: #f2f4f7 !important;
    border: none !important;
}

.login-input-group .input-group-text {
    color: #9098a5;
    padding-left: 14px;
}

.login-input-group .form-control {
    height: 46px;
    font-size: 13px;
    color: #333333;
    box-shadow: none !important;
}

.login-input-group .form-control::placeholder {
    color: #7c7c7c;
}

.login-input-group .form-control:focus {
    background-color: #f2f4f7 !important;
    box-shadow: none !important;
}

.login-input-group:focus-within {
    border-color: #0563A6;
}


/* ========================================
   BOTÓN MOSTRAR CONTRASEÑA
======================================== */

.password-toggle {
    color: #7c8797;
    padding-left: 14px;
    padding-right: 14px;
    box-shadow: none !important;
}

.password-toggle:hover,
.password-toggle:focus,
.password-toggle:active {
    background-color: #f2f4f7 !important;
    color: #223A84 !important;
    box-shadow: none !important;
    outline: none !important;
}


/* ========================================
   RECUPERACIÓN DE CONTRASEÑA
======================================== */

.forgot-link {
    font-size: 12px;
    font-weight: 600;

    color: #0A8F7A;

    text-decoration: none;
}

.forgot-link:hover {
    color: #087766;
    text-decoration: underline;
}


/* ========================================
   BOTÓN PRINCIPAL
======================================== */

.btn-login {
    height: 46px;

    background-color: #223A84;
    color: #ffffff;

    border-radius: 7px;

    font-size: 13px;
    font-weight: 700;
}

.btn-login:hover {
    background-color: #1C2544;
    color: #ffffff;
}


/* ========================================
   FOOTER
======================================== */

.login-footer {
    border-top: 1px solid #eceff3;

    margin-top: 25px;
    padding-top: 18px;

    text-align: center;

    font-size: 10px;
}

.login-footer a {
    color: #777777;
    text-decoration: none;
}

.login-footer a:hover {
    color: #17478c;
}

.login-footer span {
    margin: 0 7px;
    color: #aaaaaa;
}


/* ========================================
   MENSAJES
======================================== */

.login-alert {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 12px;
    margin-bottom: 22px;

    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;

    border-radius: 7px;
}

.login-alert i {
    font-size: 14px;
    flex-shrink: 0;
}

.login-alert.alert-danger {
    background-color: #fff3f3;
    border-color: #f4c2c2;
    color: #b42318;
}

.login-alert-warning {
    background-color: #fff8e8;
    border-color: #f1d89b;
    color: #8a6116;
}

.back-login-link {
    font-size: 12px;
    font-weight: 600;
    color: #0A8F7A;
    text-decoration: none;
}

.back-login-link:hover {
    color: #087766;
    text-decoration: underline;
}


/* ========================================
   MODAL RECUPERACIÓN
======================================== */

.recovery-modal-dialog {
    max-width: 420px;
    padding: 15px;
}

.recovery-modal {
    border: none;
    border-radius: 14px;

    box-shadow:
        0 18px 50px
        rgba(28, 46, 74, 0.16);

    overflow: hidden;
}

.recovery-modal .modal-body {
    padding: 32px 30px 28px;
}

.recovery-modal-icon {
    width: 64px;
    height: 64px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background-color: #edf3fb;
    color: #17478c;

    font-size: 27px;
}

.recovery-modal-title {
    margin-bottom: 10px;

    text-align: center;

    font-size: 19px;
    font-weight: 700;

    color: #252525;
}

.recovery-modal-text {
    margin-bottom: 22px;

    text-align: center;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;

    color: #6d7480;
}

.recovery-modal-text strong {
    font-weight: 700;
    color: #424853;
}

.recovery-modal-info {
    padding: 15px;

    background-color: #f6f8fb;

    border-radius: 9px;
}

.recovery-info-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    padding: 8px 0;

    font-size: 11px;
    line-height: 1.5;

    color: #5d6470;
}

.recovery-info-item + .recovery-info-item {
    border-top: 1px solid #e7eaf0;
}

.recovery-info-icon {
    width: 25px;
    min-width: 25px;
    height: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    background-color: #e9eff8;
    color: #17478c;

    font-size: 12px;
}


/* ========================================
   MODAL CAMBIO DE CONTRASEÑA
======================================== */

.cambio-password-dialog {
    max-width: 430px;
    padding: 15px;
}

.cambio-password-modal {
    border: none;
    border-radius: 14px;

    box-shadow:
        0 18px 50px
        rgba(28, 46, 74, 0.18);

    overflow: hidden;
}

.cambio-password-body {
    padding: 36px 32px 30px;
}

.password-help {
    margin-top: 8px;
    margin-bottom: 0;

    font-size: 11px;
    font-weight: 400;

    color: #7b8491;
}

.modal-backdrop.show {
    opacity: 0.35;
}


/* ========================================
   RESPONSIVE TABLET
======================================== */

@media (max-width: 768px) {

    .bg-stripes-top {
        width: 430px;
        height: 280px;

        top: -170px;
        left: -220px;
    }

    .bg-stripes-bottom {
        width: 500px;
        height: 330px;

        right: -290px;
        bottom: -200px;
    }

    .bg-pill-left {
        left: 3%;
    }

    .bg-pill-right {
        right: 2%;
    }

    .bg-pill-right-bottom {
        display: none;
    }

    .bg-circle-right {
        display: none;
    }

    .bg-dots {
        transform: scale(0.7);
    }

    .bg-dots-top {
        right: -15px;
    }

    .bg-dots-bottom {
        left: -15px;
    }
}


/* ========================================
   RESPONSIVE MÓVIL
======================================== */

@media (max-width: 480px) {

    .login-card {
        padding: 30px 24px 24px;
    }

    .cambio-password-dialog {
        margin-left: 10px;
        margin-right: 10px;
        padding: 0;
    }

    .cambio-password-body {
        padding: 30px 24px 26px;
    }

    .bg-pill {
        opacity: 0.45;
    }

    .bg-circle {
        opacity: 0.55;
    }

    .bg-dots {
        opacity: 0.55;
    }
}