/* ═══════════════════════════════════════════════════════
   GUITAR MASTERY — Design System
   Calm, mentor-guided, habit-forming learning platform
   ═══════════════════════════════════════════════════════ */

/* Fix #4: Replaced render-blocking @import with non-blocking @font-face.
   Pages now paint immediately using system fallback, then swap fonts in.
   Reduced from 6 Inter weights to 4 actually used (400,600,700,800). */


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

html {
  scroll-behavior: smooth;
}

/* ── Design Tokens ─────────────────────────────────── */
:root {
  /* Premium vibrant palette — deep darks with high-contrast, glowing accents */
  --bg-base: #0a0c10;
  --bg-surface: #11141d;
  --bg-card: #1a1f2e;
  --bg-elevated: #242a3d;
  --bg-hover: #2d354d;
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-focus: #818cf8;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-accent: #a5b4fc;

  /* Accent palette — vibrant and energetic */
  --accent: #6366f1; /* Vibrant Indigo */
  --accent-soft: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.4);
  --success: #22c55e; /* Vibrant Green */
  --success-soft: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b; /* Vibrant Amber */
  --warning-soft: rgba(245, 158, 11, 0.15);
  --error: #ef4444;
  --error-soft: rgba(239, 68, 68, 0.15);

  /* Finger colors — more distinct and vibrant */
  --finger-1: #fb7185; /* Rose-500 */
  --finger-2: #38bdf8; /* Sky-400 */
  --finger-3: #4ade80; /* Green-400 */
  --finger-4: #fbbf24; /* Amber-400 */

  /* Spacing scale */
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;

  /* Radius */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px var(--accent-glow);

  /* Transitions */
  --ease-out: cubic-bezier(0.2, 1, 0.3, 1);
  --t-fast: 0.2s;
  --t-med: 0.3s;
  --t-slow: 0.5s;
}

/* Light Theme */
[data-theme="light"] {
  --bg-base: #f8f9fc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f1f3f8;
  --bg-hover: #e8ecf4;
  --bg-glass: rgba(0, 0, 0, 0.02);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --border-focus: rgba(129, 140, 248, 0.5);

  --text-primary: #1a1d26;
  --text-secondary: #4a5568;
  --text-muted: #a0aec0;
  --text-accent: #6366f1;

  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.10);
  --accent-glow: rgba(99, 102, 241, 0.20);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.08);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.08);
  --error: #ef4444;
  --error-soft: rgba(239, 68, 68, 0.08);

  --finger-1: #ef4444;
  --finger-2: #3b82f6;
  --finger-3: #10b981;
  --finger-4: #f59e0b;
}


/* ── Base ──────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Typography ────────────────────────────────────── */
h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

small,
.caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Accessibility ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Layout Shell ──────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.main-content {
  padding: var(--sp-2xl);
  max-width: 960px;
  width: 100%;
}

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: var(--sp-lg) var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  overflow-y: auto;
  z-index: 50;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-sm) var(--sp-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-sm);
}

.sidebar-brand .brand-icon {
  font-size: 1.4rem;
}

.sidebar-brand .brand-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: var(--sp-md) var(--sp-sm) var(--sp-xs);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.55rem 0.75rem;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--t-fast) var(--ease-out);
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-link .nav-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.nav-link .nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.45rem;
  border-radius: var(--r-full);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: var(--sp-md);
  border-top: 1px solid var(--border);
}

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  transition: all var(--t-med) var(--ease-out);
}

.card:hover {
  border-color: var(--border-hover);
}

.card-elevated {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card-glow:hover {
  box-shadow: var(--shadow-glow);
  border-color: var(--accent);
}

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-success {
  background: var(--success);
  color: #0f1117;
}

.btn-lg {
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  border-radius: var(--r-md);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-sm);
}

/* ── Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-full);
  font-family: 'JetBrains Mono', monospace;
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ── Progress ──────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  transition: width var(--t-slow) var(--ease-out);
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring circle {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--t-slow) var(--ease-out);
}

/* ── Mentor Bubble ─────────────────────────────────── */
.mentor-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  position: relative;
}

.mentor-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.mentor-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.mentor-text strong {
  color: var(--text-primary);
}

/* ── Stat Cards ────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-md);
}

.stat-card {
  text-align: center;
  padding: var(--sp-lg) var(--sp-md);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--sp-xs);
}

/* ── Utilities ─────────────────────────────────────── */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-xs {
  gap: var(--sp-xs);
}

.gap-sm {
  gap: var(--sp-sm);
}

.gap-md {
  gap: var(--sp-md);
}

.gap-lg {
  gap: var(--sp-lg);
}

.gap-xl {
  gap: var(--sp-xl);
}

.mt-sm {
  margin-top: var(--sp-sm);
}

.mt-md {
  margin-top: var(--sp-md);
}

.mt-lg {
  margin-top: var(--sp-lg);
}

.mt-xl {
  margin-top: var(--sp-xl);
}

.mb-md {
  margin-bottom: var(--sp-md);
}

.mb-lg {
  margin-bottom: var(--sp-lg);
}

.w-full {
  width: 100%;
}

.text-center {
  text-align: center;
}

.text-accent {
  color: var(--accent);
}

.text-success {
  color: var(--success);
}

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

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Animations ────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--t-slow) var(--ease-out) both;
}

.slide-up {
  animation: slideUp 0.5s var(--ease-out) both;
}

