/* ═══════════════════════════════════════════════════════════════════════
   AUTH STYLE – Synced with bacay.css / shared.css design system
   Uses same CSS variables (--bg, --surface, --border, --text, --muted, etc.)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Verified Badge ─────────────────────────────────────────────────── */
.verified-badge::after {
    content: ' \2713';
    color: #10b981;
    font-weight: bold;
    display: inline-block;
    margin-left: 3px;
    filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.4));
}

/* ── Auth Modal Overlay (reuses modal-overlay pattern from bacay.css) ─ */
#auth-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(4px);
    z-index: 9999;
}

/* ── Auth Modal Card ────────────────────────────────────────────────── */
.auth-modal {
    width: min(100%, 480px);
    border-radius: 24px;
    border: 1px solid var(--border, rgba(99,102,241,0.14));
    background:
        linear-gradient(180deg, rgba(91, 141, 238, 0.1), transparent 44%),
        var(--surface, #ffffff);
    box-shadow: var(--shadow, 0 18px 40px rgba(15,23,42,0.12));
    padding: 20px;
    color: var(--text, #172033);
    font-family: var(--font-body, "Be Vietnam Pro", sans-serif);
}

/* ── Tabs ────────────────────────────────────────────────────────────── */
.auth-modal-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, rgba(99,102,241,0.14));
    flex-wrap: wrap;
}

.auth-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted, #64748b);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.auth-tab-btn:hover {
    background: var(--surface-soft, rgba(245,247,251,0.98));
    color: var(--text, #172033);
    transform: translateY(-1px);
}

.auth-tab-btn.active {
    background: linear-gradient(135deg, var(--blue, #4f68e8) 0%, var(--cyan, #0891b2) 100%);
    color: #ffffff;
    border-color: transparent;
    font-weight: 700;
}

.auth-tab-close {
    background: none;
    border: none;
    color: var(--muted, #64748b);
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    margin-left: auto;
    border-radius: 10px;
    transition: background 0.2s;
}

.auth-tab-close:hover {
    background: var(--surface-soft, rgba(245,247,251,0.98));
    color: var(--text, #172033);
}

/* ── Form Groups ─────────────────────────────────────────────────────── */
.auth-form-group {
    margin-bottom: 14px;
}

.auth-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #64748b);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.auth-input {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border, rgba(99,102,241,0.14));
    background: var(--bg, #f4f5f7);
    color: var(--text, #172033);
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    border-color: var(--blue, #4f68e8);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 104, 232, 0.15);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.auth-submit-btn {
    width: 100%;
    min-height: 42px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--blue, #4f68e8) 0%, var(--cyan, #0891b2) 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
    padding: 10px 14px;
    transition: transform 0.16s ease, opacity 0.2s;
    font-family: inherit;
    box-shadow: var(--shadow, 0 18px 40px rgba(15,23,42,0.12));
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

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

.auth-submit-btn.secondary {
    background: var(--surface-soft, rgba(245,247,251,0.98));
    color: var(--muted, #64748b);
    border: 1px solid var(--border, rgba(99,102,241,0.14));
    box-shadow: none;
}

.auth-submit-btn.secondary:hover {
    color: var(--text, #172033);
}

/* ── Error Message ───────────────────────────────────────────────────── */
.auth-error-msg {
    color: var(--red, #e11d48);
    font-size: 12px;
    margin-top: 10px;
    text-align: center;
    min-height: 18px;
}

/* ── Info text ───────────────────────────────────────────────────────── */
.auth-info {
    font-size: 12px;
    color: var(--muted, #64748b);
    text-align: center;
    margin-top: 6px;
    line-height: 1.4;
}

.auth-info .tick-green {
    color: #10b981;
    font-weight: bold;
}

/* ── Profile section (for logged-in users) ───────────────────────────── */
.auth-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface-soft, rgba(245,247,251,0.98));
    border: 1px solid var(--border, rgba(99,102,241,0.14));
}

.auth-profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue, #4f68e8), var(--cyan, #0891b2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.auth-profile-info {
    min-width: 0;
}

.auth-profile-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text, #172033);
}

.auth-profile-username {
    font-size: 12px;
    color: var(--muted, #64748b);
    font-family: var(--font-mono, "IBM Plex Mono", monospace);
}

/* ── Utility ─────────────────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ── Dark mode support ───────────────────────────────────────────────── */
body.dark-mode .auth-modal {
    background:
        linear-gradient(180deg, rgba(91, 141, 238, 0.08), transparent 44%),
        var(--bg-card, #0e0e24);
    border-color: var(--border);
}

body.dark-mode .auth-input {
    background: var(--bg-deep, #060614);
}

body.dark-mode .auth-profile-header {
    background: var(--bg-deep, #060614);
}
