/* =========================================================================
   DISEÑO FULL SCREEN DE ALTA GAMA - BORDES SUAVES Y CONTENEDORES MODERNOS
   ========================================================================= */
.body-login {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    overflow: hidden !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    background-color: #f8fafc !important;
}

.container-master {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #f8fafc;
    overflow: hidden;
}

/* =========================================================================
   PANELES BLANCOS Y TARJETA CONTENEDORA
   ========================================================================= */
.form-container {
    position: absolute;
    top: 0;
    height: 100vh;
    width: 50vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: all 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    background-color: #f8fafc;
}

.login-box {
    width: 100%;
    max-width: 440px; 
    background: #ffffff !important;
    padding: 2.5rem 2.2rem !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 35px -8px rgba(15, 23, 42, 0.07), 0 6px 15px -4px rgba(15, 23, 42, 0.03) !important;
    border: 1px solid #e2e8f0 !important;
}

/* 1. LOGIN (Inicia en la Derecha) */
.sign-in-container { left: 50vw; z-index: 2; }
.container-master.right-panel-active .sign-in-container { transform: translateX(-100%); opacity: 0; z-index: 1; }

/* 2. RECUPERAR CLAVE (Inicia en la Izquierda, oculto) */
.recover-container { left: 0; z-index: 1; opacity: 0; transform: translateX(50%); }
.container-master.right-panel-active .recover-container { transform: translateX(0); opacity: 1; z-index: 5; }

/* =========================================================================
   EL OVERLAY AZUL CON IMAGEN DE FONDO (SIN LÍNEAS VECTORIALES ATRAVESADAS)
   ========================================================================= */
.overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 50vw; 
    height: 100vh;
    overflow: hidden;
    transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 100;
}
.container-master.right-panel-active .overlay-container { transform: translateX(100%); }

.overlay {
    background: 
        linear-gradient(135deg, rgba(43, 59, 150, 0.88) 0%, rgba(30, 33, 103, 0.92) 100%),
        url('../img/background1.jpg') center/cover no-repeat !important;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55), border-radius 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 0 150px 150px 0; 
}

.container-master.right-panel-active .overlay { 
    transform: translateX(50%); 
    border-radius: 150px 0 0 150px; 
}

/* SE REMOVIÓ .overlay::before QUE DIBUJABA LA LÍNEA VECTORIAL ATRAVESADA */

.overlay-panel {
    position: absolute; top: 0; display: flex; flex-direction: column; justify-content: center; align-items: center;
    width: 50%; height: 100%; padding: 4.5rem; transition: transform 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 1; text-align: center;
}

.overlay-left { left: 0; transform: translateX(-20%); } 
.container-master.right-panel-active .overlay-left { transform: translateX(0); }

.overlay-right { right: 0; transform: translateX(0); } 
.container-master.right-panel-active .overlay-right { transform: translateX(20%); }

/* =========================================================================
   ELEMENTOS DE MARCA Y LOGO DEL PANEL AZUL
   ========================================================================= */
.brand-content { position: relative; z-index: 1; max-width: 420px; text-align: center; margin: 0 auto; }

/* ESTILO DEL LOGO EN EL PANEL AZUL */
.brand-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.2rem;
}

