/* =====================================================
   Authentication Pages Styles
   ===================================================== */

/* Auth Page Layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Background */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
}

.auth-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #1a1a2e 100%);
}

.auth-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Branding Side */
.auth-branding {
    padding: 40px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 48px;
}

.auth-logo svg {
    width: 40px;
    height: 40px;
}

.auth-logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-branding-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
    line-height: 1.2;
    color: var(--text-primary);
}

.auth-branding-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 400px;
    line-height: 1.7;
}

/* Auth Features */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.auth-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.auth-feature-icon svg {
    width: 24px;
    height: 24px;
}

.auth-feature-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.auth-feature-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Form Side */
.auth-form-container {
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    padding: 48px;
    box-shadow: var(--shadow-xl);
}

.auth-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-form-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-form-header p {
    color: var(--text-muted);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon .form-input {
    padding-left: 48px;
}

.input-with-icon .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

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

.input-with-icon .password-toggle svg {
    position: static;
    transform: none;
    width: 20px;
    height: 20px;
}

.input-with-icon .password-toggle .eye-closed.hidden,
.input-with-icon .password-toggle .eye-open.hidden {
    display: none;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.form-link {
    color: var(--primary-light);
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.form-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Full Width Button */
.w-full {
    width: 100%;
}

/* Button States */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading.hidden,
.btn-text.hidden {
    display: none;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 16px;
}

/* Social Buttons */
.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
}

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

/* Footer Text */
.auth-footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-footer-text a {
    color: var(--primary-light);
    font-weight: 500;
    transition: var(--transition-base);
}

.auth-footer-text a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: var(--bg-darker);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.strength-fill.weak { width: 25%; background: var(--accent-rose); }
.strength-fill.fair { width: 50%; background: var(--accent-gold); }
.strength-fill.good { width: 75%; background: var(--accent-cyan); }
.strength-fill.strong { width: 100%; background: var(--accent-green); }

.strength-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 40px;
        margin: 20px auto;
        min-height: auto;
    }
    
    .auth-branding {
        padding: 20px;
        text-align: center;
    }
    
    .auth-branding-text {
        margin-left: auto;
        margin-right: auto;
    }
    
    .auth-features {
        display: none;
    }
    
    .auth-form-container {
        padding: 32px;
        max-height: none;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 20px 16px;
    }
    
    .auth-form-container {
        padding: 24px;
        border-radius: 16px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Auth Role Tabs
   ===================================================== */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--bg-darker);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.auth-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.auth-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.auth-tab:hover {
    color: var(--text-secondary);
    background: rgba(102, 126, 234, 0.05);
}

.auth-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Admin tab active — shield color */
.auth-tab[data-role="admin"].active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Admin notice banner */
.admin-notice {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: #fcd34d;
}

.admin-notice.visible {
    display: flex;
}

.admin-notice svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #f59e0b;
}
