/* QuantBot Platform — Linear-inspired dark design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-base: #08090a;
  --bg-panel: #0f1011;
  --bg-elevated: #191a1b;
  --bg-hover: #28282c;
  --bg-input: #141516;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --border-solid: #23252a;
  --text-primary: #f7f8f8;
  --text-secondary: #d0d6e0;
  --text-muted: #8a8f98;
  --text-faint: #62666d;
  --accent: #5e6ad2;
  --accent-bright: #7170ff;
  --accent-hover: #828fff;
  --accent-bg: rgba(94,106,210,0.12);
  --green: #27a644;
  --green-bright: #10b981;
  --green-bg: rgba(39,166,68,0.12);
  --red: #e5534b;
  --red-bg: rgba(229,83,75,0.12);
  --yellow: #d4a72c;
  --yellow-bg: rgba(212,167,44,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'SF Mono', 'Fira Code', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  background: var(--bg-base); color: var(--text-primary);
  font-family: var(--font); -webkit-font-smoothing: antialiased;
  line-height: 1.5; min-height: 100vh;
}
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Layout ───────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.w-full { width: 100%; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; }

/* ── Navbar ───────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,9,10,0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 0 24px; height: 56px;
}
.navbar-inner { max-width: 1280px; margin: 0 auto; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 700; font-size: 17px; letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px; }
.logo-mark { color: var(--accent-bright); font-family: var(--mono); font-size: 14px; background: var(--accent-bg); padding: 4px 8px; border-radius: var(--radius-sm); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-link { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color 0.15s; }
.nav-link:hover { color: var(--text-primary); }
.nav-user { display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-bg); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--accent-bright); }

/* ── Cards ────────────────────────────────────────── */
.card {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: border-color 0.2s ease;
}
.card:hover { border-color: var(--border-hover); }
.card-title {
  font-size: 11px; font-weight: 600; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px;
}
.card-glow {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 0 0 1px rgba(94,106,210,0.06), 0 8px 40px rgba(0,0,0,0.3);
}

/* ── Metrics ──────────────────────────────────────── */
.metric { display: flex; flex-direction: column; gap: 2px; }
.metric-value { font-size: 28px; font-weight: 600; letter-spacing: -0.8px; font-family: var(--mono); line-height: 1.1; }
.metric-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; }
.metric-change { font-size: 13px; font-weight: 500; font-family: var(--mono); }
.green { color: var(--green-bright); }
.red { color: var(--red); }
.yellow { color: var(--yellow); }
.muted { color: var(--text-muted); }

/* ── Badges ───────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; font-family: var(--mono); letter-spacing: 0.3px; }
.badge-green { background: var(--green-bg); color: var(--green-bright); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-accent { background: var(--accent-bg); color: var(--accent-bright); }
.badge-live { background: var(--green-bg); color: var(--green-bright); }
.badge-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green-bright); margin-right: 6px; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-md); font-size: 14px;
  font-weight: 500; border: none; cursor: pointer; transition: all 0.15s;
  font-family: var(--font); letter-spacing: -0.1px;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: var(--border-hover); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: var(--green-bright); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-md); }

/* ── Forms / Inputs ───────────────────────────────── */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.input {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 14px; font-size: 14px;
  color: var(--text-primary); font-family: var(--font); outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.input::placeholder { color: var(--text-faint); }
.input-mono { font-family: var(--mono); font-size: 20px; font-weight: 600; letter-spacing: -0.5px; }

/* ── Tables ───────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 10px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.8px; padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border); font-family: var(--mono); color: var(--text-secondary); }
.table tr:hover td { background: var(--bg-elevated); }

/* ── Ticker row ───────────────────────────────────── */
.ticker-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ticker-row:last-child { border-bottom: none; }
.ticker-sym { font-weight: 600; font-size: 14px; }
.ticker-price { font-family: var(--mono); font-size: 13px; color: var(--text-secondary); }
.ticker-change { font-family: var(--mono); font-size: 12px; font-weight: 500; }

/* ── Strategy dot ─────────────────────────────────── */
.strat-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.strat-item { display: flex; align-items: center; padding: 5px 0; font-size: 13px; font-weight: 500; }

/* ── Auth pages ───────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-box { width: 100%; max-width: 400px; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -1px; }
.auth-header p { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-muted); }
.auth-error { background: var(--red-bg); color: var(--red); padding: 10px 14px; border-radius: var(--radius-md); font-size: 13px; display: none; }

/* ── Landing page ─────────────────────────────────── */
.hero { min-height: 90vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 800px; height: 800px; background: radial-gradient(ellipse, rgba(94,106,210,0.08) 0%, transparent 70%); pointer-events: none; }
.hero h1 { font-size: 64px; font-weight: 700; letter-spacing: -2.5px; line-height: 1.05; max-width: 700px; position: relative; }
.hero h1 span { background: linear-gradient(135deg, var(--accent-bright), var(--accent-hover)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 500px; margin-top: 20px; line-height: 1.6; position: relative; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; position: relative; }
.hero-stats { display: flex; gap: 48px; margin-top: 64px; position: relative; }
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 32px; font-weight: 700; font-family: var(--mono); letter-spacing: -1px; }
.hero-stat-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ── Dashboard layout ─────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
.dash-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dash-sidebar { display: flex; flex-direction: column; gap: 12px; }
.deposit-modal {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
}
.deposit-modal.active { display: flex; }
.deposit-box { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; width: 420px; max-width: 90vw; }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-solid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .hero h1 { font-size: 40px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 24px; }
}
