*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #141D2B;
  --surface: #1a2332;
  --surface-2: #1f2a3a;
  --border: #2a3a4e;
  --text: #e0e6ed;
  --text-muted: #8b9bb4;
  --text-faint: #5a6b82;
  --accent: #4a90e2;
  --accent-hover: #5ba0f2;
  --green: #9fef00;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SF Mono', 'Fira Code', ui-monospace, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(74,144,226,0.10), transparent 60%),
    radial-gradient(700px 400px at 0% 0%, rgba(159,239,0,0.05), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Navbar ── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  background: rgba(20, 29, 43, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-logo { height: 30px; width: auto; }
.brand-text { font-weight: 700; font-size: 16px; letter-spacing: 0.3px; }
.brand-sub { color: var(--text-faint); font-weight: 500; font-size: 12px; }

.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.nav-btn-primary { background: var(--accent); color: #fff; }
.nav-btn-primary:hover { background: var(--accent-hover); }
.nav-btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.nav-btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.nav-btn.lg { padding: 11px 22px; font-size: 14px; }

.nav-user {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 7px;
}
.nav-user strong { color: var(--text); }

/* ── Main ── */
main { max-width: 1180px; margin: 0 auto; padding: 0 24px 60px; }

/* ── Hero ── */
.hero { text-align: center; padding: 64px 0 40px; }
.hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, #fff 20%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--text-muted); max-width: 620px; margin: 16px auto 0; font-size: 15.5px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

/* ── Stat cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
}
.stat-num { font-size: 30px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-muted); font-size: 12.5px; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.6px; }

/* ── Charts ── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}
.chart-card.span-2 { grid-column: span 2; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chart-head h3 { font-size: 14.5px; font-weight: 700; }
.chart-tag {
  font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.8px;
  border: 1px solid var(--border); padding: 2px 8px; border-radius: 20px;
}
.chart-body { position: relative; height: 280px; }

/* ── Footer ── */
#footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-dim { color: var(--text-faint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.5px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card.span-2 { grid-column: span 1; }
  .hero h1 { font-size: 30px; }
  .brand-sub { display: none; }
}
