/* ================================================================
   The Black Vault Funding — Arena Portal styles.css  v10
   Full 8-tab dashboard theme
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:         #0a0a0a;
  --bg2:        #111111;
  --bg3:        #181818;
  --border:     #222222;
  --border2:    #2a2a2a;
  --gold:       #d4af37;
  --gold-soft:  rgba(212,175,55,0.14);
  --gold-glow:  rgba(212,175,55,0.28);
  --text:       #e8e3d8;
  --text-sub:   #6b7280;
  --text-muted: #4b5563;
  --green:      #4ade80;
  --red:        #f87171;
  --blue:       #60a5fa;
  --sidebar-w:  220px;
  --topbar-h:   56px;
  --radius:     6px;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Mono', 'Cascadia Code', monospace;
}

/* ── Reset / Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select, input, textarea { font-family: inherit; font-size: inherit; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ── Login Gate ────────────────────────────────────────────────── */
.blur-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at 60% 30%, rgba(212,175,55,0.07) 0%, transparent 70%), #0a0a0a;
  display: flex; align-items: center; justify-content: center;
}
.blur-gate-modal {
  background: #111; border: 1px solid #2a2a2a;
  border-radius: 10px; padding: 36px 40px; width: min(420px, calc(100vw - 32px));
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.gate-brand-mark { color: var(--gold); font-size: 24px; }
.gate-brand-name { display: block; font-size: 15px; font-weight: 700; letter-spacing: 0.14em; color: var(--text); }
.gate-brand-tag { display: block; font-size: 10px; letter-spacing: 0.2em; color: var(--gold); }
.gate-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.gate-sub { color: var(--text-sub); margin-bottom: 24px; font-size: 13px; }
.gate-form { display: flex; flex-direction: column; gap: 14px; }
.gate-field { display: flex; flex-direction: column; gap: 4px; }
.gate-field label { font-size: 12px; color: var(--text-sub); letter-spacing: 0.04em; }
.gate-field input {
  background: #0d0d0d; border: 1px solid #2a2a2a; border-radius: var(--radius);
  color: var(--text); padding: 10px 12px; outline: none; transition: border-color 0.2s;
}
.gate-field input:focus { border-color: var(--gold); }
.gate-error { color: var(--red); font-size: 12px; min-height: 18px; }
.gate-submit {
  background: var(--gold); color: #0a0a0a; border: none; border-radius: var(--radius);
  padding: 12px; font-weight: 700; font-size: 13px; letter-spacing: 0.08em;
  cursor: pointer; transition: opacity 0.2s;
}
.gate-submit:hover { opacity: 0.88; }
.gate-legal { font-size: 12px; color: var(--text-sub); margin-top: 16px; text-align: center; }
.required { color: var(--red); }

/* ── App Shell ─────────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.hidden { display: none !important; }

/* ── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: #0d0d0d; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #222 transparent;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px; border-bottom: 1px solid var(--border);
}
.sidebar-logo-mark { color: var(--gold); font-size: 18px; flex-shrink: 0; }
.sidebar-logo-main { display: block; font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: 0.04em; }
.sidebar-logo-sub  { display: block; font-size: 10px; color: var(--text-sub); letter-spacing: 0.1em; }
.sidebar-nav { flex: 1; padding: 10px 8px; }
.sidebar-nav ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px; border: none; background: transparent;
  color: var(--text-sub); border-radius: var(--radius); cursor: pointer;
  font-size: 13px; font-weight: 500; letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}
.nav-item:hover { background: #181818; color: var(--text); }
.nav-item.active { background: var(--gold-soft); color: var(--gold); }
.nav-item--gold { color: var(--gold) !important; border: 1px solid rgba(212,175,55,0.2); }
.nav-item--gold:hover { background: var(--gold-soft); }
.nav-icon { width: 14px; height: 14px; flex-shrink: 0; }
.sidebar-account {
  padding: 12px 14px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar-account-row { display: flex; justify-content: space-between; align-items: center; }
.sidebar-account-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.sidebar-account-number { font-size: 11px; color: var(--text-sub); font-family: var(--font-mono); }
.sidebar-logout { margin-top: 4px; width: 100%; }

/* ── Main Area ─────────────────────────────────────────────────── */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── Topbar ────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); min-height: var(--topbar-h);
  background: #0d0d0d; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 12px;
}
.topbar-title { display: flex; flex-direction: column; }
.topbar-heading { font-size: 16px; font-weight: 700; color: var(--text); }
.topbar-sub { font-size: 11px; color: var(--text-muted); }
.topbar-controls { display: flex; align-items: center; gap: 10px; }
.last-updated { font-size: 11px; color: var(--text-muted); }
.status-pill--live {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; letter-spacing: 0.1em; color: var(--gold);
  padding: 3px 8px; border: 1px solid rgba(212,175,55,0.3); border-radius: 20px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── Content Area ──────────────────────────────────────────────── */
.content-area { flex: 1; overflow-y: auto; padding: 16px 20px; scrollbar-width: thin; scrollbar-color: #222 transparent; }

/* ── Tab Panels ────────────────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius); border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; letter-spacing: 0.02em;
  transition: opacity 0.15s, background 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn--gold { background: var(--gold); color: #0a0a0a; }
.btn--ghost { background: transparent; color: var(--text-sub); border: 1px solid var(--border2); }
.btn--ghost:hover { color: var(--text); border-color: #444; background: #181818; }
.btn--danger { background: rgba(248,113,113,0.15); color: var(--red); border: 1px solid rgba(248,113,113,0.3); }
.btn--sm { padding: 5px 10px; font-size: 12px; }

/* ── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 7px; border-radius: 3px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
}
.badge--active { background: rgba(74,222,128,0.12); color: var(--green); }
.badge--gold   { background: rgba(212,175,55,0.15);  color: var(--gold); }
.badge--info   { background: rgba(96,165,250,0.12);  color: var(--blue); }
.badge--danger { background: rgba(248,113,113,0.12); color: var(--red); }
.badge--inactive { background: rgba(107,114,128,0.15); color: var(--text-sub); }

.badge-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
}
.badge-pill--live { background: rgba(74,222,128,0.1); color: var(--green); border: 1px solid rgba(74,222,128,0.2); }
.badge-pill--info { background: rgba(96,165,250,0.1); color: var(--blue); border: 1px solid rgba(96,165,250,0.2); }

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: 0.04em; }

/* ── Stat cards ─────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-sub   { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.stat-label-sm { font-size: 10px; color: var(--text-muted); display: block; }
.stat-val   { font-size: 14px; font-weight: 600; }
.stat-val-gold { font-size: 14px; font-weight: 700; color: var(--gold); }

/* ── P&L colors ─────────────────────────────────────────────────── */
.pnl-pos { color: var(--green); }
.pnl-neg { color: var(--red);   }

/* ── Equity chart ───────────────────────────────────────────────── */
.chart-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); }
.chart-card-inner { padding: 14px 16px; }
.chart-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.chart-card-title { font-size: 13px; font-weight: 700; }
.chart-card-sub { font-size: 11px; color: var(--text-muted); }
.equity-chart-area { width: 100%; height: 150px; position: relative; }
.equity-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 12px; }

