/* =========================================
   LOGIN SPLIT-SCREEN (PREMIUM TEAL DESIGN)
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body.login-page {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', sans-serif;
    background-color: #ffffff !important;
    height: 100vh !important;
    width: 100vw !important;
    overflow: hidden !important;
}

body.login-page h1, 
body.login-page h2, 
body.login-page p, 
body.login-page input, 
body.login-page button, 
body.login-page a, 
body.login-page label {
    font-family: 'Inter', sans-serif;
}

.split-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
}

/* --- Lado Izquierdo (Marca y Visuales) --- */
.split-left {
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: white;
    overflow: hidden;
}

.brand-logo-top {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 20;
}

.brand-logo-top img {
    height: 45px;
    width: auto;
}

/* Figuras geométricas animadas (Estilo Opción 2 con colores Teal) */
.split-left::before, .split-left::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

/* Aurora Abstracta Premium */
.split-left::before, .split-left::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
}

/* Aurora Superior Izquierda */
.split-left::before {
    width: 600px;
    height: 600px;
    background: var(--brand-primary, #14b8a6); 
    opacity: 0.45;
    top: -10%;
    left: -10%;
    filter: blur(120px);
    animation: auroraFloat1 20s ease-in-out infinite;
}

/* Aurora Inferior Derecha */
.split-left::after {
    width: 700px;
    height: 700px;
    background: var(--brand-secondary, #0ea5e9);
    opacity: 0.35;
    bottom: -15%;
    right: -10%;
    filter: blur(140px);
    animation: auroraFloat2 25s ease-in-out infinite reverse;
}

@keyframes auroraFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -50px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes auroraFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-60px, 40px) scale(1.15); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Tarjeta Glassmorphism (Copia exacta del diseño premium) */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 60px 50px;
    max-width: 540px;
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    box-shadow: 
        0 30px 60px -12px rgba(0, 0, 0, 0.5), 
        inset 1px 1px 0px rgba(255, 255, 255, 0.3),
        inset -1px -1px 0px rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fadeSlideRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeSlideRight {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

.glass-card h1, .glass-card h2 {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.glass-card p {
    font-size: 1.05rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

.glass-icon {
    font-size: 3.5rem;
    color: var(--brand-primary, #14b8a6);
    margin: 0;
    filter: drop-shadow(0 0 20px rgba(20, 184, 166, 0.6));
}


/* --- Lado Derecho (Formulario) --- */
.split-right {
    flex: 1;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-wrapper h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.form-wrapper p.subtitle {
    color: #64748b;
    margin-bottom: 32px;
    font-size: 0.95rem;
}

/* Floating Labels Inputs */
.floating-group {
    position: relative;
    margin-bottom: 24px;
}

.floating-group input {
    width: 100%;
    padding: 24px 16px 8px 16px;
    font-size: 1rem;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.floating-group input:focus {
    background-color: #ffffff;
    border-color: var(--brand-primary, #14b8a6);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
}

.floating-group label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.2s ease;
}

/* The magic for floating labels */
.floating-group input:focus ~ label,
.floating-group input:not(:placeholder-shown) ~ label,
.floating-group input:-webkit-autofill ~ label,
.floating-group input:autofill ~ label {
    top: 14px;
    font-size: 0.75rem;
    color: var(--brand-primary, #14b8a6);
    font-weight: 600;
}

/* Chrome autofill background & text styling */
.floating-group input:-webkit-autofill,
.floating-group input:-webkit-autofill:hover, 
.floating-group input:-webkit-autofill:focus, 
.floating-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important;
    -webkit-text-fill-color: #334155 !important;
    border-color: #e2e8f0 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.floating-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset, 0 0 0 4px rgba(20, 184, 166, 0.15) !important;
    border-color: var(--brand-primary, #14b8a6) !important;
}

/* Botones Premium */
.btn-teal {
    background: linear-gradient(135deg, var(--brand-secondary, #0d9488) 0%, var(--brand-primary, #14b8a6) 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.btn-teal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
    background: linear-gradient(135deg, var(--brand-secondary, #0f766e) 0%, var(--brand-secondary, #0d9488) 100%);
}

.btn-teal-outline {
    background: transparent;
    color: #475569;
    border: 2px solid #e2e8f0;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-top: 16px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.btn-teal-outline:hover {
    background-color: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

.logo-mobile {
    display: none;
    max-height: 35px;
    width: auto;
    margin-bottom: 24px;
}

/* --- OTP 2FA Component Styles --- */
.otp-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin: 24px 0 28px 0;
}

.otp-boxes {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.otp-box {
    width: 52px;
    height: 60px;
    border-radius: 12px;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #1e293b;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.otp-box:hover:not(:disabled) {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

.otp-box:focus {
    background-color: #ffffff;
    border-color: var(--brand-primary, #14b8a6);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.15);
    transform: translateY(-2px);
}

.otp-box.is-filled {
    border-color: var(--brand-primary, #14b8a6);
    background-color: #f0fdfa;
    color: var(--brand-secondary, #0f766e);
}

.otp-boxes.has-error .otp-box {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

.otp-boxes.has-error {
    animation: otpShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.otp-message {
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 1.25rem;
    text-align: center;
    color: #ef4444;
    transition: all 0.2s ease;
}

@keyframes otpShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* --- Responsivo: Dark Mode Móvil --- */
@media (max-width: 900px) {
    body.login-page {
        height: auto !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
        background-color: #0f172a !important;
    }

    .split-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }
    
    .split-left {
        display: none !important; /* En móvil, ocultamos la columna izquierda */
    }

    .split-right {
        padding: 40px 24px;
        min-height: 100vh;
        box-sizing: border-box;
        background: transparent !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .logo-mobile {
        display: block !important;
        max-height: 38px !important;
        width: auto;
        margin-bottom: 28px;
    }

    .form-wrapper h2 {
        color: #ffffff !important;
    }

    .form-wrapper p.subtitle {
        color: #94a3b8 !important;
    }

    .floating-group input {
        background-color: rgba(30, 41, 59, 0.7) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        color: #ffffff !important;
    }

    .floating-group input:focus {
        background-color: #1e293b !important;
        border-color: var(--brand-primary, #14b8a6) !important;
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.25) !important;
    }

    .floating-group label {
        color: #94a3b8 !important;
    }

    .floating-group input:focus ~ label,
    .floating-group input:not(:placeholder-shown) ~ label {
        color: var(--brand-primary, #14b8a6) !important;
    }

    .floating-group input:-webkit-autofill,
    .floating-group input:-webkit-autofill:hover, 
    .floating-group input:-webkit-autofill:focus, 
    .floating-group input:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
        -webkit-text-fill-color: #ffffff !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
    }

    .btn-teal-outline {
        background: rgba(255, 255, 255, 0.05) !important;
        color: #e2e8f0 !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }

    .btn-teal-outline:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #ffffff !important;
        border-color: rgba(255, 255, 255, 0.25) !important;
    }

    /* OTP 2FA Dark Mode en Móvil */
    .otp-box {
        background-color: rgba(30, 41, 59, 0.8) !important;
        border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
    }

    .otp-box:focus {
        background-color: #1e293b !important;
        border-color: var(--brand-primary, #14b8a6) !important;
        box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.25) !important;
    }

    .otp-box.is-filled {
        border-color: var(--brand-primary, #14b8a6) !important;
        background-color: rgba(20, 184, 166, 0.15) !important;
        color: #2dd4bf !important;
    }
}

@media (max-width: 440px) {
    .otp-boxes {
        gap: 6px;
    }
    .otp-box {
        width: 44px;
        height: 52px;
        font-size: 1.35rem;
    }
}

