/* ═══════════════════════════════════════════════════════
   fxFundedSim — Brand Palette
   Backgrounds: black / grey / white (simple, clean)
   Accents: dy1an.fx warm tan (#c4a87a) + charcoal (#3d3428)
   Typography: Space Grotesk + JetBrains Mono + Inter
   ═══════════════════════════════════════════════════════ */

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

:root {
  /* Backgrounds — simple black/grey/white */
  --bg: #0a0a0a;
  --bg-raised: #111111;
  --bg-card: rgba(18, 18, 18, 0.7);
  --bg-card-hover: rgba(24, 24, 24, 0.85);
  --bg-input: rgba(20, 20, 20, 0.9);
  --bg-white: #f5f0e8;

  /* Borders */
  --border: rgba(196, 168, 122, 0.1);
  --border-hover: rgba(196, 168, 122, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.05);

  /* Text */
  --text: #f0ebe3;
  --text-dim: rgba(240, 235, 227, 0.5);
  --text-muted: rgba(240, 235, 227, 0.25);
  --text-dark: #3d3428;

  /* dy1an.fx brand accents */
  --tan: #c4a87a;
  --tan-soft: rgba(196, 168, 122, 0.1);
  --tan-glow: rgba(196, 168, 122, 0.2);
  --cream: #e8dcc8;
  --charcoal: #3d3428;
  --warm-grey: #8a7e6e;

  /* Semantic */
  --green: #5cb85c;
  --green-soft: rgba(92, 184, 92, 0.1);
  --red: #d9534f;
  --red-soft: rgba(217, 83, 79, 0.1);
  --blue: #7a9bb5;
  --blue-soft: rgba(122, 155, 181, 0.1);
  --yellow: #d4a94c;
  --purple: #a38bb5;

  /* Shape */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --blur: 20px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --speed: 0.25s;
}

html { font-size: 14.5px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── CANVAS BACKGROUND ───────────────────────────── */
#mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

#app { position: relative; z-index: 1; }

/* ── UTILITY ─────────────────────────────────────── */
.green { color: var(--green) !important; }
.red { color: var(--red) !important; }

/* ── TOP BAR ─────────────────────────────────────── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 24px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  border-bottom: 1px solid var(--border-subtle);
}

/* Logo — animated orb + futuristic type */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-orb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(232,220,200,0.5), rgba(196,168,122,0.15) 50%, transparent 70%);
  box-shadow: 0 0 15px rgba(196,168,122,0.2), inset 0 0 10px rgba(232,220,200,0.1);
  position: relative;
  animation: orbFloat 4s ease-in-out infinite;
  flex-shrink: 0;
}

.logo-orb-inner {
  position: absolute;
  top: 3px; left: 8px;
  width: 8px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  filter: blur(2px);
  animation: orbShine 4s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes orbShine {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  50% { opacity: 0.9; transform: translateX(2px); }
}

.logo-type { display: flex; align-items: baseline; }

.logo-brand {
  font-family: 'Bebas Neue', 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 3px;
  color: rgba(232, 220, 200, 0.7);
  font-weight: 400;
}

.logo-accent {
  color: var(--tan);
  text-shadow: 0 0 20px rgba(196, 168, 122, 0.3);
}

.badge-beta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--tan-soft);
  color: var(--tan);
  border: 1px solid rgba(196, 168, 122, 0.12);
  margin-left: 4px;
}

/* Navigation */
.nav-tabs {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.nav-tab {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 18px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transition: all var(--speed) var(--ease);
}

.nav-tab:hover { color: var(--text); }

.nav-tab.active {
  color: var(--cream);
  background: var(--tan-soft);
}

.nav-tab.active .nav-dot {
  background: var(--tan);
  box-shadow: 0 0 6px var(--tan-glow);
}

/* Level badge */
.level-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.level-ring {
  position: relative;
  width: 36px;
  height: 36px;
}

.level-ring svg { width: 100%; height: 100%; }

.level-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--tan);
}

.xp-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ── MAIN CONTENT ────────────────────────────────── */
.main-content {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px;
}

.tab-content {
  display: none;
  animation: tabIn 0.45s var(--ease-out);
}

.tab-content.active { display: block; }