.stagger-1 {
  animation-delay: 0.05s;
}

.stagger-2 {
  animation-delay: 0.1s;
}

.stagger-3 {
  animation-delay: 0.15s;
}

.stagger-4 {
  animation-delay: 0.2s;
}

/* Fix #7: GPU compositing hints for animated elements.
   Promotes elements to their own layers to prevent main-thread repaints. */
.card-interactive,
.strum-arrow,
.finger-index,
.finger-middle,
.pluck-flash,
.hammer-flash {
  will-change: transform, opacity;
  transform: translateZ(0);
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-md);
}

.rec-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding: var(--sp-lg);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r-lg);
  transition: all var(--t-med) var(--ease-out);
}

.rec-card:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.rec-emoji {
  font-size: 2rem;
  margin-bottom: var(--sp-xs);
}

.rec-card h4 {
  color: var(--text-primary);
  margin-bottom: 2px;
}

.rec-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Fix #9: Content-visibility for lazy rendering of below-fold content. */
.chord-card,
.song-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 200px;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: var(--sp-xs) var(--sp-sm);
    border-right: none;
    border-top: 1px solid var(--border);
    gap: 0;
  }

  .sidebar-brand,
  .nav-section-label,
  .sidebar-footer,
  .nav-link span:not(.nav-icon) {
    display: none;
  }

  .nav-link {
    flex-direction: column;
    font-size: 0.65rem;
    padding: 0.6rem var(--sp-xs);
    gap: 2px;
    min-width: 0;
    flex: 1;
    min-height: 64px;
  }

  .sidebar > .nav-link:not(.mobile-essential) {
    display: none;
  }

  .nav-link .nav-icon {
    font-size: 1.2rem;
  }

  .main-content {
    padding: var(--sp-lg) var(--sp-md) 5rem;
  }
}
/* ── Authentication Overlay ────────────────────────── */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 18, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-med) var(--ease-out);
}

.auth-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: var(--sp-2xl);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--sp-lg) var(--sp-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease-out);
    position: relative;
}

.profile-card:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.profile-avatar {
    width: 50px;
    height: 50px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto var(--sp-sm);
}

.profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-locked {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    opacity: 0.6;
}

/* ── PIN Input ───────────────────────────────────── */
.pin-input-group {
    display: flex;
    justify-content: center;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.pin-digit {
    width: 50px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.pin-digit:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: var(--sp-md);
}

.btn-back:hover {
    color: var(--text-secondary);
}

/* ── Form Inputs ────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--t-fast) var(--ease-out);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 1px var(--accent);
}

/* ── Left-Handed Mode ────────────────────────────── */
/* Flips ONLY the specific visual elements that represent right-handed playing */
body.left-handed-mode .chord-svg {
    transform: scaleX(-1);
}

body.left-handed-mode .chord-svg text {
    /* Un-flip the text inside the SVG so frets/finger numbers read correctly */
    transform: scaleX(-1);
    transform-origin: center;
}

body.left-handed-mode .pattern-svg {
    transform: scaleX(-1);
}

body.left-handed-mode .pattern-svg text {
    transform: scaleX(-1);
    transform-origin: center;
}

body.left-handed-mode .svg-wrap svg {
    transform: scaleX(-1);
}
body.left-handed-mode .svg-wrap text {
    transform: scaleX(-1);
    transform-origin: center;
}

/* Fix for flip transform bounding boxes */
body.left-handed-mode svg text {
    transform-box: fill-box;
}

/* ── Daily Quests Widget ───────────────────────────── */
.quest-widget {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}

.quest-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-sm);
  padding: var(--sp-sm);
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}

.quest-item:hover {
  background: var(--bg-glass);
}

.quest-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: transparent;
}

.quest-checkbox.done {
  background: var(--success);
  border-color: var(--success);
  color: #0f1117;
}

.quest-info {
  flex: 1;
}

.quest-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quest-item.done .quest-name {
  color: var(--text-muted);
  text-decoration: line-through;
}

.quest-progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  margin-top: 4px;
}

.quest-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Dashboard Specifics ──────────────────────────── */
.greeting h1 span {
  background: linear-gradient(135deg, var(--text-accent), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.resume-card {
  background: linear-gradient(135deg, var(--bg-card), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-lg);
}

.resume-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-md);
}

.stat-card {
  text-align: center;
  padding: var(--sp-lg) var(--sp-md);
}

.path-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.path-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md);
  min-height: 72px;
  border-radius: var(--r-md);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  transition: all var(--t-fast) var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.path-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.path-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.path-icon.green { background: var(--success-soft); }
.path-icon.blue { background: var(--accent-soft); }
.path-icon.amber { background: var(--warning-soft); }

/* Heatmap */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-md);
}

.heatmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
}

.heatmap-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--r-full);
  overflow: hidden;
  margin: var(--sp-sm) 0;
}

.heatmap-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: var(--r-full);
  transition: width 0.6s var(--ease-out);
}

/* Charts */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  height: 220px;
  display: flex;
  flex-direction: column;
}

.chart-main-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

/* Coach components */
.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-lg);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-xs);
}

.plan-card {
  padding: var(--sp-sm);
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  font-size: 0.75rem;
}

@media (max-width: 600px) {
  .main-content {
    padding: var(--sp-md);
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .top-grid {
    grid-template-columns: 1fr;
  }
}
