* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #0ea5e9;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* Left Side - Branding */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
}

.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    opacity: 0.6;
}

.login-content {
    position: relative;
    z-index: 1;
    color: white;
    max-width: 500px;
}

.logo-section {
    margin-bottom: 60px;
    text-align: center;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.logo-section .subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 400;
}

.info-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.info-section p {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.8;
}

/* Right Side - Login Form */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-primary);
}

.login-form-container {
    width: 100%;
    max-width: 460px;
}

.form-header {
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.form-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message::before {
    content: "⚠";
    font-size: 1.2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-light);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-light);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--text-secondary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -8px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
    transform: translateX(4px);
}

.form-footer {
    margin-top: 40px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-left {
        padding: 40px;
    }
    
    .logo-section h1 {
        font-size: 2rem;
    }
    
    .info-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        min-height: 40vh;
        padding: 40px 24px;
    }
    
    .logo-section {
        margin-bottom: 30px;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
    
    .logo-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .logo-section h1 {
        font-size: 1.75rem;
    }
    
    .logo-section .subtitle {
        font-size: 1rem;
    }
    
    .info-section {
        display: none;
    }
    
    .login-right {
        padding: 40px 24px;
    }
    
    .form-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .login-left {
        min-height: 30vh;
        padding: 30px 20px;
    }
    
    .logo-section h1 {
        font-size: 1.5rem;
    }
    
    .login-right {
        padding: 30px 20px;
    }
    
    .form-header {
        margin-bottom: 30px;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .login-form {
        gap: 20px;
    }
}

/* Loading state */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading .btn-text::after {
    content: '';
    width: 14px;
    height: 14px;
    margin-left: 12px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
    display: inline-block;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}
