/* Authentication Pages Styles */

.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border-color-light);
}

.auth-header {
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.05) 0%, 
        rgba(5, 150, 105, 0.05) 100%);
}

.auth-logo {
    max-height: 100px;
    max-width: 300px;
    width: auto;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
}

.auth-header h1 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.auth-form {
    padding: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 2rem;
}

.auth-form label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-form input {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.auth-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-primary);
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

.auth-form .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.auth-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.auth-footer {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color-light);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.875rem;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-help {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 1rem 0 0 0;
}

/* Alert in auth context */
.auth-form .alert {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-form .alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-form .alert-success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #065f46;
}

.auth-form .alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--border-color-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak .strength-fill {
    width: 33%;
    background: var(--error-color);
}

.strength-medium .strength-fill {
    width: 66%;
    background: var(--warning-color);
}

.strength-strong .strength-fill {
    width: 100%;
    background: var(--success-color);
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.strength-weak .strength-text {
    color: var(--error-color);
}

.strength-medium .strength-text {
    color: var(--warning-color);
}

.strength-strong .strength-text {
    color: var(--success-color);
}

/* Remember me checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    margin: 0;
    font-weight: 400;
    font-size: 0.875rem;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

/* Loading state */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive auth */
@media (max-width: 480px) {
    .auth-page {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .auth-container {
        max-width: 100%;
    }
    
    .auth-card {
        border-radius: var(--radius-lg);
        margin: 0;
    }
    
    .auth-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .auth-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .auth-form input {
        padding: 0.875rem 1rem;
    }
    
    .auth-form .btn {
        padding: 0.875rem 1.25rem;
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .auth-page {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .auth-form input {
        border-width: 3px;
    }
    
    .auth-form input:focus {
        border-width: 3px;
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .auth-form input,
    .auth-form .btn,
    .strength-fill {
        transition: none;
    }
    
    .btn-loading::after {
        animation: none;
    }
    
    .auth-form .btn:hover {
        transform: none;
    }
}