/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  /* backgrounds */
  --bg:        #07080F;
  --surface:   #0D0F1A;
  --card:      #13151F;
  --card2:     #191C28;

  /* borders */
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.13);

  /* brand */
  --green:     #00D47A;
  --green-lo:  #003D22;
  --green-glow:rgba(0,212,122,0.15);
  --gold:      #FFB800;
  --gold-lo:   rgba(255,184,0,0.12);
  --red:       #FF4A6E;
  --blue:      #3B82F6;

  /* text */
  --text:      #E8EAF6;
  --text2:     #8A8FAA;
  --text3:     #4A5070;

  /* shape */
  --radius:    12px;
  --radius-sm: 8px;

  /* layout */
  --sidebar-w: 220px;
  --topbar-h:  56px;

  /* motion */
  --t:         0.2s ease;
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ─── UTILITIES ──────────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.w-full   { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex-center { display:flex; align-items:center; gap:8px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* tabular numbers everywhere they help */
.tabnum { font-variant-numeric: tabular-nums; }

/* semantic colors */
.c-green { color: var(--green); }
.c-gold  { color: var(--gold);  }
.c-red   { color: var(--red);   }
.c-muted { color: var(--text2); }

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes blink    { 0%,100%{opacity:1} 50%{opacity:.4} }
@keyframes fadeIn   { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
@keyframes spin     { to{transform:rotate(360deg)} }
@keyframes skeleton { 0%,100%{opacity:.4} 50%{opacity:.8} }

.fade-in { animation: fadeIn .25s ease both; }

/* ─── SKELETON LOADER ────────────────────────────────── */
.skeleton {
  background: var(--card2);
  border-radius: var(--radius-sm);
  animation: skeleton 1.4s ease-in-out infinite;
}

/* ─── TOAST ──────────────────────────────────────────── */
#toast-root {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 10px; padding: 12px 18px;
  font-size: .82rem; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: fadeIn .2s ease both;
  display: flex; align-items: center; gap: 10px;
  pointer-events: all;
}
.toast-success { border-color: rgba(0,212,122,.3); }
.toast-error   { border-color: rgba(255,74,110,.3); }
.toast-info    { border-color: rgba(59,130,246,.3); }

/* ─── MODAL BASE ─────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease both;
}
.modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 18px; padding: 28px;
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 20px; }