@keyframes tabIn {
  from { opacity: 0; transform: translateY(16px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

/* ── HERO STATS ──────────────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.hero-card {
  position: relative;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all var(--speed) var(--ease);
}

.hero-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tan-glow), transparent);
  opacity: 0;
  transition: opacity var(--speed);
}

.hero-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.hero-card:hover::after { opacity: 1; }

.card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tan-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.hero-card:hover .card-glow { opacity: 1; }

.hero-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--warm-grey);
  margin-bottom: 10px;
}

.hero-value {
  font-family: 'Bebas Neue', 'JetBrains Mono', monospace;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--cream);
}

.hero-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── STATS GRID ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--speed) var(--ease);
}

.stat-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream);
}

/* ── GLASS PANELS ────────────────────────────────── */
.breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.glass-panel {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--speed);
}

.glass-panel.full-width { grid-column: 1 / -1; }
.glass-panel:hover { border-color: var(--border); }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--warm-grey);
  margin-bottom: 16px;
}

.panel-header .panel-title { margin-bottom: 0; }

/* ── SELECT ──────────────────────────────────────── */
.select-dark {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: all var(--speed);
}

.select-dark:focus { border-color: var(--tan); box-shadow: 0 0 0 3px var(--tan-soft); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-primary {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--tan);
  color: var(--charcoal);
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px -10px var(--tan-glow), 0 0 0 1px rgba(196, 168, 122, 0.3);
  background: #d4b88a;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before { left: 120%; }

.btn-icon {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--speed);
}

.btn-icon:hover { border-color: var(--tan); color: var(--tan); }

/* ── PNL CALENDAR ────────────────────────────────── */
.pnl-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-header {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 8px 0;
}

.cal-day {
  aspect-ratio: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid transparent;
  transition: all var(--speed) var(--ease);
}

.cal-day.has-data { cursor: pointer; }
.cal-day.has-data:hover { transform: scale(1.08); border-color: var(--border-hover); }
.cal-day.green-day { background: var(--green-soft); border-color: rgba(92, 184, 92, 0.12); }
.cal-day.red-day { background: var(--red-soft); border-color: rgba(217, 83, 79, 0.12); }
.cal-day.no-trade-day { background: var(--blue-soft); border-color: rgba(122, 155, 181, 0.12); }

.cal-day-num { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-dim); }
.cal-day-pnl { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; font-weight: 600; margin-top: 2px; }
.cal-day.green-day .cal-day-pnl { color: var(--green); }
.cal-day.red-day .cal-day-pnl { color: var(--red); }
.cal-day.no-trade-day .cal-day-pnl { color: var(--blue); font-size: 0.5rem; }

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── TABLES ──────────────────────────────────────── */
.table-container table { width: 100%; border-collapse: collapse; }

.table-container th {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.table-container td {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--cream);
}

.table-container tr { transition: background var(--speed); }
.table-container tr:hover td { background: var(--tan-soft); }

/* ── BAR CHARTS ──────────────────────────────────── */
.bar-chart-container { min-height: 180px; }

.mood-bar, .dist-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mood-label, .dist-label { width: 72px; font-size: 0.72rem; color: var(--text-dim); text-align: right; flex-shrink: 0; }

.bar-track { flex: 1; height: 26px; background: rgba(255, 255, 255, 0.02); border-radius: var(--radius-xs); overflow: hidden; }

.bar-fill { height: 100%; border-radius: var(--radius-xs); transition: width 0.9s var(--ease-out); position: relative; }
.bar-fill.green { background: linear-gradient(90deg, var(--green-soft), var(--green)); }
.bar-fill.red { background: linear-gradient(90deg, var(--red-soft), var(--red)); }
.bar-fill.accent { background: linear-gradient(90deg, var(--tan-soft), var(--tan)); }
.bar-fill.blue { background: linear-gradient(90deg, var(--blue-soft), var(--blue)); }

.bar-value {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* ── GRADE GRID ──────────────────────────────────── */
.grade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }

.grade-card {
  text-align: center; padding: 14px 10px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-subtle);
  transition: all var(--speed);
}

.grade-card:hover { border-color: var(--border); transform: translateY(-1px); }
.grade-card-label { font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; font-weight: 700; margin-bottom: 3px; }
.grade-card-count { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--text-muted); }

.grade-card[data-grade="A+"] .grade-card-label { color: var(--green); }
.grade-card[data-grade="SOLID"] .grade-card-label { color: var(--blue); }
.grade-card[data-grade="MARGINAL"] .grade-card-label { color: var(--yellow); }
.grade-card[data-grade="LOW QUALITY"] .grade-card-label { color: var(--red); }
.grade-card[data-grade="DISCIPLINE"] .grade-card-label { color: var(--purple); }

/* ── RUBRIC BARS ─────────────────────────────────── */
.rubric-bars { display: flex; flex-direction: column; gap: 8px; }
.rubric-item { display: flex; align-items: center; gap: 12px; }
.rubric-name { width: 240px; font-size: 0.75rem; color: var(--text-dim); flex-shrink: 0; }
.rubric-track { flex: 1; height: 20px; background: rgba(255, 255, 255, 0.02); border-radius: var(--radius-xs); overflow: hidden; }
.rubric-fill {
  height: 100%; border-radius: var(--radius-xs); transition: width 1s var(--ease-out);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; color: #fff;
}

