/*
 * User Authentication Stylesheet (Login, Signup, Google Auth & Profile Dashboard)
 * Theme: Premium Modern Glassmorphic with Warm Orange & Glow Accents
 */

.auth-page-wrapper {
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 95px;
    position: relative;
    overflow-x: hidden;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Background Glow Effects */
.auth-glow-1 {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 85, 0, 0.15) 0%, rgba(255, 122, 0, 0) 70%);
    top: 10%;
    left: 15%;
    filter: blur(40px);
    pointer-events: none;
    z-index: 1;
}

.auth-glow-2 {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, rgba(255, 85, 0, 0) 70%);
    bottom: 10%;
    right: 15%;
    filter: blur(50px);
    pointer-events: none;
    z-index: 1;
}

/* Auth Card */
.auth-card {
    background: #ffffff;
    border: 1px solid rgba(255, 85, 0, 0.14);
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(255, 85, 0, 0.08), 0 4px 12px rgba(15, 23, 42, 0.03);
    padding: 36px 32px;
    position: relative;
    backdrop-filter: blur(16px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 26px 20px;
        border-radius: 20px;
    }
}

/* Header & Brand */
.auth-header {
    text-align: center;
    margin-bottom: 26px;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 85, 0, 0.08);
    border: 1px solid rgba(255, 85, 0, 0.2);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    color: #ff5500;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-header h1 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* Switcher Tabs */
.auth-tabs {
    display: flex;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.auth-tab-btn {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.auth-tab-btn.active {
    background: #ffffff;
    color: #ff5500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(255, 85, 0, 0.1);
    font-weight: 700;
}

.auth-tab-btn:hover:not(.active) {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}

/* Google Sign-in Section */
.google-auth-section {
    margin-bottom: 22px;
}

.btn-google-custom {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 18px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-google-custom:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}

.btn-google-custom:active {
    transform: translateY(0);
}

.btn-google-custom svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-google-custom.loading {
    opacity: 0.82;
    cursor: wait !important;
    pointer-events: none;
    background: #f8fafc;
}

.btn-google-custom.loading svg {
    animation: spinGoogle 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spinGoogle {
    0% { transform: rotate(0deg) scale(0.95); }
    50% { transform: rotate(180deg) scale(1.08); }
    100% { transform: rotate(360deg) scale(0.95); }
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 12px;
    background: #ffffff;
}

/* Form Styles */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 16px;
    animation: fadeInAuth 0.3s ease forwards;
}

.auth-form.active {
    display: flex;
}

@keyframes fadeInAuth {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group-custom {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-label-custom {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-prefix {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.2s;
}

.form-input-custom {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.form-input-custom:focus {
    background: #ffffff;
    border-color: #ff5500;
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.12);
}

.form-input-custom:focus + .input-icon-prefix,
.form-input-wrapper:focus-within .input-icon-prefix {
    color: #ff5500;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-toggle-password:hover {
    color: #334155;
}

/* Password Strength Indicator */
.password-strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
    display: flex;
}

.strength-segment {
    height: 100%;
    flex: 1;
    transition: background-color 0.3s ease;
    border-right: 2px solid #ffffff;
}

.strength-text {
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    color: #64748b;
}

/* Options Bar (Remember Me / Forgot Pass) */
.auth-options-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-top: -4px;
}

.remember-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.remember-checkbox-wrap input[type="checkbox"] {
    accent-color: #ff5500;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.link-forgot-pass {
    color: #ff5500;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    padding: 0;
}

.link-forgot-pass:hover {
    color: #e04b00;
    text-decoration: underline;
}

/* Submit Button */
.btn-auth-submit {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #ff5500 0%, #ff7a00 100%);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 85, 0, 0.28);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.btn-auth-submit:hover {
    background: linear-gradient(135deg, #e04b00 0%, #ff6b00 100%);
    box-shadow: 0 12px 26px rgba(255, 85, 0, 0.38);
    transform: translateY(-1.5px);
}

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

.btn-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner-auth {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spinAuth 0.8s linear infinite;
    display: inline-block;
}

@keyframes spinAuth {
    to { transform: rotate(360deg); }
}

/* Alert Notification Boxes */
.auth-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    margin-bottom: 18px;
    display: none;
    align-items: flex-start;
    gap: 10px;
    animation: slideDownAlert 0.25s ease forwards;
}

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

.auth-alert.show {
    display: flex;
}

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

.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-alert-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Terms and Privacy Text */
.auth-terms-text {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
    margin-top: 14px;
}

.auth-terms-text a {
    color: #ff5500;
    text-decoration: none;
}

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

/* Dedicated Auth Page Footer */
.auth-page-footer {
    width: 100%;
    margin-top: 24px;
    padding-bottom: 20px;
    position: relative;
    z-index: 2;
}

.auth-footer-links a {
    color: #64748B;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer-links a:hover {
    color: #FF5500;
}

.auth-footer-copy {
    font-size: 11px;
    color: #94A3B8;
}

/* Top Nav User Avatar & Dropdown */
.user-nav-profile-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-user-avatar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 6px;
    background: #ffffff;
    border: 1.5px solid rgba(255, 85, 0, 0.25);
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-user-avatar:hover {
    border-color: #ff5500;
    box-shadow: 0 4px 14px rgba(255, 85, 0, 0.15);
    transform: translateY(-1px);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff5500, #ff8c00);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-nav-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-nav-chevron {
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.user-nav-profile-wrap.open .user-nav-chevron {
    transform: rotate(180deg);
    color: #ff5500;
}

.user-nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(255, 85, 0, 0.05);
    padding: 8px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: dropdownPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.user-nav-profile-wrap.open .user-nav-dropdown {
    display: flex;
}

@keyframes dropdownPop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-dropdown-header {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

.user-dropdown-header .user-full-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.user-dropdown-header .user-email-tag {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.user-dropdown-item:hover {
    background: #fff7ed;
    color: #ff5500;
}

.user-dropdown-item svg {
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.15s;
}

.user-dropdown-item:hover svg {
    color: #ff5500;
}

.user-dropdown-item.item-logout {
    color: #ef4444;
}

.user-dropdown-item.item-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.user-dropdown-item.item-logout svg {
    color: #f87171;
}

.user-dropdown-item.item-logout:hover svg {
    color: #dc2626;
}

.btn-header-login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #ff5500 0%, #ff7a00 100%);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255, 85, 0, 0.25);
    transition: all 0.2s ease;
}

.btn-header-login-link:hover {
    background: linear-gradient(135deg, #e04b00 0%, #ff6b00 100%);
    box-shadow: 0 6px 18px rgba(255, 85, 0, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

/* Referral Status Banner */
.ref-status-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 12.5px;
    color: #065f46;
    animation: fadeInAuth 0.3s ease;
}

.ref-status-banner .ref-badge-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.ref-status-banner .ref-code-highlight {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: #047857;
    background: #ffffff;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    letter-spacing: 0.5px;
}

/* OTP Code Input Styling */
.otp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-otp {
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 8px;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.form-input-otp:focus {
    background: #ffffff;
    border-color: #ff5500;
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.12);
}

.otp-timer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: #64748b;
    margin-top: 4px;
}

.btn-resend-otp {
    background: none;
    border: none;
    color: #ff5500;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}

.btn-resend-otp:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: none;
}

.btn-resend-otp:not(:disabled):hover {
    color: #e04b00;
    text-decoration: underline;
}

.auth-step-box {
    animation: fadeInAuth 0.3s ease forwards;
}

