﻿/* =====================================================================
   claims-auth.css
   Rediseño visual de las pantallas de autenticación de Recuperos
   (Login / Recuperar / Nueva contraseña / 2FA).
   Portado del Design System de Claims (Traslados) — adaptado a
   Bootstrap 3.3.6 + WebForms (ver sección 9 de DISENO-LOGIN.md).
   Se carga DESPUES de claims.css para prevalecer. Scopeado en .auth-page.
   ===================================================================== */

/* ===== Base / tipografía ===== */
.auth-page,
.auth-page body {
    font-family: 'Poppins', 'Open Sans', sans-serif;
    background-color: whitesmoke;
}

    /* ===== Shims de utilidades que NO existen en Bootstrap 3 ===== */
    .auth-page .d-flex {
        display: flex !important;
    }

    .auth-page .justify-content-center {
        justify-content: center !important;
    }

    .auth-page .justify-content-end {
        justify-content: flex-end !important;
    }

    .auth-page .align-items-center {
        align-items: center !important;
    }

    .auth-page .text-white {
        color: #fff !important;
    }

    .auth-page .img-fluid {
        max-width: 100%;
        height: auto;
    }

    .auth-page .p-0 {
        padding: 0 !important;
    }

    .auth-page .w-100 {
        width: 100% !important;
    }

    .auth-page .pb-3 {
        padding-bottom: 1rem !important;
    }

    .auth-page .my-3 {
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .auth-page .mt-1 {
        margin-top: .25rem !important;
    }

    .auth-page .mt-2 {
        margin-top: .5rem !important;
    }

    .auth-page .mt-3 {
        margin-top: 1rem !important;
    }

    .auth-page .mt-4 {
        margin-top: 1.5rem !important;
    }

    .auth-page .mt-5 {
        margin-top: 3rem !important;
    }

    .auth-page .mb-1 {
        margin-bottom: .25rem !important;
    }

    .auth-page .mb-2 {
        margin-bottom: .5rem !important;
    }

    .auth-page .mb-3 {
        margin-bottom: 1rem !important;
    }

    .auth-page .mb-4 {
        margin-bottom: 1.5rem !important;
    }

    .auth-page .mb-5 {
        margin-bottom: 3rem !important;
    }

    /* ===== BS3: forzar flex en el row del login para altura completa ===== */
    .auth-page .row.content {
        display: flex;
        flex-wrap: wrap;
        min-height: 100vh;
        margin: 0;
    }

    /* ===== Fondo estático + overlay ===== */
    .auth-page .fondo {
        background-image: url("../img/slides/claims_logins_recuperos.png");
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        min-height: 100vh;
        min-width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        overflow: hidden;
        z-index: 0;
    }

    .auth-page .overlay {
        width: 100%;
        height: 100%;
        position: fixed;
        z-index: 0;
        top: 0;
        left: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0) 100%);
    }

@media (max-width: 1200px) {
    .auth-page .overlay {
        background: rgba(0, 0, 0, 0.5);
    }
}