/* ── CHALLENGE LIST ──────────────────────────────── */
.challenge-list { max-height: 300px; overflow-y: auto; }

.challenge-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-subtle);
  transition: all var(--speed);
}

.challenge-item:hover { border-color: var(--border); background: var(--tan-soft); }
.challenge-item-left { display: flex; flex-direction: column; gap: 2px; }
.challenge-item-firm { font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; font-weight: 600; color: var(--cream); }
.challenge-item-meta { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; color: var(--text-muted); }
.challenge-item-right { text-align: right; }
.challenge-item-pnl { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; font-weight: 600; }
.challenge-item-status {
  font-family: 'JetBrains Mono', monospace; font-size: 0.55rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px; padding: 2px 8px; border-radius: 3px;
  display: inline-block; margin-top: 4px;
}

.status-passed { background: var(--green-soft); color: var(--green); }
.status-failed { background: var(--red-soft); color: var(--red); }
.status-active { background: var(--blue-soft); color: var(--blue); }
.status-completed { background: var(--tan-soft); color: var(--tan); }
.status-paused { background: rgba(255,255,255,0.04); color: var(--text-muted); }

/* ── LOGIN OVERLAY — FULLY IMMERSIVE ─────────────── */
.login-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: #050505;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease);
}

.login-overlay.hidden { opacity: 0; pointer-events: none; }

#login-mesh-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.login-scene {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center;
  width: 100%; max-width: 480px;
  animation: sceneIn 1s var(--ease-out);
}

@keyframes sceneIn {
  from { opacity: 0; transform: translateY(40px) scale(0.92); }
  to { opacity: 1; transform: none; }
}

/* Animated Globe */
.login-globe-wrap {
  margin-bottom: 28px;
  perspective: 600px;
}

.login-globe {
  width: 100px; height: 100px;
  position: relative;
  animation: globeSpin 12s linear infinite;
}

@keyframes globeSpin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.globe-core {
  position: absolute; inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    rgba(232,220,200,0.25),
    rgba(196,168,122,0.08) 50%,
    rgba(10,10,10,0.8) 80%
  );
  box-shadow:
    0 0 40px rgba(196,168,122,0.15),
    0 0 80px rgba(196,168,122,0.05),
    inset 0 0 30px rgba(0,0,0,0.6);
}

.globe-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(196,168,122,0.12);
}

.ring-1 { inset: 0; transform: rotateX(70deg); animation: ringPulse 6s ease-in-out infinite; }
.ring-2 { inset: -5px; transform: rotateX(70deg) rotateZ(60deg); animation: ringPulse 6s ease-in-out infinite 2s; border-color: rgba(196,168,122,0.08); }
.ring-3 { inset: -10px; transform: rotateX(70deg) rotateZ(120deg); animation: ringPulse 6s ease-in-out infinite 4s; border-color: rgba(196,168,122,0.05); }

@keyframes ringPulse {
  0%, 100% { opacity: 0.5; transform: rotateX(70deg) scale(1); }
  50% { opacity: 1; transform: rotateX(70deg) scale(1.05); }
}

.globe-flare {
  position: absolute;
  top: 8px; left: 30px;
  width: 16px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  filter: blur(4px);
  animation: flarePulse 4s ease-in-out infinite;
}

@keyframes flarePulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.3); }
}

/* Brand name — futuristic wide-spaced */
.login-brand { margin-bottom: 36px; text-align: center; }

.login-brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: 12px;
  color: rgba(232, 220, 200, 0.6);
  text-shadow: 0 0 40px rgba(196, 168, 122, 0.15);
  animation: brandPulse 5s ease-in-out infinite;
}

.login-brand-accent {
  color: var(--tan);
  text-shadow: 0 0 30px rgba(196, 168, 122, 0.3);
}

@keyframes brandPulse {
  0%, 100% { text-shadow: 0 0 40px rgba(196, 168, 122, 0.1); }
  50% { text-shadow: 0 0 60px rgba(196, 168, 122, 0.25), 0 0 100px rgba(196, 168, 122, 0.08); }
}