.brand-logo-img {
    height: 75px;
    width: auto;
    object-fit: contain;
    /* Filtro para convertir el logo a blanco brillante si es oscuro, o dejarlo nítido */
    filter: brightness(0) invert(1) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.brand-title { 
    color: #ffffff !important; 
    font-size: 2.3rem !important; 
    font-weight: 800 !important; 
    letter-spacing: -0.5px !important; 
    margin-bottom: 1rem !important; 
    line-height: 1.2 !important; 
    text-align: center !important;
}

.brand-description { 
    font-size: 0.92rem !important; 
    color: #cbd5e1 !important; 
    font-weight: 400 !important; 
    line-height: 1.5 !important; 
    text-align: center !important;
}

.brand-footer { position: absolute; bottom: 2rem; width: 100%; left: 0; text-align: center; color: #a5b4fc; font-size: 0.78rem; font-weight: 600; z-index: 1; }

button.btn-ghost {
    background: transparent !important; 
    border: 1.5px solid #a5b4fc !important; 
    color: #a5b4fc !important; 
    font-weight: 700 !important; 
    font-size: 0.8rem !important; 
    padding: 10px 22px !important; 
    border-radius: 8px !important; 
    margin: 1.8rem auto 0 auto !important; 
    cursor: pointer !important; 
    transition: all 0.3s ease !important; 
    text-transform: uppercase !important; 
    letter-spacing: 0.8px !important;
    display: inline-block !important;
}
button.btn-ghost:hover { background: #a5b4fc !important; color: #1e2167 !important; transform: translateY(-2px) !important; }

/* =========================================================================
   ELEMENTOS DE LA CARD BLANCA
   ========================================================================= */
.logo-header { margin-bottom: 1.2rem; display: flex; justify-content: center !important; width: 100%; text-align: center; }
.logo-img { height: 70px; width: auto; object-fit: contain; margin: 0 auto; }

.welcome-title { color: #0f172a !important; font-size: 1.85rem !important; font-weight: 800 !important; text-align: center !important; margin-bottom: 0.4rem; letter-spacing: -0.5px; }
.welcome-subtitle { color: #64748b !important; font-size: 0.88rem !important; text-align: center !important; margin-bottom: 1.8rem; font-weight: 500; line-height: 1.45; }

.form-group-custom { margin-bottom: 1.2rem; width: 100%; text-align: left; }
.label-custom { color: #64748b !important; font-size: 0.72rem !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; display: block; }

.input-box-modern {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 2px 14px;
    transition: all 0.25s ease-in-out;
}

.input-icon-box {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-right: 10px;
    pointer-events: none;
    transition: color 0.25s ease;
}

.form-control-box {
    width: 100%;
    height: 44px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #1e293b !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    padding: 0 !important;
}

.form-control-box::placeholder { color: #94a3b8 !important; font-weight: 500; }
.form-control-box:focus { outline: none !important; box-shadow: none !important; }

.input-box-modern:focus-within {
    background-color: #ffffff;
    border-color: #2b3b96;
    box-shadow: 0 0 0 3.5px rgba(43, 59, 150, 0.12);
}
.input-box-modern:focus-within .input-icon-box {
    color: #2b3b96;
}

.btn-toggle-pass {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.95rem;
    padding: 0;
    margin-left: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}
.btn-toggle-pass:hover { color: #1e2167; }

.link-forget {
    color: #4361ee;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.link-forget:hover {
    color: #1e2167;
    text-decoration: underline;
}

.btn-submit-dark {
    background-color: #0f172a !important; 
    color: #ffffff !important; 
    font-weight: 700 !important; 
    font-size: 0.95rem !important;
    height: 48px !important;
    border-radius: 12px !important; 
    border: none !important; 
    width: 100%; 
    margin-top: 0.5rem;
    transition: all 0.3s ease !important; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.25);
}
.btn-submit-dark:hover { 
    background-color: #1e2167 !important; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px -2px rgba(30, 33, 103, 0.35); 
}

.alert-minimal { color: #ef4444; font-size: 0.82rem; font-weight: 700; margin-top: 1rem; text-align: center !important; width: 100%; }

.form-control-box:-webkit-autofill,
.form-control-box:-webkit-autofill:hover, 
.form-control-box:-webkit-autofill:focus, 
.form-control-box:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f1f5f9 inset !important;
    -webkit-text-fill-color: #1e293b !important;
    transition: background-color 5000s ease-in-out 0s;
}

@media (max-width: 991.88px) {
    .overlay-container { display: none; } 
    .form-container { width: 100vw; position: absolute; left: 0 !important; transform: none !important; opacity: 1 !important; transition: none; z-index: 1; padding: 1.2rem; }
    .login-box { max-width: 100%; border-radius: 18px !important; }
    .recover-container { display: none; z-index: 2; }
    .container-master.right-panel-active .sign-in-container { display: none; }
    .container-master.right-panel-active .recover-container { display: flex; }
}