/* ===== Contenedor general ===== */
.auth-page .content {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* ===== Columna izquierda (promo) ===== */
.auth-page .promo {
    min-height: 100vh;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 50px;
}

.auth-page .intropromo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.auth-page .copy-clean {
    border-radius: 20px;
    max-width: 540px;
    padding: 24px 28px;
    background: rgb(12 14 22 / 55%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: -1px 5px 18px 0px rgb(0 0 0 / 48%);
}

.auth-page .copy-clean {
    max-width: 540px;
    padding: 18px 20px;
}

    .auth-page .copy-clean p,
    .auth-page .login-copy__lead {
        line-height: 1.5;
        font-size: 16px;
        opacity: 1;
        color: #fff;
        margin-bottom: 18px;
    }

.auth-page .login-copy__cta {
    display: inline-block;
    background: rgb(255 255 255 / 6%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .auth-page .login-copy__cta:hover {
        background: rgb(255 255 255 / 14%);
        border-color: rgba(255, 255, 255, 0.45);
        text-decoration: none;
        color: #fff;
    }

/* ===== Panel derecho (form) — glass sólido oscuro ===== */
.auth-page .col-left {
    padding: 0;
}

.auth-page .leftline {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding: 32px 38px;
    background: rgb(12 14 22 / 84%);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(4px);
    box-shadow: 0 20px 60px #00000073;
}

.auth-page .leftlineinside {
    width: 100%;
    padding: 10px 0;
}

.auth-page .leftline .logo {
    margin: 0 0 12px;
}

    .auth-page .leftline .logo img {
        margin-bottom: 6px;
    }

.auth-page .text1 {
    color: #fff;
}

.auth-page .leftlineinside > p.text-white {
    font-size: 15px;
    opacity: .95;
}

/* Anula el max-width:400px que claims.css aplica a #loginForm (selector con ID) */
.auth-page #loginForm,
.auth-page .leftline form {
    max-width: 100% !important;
    width: 100%;
    padding-bottom: 0 !important;
    margin-bottom: 44px;
}

/* Fuerza la tipografía correcta en el CTA del promo */
.auth-page .login-copy__cta,
.auth-page .copy-clean,
.auth-page .copy-clean p,
.auth-page .login-copy__lead {
    font-family: 'Poppins', 'Open Sans', Arial, sans-serif;
    font-style: normal;
}

.auth-page .login-copy__cta {
    font-weight: 500;
    letter-spacing: normal;
}

/* ===== Inputs (legacy override de border-radius) ===== */
.auth-page .input-lg,
.auth-page .form-control.input-lg,
.auth-page .leftline .form-control {
    height: 40px !important;
    font-size: 12px;
    border-radius: 20px !important;
    line-height: 1.5;
    background-color: #E8F0FE;
    border: none;
    color: #1e2022;
    padding: 0 16px;
    box-shadow: none;
}

    .auth-page .leftline .form-control::placeholder {
        color: #8a90a0;
    }

    .auth-page .leftline .form-control:focus {
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.25);
        outline: none;
        background-color: #fff;
    }

/* ===== Toggle ver/ocultar contraseña ===== */
.auth-page .pass-wrap {
    position: relative;
    display: block;
}

    .auth-page .pass-wrap .form-control {
        padding-right: 48px;
    }

.auth-page #togglePassword,
.auth-page .btn-blue-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #6E6B7B;
    height: 36px;
    width: 36px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 14px;
}

    .auth-page #togglePassword:hover,
    .auth-page .btn-blue-pass:hover,
    .auth-page .btn-blue-pass:focus {
        color: #1f7fe5;
        outline: 0;
    }

/* ===== Botones (legacy override de max-width / radius) ===== */
.auth-page .btn {
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 6px 0;
    border-radius: 23px !important;
}

.auth-page .loginBtn,
.auth-page .btn-block {
    border-radius: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px;
}

.auth-page .btn-blue,
.auth-page .leftline .btn-primary {
    color: #fff;
    border: 2px solid #1B6EC2;
    background-color: #1B6EC2;
}

    .auth-page .btn-blue:hover,
    .auth-page .btn-blue:focus,
    .auth-page .leftline .btn-primary:hover,
    .auth-page .leftline .btn-primary:focus {
        border-color: #155a9f;
        background-color: #155a9f;
        color: #fff;
        outline: 0;
    }

.auth-page .leftline .btn-secondary {
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
}

    .auth-page .leftline .btn-secondary:hover,
    .auth-page .leftline .btn-secondary:focus {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.5);
        color: #fff;
        outline: 0;
    }

.auth-page .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Links ===== */
.auth-page .text-forgot {
    font-size: 12px;
    color: #cfe0ff;
    text-decoration: none;
    display: inline-block;
    margin-top: 4px;
}

    .auth-page .text-forgot:hover {
        text-decoration: underline;
        color: #fff;
    }

.auth-page .leftline a {
    color: #cfe0ff;
}

/* ===== Separador ===== */
.auth-page hr {
    border-top: 1px solid rgba(240, 246, 255, 0.27);
    margin: 16px 0;
}

/* ===== Sello ISO + redes ===== */
.auth-page .auth-iso {
    display: flex;
    justify-content: center;
}

    .auth-page .auth-iso img {
        width: 300px;
        max-width: 100%;
    }

.auth-page .auth-social {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 44px;
    margin-bottom: 6px;
}

    .auth-page .auth-social a {
        color: #fff;
        font-size: 20px;
        transition: opacity .2s ease, transform .2s ease;
    }

        .auth-page .auth-social a:hover {
            opacity: .7;
            transform: translateY(-2px);
        }

/* ===== reCAPTCHA centrado ===== */
.auth-page #captchaContainer {
    display: flex;
    justify-content: center;
    margin: 14px 0;
}

