/* 🔐 Authentication Styles */

/* Auth Section */
.auth-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.auth-section.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Auth Container */
.auth-container {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    margin: 1rem;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Auth Forms */
.auth-form {
    transition: all 0.3s ease;
}

.auth-form.hidden {
    display: none;
}

.auth-form h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Groups */
.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.auth-form .form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-form .form-group input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Submit Button */
.auth-form .btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    justify-content: center;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.auth-switch a {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-switch a:hover {
    color: #2563eb;
}

/* Error Messages */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: '⚠️';
    font-size: 1rem;
}

/* Success Messages */
.success-message {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message::before {
    content: '✅';
    font-size: 1rem;
}

/* Loading State */
.auth-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.auth-form.loading .btn {
    position: relative;
}

.auth-form.loading .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.strength-bar {
    flex: 1;
    height: 0.25rem;
    background-color: #e5e7eb;
    border-radius: 0.125rem;
    transition: background-color 0.2s ease;
}

.strength-bar.filled {
    background-color: #10b981;
}

.strength-bar.filled.weak {
    background-color: #ef4444;
}

.strength-bar.filled.medium {
    background-color: #f59e0b;
}

.strength-bar.filled.strong {
    background-color: #10b981;
}

.strength-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Remember Me Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.remember-me label {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
}

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password a {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: #3b82f6;
}

/* Social Login (Future) */
.social-login {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.social-login-title {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    position: relative;
}

.social-login-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
    z-index: 1;
}

.social-login-title span {
    background-color: #ffffff;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #ffffff;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.social-btn img {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        padding: 1.5rem;
        margin: 0.5rem;
        border-radius: 0.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .auth-form h2 {
        font-size: 1.25rem;
    }
}

/* Dark theme support (future) */
@media (prefers-color-scheme: dark) {
    .auth-container {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .auth-header h1,
    .auth-form h2 {
        color: #f9fafb;
    }
    
    .auth-form .form-group label {
        color: #d1d5db;
    }
    
    .auth-form .form-group input {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .auth-form .form-group input:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }
    
    .social-btn {
        background-color: #374151;
        border-color: #4b5563;
        color: #d1d5db;
    }
    
    .social-btn:hover {
        background-color: #4b5563;
        color: #f9fafb;
    }
}