html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #0a0a0a;
    overflow-x: hidden;
}

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

/* ===== Panel visual (foto + branding) ===== */
.login-visual {
    position: relative;
    flex: 1.1;
    background: url('../assets/img/fondo-moto-motor.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.login-visual-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(6,6,6,.96) 0%, rgba(6,6,6,.75) 42%, rgba(6,6,6,.35) 75%, rgba(6,6,6,.55) 100%),
        linear-gradient(100deg, rgba(0,0,0,.35), transparent 55%);
}
.login-visual::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--red, #e50914) 50%, transparent);
    opacity: .6;
}

.login-visual-content {
    position: relative;
    z-index: 2;
    padding: 50px 56px 60px;
    color: #fff;
}

.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.login-brand-img { width: 100%; max-width: 380px; filter: drop-shadow(0 8px 24px rgba(229,9,20,.35)); }
.login-logo {
    width: 54px; height: 54px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e50914, #7a0009);
    box-shadow: 0 0 22px rgba(229,9,20,.4);
    font-size: 24px; flex-shrink: 0;
}
.login-visual-content h1 {
    font-size: 1.7rem; font-weight: 800; letter-spacing: .5px; margin: 0; line-height: 1.15;
}
.login-visual-content h1 span { color: #ff3b47; }

.login-tagline {
    font-size: 1.02rem; color: #d8d8d8; max-width: 380px; margin-bottom: 22px; line-height: 1.5;
}

.login-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.login-features li { font-size: .88rem; color: #bdbdbd; display: flex; align-items: center; gap: 10px; }
.login-features i {
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(229,9,20,.18); color: #ff3b47;
    display: inline-flex; align-items: center; justify-content: center; font-size: .68rem; flex-shrink: 0;
}

/* ===== Panel del formulario ===== */
.login-form-panel {
    flex: 0.9;
    min-width: 380px;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-form-box { width: 100%; max-width: 360px; }
.login-form-box h2 { color: #fff; font-weight: 800; margin-bottom: 4px; font-size: 1.4rem; }
.login-sub { color: #8a8a8a; font-size: .88rem; margin-bottom: 26px; }

.form-label { color: #c7c7c7; }

.input-group-text {
    background-color: #1a1a1a;
    border: 1px solid rgba(255,255,255,.08);
    color: #e50914;
}
.form-control {
    background-color: #161616;
    border: 1px solid rgba(255,255,255,.08);
    color: #f0f0f0;
}
.form-control:focus {
    background-color: #161616;
    color: #fff;
    border-color: #e50914;
    box-shadow: 0 0 0 .18rem rgba(229,9,20,.22);
}

.toggle-password {
    border: 1px solid rgba(255,255,255,.08);
    background-color: #1a1a1a;
    color: #c7c7c7;
}
.toggle-password:hover { color: #e50914; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .5s ease both; }

.login-alert {
    animation: alertIn .4s cubic-bezier(.4,0,.2,1) both;
    transition: opacity .4s ease, max-height .4s ease, margin .4s ease, padding .4s ease, transform .4s ease;
    max-height: 60px;
    overflow: hidden;
}
.login-alert.hide {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    transform: translateY(-6px);
    border-width: 0;
}
@keyframes alertIn {
    from { opacity: 0; transform: translateY(-10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 860px) {
    .login-split { flex-direction: column; }
    .login-visual { flex: none; min-height: 240px; }
    .login-visual-content { padding: 26px 24px 30px; }
    .login-tagline, .login-features { display: none; }
    .login-form-panel { min-width: 0; flex: none; }
}
