/* ============================================
   AUTH MODAL — Buyer Login / Register
   ============================================ */

/* Profile button in header */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.12);
    border: 1.5px solid rgba(99, 102, 241, 0.3);
    color: #6366f1;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.profile-btn:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-1px);
}

.profile-btn.logged-in {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #059669;
}

.profile-btn.logged-in:hover {
    background: rgba(16, 185, 129, 0.22);
}

/* Auth Modal */
.auth-modal-content {
    max-width: 380px;
    width: 92%;
    border-radius: 16px;
    overflow: hidden;
}

/* Tab switcher */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.auth-tab-btn.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

/* Auth forms */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 12px;
}

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

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: #fafafa;
}

.auth-form input:focus {
    border-color: #6366f1;
    background: white;
}

.auth-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    margin-top: 4px;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

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

.auth-error {
    font-size: 13px;
    color: #ef4444;
    text-align: center;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 8px;
    display: none;
}

.auth-error.show {
    display: block;
}

/* User dropdown menu (shown when logged in) */
.auth-user-info {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.auth-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 10px;
}

.auth-user-email {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    word-break: break-all;
}

.auth-user-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.auth-logout-btn {
    width: 100%;
    padding: 11px;
    background: #fef2f2;
    color: #ef4444;
    border: 1.5px solid #fecaca;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.auth-logout-btn:hover {
    background: #fee2e2;
}

.auth-report-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.auth-report-link:hover {
    background: rgba(99, 102, 241, 0.15);
}

/* Dark mode */
body.dark-mode .auth-form input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode .auth-form input:focus {
    border-color: #6366f1;
    background: #1f2937;
}

body.dark-mode .auth-tab-btn {
    color: #6b7280;
}

body.dark-mode .auth-tabs {
    border-color: #374151;
}

body.dark-mode .auth-user-info {
    border-color: #374151;
}

body.dark-mode .auth-user-email {
    color: #f9fafb;
}