/* ── Progress cards ─────────────────────────────────────────────── */
.progress-section { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.progress-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.prog-label { font-size: 12px; color: var(--text-sub); margin-bottom: 8px; }
.prog-bar-track { height: 5px; background: #1e1e1e; border-radius: 3px; overflow: hidden; }
.prog-bar-fill { height: 100%; border-radius: 3px; background: var(--gold); transition: width 0.5s ease; }
.prog-green { background: var(--green) !important; }
.prog-red   { background: var(--red)   !important; }
.prog-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 11px; }
.prog-current { color: var(--text); font-weight: 600; }
.prog-target  { color: var(--text-muted); }
.prog-pct     { color: var(--gold); font-weight: 700; }

/* ── Tables ─────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  padding: 9px 12px; text-align: left; font-size: 11px;
  font-weight: 600; color: var(--text-muted); letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg2);
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid #161616; color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.no-data { text-align: center; color: var(--text-muted); padding: 24px !important; font-size: 13px; }
.table-footer { padding: 8px 12px; border-top: 1px solid var(--border); background: var(--bg2); }
.table-count  { font-size: 11px; color: var(--text-muted); }

/* ── Side badges ────────────────────────────────────────────────── */
.side-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.side-long  { background: rgba(74,222,128,0.12); color: var(--green); }
.side-short { background: rgba(248,113,113,0.12); color: var(--red);   }
.copy-badge { background: rgba(96,165,250,0.12); color: var(--blue); padding: 1px 5px; border-radius: 3px; font-size: 10px; font-weight: 700; }
.row-copy td { opacity: 0.8; }
.text-mono { font-family: var(--font-mono); }
.text-sm   { font-size: 12px; }

/* ── Section header ─────────────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.section-title  { font-size: 17px; font-weight: 700; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-select {
  background: var(--bg3); border: 1px solid var(--border2); color: var(--text);
  border-radius: var(--radius); padding: 6px 10px; font-size: 12px; outline: none; cursor: pointer;
}
.filter-select:hover, .filter-select:focus { border-color: #444; }

/* ── Account cards ───────────────────────────────────────────────── */
.accounts-grid { display: flex; flex-direction: column; gap: 12px; }
.account-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.account-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.account-id { font-size: 14px; font-weight: 700; font-family: var(--font-mono); color: var(--gold); margin-bottom: 5px; }
.account-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.account-size { font-size: 20px; font-weight: 700; color: var(--text); }
.account-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.account-stat { display: flex; flex-direction: column; gap: 2px; }
.account-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.account-stat-val { font-size: 13px; font-weight: 600; color: var(--text); }
.account-breach { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2); color: var(--red); border-radius: var(--radius); padding: 8px 12px; font-size: 12px; margin-bottom: 12px; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.loading-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; color: var(--text-muted); text-align: center; }

