/* ============================================================================
   VideoForge — Accounts UI (login, balance chip, funds modal, loading overlay)
   ============================================================================ */
:root {
    --vf-bg: #0a0b14;
    --vf-card: rgba(20, 22, 36, 0.92);
    --vf-border: rgba(129, 140, 248, 0.22);
    --vf-accent: #818cf8;
    --vf-accent-2: #38bdf8;
    --vf-good: #34d399;
    --vf-bad: #f87171;
    --vf-text: #e8eaf6;
    --vf-muted: #9aa0c0;
}

/* ── Full-screen loading overlay ─────────────────────────────────────────── */
#vf-loading-overlay {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px;
    background: radial-gradient(1200px 600px at 50% -10%, rgba(56,189,248,0.10), transparent),
                var(--vf-bg);
    color: var(--vf-text); font-family: "Outfit", system-ui, sans-serif;
    transition: opacity .35s ease;
}
#vf-loading-overlay.vf-hide { opacity: 0; pointer-events: none; }
.vf-spinner {
    width: 54px; height: 54px; border-radius: 50%;
    border: 3px solid rgba(129,140,248,0.18);
    border-top-color: var(--vf-accent);
    animation: vf-spin 0.9s linear infinite;
}
.vf-spinner.sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes vf-spin { to { transform: rotate(360deg); } }
.vf-loading-text { font-size: 0.95rem; color: var(--vf-muted); letter-spacing: .3px; }
.vf-loading-brand { font-weight: 800; font-size: 1.4rem; letter-spacing: .5px;
    background: linear-gradient(90deg, var(--vf-accent), var(--vf-accent-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ── Floating account chip (top-right of the app) ────────────────────────── */
#vf-account-chip {
    position: fixed; top: 14px; right: 16px; z-index: 9000;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 14px;
    background: var(--vf-card); border: 1px solid var(--vf-border);
    backdrop-filter: blur(12px);
    font-family: "Outfit", system-ui, sans-serif; color: var(--vf-text);
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
#vf-account-chip .vf-balance {
    font-weight: 800; font-size: 1.02rem; color: var(--vf-good);
    font-variant-numeric: tabular-nums;
}
#vf-account-chip .vf-balance.low { color: var(--vf-bad); }
#vf-account-chip .vf-email { font-size: 0.74rem; color: var(--vf-muted); max-width: 150px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* When injected into the app header row: sit in normal flow, pushed to the
   right next to the menu button — no overlap, no fixed positioning. */
#vf-account-chip.in-header {
    position: static; top: auto; right: auto;
    margin-left: auto; margin-right: 10px;
    box-shadow: none; background: rgba(129,140,248,0.08);
    padding: 6px 10px;
}
@media (max-width: 600px) {
    #vf-account-chip.in-header { flex-wrap: wrap; max-width: 220px; }
    #vf-account-chip.in-header .vf-email { max-width: 110px; }
}
.vf-chip-btn {
    border: 1px solid var(--vf-border); background: rgba(129,140,248,0.12);
    color: var(--vf-text); border-radius: 10px; padding: 6px 10px;
    font-size: 0.78rem; cursor: pointer; font-weight: 600; transition: .15s;
}
.vf-chip-btn:hover { background: rgba(129,140,248,0.25); }
.vf-chip-btn.admin { color: #fde68a; border-color: rgba(253,230,138,0.3); background: rgba(253,230,138,0.08); }

/* ── Modal (funds / generic) ─────────────────────────────────────────────── */
.vf-modal-backdrop {
    position: fixed; inset: 0; z-index: 99998;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(4,5,12,0.72); backdrop-filter: blur(6px);
    font-family: "Outfit", system-ui, sans-serif;
}
.vf-modal {
    width: min(440px, 94vw); background: var(--vf-card);
    border: 1px solid var(--vf-border); border-radius: 20px; padding: 28px;
    color: var(--vf-text); box-shadow: 0 24px 80px rgba(0,0,0,0.55);
    text-align: center; animation: vf-pop .22s ease;
}
@keyframes vf-pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.vf-modal h3 { margin: 0 0 8px; font-size: 1.35rem; font-weight: 800; }
.vf-modal p { margin: 6px 0; color: var(--vf-muted); font-size: 0.92rem; line-height: 1.5; }
.vf-modal-icon {
    width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
    background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3);
}
.vf-modal-figures {
    display: flex; gap: 12px; margin: 18px 0 6px;
}
.vf-modal-figures > div {
    flex: 1; background: rgba(255,255,255,0.04); border: 1px solid var(--vf-border);
    border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 3px;
}
.vf-fig-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .5px; color: var(--vf-muted); }
.vf-modal .vf-amount { color: var(--vf-bad); font-weight: 800; font-size: 1.15rem; }
.vf-fig-bal { color: var(--vf-text); font-weight: 800; font-size: 1.15rem; }
.vf-wa-btn {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
    background: #25D366; color: #053; font-weight: 800; text-decoration: none;
    padding: 12px 20px; border-radius: 12px; font-size: 0.98rem;
    box-shadow: 0 8px 24px rgba(37,211,102,0.3);
}
.vf-wa-btn:hover { filter: brightness(1.05); }
.vf-modal .vf-close { margin-top: 14px; display: block; width: 100%;
    background: none; border: none; color: var(--vf-muted); cursor: pointer; font-size: 0.85rem; }

