/* Login Page Styles - Theme Aware - Inspired by mitigatex */

body {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Theme Toggle for Login */
.login-theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .login-theme-toggle {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(6, 182, 212, 0.2);
}

[data-theme="light"] .login-theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(6, 182, 212, 0.2);
}

.login-theme-toggle:hover {
    box-shadow: var(--shadow-lg);
    opacity: 0.9;
}

/* Animated Background */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
    z-index: -1;
}

[data-theme="light"] .login-background {
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 50%, #CBD5E1 100%);
}

.login-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Floating particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(102, 126, 234, 0.5);
    border-radius: 50%;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 1.5rem;
    max-width: 1100px;
    width: 100%;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.4),
        0 10px 10px -5px rgba(0, 0, 0, 0.3),
        0 0 60px -15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

[data-theme="light"] .login-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.05),
        0 0 60px -15px rgba(102, 126, 234, 0.2);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Left Side - Branding */
.login-branding {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-right: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
}

[data-theme="light"] .login-branding {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.04) 100%);
    border-right: 1px solid rgba(102, 126, 234, 0.15);
}

.login-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.branding-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.logo-container {
    position: relative;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

[data-theme="dark"] .logo-container {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 60px;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    filter: blur(30px);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.login-logo {
    position: relative;
    z-index: 1;
}

.login-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    line-height: 1.2;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.login-features {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.login-feature {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    min-width: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .login-feature {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.login-feature-icon {
    width: 32px;
    height: 32px;
    color: white;
    margin: 0 auto 0.5rem;
}

[data-theme="light"] .login-feature-icon {
    color: #667eea;
}

.login-feature-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
}

[data-theme="light"] .login-feature-text {
    color: #667eea;
}

/* Right Side - Form */
.login-form-side {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.login-form-container {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.login-form-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.login-form-description {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 0.9375rem;
}

.login-form-field {
    margin-bottom: 1.25rem;
}

.login-form-field-last {
    margin-bottom: 2rem;
}

.login-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-form-input {
    height: 48px;
    font-size: 0.9375rem;
}

/* Autofill Styling - Dark Theme */
[data-theme="dark"] .login-form-input:-webkit-autofill,
[data-theme="dark"] .login-form-input:-webkit-autofill:hover,
[data-theme="dark"] .login-form-input:-webkit-autofill:focus,
[data-theme="dark"] .login-form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(30, 41, 59, 0.8) inset !important;
    -webkit-text-fill-color: #F8FAFC !important;
    border: 1px solid var(--border-color) !important;
    background-color: rgba(30, 41, 59, 0.8) !important;
    color: #F8FAFC !important;
    caret-color: #F8FAFC !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Autofill Styling - Light Theme */
[data-theme="light"] .login-form-input:-webkit-autofill,
[data-theme="light"] .login-form-input:-webkit-autofill:hover,
[data-theme="light"] .login-form-input:-webkit-autofill:focus,
[data-theme="light"] .login-form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #F5F7FA inset !important;
    -webkit-text-fill-color: #2D3748 !important;
    border: 1px solid var(--border-color) !important;
    background-color: #F5F7FA !important;
    color: #2D3748 !important;
    caret-color: #2D3748 !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

.login-form-button {
    width: 100%;
    height: 48px;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-form-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.login-form-button:hover:not(:disabled) {
    opacity: 0.9;
}

.login-form-button:hover::before {
    left: 100%;
}

.login-form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-version {
    text-align: center;
    margin-top: 3rem;
}

.login-version-text {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 968px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .login-branding {
        border-right: none;
        border-bottom: 1px solid rgba(102, 126, 234, 0.2);
        padding: 3rem 2rem;
    }
    
    .login-form-side {
        padding: 3rem 2rem;
    }
    
    .login-title {
        font-size: 2.25rem;
    }
    
    .login-features {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-branding, .login-form-side {
        padding: 2rem 1.5rem;
    }
}