/* Login card */
.login-card {
  width: 100%; padding: 32px 36px;
  border-radius: var(--radius);
  background: rgba(12, 12, 12, 0.6);
  border: 1px solid rgba(196, 168, 122, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem; font-weight: 600;
  color: var(--cream); margin-bottom: 6px;
  text-align: center;
}

.login-card-sub {
  font-size: 0.8rem; color: var(--text-dim);
  text-align: center; margin-bottom: 24px;
}

.login-link {
  color: var(--tan); text-decoration: none;
  transition: color var(--speed);
}
.login-link:hover { color: var(--cream); }

.input-group { text-align: left; margin-bottom: 16px; }

.input-group label {
  display: block; font-size: 0.72rem; font-weight: 600;
  color: var(--text-dim); margin-bottom: 6px;
}

.input-group input {
  font-family: 'Inter', sans-serif; font-size: 0.88rem;
  width: 100%; padding: 12px 14px; border-radius: var(--radius-xs);
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(196, 168, 122, 0.08);
  color: var(--text); outline: none; transition: all var(--speed);
}

.input-group input:focus {
  border-color: rgba(196, 168, 122, 0.3);
  box-shadow: 0 0 0 3px var(--tan-soft);
}

.input-group input::placeholder { color: var(--text-muted); }

.login-options {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.75rem; color: var(--text-dim);
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--tan);
}

.btn-login {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  width: 100%; padding: 13px;
  border: 1px solid rgba(196, 168, 122, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(196, 168, 122, 0.06);
  color: var(--cream);
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  letter-spacing: 1px;
}

.btn-login:hover {
  background: rgba(196, 168, 122, 0.12);
  border-color: rgba(196, 168, 122, 0.3);
  box-shadow: 0 0 30px rgba(196, 168, 122, 0.08);
  transform: translateY(-1px);
}

.login-error { font-size: 0.78rem; color: var(--red); margin-top: 12px; min-height: 1.2em; text-align: center; }

/* ── PROFILE ─────────────────────────────────────── */
.profile-header-card { padding: 28px 30px; }

.profile-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tan), var(--cream));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--charcoal);
}

.profile-info { flex: 1; }

.profile-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 4px;
}

.profile-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-tier {
  font-weight: 600;
  color: var(--tan);
}

.profile-sep { color: var(--text-muted); }

.profile-stats-row {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.profile-stat { text-align: center; min-width: 60px; }

.profile-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
}

.profile-stat-label {
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* XP Progress Bar */
.xp-progress-container { margin-top: 4px; }

.xp-progress-label {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.xp-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}

.xp-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--tan), var(--cream));
  transition: width 1s var(--ease-out);
}

/* ── BADGES GRID ─────────────────────────────────── */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.badge-item {
  text-align: center;
  padding: 16px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
  transition: all var(--speed);
  opacity: 0.35;
}

.badge-item.unlocked {
  opacity: 1;
  border-color: var(--border);
  background: var(--tan-soft);
}

.badge-item:hover { transform: translateY(-2px); }

.badge-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
  display: block;
}

.badge-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 3px;
}

.badge-desc {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.badge-xp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--tan);
  margin-top: 4px;
}

/* ── ACTIVITY FEED ───────────────────────────────── */
.activity-feed { max-height: 400px; overflow-y: auto; }

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.feed-item:last-child { border-bottom: none; }

.feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.feed-dot.eval_pass { background: var(--green); box-shadow: 0 0 6px var(--green-soft); }
.feed-dot.eval_fail { background: var(--red); box-shadow: 0 0 6px var(--red-soft); }
.feed-dot.badge_unlock { background: var(--tan); box-shadow: 0 0 6px var(--tan-soft); }

.feed-content { flex: 1; }

.feed-user {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--cream);
}

.feed-msg {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.feed-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── FOLLOW LIST ─────────────────────────────────── */
.follow-list { max-height: 250px; overflow-y: auto; }

.follow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.follow-item:last-child { border-bottom: none; }

.follow-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cream);
}

.follow-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* ── LEADERBOARD ROW HIGHLIGHT ───────────────────── */
.lb-rank-1 td:first-child { color: var(--tan); font-weight: 700; }
.lb-rank-2 td:first-child { color: var(--cream); font-weight: 600; }
.lb-rank-3 td:first-child { color: var(--warm-grey); font-weight: 600; }
.lb-self td { background: var(--tan-soft) !important; }

/* ── SCROLLBAR ───────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(196, 168, 122, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(196, 168, 122, 0.3); }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1200px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .breakdown-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .top-bar { flex-wrap: wrap; padding: 8px 14px; gap: 8px; }
  .nav-tabs { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; }
  .nav-tab { padding: 6px 12px; font-size: 0.75rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .main-content { padding: 14px; }
  .hero-value { font-size: 1.4rem; }
  .login-card { width: 90%; padding: 30px 24px; }
}