/* ── Login / signup page ─────────────────────────────────────────────────── */
.vf-auth-body {
    margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; font-family: "Outfit", system-ui, sans-serif; color: var(--vf-text);
    background: radial-gradient(1000px 500px at 12% -8%, rgba(129,140,248,0.18), transparent),
                radial-gradient(900px 500px at 100% 110%, rgba(56,189,248,0.14), transparent),
                var(--vf-bg);
}
.vf-auth-card {
    width: min(900px, 100%); display: grid; grid-template-columns: 1.05fr 1fr;
    background: var(--vf-card); border: 1px solid var(--vf-border);
    border-radius: 24px; overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,0.55);
}
.vf-auth-hero {
    padding: 46px 40px; background:
        linear-gradient(160deg, rgba(129,140,248,0.16), rgba(56,189,248,0.06));
    border-right: 1px solid var(--vf-border); display: flex; flex-direction: column; justify-content: center;
}
.vf-auth-hero .brand { font-size: 1.9rem; font-weight: 800; letter-spacing: .5px;
    background: linear-gradient(90deg, var(--vf-accent), var(--vf-accent-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.vf-auth-hero .brand span { -webkit-text-fill-color: var(--vf-accent-2); }
.vf-auth-hero h1 { font-size: 1.55rem; line-height: 1.25; margin: 18px 0 10px; font-weight: 800; }
.vf-auth-hero p { color: var(--vf-muted); font-size: 0.95rem; line-height: 1.6; }
.vf-auth-hero ul { list-style: none; padding: 0; margin: 22px 0 0; }
.vf-auth-hero li { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0;
    font-size: 0.9rem; color: var(--vf-text); }
.vf-auth-hero li .dot { color: var(--vf-accent); font-weight: 900; }

/* Solo (single-column) login card — no marketing hero. */
.vf-auth-card--solo { grid-template-columns: 1fr; width: min(420px, 100%); }
.vf-auth-logo {
    font-size: 1.8rem; font-weight: 800; letter-spacing: .5px; text-align: center;
    margin-bottom: 26px;
    background: linear-gradient(90deg, var(--vf-accent), var(--vf-accent-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.vf-auth-logo span { -webkit-text-fill-color: var(--vf-accent-2); }

.vf-auth-form { padding: 44px 40px; display: flex; flex-direction: column; }
.vf-tabs { display: flex; gap: 6px; background: rgba(255,255,255,0.04);
    border-radius: 12px; padding: 5px; margin-bottom: 24px; }
.vf-tab { flex: 1; text-align: center; padding: 10px; border-radius: 9px;
    cursor: pointer; font-weight: 700; font-size: 0.9rem; color: var(--vf-muted); transition: .18s; }
.vf-tab.active { background: linear-gradient(90deg, var(--vf-accent), var(--vf-accent-2)); color: #07101f; }
.vf-field { margin-bottom: 16px; }
.vf-field label { display: block; font-size: 0.78rem; color: var(--vf-muted);
    margin-bottom: 6px; font-weight: 600; letter-spacing: .3px; }
.vf-field input {
    width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--vf-border);
    color: var(--vf-text); font-size: 0.98rem; font-family: inherit; transition: .15s;
}
.vf-field input:focus { outline: none; border-color: var(--vf-accent);
    box-shadow: 0 0 0 3px rgba(129,140,248,0.18); }
.vf-submit {
    margin-top: 6px; padding: 14px; border: none; border-radius: 12px; cursor: pointer;
    font-weight: 800; font-size: 1rem; color: #07101f;
    background: linear-gradient(90deg, var(--vf-accent), var(--vf-accent-2));
    display: flex; align-items: center; justify-content: center; gap: 10px; transition: .15s;
}
.vf-submit:hover { filter: brightness(1.06); }
.vf-submit:disabled { opacity: .6; cursor: not-allowed; }
.vf-auth-msg { margin-top: 16px; font-size: 0.88rem; min-height: 20px; text-align: center; }
.vf-auth-msg.error { color: var(--vf-bad); }
.vf-auth-msg.ok { color: var(--vf-good); }
.vf-auth-foot { margin-top: 22px; font-size: 0.8rem; color: var(--vf-muted); text-align: center; line-height: 1.6; }
.vf-auth-foot a { color: var(--vf-accent-2); text-decoration: none; }

@media (max-width: 760px) {
    .vf-auth-card { grid-template-columns: 1fr; }
    .vf-auth-hero { display: none; }
}
