/* Split Layout Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px var(--glass-shadow);
    overflow: hidden;
    animation: fade-in-up 0.6s ease-out;
}

/* Left Side - Branding */
.login-brand-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    text-align: center;
    position: relative;
    border-right: 1px solid var(--glass-border);
}

.brand-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-logo {
    width: 140px;
    height: 140px;
    margin-bottom: var(--spacing-xl);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    animation: float 6s ease-in-out infinite;
    object-fit: contain;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

/* Right Side - Form */
.login-form-section {
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.login-header {
    text-align: left;
    margin-bottom: var(--spacing-xl);
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Form Styles Override */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    font-size: 0.9rem;
}

.checkbox-label {
    color: var(--text-secondary);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Buttons */
.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.divider {
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--glass-border);
}

.divider span {
    position: relative;
    background: var(--bg-primary);
    /* Fallback */
    background: #1e293b;
    /* Match dark theme bg approx if needed, but transparent is better if we can match parent */
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    z-index: 1;
    border-radius: 10px;
}

/* Google Button */
#googleLoginBtn {
    background: white;
    color: #1f2937;
    font-weight: 600;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#googleLoginBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f9fafb;
}

/* Footer */
.login-footer {
    margin-top: var(--spacing-xl);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--primary);
}

/* Demo Hint - Compact */
.demo-hint-compact {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.demo-hint-compact p {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    text-align: center;
}

.demo-chips {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-chip {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
    }

    .login-brand-section {
        padding: var(--spacing-xl);
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        display: none;
        /* Hide branding on mobile to save space, or keep small */
    }

    /* Option: Show simplified header on mobile instead of full brand section */
    .mobile-brand-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .mobile-brand-logo {
        width: 50px;
        height: 50px;
    }

    .mobile-brand-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-primary);
    }
}

@media (min-width: 901px) {
    .mobile-brand-header {
        display: none;
    }
}

/* ========================================
   Light Theme Overrides for Login Page
   ======================================== */
body.light-theme .login-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

body.light-theme .login-brand-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-right-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .brand-title {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #4f46e5; /* Fallback for browsers that don't support background-clip: text */
}

body.light-theme .brand-subtitle {
    color: #475569;
}

body.light-theme .login-form-section {
    background: rgba(255, 255, 255, 0.9);
}

body.light-theme .login-header h2 {
    color: #0f172a;
}

body.light-theme .login-header p {
    color: #475569;
}

body.light-theme .form-group label {
    color: #334155;
}

body.light-theme .form-group input {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(0, 0, 0, 0.15);
    color: #0f172a;
}

body.light-theme .form-group input::placeholder {
    color: #94a3b8;
}

body.light-theme .form-group input:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

body.light-theme .checkbox-label {
    color: #475569;
}

body.light-theme .forgot-link {
    color: #6366f1;
}

body.light-theme .forgot-link:hover {
    color: #4f46e5;
}

body.light-theme .divider span {
    background: rgba(255, 255, 255, 0.95);
    color: #64748b;
}

body.light-theme .divider::before {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .demo-hint-compact {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-theme .demo-hint-compact p {
    color: #475569;
}

body.light-theme .demo-chip {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

body.light-theme .demo-chip:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

body.light-theme .login-footer {
    color: #475569;
}

body.light-theme .login-footer a {
    color: #6366f1;
}

body.light-theme .login-footer a:hover {
    color: #4f46e5;
}

body.light-theme .error-message {
    color: #ef4444;
}

body.light-theme .mobile-brand-title {
    color: #0f172a;
}