/* ===== Cajas informativas / reglas de password ===== */
.auth-page .info-box,
.auth-page .alert-custom {
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.auth-page .info-box,
.auth-page .alert-info-custom {
    background: rgba(23, 162, 184, 0.12);
    border: 1px solid rgba(23, 162, 184, 0.3);
    color: #fff;
}

.auth-page .alert-primary-custom {
    background: rgba(0, 123, 255, 0.15);
    border: 1px solid rgba(0, 123, 255, 0.3);
    color: #fff;
}

.auth-page .info-box__header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.auth-page .info-box__icon {
    color: #bdc8d6;
    margin-top: 3px;
}

.auth-page .info-box__text {
    margin: 0;
    color: #fff;
    opacity: .9;
}

.auth-page #passwordRules {
    list-style: none;
    padding-left: 0;
    margin: 10px 0 0;
    color: #bdc8d6;
    font-size: 1.2rem;
    line-height: 20px !important;
}

    .auth-page #passwordRules li {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 0px;
        transition: color .2s ease;
    }

        .auth-page #passwordRules li.rule-ok {
            color: #4ade80;
        }

.auth-page .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 11px;
    color: #ff6b6b;
}

/* ===== 2FA — 6 casillas ===== */
.auth-page .otp-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 22px 0 6px;
}

.auth-page .otp-box,
.auth-page .otp-box.form-control {
    width: 44px !important;
    height: 50px !important;
    text-align: center !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    border: none !important;
    background: #E8F0FE !important;
    color: #1e2022 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

    .auth-page .otp-box::placeholder {
        color: #8a90a0;
    }

    .auth-page .otp-box:focus,
    .auth-page .otp-box.form-control:focus {
        outline: none !important;
        background: #fff !important;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.35) !important;
    }

/* Botones 2FA lado a lado */
.auth-page .otp-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

    .auth-page .otp-actions .btn {
        flex: 1;
        margin: 0;
    }

.auth-page .btn-outline-white {
    background: transparent !important;
    border: 2px solid rgba(255,255,255,0.35) !important;
    color: #fff !important;
}

    .auth-page .btn-outline-white:hover,
    .auth-page .btn-outline-white:focus {
        background: rgba(255,255,255,0.1) !important;
        border-color: rgba(255,255,255,0.6) !important;
        color: #fff !important;
        outline: 0 !important;
    }

/* Error inline 2FA */
.auth-page .otp-error {
    text-align: center;
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ===== Scrollbar del panel ===== */
.auth-page .leftline::-webkit-scrollbar {
    width: 8px;
}

.auth-page .leftline::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.auth-page .leftline::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

    .auth-page .leftline::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.3);
    }

/* ===== Toasts / Flyover =====
   sspv-app.css anima con "left" (150% → 50%).
   Mantenemos la misma propiedad para que la transition funcione,
   pero reposicionamos a bottom-right con coordenadas vw.
   ================================================================ */
.auth-page .flyover {
    position: fixed !important;
    /* oculto: fuera de pantalla por la derecha */
    left: 110vw !important;
    top: auto !important;
    bottom: 22px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100px !important;
    width: 360px !important;
    max-width: calc(100vw - 44px) !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    box-shadow: 0 10px 34px rgba(0,0,0,0.45) !important;
    border: none !important;
    z-index: 99999 !important;
}
    /* visible: 22px del borde derecho */
    .auth-page .flyover.in {
        left: calc(100vw - 382px) !important;
    }

    .auth-page .flyover,
    .auth-page .flyover .title,
    .auth-page .flyover .content,
    .auth-page .flyover .close {
        color: #fff !important;
    }

        .auth-page .flyover .title {
            font-size: 15px !important;
            font-weight: 600 !important;
            margin: 0 0 4px !important;
            line-height: 1.3 !important;
        }

        .auth-page .flyover .content {
            font-size: 13px !important;
            margin: 0 !important;
            line-height: 1.4 !important;
        }

        .auth-page .flyover.alert-success {
            background: #0f6e56 !important;
        }

        .auth-page .flyover.alert-danger {
            background: #a32d2d !important;
        }

        .auth-page .flyover.alert-warning {
            background: #854f0b !important;
        }

        .auth-page .flyover.alert-info {
            background: #185fa5 !important;
        }

/* ===== Animación de entrada ===== */
.auth-page .animate-fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: authFadeSlideIn 0.6s ease-out forwards;
}

@keyframes authFadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .auth-page .promo {
        display: none;
    }

    .auth-page .col-left {
        height: auto;
        position: relative;
    }

    .auth-page .leftline {
        min-height: 100vh;
        max-height: none;
        overflow-y: visible;
        border-left: none;
    }
}
