/* Modern Auth Pages Styles - Login, Register & Forgot Password */

/* No full-screen backdrop needed � card floats naturally in the content area */


.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-primary);
    padding: 2.5rem;
    position: relative;
    z-index: 1;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group .form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group .form-label i {
    color: var(--brand-primary);
}

.form-group .form-control {
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border-primary);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group .form-control:hover {
    border-color: var(--border-secondary);
}

.form-group .form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--brand-primary-light);
    outline: none;
    background-color: var(--bg-primary);
}

[data-theme="dark"] .form-group .form-control:focus {
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
}

.form-group .form-control::placeholder {
    color: var(--text-tertiary);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.password-toggle i {
    font-size: 1.125rem;
}

.password-requirements {
    margin-top: 0.5rem;
}

.password-requirements small {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* Form Options (Remember Me / Forgot Password) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    cursor: pointer;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-sm);
    background-color: var(--bg-primary);
    transition: all var(--transition-fast);
}

.form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--brand-primary-light);
    outline: none;
}

.form-check-label {
    font-size: 0.9375rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.form-check-label a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.form-check-label a:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

.forgot-password-link {
    font-size: 0.9375rem;
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.forgot-password-link:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

/* Auth Button */
.btn-auth {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-auth:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-auth:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.btn-auth:active:not(:disabled) {
    transform: translateY(0);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-auth .spinner-border {
    width: 1.125rem;
    height: 1.125rem;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.3);
    border-right-color: white;
}

/* Auth Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-primary);
}

.auth-divider span {
    position: relative;
    background: var(--bg-elevated);
    padding: 0 1rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Auth Footer */
.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
    text-align: center;
}

.auth-footer p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

.auth-footer-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

.auth-link,
.auth-footer-link {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
    transition: color var(--transition-fast);
}

.auth-link:hover,
.auth-footer-link:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

/* Auth Help */
.auth-help {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

/* Alerts in Auth Pages */
.auth-card .alert {
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: none;
    border-left: 4px solid;
}

.auth-card .alert i {
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.auth-card .alert-danger {
    background-color: var(--error-light);
    border-left-color: var(--error);
    color: var(--error);
}

.auth-card .alert-success {
    background-color: var(--success-light);
    border-left-color: var(--success);
    color: var(--success);
}

.auth-card .alert-info {
    background-color: var(--info-light);
    border-left-color: var(--info);
    color: var(--info);
}

.auth-card .btn-close {
    margin-left: auto;
    background-color: transparent;
    opacity: 0.6;
}

.auth-card .btn-close:hover {
    opacity: 1;
}

/* Success message state (forgot password) */
.success-message {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.success-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Social Auth Buttons (if needed) */
.social-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.social-auth-divider::before,
.social-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-primary);
}

.social-auth-divider span {
    padding: 0 1rem;
}

.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-social {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-primary);
    border-radius: var(--radius-lg);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-social:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-secondary);
}

/* Dark Mode Enhancements */
[data-theme="dark"] .auth-container::before {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.10) 0%, transparent 50%);
}

[data-theme="dark"] .auth-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-color: var(--border-primary);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .auth-divider span {
    background: var(--bg-elevated);
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-container::before,
    .btn-auth::before {
        animation: none !important;
    }
}
