* { box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    margin: 0;
    display: flex;
    background: #F1F5F9;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════ LEFT PANEL — Animated Glassmorphism ═══════════ */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #0F172A 0%, #1A1A2E 30%, #16213E 60%, #0F3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient mesh */
.login-left::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220,38,38,0.18) 0%, transparent 70%);
    top: -150px;
    right: -200px;
    animation: loginOrb1 8s ease-in-out infinite alternate;
}
.login-left::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: loginOrb2 10s ease-in-out 2s infinite alternate;
}
@keyframes loginOrb1 {
    0% { transform: translate(0, 0) scale(1); opacity: .6; }
    100% { transform: translate(-40px, 30px) scale(1.2); opacity: 1; }
}
@keyframes loginOrb2 {
    0% { transform: translate(0, 0) scale(1); opacity: .5; }
    100% { transform: translate(30px, -40px) scale(1.15); opacity: .9; }
}

/* Grid background */
.login-left-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: loginGridDrift 25s linear infinite;
    pointer-events: none;
}
@keyframes loginGridDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating shapes */
.login-float-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
}
.login-float-shape:nth-child(1) {
    width: 120px; height: 120px;
    border: 2px solid #DC2626;
    top: 15%; left: 10%;
    animation: loginShapeFloat 7s ease-in-out infinite;
}
.login-float-shape:nth-child(2) {
    width: 80px; height: 80px;
    background: rgba(59,130,246,0.3);
    top: 60%; right: 15%;
    animation: loginShapeFloat 9s ease-in-out 2s infinite;
    border-radius: 20%;
}
.login-float-shape:nth-child(3) {
    width: 60px; height: 60px;
    border: 2px solid #F59E0B;
    bottom: 20%; left: 20%;
    animation: loginShapeFloat 11s ease-in-out 4s infinite;
    border-radius: 30%;
}
.login-float-shape:nth-child(4) {
    width: 40px; height: 40px;
    background: rgba(220,38,38,0.2);
    top: 30%; right: 25%;
    animation: loginShapeFloat 8s ease-in-out 1s infinite;
}
.login-float-shape:nth-child(5) {
    width: 100px; height: 100px;
    border: 1px solid rgba(255,255,255,0.1);
    bottom: 35%; right: 10%;
    animation: loginShapeFloat 12s ease-in-out 3s infinite;
    border-radius: 40%;
}
@keyframes loginShapeFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 15px) rotate(-3deg); }
    75% { transform: translate(20px, 10px) rotate(4deg); }
}

/* Brand content — Glassmorphism card */
.login-left .brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 40px 36px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: loginCardIn .7s cubic-bezier(0.16,1,0.3,1) forwards;
    opacity: 0;
    transform: translateY(20px);
}
@keyframes loginCardIn {
    to { opacity: 1; transform: translateY(0); }
}

.login-left .brand-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #DC2626, #E74C3C);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 12px 36px rgba(220,38,38,0.35);
    animation: loginIconPulse 3s ease-in-out infinite;
    position: relative;
}
.login-left .brand-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 26px;
    border: 2px solid rgba(220,38,38,0.2);
    animation: loginIconRing 3s ease-in-out infinite;
}
@keyframes loginIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes loginIconRing {
    0%, 100% { transform: scale(1); opacity: .5; }
    50% { transform: scale(1.15); opacity: 0; }
}

.login-left .brand-icon i {
    font-size: 2.2rem;
    color: #fff;
}

.login-left h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.login-left p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    font-weight: 400;
    max-width: 320px;
    line-height: 1.6;
    margin: 0 auto;
}

/* Features — glassmorphism items */
.login-features {
    position: relative;
    z-index: 2;
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 14px 18px;
    transition: all .3s ease;
    opacity: 0;
    transform: translateX(-20px);
    animation: loginFeatureIn .5s cubic-bezier(0.16,1,0.3,1) forwards;
}
.login-feature-item:nth-child(1) { animation-delay: .4s; }
.login-feature-item:nth-child(2) { animation-delay: .55s; }
.login-feature-item:nth-child(3) { animation-delay: .7s; }

@keyframes loginFeatureIn {
    to { opacity: 1; transform: translateX(0); }
}

.login-feature-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    transform: translateX(4px);
}

.login-feature-item .feat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(220,38,38,0.12);
    border: 1px solid rgba(220,38,38,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fca5a5;
    flex-shrink: 0;
    transition: all .3s;
}
.login-feature-item:hover .feat-icon {
    background: rgba(220,38,38,0.2);
    transform: scale(1.08);
}

/* ═══════════ RIGHT PANEL ═══════════ */
.login-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
    animation: loginFormIn .6s cubic-bezier(0.16,1,0.3,1) .2s both;
}
@keyframes loginFormIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-form-wrapper h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1E293B;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-form-wrapper .subtitle {
    color: #64748B;
    font-size: 0.88rem;
    margin-bottom: 36px;
}

.login-form-wrapper .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.login-form-wrapper .form-control {
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    background: #FAFBFC;
}

.login-form-wrapper .form-control:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
    background: #fff;
}

.login-form-wrapper .input-group-text {
    border: 1.5px solid #E2E8F0;
    border-right: none;
    background: #F8FAFC;
    border-radius: 12px 0 0 12px;
    color: #94A3B8;
    transition: all .25s;
}
.login-form-wrapper .input-group:focus-within .input-group-text {
    border-color: #DC2626;
    color: #DC2626;
}

.login-form-wrapper .input-group .form-control {
    border-left: none;
    border-radius: 0 12px 12px 0;
}

.btn-login {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border: none;
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(220,38,38,0.25);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: translateX(-100%);
    transition: none;
}
.btn-login:hover::after {
    animation: loginBtnShine .6s ease-out;
}
@keyframes loginBtnShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.btn-login:hover {
    background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(220,38,38,0.35);
}

.login-alert {
    background: #FEE2E2;
    color: #991B1B;
    border: none;
    border-left: 4px solid #DC2626;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: loginAlertIn .4s ease-out;
}
@keyframes loginAlertIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 991px) {
    .login-left { display: none; }
    .login-right {
        width: 100%;
        min-height: 100vh;
    }
}
