/* 
 * Optimiza Host - Estilos de Autenticación (Split-Screen Redesign)
 */

.auth-layout {
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

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

/* Columna Izquierda: Formulario */
.auth-box-side {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Aligned to top to reduce gaps */
    padding: 20px 8%;
    /* Reduced from 40px */
    background: var(--bg-color);
    z-index: 10;
    overflow-y: hidden;
    /* Prevent scroll if possible */
}

.auth-header-new {
    margin-bottom: 20px;
    /* Reduced from 30px */
}

.logo-img {
    height: 180px;
    /* Slightly reduced from 230px to save space */
    width: auto;
    margin-bottom: 5px;
    /* Reduced from 20px */
    display: block;
}

.main-title {
    font-size: 2.8rem;
    /* Slightly smaller to save space */
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.auth-form {
    width: 100%;
}

.form-group-new {
    margin-bottom: 15px;
    /* Reduced from 20px */
}


.form-group-new label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field {
    width: 100%;
    padding: 10px 14px;
    /* Reduced from 12px */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-neon);
    box-shadow: 0 0 15px var(--accent-neon-glow);
    background: rgba(0, 255, 136, 0.02);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
}

/* Botón de Login Neon */
.btn-neon-submit {
    width: 100%;
    margin-top: 5px;
    /* Reduced from 10px */
    padding: 12px;
    /* Reduced from 14px */
    background: linear-gradient(90deg, #00ff88 0%, #a2ff00 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--accent-neon-glow);
}

.btn-neon-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-neon-glow);
    filter: brightness(1.1);
}

.auth-links {
    margin-top: 15px;
    /* Reduced from 25px */
    font-size: 0.85rem;
    color: var(--text-secondary);
}


.auth-links p {
    margin-bottom: 8px;
}

.auth-links a {
    color: var(--accent-neon);
    font-weight: 600;
}

.back-home-link {
    display: block;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-home-link:hover {
    color: var(--accent-neon) !important;
}

.back-home-link i {
    margin-right: 8px;
}

.brand a {
    text-decoration: none;
    display: inline-block;
}


/* Hide scrollbar for a cleaner look while maintaining functionality */
.auth-box-side::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.auth-box-side {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Columna Derecha: Visuales Rediseñada */
.visual-side {
    flex: 1 1 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    margin-left: -1px;
    /* Remove potential gap */
}

.bg-visual-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.bg-visual-img.loaded {
    opacity: 1;
}

.visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, var(--bg-color) 0%, rgba(0, 0, 0, 0.2) 100%);
    /* Softer gradient */
    z-index: 1;
}

.visual-content-new {
    position: relative;
    z-index: 2;
    width: 85%;
    max-width: 500px;
}

.info-glass-card {
    background: rgba(0, 0, 0, 0.3);
    /* Lighter */
    backdrop-filter: blur(2px) !important;
    /* Minimum blur */
    -webkit-backdrop-filter: blur(2px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.badge-tech {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-neon);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(0, 255, 136, 0.2);
    margin-bottom: 25px;
}

.info-glass-card h2 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff;
}

.info-glass-card p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.feature-inline {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.f-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-neon);
}

.small-text {
    font-size: 0.85rem !important;
    opacity: 0.6;
    margin-bottom: 30px !important;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    color: #fff;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.status-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

.premium-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 25px 0;
}

.small-text-premium {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-box-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    font-size: 0.85rem;
}

.auth-box-footer a {
    color: var(--accent-neon);
    text-decoration: none;
    font-weight: 600;
}


/* Responsivo */
@media (max-width: 1024px) {
    .auth-layout {
        overflow-y: auto;
    }

    .split-layout {
        flex-direction: column;
        height: auto;
    }

    .auth-box-side {
        padding: 60px 10%;
        min-height: 100vh;
    }

    .visual-side {
        display: none;
    }
}


.alert {
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.95rem;
    display: none;
    /* Handled by JS */
}

.alert-danger {
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid rgba(255, 50, 50, 0.3);
    color: #ff6060;
}

/* 2FA Modal Styles */
.modal-2fa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-2fa-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-2fa-content {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-2fa-overlay.active .modal-2fa-content {
    transform: translateY(0);
}

.modal-2fa-header h2 {
    font-size: 1.8rem;
    margin: 20px 0 10px;
    color: #fff;
}

.modal-2fa-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}

.icon-shield {
    width: 80px;
    height: 80px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.2rem;
    color: var(--accent-neon);
}

.pulse-neon {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 255, 136, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    }
}

.code-field {
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: 8px;
    font-family: var(--font-mono);
}

.btn-cancel-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    margin-top: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    transition: var(--transition);
}

.btn-cancel-link:hover {
    color: #fff;
}

.glass-morphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}