/* ── Form cards ──────────────────────────────────────────────────── */
.vault-form-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.form-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.form-title { font-size: 15px; font-weight: 700; margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 12px; color: var(--text-sub); }
.form-field input, .form-field select, .form-field textarea {
  background: #0d0d0d; border: 1px solid var(--border2); color: var(--text);
  border-radius: var(--radius); padding: 9px 11px; outline: none; transition: border-color 0.2s;
  width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--gold); }
.form-field textarea { resize: vertical; min-height: 80px; }
.label-sub { font-size: 11px; color: var(--text-muted); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Sync / follower checklist ───────────────────────────────────── */
.follower-checklist {
  display: flex; flex-direction: column; gap: 8px;
  background: #0d0d0d; border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 12px; min-height: 60px;
}
.follower-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.follower-check input { accent-color: var(--gold); width: 14px; height: 14px; }

/* ── Info banners ────────────────────────────────────────────────── */
.info-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(96,165,250,0.06); border: 1px solid rgba(96,165,250,0.15);
  border-radius: var(--radius); padding: 12px 14px; color: var(--text-sub); font-size: 13px; line-height: 1.5;
  color: var(--blue);
}
.info-banner--warn {
  background: rgba(251,191,36,0.06); border-color: rgba(251,191,36,0.2); color: #fbbf24;
}

/* ── Leaderboard ─────────────────────────────────────────────────── */
.my-rank-card {
  background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, rgba(212,175,55,0.03) 100%);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: var(--radius); padding: 16px 20px;
}
.my-rank-label { font-size: 10px; color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.my-rank-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.my-rank-position { font-size: 36px; font-weight: 900; color: var(--gold); line-height: 1; font-family: var(--font-mono); }
.my-rank-details { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.my-rank-alias { font-size: 16px; font-weight: 700; color: var(--text); }
.my-rank-tier  { font-size: 12px; color: var(--text-sub); }
.my-rank-stats { display: flex; gap: 20px; }
.lb-rank { font-size: 15px; text-align: center; }
.lb-self-row td { background: rgba(212,175,55,0.05) !important; }
.lb-self-row td:first-child { border-left: 3px solid var(--gold); }
.leaderboard-table { table-layout: auto; }

/* ── Rules / payout check lists ──────────────────────────────────── */
.rules-check-list { display: flex; flex-direction: column; gap: 6px; }
.rule-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius); font-size: 13px; }
.rule-pass { background: rgba(74,222,128,0.07); color: var(--green); }
.rule-fail { background: rgba(248,113,113,0.07); color: var(--red); }
.rule-icon { font-weight: 900; font-size: 14px; flex-shrink: 0; }

.rules-splash { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.rules-splash-icon { font-size: 32px; color: var(--gold); margin-bottom: 12px; opacity: 0.5; }
.rules-account-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-size: 14px; }
.rules-list { display: flex; flex-direction: column; gap: 10px; }
.rule-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.rule-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.rule-card-label { font-size: 13px; font-weight: 600; }
.rule-card-status { font-size: 12px; font-weight: 700; }
.rule-card-detail { font-size: 12px; color: var(--text-sub); }

/* ── Support ─────────────────────────────────────────────────────── */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.faq-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.faq-list { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item > summary {
  padding: 10px 4px; font-size: 13px; font-weight: 600;
  color: var(--text); display: flex; align-items: center; justify-content: space-between;
}
.faq-item > summary:hover { color: var(--gold); }
.faq-item > summary::after { content: '+'; color: var(--text-muted); font-size: 16px; }
.faq-item[open] > summary::after { content: '-'; }
.faq-item > p { padding: 0 4px 12px; font-size: 13px; color: var(--text-sub); line-height: 1.6; }

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 99999;
  background: #1a1a1a; border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 10px 16px;
  font-size: 13px; color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s;
  pointer-events: none; max-width: 360px;
}
.toast--show { opacity: 1; transform: translateY(0); }
.toast--success { border-left: 3px solid var(--green); }
.toast--warn    { border-left: 3px solid #fbbf24; }
.toast--info    { border-left: 3px solid var(--blue); }

/* ── Text utilities ──────────────────────────────────────────────── */
.text-sub   { color: var(--text-sub); }
.text-muted { color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 48px; }
  .nav-item { padding: 10px; justify-content: center; }
  .nav-item span:not(.nav-icon) { display: none; }
  .sidebar-logo-main, .sidebar-logo-sub { display: none; }
  .sidebar-account-row, .sidebar-account-label { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-section { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .my-rank-stats { gap: 12px; }
  .content-area { padding: 10px 12px; }
}
