/* ===============================================
   Login Page — Premium Dark Glassmorphism Style
   =============================================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0f1e;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Animated gradient orbs */
.login-wrapper::before,
.login-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
}

.login-wrapper::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.login-wrapper::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    animation-delay: -4s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -30px) scale(1.05); }
    66%       { transform: translate(-20px, 20px) scale(0.97); }
}

/* Grid texture overlay */
.login-wrapper .grid-overlay {
    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;
    pointer-events: none;
}

/* Split layout */
.login-layout {
    display: grid;
    grid-template-columns: 1fr 460px;
    min-height: 100vh;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Left brand panel */
.login-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3rem;
    position: relative;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a5b4fc;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    width: fit-content;
}

.brand-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 6px #6366f1;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px #6366f1; }
    50%       { opacity: 0.5; box-shadow: 0 0 12px #6366f1; }
}

.brand-headline {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.brand-headline .highlight {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-description {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    margin-bottom: 3rem;
    max-width: 420px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.brand-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #a5b4fc;
}

/* Right form panel */
.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-left: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(20px);
}

.login-container {
    width: 100%;
    max-width: 380px;
}

.login-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow:
        0 0 0 1px rgba(99,102,241,0.1),
        0 32px 64px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.07);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(99,102,241,0.3);
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0;
}

/* Form fields — dark variant */
.login-form .form-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.login-form .form-control {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #ffffff;
    transition: all 0.2s;
}

.login-form .form-control::placeholder {
    color: rgba(255,255,255,0.25);
}

.login-form .form-control:focus {
    background: rgba(255,255,255,0.08);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
    color: #ffffff;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

/* Login button */
.login-form .btn-login {
    width: 100%;
    padding: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    letter-spacing: 0.01em;
}

.login-form .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #4f52e8 0%, #7c3aed 100%);
}

.login-form .btn-login:active {
    transform: translateY(0);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.login-footer p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    margin: 0 0 0.25rem;
}

.login-footer code {
    background: rgba(255,255,255,0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
}

.version-info {
    margin-top: 0.75rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.2);
}

/* Password Toggle */
.password-toggle {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: color 0.2s;
    font-size: 1rem;
    line-height: 1;
}

.password-toggle-btn:hover {
    color: rgba(255,255,255,0.7);
}

/* Alert overrides for dark bg */
.login-card .alert {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    border-radius: 10px;
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
}

.login-card .alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.login-card .alert-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Responsive: stack layout on small screens */
@media (max-width: 900px) {
    .login-layout {
        grid-template-columns: 1fr;
    }
    .login-brand-panel {
        display: none;
    }
    .login-form-panel {
        border-left: none;
        padding: 2rem 1rem;
        background: transparent;
    }
}
