/* ===========================================
   AUTH PAGES — Login / Signup / Forgot Password
   Premium glassmorphism auth UI
   =========================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    padding: 40px 16px;
}

/* Animated background orbs */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(100px);
    opacity: 0.12;
}
.auth-orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    top: -120px; right: -100px;
    animation: authFloat 12s ease-in-out infinite;
}
.auth-orb-2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
    bottom: -80px; left: -80px;
    animation: authFloat 10s ease-in-out infinite reverse;
}
.auth-orb-3 {
    width: 200px; height: 200px;
    background: radial-gradient(circle, #a855f7, transparent 70%);
    top: 40%; left: 10%;
    animation: authFloat 14s ease-in-out infinite 2s;
}

@keyframes authFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
}

/* Auth card */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bg-glass-border);
    border-radius: 28px;
    padding: 48px 40px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 28px 28px 0 0;
}

@media (max-width: 480px) {
    .auth-card { padding: 36px 24px; border-radius: 22px; }
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 8px;
}
.auth-logo img {
    width: 56px; height: 56px;
    border-radius: 16px;
    border: 2px solid var(--border-glass);
}

/* Headings */
.auth-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.auth-subtitle {
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Tab toggle */
.auth-tabs {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-surface);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
}
.auth-tab.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,194,255,0.25);
}

/* Form fields */
.auth-field {
    margin-bottom: 20px;
}
.auth-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.auth-input-wrap {
    position: relative;
}
.auth-input-wrap i.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.3s ease;
}
.auth-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--bg-surface);
    border: 1px solid var(--border-surface);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}
.auth-input:focus {
    border-color: var(--accent-primary);
    background: rgba(0,194,255,0.04);
    box-shadow: 0 0 0 3px rgba(0,194,255,0.08);
}
.auth-input:focus + i.field-icon,
.auth-input:focus ~ i.field-icon {
    color: var(--accent-primary);
}
.auth-input::placeholder {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Password toggle */
.pw-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.3s;
}
.pw-toggle:hover { color: var(--accent-primary); }

/* Submit button */
.auth-submit {
    width: 100%;
    padding: 15px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.auth-submit::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
.auth-submit:hover::before { transform: translateX(100%); }
.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,194,255,0.35);
}
.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-glass);
}

/* Google button */
.auth-google {
    width: 100%;
    padding: 13px;
    background: var(--bg-surface);
    border: 1px solid var(--border-surface);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.auth-google:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.auth-google img {
    width: 20px; height: 20px;
}

/* Alert */
.auth-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
    animation: authAlertIn 0.3s ease;
}
.auth-alert.show { display: flex; align-items: center; gap: 10px; }
.auth-alert.error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: #ef4444;
}
.auth-alert.success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.2);
    color: #10b981;
}
.auth-alert.info {
    background: rgba(0,194,255,0.1);
    border: 1px solid rgba(0,194,255,0.2);
    color: var(--accent-primary);
}

@keyframes authAlertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer links */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.auth-footer a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* Password strength bar */
.pw-strength {
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    margin-top: 8px;
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: all 0.4s ease;
    width: 0;
}
.pw-strength-fill.weak { width: 33%; background: #ef4444; }
.pw-strength-fill.medium { width: 66%; background: #f59e0b; }
.pw-strength-fill.strong { width: 100%; background: #10b981; }

.pw-strength-text {
    font-size: 0.72rem;
    margin-top: 4px;
    font-weight: 600;
    transition: color 0.3s;
}

/* Nav avatar */
.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-avatar:hover {
    box-shadow: 0 0 12px rgba(0,194,255,0.4);
    transform: scale(1.05);
}
.nav-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.nav-avatar-initial {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Back to site link */
.auth-back {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 20;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: color 0.3s;
}
.auth-back:hover { color: var(--accent-primary); }

/* Shake animation */
@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}
.shake { animation: authShake 0.4s ease; }

/* Display contents utility — makes the span invisible in flexbox */
.d-contents { display: contents; }

/* Auth nav dropdown */
.auth-nav-dropdown {
    position: relative;
}
.auth-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 1050;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.auth-nav-dropdown.open .auth-nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.auth-nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.auth-nav-dropdown-menu a:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}
.auth-nav-dropdown-menu a i {
    width: 18px;
    text-align: center;
    color: var(--accent-primary);
    font-size: 0.85rem;
}
.auth-nav-dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 6px 0;
}
.auth-nav-dropdown-menu a.text-danger {
    color: #ef4444 !important;
}
.auth-nav-dropdown-menu a.text-danger i {
    color: #ef4444;
}

/* Mobile auth nav */
@media (max-width: 991px) {
    .auth-nav-container .nav-item {
        padding: 4px 0;
    }
    .auth-nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 1px solid var(--border-glass);
        margin-top: 8px;
    }
}
