/* ==========================================================================
   ERP Premium Login Styles (Glassmorphism & Split Screen)
   ========================================================================== */

/* Reseteo extra por si hay estilos del tema sueltos */
.page-template-page-erp-login header,
.page-template-page-erp-login footer,
.page-template-page-erp-login .top-bar {
    display: none !important; /* Escondemos el menú normal para inmersión total */
}

.erp-login-wrapper {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a; /* Fondo base muy oscuro/moderno */
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #f8fafc;
}

/* Orbes Animados de Fondo (Efecto Glassmorphism) */
.erp-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: floatOrb 20s infinite ease-in-out alternate;
    z-index: 0;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #3b82f6; /* Azul primario */
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #8b5cf6; /* Púrpura acento */
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #0ea5e9; /* Cyan oscuro */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes floatOrb {
    100% { transform: translateY(50px) scale(1.1) translateX(40px); }
}

/* Contenedor Principal Split-Screen */
.erp-login-container {
    position: relative;
    z-index: 10;
    display: flex;
    width: 90%;
    max-width: 1200px;
    min-height: 700px;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    100% { opacity: 1; transform: translateY(0); }
}

/* ================= LADO IZQUIERDO ================= */
.erp-login-brand-panel {
    flex: 1.2;
    position: relative;
    display: flex;
    align-items: center;
    padding: 60px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.7)), url('../images/login-bg.jpg') center/cover no-repeat;
    overflow: hidden;
}

.brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.4), transparent);
    z-index: 1;
}

.brand-content {
    position: relative;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.brand-logo {
    max-width: 200px;
    margin-bottom: 30px;
    border-radius: 50%;
    /* mix-blend-mode: lighten; /* Otra opción temporal para fondos oscuros */
}

.brand-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-content p {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    line-height: 1.6;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #f8fafc;
    background: rgba(255,255,255,0.05);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.feature-item i {
    color: #3b82f6;
    font-size: 1.2rem;
}

/* ================= LADO DERECHO (Formulario) ================= */
.erp-login-form-panel {
    flex: 1;
    padding: 60px;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid rgba(255,255,255,0.05);
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.form-header p {
    color: #94a3b8;
    font-size: 1rem;
}

/* Divisor OR */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #64748b;
    margin: 30px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.login-divider:not(:empty)::before { margin-right: 15px; }
.login-divider:not(:empty)::after { margin-left: 15px; }

/* Native WP Form Overrides */
.native-login-container .login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.native-login-container p { margin: 0; }

.native-login-container label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
}

.native-login-container input[type="text"],
.native-login-container input[type="password"] {
    width: 100%;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.native-login-container input[type="text"]:focus,
.native-login-container input[type="password"]:focus {
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 1);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
}
.login-remember input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.native-login-container input[type="submit"] {
    width: 100%;
    padding: 16px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.native-login-container input[type="submit"]:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.5);
}

.form-footer {
    margin-top: 25px;
    text-align: center;
}

.forgot-password-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.forgot-password-link:hover {
    color: #fff;
}

/* Animaciones de inputs focus */
.input-wrap {
    position: relative;
}

/* ================= RESPONSIVO ================= */
@media (max-width: 991px) {
    .erp-login-container {
        flex-direction: column;
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .erp-login-brand-panel {
        flex: none;
        padding: 30px 20px 15px; /* Reducido drásticamente */
        text-align: center;
        min-height: auto; /* Quitamos el min-height excesivo */
    }

    .brand-logo {
        max-width: 120px; /* Logo más pequeño */
        margin-bottom: 15px;
    }

    .brand-content h1 { 
        font-size: 1.5rem; /* Título más pequeño */
        margin-bottom: 10px;
    }

    .brand-content p {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    /* Ocultamos las características para ahorrar espacio en el móvil */
    .brand-features {
        display: none;
    }

    .erp-login-form-panel {
        padding: 15px 20px 40px;
        border-left: none;
    }
    
    .form-header {
        margin-bottom: 20px;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }
}
