/* =============================================
   LOGIN PAGE STYLES
   ============================================= */

.login-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* =============================================
   LEFT SIDE - Logo & Branding
   ============================================= */

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    position: relative;
    overflow: hidden;
}

.logo-container {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeIn 1s ease;
}

.main-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    margin-bottom: var(--spacing-xl);
    animation: slideInRight 0.8s ease;
}

.logo-subtitle {
    color: white;
    animation: fadeIn 1.2s ease;
}

.ai-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-md);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-subtitle p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin: 0;
}

/* Animated Background */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 70%;
    width: 300px;
    height: 300px;
    animation-delay: 4s;
}

.particle:nth-child(3) {
    top: 30%;
    left: 50%;
    width: 250px;
    height: 250px;
    animation-delay: 8s;
}

.particle:nth-child(4) {
    bottom: 10%;
    left: 20%;
    width: 350px;
    height: 350px;
    animation-delay: 12s;
}

.particle:nth-child(5) {
    top: 50%;
    right: 10%;
    width: 200px;
    height: 200px;
    animation-delay: 16s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.3;
    }
    75% {
        transform: translate(20px, 30px) scale(1.05);
        opacity: 0.4;
    }
}

/* =============================================
   RIGHT SIDE - Login Form
   ============================================= */

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    background: var(--bg-primary);
}

.login-form-container {
    width: 100%;
    max-width: 440px;
    animation: slideInRight 0.6s ease;
}

.login-form-container h1 {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
}

.login-form {
    margin-bottom: var(--spacing-xl);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-right: var(--spacing-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.checkbox-container:hover .checkmark {
    border-color: var(--primary-blue);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkbox-container input:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary-blue);
    font-weight: 500;
}

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

/* Login Button */
.btn-login {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1.0625rem;
    font-weight: 600;
}

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.login-footer a {
    color: var(--primary-blue);
    font-weight: 600;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    .login-left {
        display: none;
    }
    
    .login-right {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .login-right {
        padding: var(--spacing-lg);
    }
    
    .login-form-container {
        max-width: 100%;
    }
    
    .login-form-container h1 {
        font-size: 1.875rem;
    }
}

/* =============================================
   LOADING STATE
   ============================================= */

.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading span {
    opacity: 0;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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