/* =====================================================================
   LOGIN PROFESIONAL - Diseño Split
   ===================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

body.login-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    min-height: 100vh;
    background: #f4f6f9;
    overflow-x: hidden;
}

.login-split {
    display: flex;
    min-height: 100vh;
}

/* ===== Panel izquierdo ===== */
.login-branding {
    flex: 1;
    background: linear-gradient(135deg, #8e0000 0%, #2321a2 50%, #ef5350 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}
.brand-pattern {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 60%);
}
.branding-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 480px;
    animation: fadeInLeft 0.8s ease;
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.brand-logo-big {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.brand-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.brand-divider {
    width: 80px;
    height: 3px;
    background: rgba(255,255,255,0.5);
    margin: 1.5rem auto;
    border-radius: 2px;
}
.brand-region {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 0.3rem;
}
.brand-election {
    opacity: 0.85;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 320px;
    margin: 0 auto;
}
.feature-item {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.15);
}
.feature-item i {
    font-size: 1.2rem;
    color: #ffc107;
}

/* ===== Panel derecho ===== */
.login-form-panel {
    flex: 0 0 480px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    box-shadow: -10px 0 40px rgba(0,0,0,0.05);
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
    animation: fadeInRight 0.8s ease;
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.form-header {
    margin-bottom: 2rem;
}
.form-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}
.form-header p {
    color: #718096;
    font-size: 0.95rem;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border: none;
    border-left: 4px solid #c62828;
    padding: 0.9rem 1.1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* ===== Form floating modern ===== */
.form-floating-modern {
    position: relative;
    margin-bottom: 1.2rem;
}
.form-floating-modern label {
    position: absolute;
    top: -9px;
    left: 14px;
    background: white;
    padding: 0 8px;
    font-size: 0.78rem;
    color: #c62828;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 3;
}
.form-floating-modern label i { margin-right: 0.3rem; }
.form-floating-modern input {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem 1.1rem;
    font-size: 1.05rem;
    transition: all 0.2s;
    background: #fafbfc;
}
.form-floating-modern input:focus {
    border-color: #c62828;
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.1);
}

.btn-show-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
    transition: color 0.2s;
}
.btn-show-password:hover { color: #c62828; }

/* ===== Botón login ===== */
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #c62828 0%, #8e0000 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    transition: all 0.25s;
    box-shadow: 0 10px 25px rgba(198, 40, 40, 0.3);
    margin-top: 0.5rem;
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(198, 40, 40, 0.4);
}
.btn-login:active { transform: translateY(0); }
.btn-login i { font-size: 1.2rem; }

.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef0f4;
    color: #a0aec0;
    font-size: 0.82rem;
    line-height: 1.7;
}
.form-footer i { color: #c62828; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .login-split {
        flex-direction: column;
    }
    .login-branding {
        flex: none;
        padding: 2.5rem 2rem;
    }
    .brand-logo-big {
        width: 70px; height: 70px;
        font-size: 2rem;
    }
    .brand-title { font-size: 1.3rem; }
    .brand-features { flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: 100%; }
    .feature-item { flex: 1; min-width: 160px; font-size: 0.8rem; padding: 0.6rem 0.9rem; }
    .login-form-panel {
        flex: 1;
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 575px) {
    .brand-features { flex-direction: column; }
    .form-header h2 { font-size: 1.5rem; }
}