/* fakturox Login Page - 2-Column Design */

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

/* Theme Toggle Button */
.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(24, 183, 200, 0.2);
}

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

.login-theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 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(24, 183, 200, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(110, 235, 59, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 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(24, 183, 200, 0.5);
    border-radius: 50%;
    animation: float 20s infinite;
}

.particle-1 { left: 10%; animation-delay: 0s; }
.particle-2 { left: 20%; animation-delay: 2s; }
.particle-3 { left: 30%; animation-delay: 4s; }
.particle-4 { left: 40%; animation-delay: 6s; }
.particle-5 { left: 50%; animation-delay: 8s; }
.particle-6 { left: 60%; animation-delay: 10s; }
.particle-7 { left: 70%; animation-delay: 12s; }
.particle-8 { left: 80%; animation-delay: 14s; }
.particle-9 { left: 90%; animation-delay: 16s; }

@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);
    border: 1px solid rgba(24, 183, 200, 0.2);
    border-radius: 1.5rem;
    max-width: 1000px;
    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(24, 183, 200, 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(24, 183, 200, 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(24, 183, 200, 0.2);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1EA7FF 0%, #18B7C8 50%, #6EEB3B 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-left {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(24, 183, 200, 0.1) 0%, rgba(110, 235, 59, 0.05) 100%);
    border-right: 1px solid rgba(24, 183, 200, 0.2);
    position: relative;
}

[data-theme="light"] .login-left {
    background: linear-gradient(135deg, rgba(24, 183, 200, 0.08) 0%, rgba(110, 235, 59, 0.04) 100%);
    border-right: 1px solid rgba(24, 183, 200, 0.15);
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(24, 183, 200, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(110, 235, 59, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.branding-content {
    position: relative;
    z-index: 1;
}

.logo-container {
    position: relative;
    margin-bottom: 2rem;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 110px;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(24, 183, 200, 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;
    max-width: 220px;
    height: auto;
    object-fit: contain;
}
    background-clip: text;
    letter-spacing: -1px;
    line-height: 1.2;
}

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

.login-features {
    list-style: none;
    margin-top: 1.5rem;
    padding: 0;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
    font-size: 0.9rem;
}

.login-features li svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

/* Right Side - Form */
.login-right {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.login-form-header {
    margin-bottom: 1.5rem;
}

.login-form-header h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.login-form-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-right .form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    width: 100%;
}

[data-theme="dark"] .login-right .form-control {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(24, 183, 200, 0.2);
}

.login-right .form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(24, 183, 200, 0.15);
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1EA7FF 0%, #18B7C8 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(24, 183, 200, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(24, 183, 200, 0.5);
    background: linear-gradient(135deg, #18B7C8 0%, #6EEB3B 100%);
}

.btn-login:active {
    transform: translateY(0) scale(0.98);
}

/* OAuth Divider */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.login-divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* OAuth Buttons */
.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-google {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-google:hover {
    background: var(--bg-hover);
    border-color: rgba(24, 183, 200, 0.3);
    box-shadow: 0 4px 15px rgba(24, 183, 200, 0.15);
    transform: translateY(-2px);
}

.btn-google:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.login-legal-links {
    margin-top: 1.5rem;
    font-size: 0.75rem;
}

.login-legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

.login-copyright {
    margin-top: 1rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

.login-version {
    margin-top: 0.25rem;
    font-size: 0.625rem;
    opacity: 0.35;
    letter-spacing: 0.05em;
}

/* Login Options Row */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

.remember-me-label input {
    cursor: pointer;
}

.forgot-password-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* Logo Fallback */
.login-logo-fallback {
    display: none;
}

/* Theme Toggle Icons */
.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* Narrow Card (for reset-password) */
.login-card-narrow {
    max-width: 500px;
    grid-template-columns: 1fr;
}

.login-card-narrow .login-right {
    padding: 3rem;
}

/* Form Hint */
.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Alerts */
.login-right .alert {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.login-right .alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.login-right .alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

/* Responsive */
@media (max-width: 900px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    
    .login-left {
        border-right: none;
        border-bottom: 1px solid rgba(24, 183, 200, 0.2);
        padding: 2.5rem 2rem;
    }
    
    .login-right {
        padding: 2.5rem 2rem;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .login-features {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-left, .login-right {
        padding: 2rem 1.5rem;
    }
}

/* ========================================
   BROWSER AUTOFILL OVERRIDE - LOGIN
   ======================================== */

/* Browser Autofill - Dark Theme */
[data-theme="dark"] .login-right input.form-control:-webkit-autofill,
[data-theme="dark"] .login-right input.form-control:-webkit-autofill:hover,
[data-theme="dark"] .login-right input.form-control:-webkit-autofill:focus,
[data-theme="dark"] .login-right input.form-control:-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 rgba(24, 183, 200, 0.2) !important;
    background-color: rgba(30, 41, 59, 0.8) !important;
    background-image: none !important;
    caret-color: #F8FAFC !important;
    appearance: none !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

[data-theme="dark"] .login-right input.form-control:-internal-autofill-selected {
    appearance: none !important;
    background-image: none !important;
    background-color: rgba(30, 41, 59, 0.8) !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(30, 41, 59, 0.8) inset !important;
    color: #F8FAFC !important;
    -webkit-text-fill-color: #F8FAFC !important;
    border: 1px solid rgba(24, 183, 200, 0.2) !important;
}

/* Browser Autofill - Light Theme */
[data-theme="light"] .login-right input.form-control:-webkit-autofill,
[data-theme="light"] .login-right input.form-control:-webkit-autofill:hover,
[data-theme="light"] .login-right input.form-control:-webkit-autofill:focus,
[data-theme="light"] .login-right input.form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    -webkit-text-fill-color: #1E293B !important;
    border: 1px solid #E2E8F0 !important;
    background-color: #FFFFFF !important;
    background-image: none !important;
    caret-color: #1E293B !important;
    appearance: none !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

[data-theme="light"] .login-right input.form-control:-internal-autofill-selected {
    appearance: none !important;
    background-image: none !important;
    background-color: #FFFFFF !important;
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    color: #1E293B !important;
    -webkit-text-fill-color: #1E293B !important;
}

.btn-login:disabled {
    opacity: 0.8;
    cursor: wait;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
