/* ============================================================
   MYCOURTPRO — Design System
   Token-based CSS, zero hardcoded colors
   ============================================================ */

:root {
  /* Brand */
  --green-50: #f0faf0;
  --green-100: #d4f0d4;
  --green-500: #2d9e4f;
  --green-600: #1f7a3a;
  --green-700: #165c2b;

  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  --amber-50: #fffbeb;
  --amber-100: #fde68a;
  --amber-500: #f59e0b;

  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  /* Surfaces */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;
  --bg-sidebar: #0f1117;
  --bg-sidebar-hover: #1a1d27;
  --bg-sidebar-active: #22263a;

  /* Text */
  --text-primary: #0f1117;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-inverse: #ffffff;
  --text-sidebar: rgba(255,255,255,0.7);
  --text-sidebar-active: #ffffff;

  /* Borders */
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --border-heavy: #9ca3af;
  --border-card: #e5e7eb;    /* alias — used by cards throughout */
  --text-muted: #9ca3af;     /* alias — used by secondary UI labels */

  /* Status */
  --success-bg: #f0fdf4;
  --success-text: #166534;
  --success-border: #86efac;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --warning-border: #fcd34d;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --danger-border: #fca5a5;

  /* Green alias (used as var(--green) in billing/promo UI) */
  --green: #2d9e4f;

  /* Purple / Violet — player portal accent */
  --purple-50:  #f5f3ff;
  --purple-100: #ede9fe;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;

  /* Amber extended */
  --amber-200: #fde68a;
  --amber-700: #b45309;

  /* Chart colors */
  --chart-1: #2d9e4f;
  --chart-2: #3b82f6;
  --chart-3: #f59e0b;
  --chart-4: #8b5cf6;

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

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);

  /* Layout */
  --sidebar-width: 220px;
  --topbar-height: 0px;
}

[data-theme="dark"] {
  --bg-primary: #1a1d27;
  --bg-secondary: #22263a;
  --bg-tertiary: #2a2e3f;
  --bg-sidebar: #0f1117;
  --border-light: #2d3249;
  --border-medium: #3d4260;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --success-bg: #052e16;
  --success-text: #86efac;
  --warning-bg: #1c1407;
  --warning-text: #fcd34d;
  --danger-bg: #1c0909;
  --danger-text: #fca5a5;
  --border-card: #2d3249;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --purple-50:  #2e1f4f;
  --purple-100: #3d2d66;
  --warning-bg: #2a1f07;
  --warning-text: #fcd34d;
  --amber-700: #fbbf24;
}

/* ============================================================ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; color: var(--text-primary); }
a { text-decoration: none; color: inherit; }

/* Global keyboard focus ring — visible only on keyboard nav, not mouse clicks */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ============================================================ PAGES */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ============================================================ LANDING */
.landing-nav {
  display: flex; align-items: center; gap: 32px;
  padding: 0 40px;
  height: 64px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo {
  display: flex; align-items: center; gap: 2px;
  font-size: 20px; font-weight: 600; letter-spacing: -0.5px;
}
.logo-mark {
  background: var(--green-500);
  color: white;
  width: 26px; height: 26px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.logo-text { color: var(--text-primary); }
.nav-links { display: flex; gap: 24px; margin-left: 16px; flex: 1; }
.nav-link { font-size: 14px; color: var(--text-secondary); }
.nav-link:hover { color: var(--text-primary); }
.nav-actions { display: flex; gap: 10px; }

.hero {
  text-align: center;
  padding: 80px 40px 60px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-full);
  padding: 6px 16px; margin-bottom: 28px;
}
.sport-pill {
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  padding: 2px 8px; border-radius: var(--r-full);
}
.sport-pill.tennis { background: var(--green-100); color: var(--green-700); }
.sport-pill.pickleball { background: var(--blue-100); color: var(--blue-700); }
.badge-text { font-size: 13px; color: var(--text-secondary); }

.hero-title {
  font-size: clamp(36px, 5vw, 60px); font-weight: 600;
  line-height: 1.15; letter-spacing: -1.5px;
  color: var(--text-primary); margin-bottom: 20px;
}
.hero-sub {
  font-size: 18px; color: var(--text-secondary);
  max-width: 520px; margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 12px; }
.hero-note { font-size: 13px; color: var(--text-tertiary); }

.portals-preview {
  padding: 60px 40px;
  background: var(--bg-secondary);
}
.portals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; max-width: 900px; margin: 0 auto;
}
.portal-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  display: block;
  width: 100%;
}
.portal-card:hover {
  border-color: var(--green-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.portal-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: white; margin-bottom: 14px;
}
.pro-icon { background: var(--green-500); }
.manager-icon { background: var(--blue-600); }
.player-icon { background: var(--purple-500); }
.portal-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.portal-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.portal-cta { font-size: 13px; color: var(--green-500); font-weight: 500; }

.features-strip {
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-primary);
}
.feature-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 28px 32px;
  flex: 1; min-width: 200px;
  border-right: 1px solid var(--border-light);
}
.feature-item:last-child { border-right: none; }
.feature-icon { font-size: 22px; margin-top: 2px; }
.feature-item h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.feature-item p { font-size: 13px; color: var(--text-secondary); }

.pricing-section { padding: 80px 40px; background: var(--bg-secondary); }
.section-title {
  font-size: 32px; font-weight: 600; letter-spacing: -0.8px;
  text-align: center; margin-bottom: 48px;
}
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; max-width: 1000px; margin: 0 auto;
}
.price-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  position: relative;
}
.price-card.price-featured {
  border-color: var(--green-500);
  box-shadow: var(--shadow-md);
}
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--green-500); color: white;
  font-size: 11px; font-weight: 600; padding: 3px 12px;
  border-radius: var(--r-full); white-space: nowrap;
}
.price-tier { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.price-amount { font-size: 36px; font-weight: 700; letter-spacing: -1px; margin-bottom: 20px; }
.price-amount span { font-size: 16px; font-weight: 400; color: var(--text-secondary); }
.price-features { list-style: none; margin-bottom: 24px; }
.price-features li {
  font-size: 13px; color: var(--text-secondary);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
}
.price-features li::before { content: '✓ '; color: var(--green-500); font-weight: 600; }

/* ============================================================ BUTTONS */
.btn-primary {
  background: var(--green-500); color: white;
  border: none; border-radius: var(--r-md);
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--green-600); }
.btn-primary.full-width { width: 100%; padding: 12px; }

.btn-secondary {
  background: var(--bg-secondary); color: var(--text-primary);
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  transition: all 0.15s;
}
.btn-secondary:hover { background: var(--bg-tertiary); }
.btn-danger {
  background: var(--red-500); color: var(--text-inverse);
  border: none; border-radius: var(--r-md);
  padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: var(--red-600); }

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: none; border-radius: var(--r-md);
  padding: 6px 12px; font-size: 14px;
  transition: all 0.15s;
}
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-ghost.small { font-size: 12px; padding: 4px 8px; }
.btn-ghost.tiny { font-size: 12px; padding: 3px 8px; }
.btn-director-toggle {
  width: 100%; margin-bottom: 8px;
  background: var(--green-500); color: var(--text-inverse);
  border: none; border-radius: var(--r-md);
  padding: 8px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.btn-director-toggle:hover { background: var(--green-600); }
.btn-director-back {
  width: 100%; margin-bottom: 8px;
  background: var(--blue-50); color: var(--blue-600);
  border: 1px solid var(--blue-100); border-radius: var(--r-md);
  padding: 7px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.btn-director-back:hover { background: var(--blue-100); }

.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  width: 100%;
}
.btn-outline:hover { background: var(--bg-secondary); }

.btn-hero-primary {
  background: var(--green-500); color: white;
  border: none; border-radius: var(--r-md);
  padding: 14px 28px; font-size: 16px; font-weight: 500;
  transition: background 0.15s;
}
.btn-hero-primary:hover { background: var(--green-600); }

.btn-hero-ghost {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  padding: 14px 28px; font-size: 16px; font-weight: 500;
}
.btn-hero-ghost:hover { background: var(--bg-secondary); }

.btn-icon {
  background: transparent; border: none;
  padding: 4px 6px; font-size: 14px; border-radius: var(--r-sm);
}
.btn-icon:hover { background: var(--bg-tertiary); }

.btn-voice {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-secondary); color: var(--text-secondary);
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  padding: 6px 12px; font-size: 13px;
}
.btn-voice:hover { border-color: var(--green-500); color: var(--green-500); }
.btn-voice.recording {
  background: var(--red-50); border-color: var(--red-500); color: var(--red-600);
}

/* ============================================================ AUTH MODAL */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  width: min(480px, 92vw);
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-box.large-modal { width: min(680px, 92vw); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
.modal-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.modal-close {
  background: var(--bg-tertiary); border: none; border-radius: var(--r-sm);
  width: 28px; height: 28px; font-size: 12px; color: var(--text-secondary);
}

.demo-portals { margin-bottom: 20px; }
.demo-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.demo-buttons { display: flex; gap: 8px; }
.demo-btn {
  flex: 1; padding: 10px; border: 1px solid var(--border-medium);
  border-radius: var(--r-md); font-size: 13px; font-weight: 500;
  background: var(--bg-secondary); transition: all 0.15s;
}
.pro-btn:hover { border-color: var(--green-500); color: var(--green-600); background: var(--green-50); }
.manager-btn:hover { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-50); }
.player-btn:hover { border-color: var(--purple-500); color: var(--purple-700); background: var(--purple-50); }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--text-tertiary); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-light);
}

.auth-input {
  width: 100%; padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  background: var(--bg-primary); font-size: 14px;
  transition: border-color 0.15s;
}
.auth-input:focus { outline: none; border-color: var(--green-500); }
.textarea-input { min-height: 100px; resize: vertical; }

.role-selector { display: flex; gap: 6px; margin-bottom: 16px; }
.role-btn {
  flex: 1; padding: 8px; border: 1px solid var(--border-medium);
  border-radius: var(--r-md); font-size: 13px;
  background: var(--bg-secondary); color: var(--text-secondary);
}
.role-btn.active { background: var(--green-500); border-color: var(--green-500); color: white; }

.sport-selector { margin-bottom: 16px; }
.sport-selector label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.sport-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.sport-btn {
  padding: 6px 14px; border: 1px solid var(--border-medium);
  border-radius: var(--r-full); font-size: 13px;
  background: var(--bg-secondary); color: var(--text-secondary);
}
.sport-btn.active { background: var(--green-500); border-color: var(--green-500); color: white; }

.auth-switch { font-size: 13px; color: var(--text-secondary); margin-top: 16px; text-align: center; }
.auth-switch a { color: var(--green-500); font-weight: 500; }
.auth-error { font-size: 13px; color: var(--danger-text); background: var(--danger-bg); border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; }

/* ============================================================ APP SHELL */
.app-shell {
  display: flex; min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 50; overflow-y: auto;
}

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo.small { font-size: 16px; }
.sport-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: var(--r-full);
}
.tennis-badge { background: rgba(45,158,79,0.2); color: var(--green-100); }
.manager-badge { background: rgba(59,130,246,0.2); color: var(--blue-100); }

.sidebar-nav {
  flex: 1; padding: 12px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-md);
  font-size: 13.5px; color: var(--text-sidebar);
  cursor: pointer; transition: all 0.15s;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-sidebar-hover); color: white; }
.nav-item.active { background: var(--bg-sidebar-active); color: white; }
.nav-icon { font-size: 14px; width: 18px; text-align: center; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--r-md);
  margin-bottom: 8px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--green-500); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.user-avatar.manager-avatar { background: var(--blue-600); }
.user-avatar.player-avatar { background: var(--purple-500); }
.user-avatar.tiny-av { width: 24px; height: 24px; font-size: 9px; }
.user-name { display: block; font-size: 13px; color: white; font-weight: 500; }
.user-role { display: block; font-size: 11px; color: var(--text-sidebar); }

.main-content {
  flex: 1; margin-left: var(--sidebar-width);
  background: var(--bg-tertiary);
  min-height: 100vh;
}

.view { display: none; padding: 32px; }
.view.active { display: block; }

.view-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.view-header h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; }
.view-sub { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================ STAT CARDS */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 24px;
}
.stats-row.five-col { grid-template-columns: repeat(5, 1fr); }
.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: flex; flex-direction: column;
}
.stat-card.large { padding: 20px 24px; }
.stat-label { font-size: 12px; color: var(--text-tertiary); font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.8px; margin-bottom: 4px; }
.stat-value.big { font-size: 32px; }
.stat-delta { font-size: 12px; }
.stat-delta.positive { color: var(--green-500); }
.stat-delta.warning { color: var(--amber-500); }
.stat-delta.neutral { color: var(--text-tertiary); }

/* ============================================================ CARDS */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.dashboard-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.span-2 { grid-column: span 2; }

/* ============================================================ BADGES */
.badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: var(--r-full);
}
.warning-badge { background: var(--warning-bg); color: var(--warning-text); }
.danger-badge { background: var(--danger-bg); color: var(--danger-text); }
.badge-amber { background: var(--amber-100); color: var(--warning-text); }

/* ============================================================ UNPAID SESSIONS */
.unpaid-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border-light);
}
.unpaid-item:last-child { border-bottom: none; }
.unpaid-info { flex: 1; min-width: 0; }
.unpaid-client { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.unpaid-meta   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.unpaid-amount { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-right: 12px; white-space: nowrap; }
.pay-btns      { display: flex; gap: 6px; flex-shrink: 0; }
.pay-btn {
  font-size: 12px; padding: 5px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border-medium); background: var(--bg-primary);
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
}
.pay-btn:hover { background: var(--green-500); color: var(--text-inverse); border-color: var(--green-500); }
.new-badge { background: var(--green-500); color: white; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-full); }

/* ============================================================ LESSON LIST */
.lesson-list { display: flex; flex-direction: column; gap: 1px; }
.lesson-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.lesson-item:last-child { border-bottom: none; }
.lesson-time { font-size: 12px; font-weight: 600; color: var(--text-tertiary); width: 72px; flex-shrink: 0; font-family: 'DM Mono', monospace; }
.lesson-info { flex: 1; }
.lesson-client { display: block; font-size: 14px; font-weight: 500; }
.lesson-type { display: block; font-size: 12px; color: var(--text-tertiary); }
.lesson-actions { display: flex; align-items: center; gap: 8px; }
.lesson-status {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-full);
}
.lesson-status.confirmed { background: var(--success-bg); color: var(--success-text); }
.lesson-status.pending { background: var(--warning-bg); color: var(--warning-text); }

/* ============================================================ ACTIVITY FEED */
.activity-feed { display: flex; flex-direction: column; gap: 14px; }
.activity-item { display: flex; align-items: flex-start; gap: 10px; }
.activity-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-100); color: var(--green-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.activity-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.activity-text strong { color: var(--text-primary); font-weight: 500; }
.activity-time { display: block; font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* ============================================================ PENDING NOTES */
.pending-notes { display: flex; flex-direction: column; gap: 10px; }
.pending-note {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--bg-secondary); border-radius: var(--r-md);
  cursor: pointer; transition: background 0.15s;
}
.pending-note:hover { background: var(--bg-tertiary); }
.note-client { font-size: 14px; font-weight: 500; flex: 1; }
.note-date { font-size: 12px; color: var(--text-tertiary); }
.pending-note-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border-card);
}
.pending-note-item:last-child { border-bottom: none; }
.pending-note-client { font-size: 14px; font-weight: 500; flex: 1; color: var(--text-primary); }
.pending-note-date { font-size: 12px; color: var(--text-muted); margin-right: 8px; }

/* Activity feed — dot variant */
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0; margin-top: 5px;
}
.activity-body { display: flex; flex-direction: column; gap: 1px; }
.activity-label { font-size: 13px; color: var(--text-secondary); }
.activity-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.activity-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================ EARNINGS */

.earnings-total { font-size: 32px; font-weight: 600; letter-spacing: -1px; margin-bottom: 4px; }
.earnings-target { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.progress-bar-container {
  background: var(--bg-tertiary); border-radius: var(--r-full);
  height: 6px; margin-bottom: 16px; overflow: hidden;
}
.progress-bar {
  background: var(--green-500); height: 100%;
  border-radius: var(--r-full); transition: width 0.5s ease;
}
.earnings-breakdown { display: flex; flex-direction: column; gap: 8px; }
.earning-line {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--text-secondary);
}

/* ============================================================ WEEK SCHEDULE */
.week-nav {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.week-label { font-size: 15px; font-weight: 500; flex: 1; text-align: center; }
.week-grid {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg); overflow: hidden;
}
.week-header {
  display: grid; grid-template-columns: 60px repeat(7, 1fr);
  border-bottom: 1px solid var(--border-light);
}
.wh-day {
  padding: 12px 8px; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  border-left: 1px solid var(--border-light);
}
.wh-day.today-col { background: var(--green-50); color: var(--green-600); }
.week-body { display: flex; }
.time-slots { width: 60px; flex-shrink: 0; }
.time-slot {
  height: 60px; display: flex; align-items: flex-start; padding: 4px 6px;
  font-size: 10px; color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-light);
  font-family: 'DM Mono', monospace;
}
.days-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); }
.day-col {
  border-left: 1px solid var(--border-light);
  position: relative; min-height: 600px;
}
@media (max-width: 600px) {
  .days-grid { grid-template-columns: 1fr; }
  .wh-day { display: none; }
}
.day-col.today-day { background: rgba(45,158,79,0.02); }
.lesson-block {
  position: absolute; left: 4px; right: 4px;
  background: var(--green-100); border-left: 3px solid var(--green-500);
  border-radius: var(--r-sm); padding: 4px 6px;
  font-size: 11px; font-weight: 500; color: var(--green-700);
  overflow: hidden; cursor: pointer;
  transition: opacity 0.15s;
}
.lesson-block:hover { opacity: 0.85; }
.lesson-block.group-block { background: var(--blue-100); border-color: var(--blue-500); color: var(--blue-700); }
.lesson-block.pending-block {
  background: var(--amber-50, #fffbeb);
  border-color: var(--amber-500, #f59e0b);
  color: var(--amber-700, #b45309);
}
.lb-time   { font-size: 10px; opacity: 0.75; }
.lb-client { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-pending { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px; }

/* ============================================================ CLIENTS GRID */
.clients-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.client-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 18px 20px;
  cursor: pointer; transition: all 0.15s;
}
.client-card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-medium); }
.client-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.client-name { font-size: 15px; font-weight: 600; }
.client-sport { font-size: 12px; color: var(--text-tertiary); }
.client-stats { display: flex; gap: 16px; }
.client-stat { font-size: 12px; color: var(--text-secondary); }
.client-stat span { display: block; font-size: 16px; font-weight: 600; color: var(--text-primary); }

/* ============================================================ NOTES LIST */
.notes-list, .player-notes-list { display: flex; flex-direction: column; gap: 12px; }
.note-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 20px 22px;
  cursor: pointer; transition: all 0.15s;
}
.note-card:hover { box-shadow: var(--shadow-sm); }
.note-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.note-card-client { font-size: 15px; font-weight: 600; }
.note-card-date { font-size: 12px; color: var(--text-tertiary); }
.note-card-body { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.6; }
.note-card-footer { display: flex; align-items: center; gap: 12px; }
.note-shared-badge { font-size: 11px; background: var(--success-bg); color: var(--success-text); padding: 2px 8px; border-radius: var(--r-full); }
.note-video-badge { font-size: 11px; background: var(--red-50); color: var(--red-600); padding: 2px 8px; border-radius: var(--r-full); }
.note-seen-badge { font-size: 11px; background: var(--blue-50,#eff6ff); color: var(--blue-600); padding: 2px 8px; border-radius: var(--r-full); cursor: default; }
.note-seen-badge.unseen { background: var(--amber-50,#fffbeb); color: var(--amber-700,#b45309); }

/* ============================================================ EARNINGS CHART */
.earnings-overview {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 24px;
}
.chart-placeholder { padding: 8px 0; }
.breakdown-list { display: flex; flex-direction: column; gap: 14px; }

.breakdown-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 6px;
}
.breakdown-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.private-dot { background: var(--green-500); }
.group-dot { background: var(--blue-500); }
.junior-dot { background: var(--amber-500); }
.breakdown-value { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.breakdown-pct { color: var(--text-tertiary); font-size: 12px; font-weight: 400; }
.breakdown-bar {
  height: 4px; background: var(--green-500); border-radius: var(--r-full);
}
.group-bar { background: var(--blue-500); }
.junior-bar { background: var(--amber-500); }

/* ============================================================ JOBS BOARD */
.jobs-list { display: flex; flex-direction: column; gap: 12px; }
.job-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 20px 24px;
  display: flex; align-items: flex-start; gap: 16px;
}
.job-club-logo {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--bg-tertiary); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--text-secondary);
  flex-shrink: 0;
}
.job-info { flex: 1; }
.job-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.job-club { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.job-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.job-tag {
  font-size: 11px; padding: 3px 10px; border-radius: var(--r-full);
  background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-light);
}
.job-tag.sport-tag { background: var(--green-50); color: var(--green-600); border-color: var(--green-100); }
.job-tag.type-tag { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.job-meta { text-align: right; flex-shrink: 0; }
.job-salary { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.job-location { font-size: 12px; color: var(--text-tertiary); margin-bottom: 12px; }

/* ============================================================ MANAGER: STAFF */
.staff-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.staff-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 20px 22px;
}
.staff-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.staff-name { font-size: 15px; font-weight: 600; }
.staff-title { font-size: 12px; color: var(--text-tertiary); }
.staff-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.staff-stat { text-align: center; }
.staff-stat-val { font-size: 18px; font-weight: 600; }
.staff-stat-label { font-size: 11px; color: var(--text-tertiary); }

/* ============================================================ MANAGER: RETENTION */
.retention-list { display: flex; flex-direction: column; gap: 10px; }
.retention-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
}
.retention-row.at-risk { background: var(--danger-bg); }
.retention-row.warning { background: var(--warning-bg); }
.retention-name { font-size: 14px; font-weight: 500; flex: 1; }
.retention-signal { font-size: 12px; color: var(--text-secondary); flex: 2; }

/* ============================================================ MANAGER: COURTS */
.pro-revenue-list { display: flex; flex-direction: column; gap: 12px; }
.pro-rev-row { display: flex; align-items: center; gap: 10px; }
.pro-rev-name { display: flex; align-items: center; gap: 8px; font-size: 13px; width: 130px; flex-shrink: 0; }
.pro-rev-bar-wrap { flex: 1; background: var(--bg-tertiary); border-radius: var(--r-full); height: 6px; }
.pro-rev-bar { background: var(--green-500); height: 100%; border-radius: var(--r-full); }
.pro-rev-amount { font-size: 13px; font-weight: 500; width: 52px; text-align: right; }

.court-util-grid { display: flex; flex-direction: column; gap: 12px; }
.court-row { display: flex; align-items: center; gap: 10px; }
.court-name { font-size: 13px; width: 60px; flex-shrink: 0; }
.court-bar-wrap { flex: 1; background: var(--bg-tertiary); border-radius: var(--r-full); height: 6px; }
.court-bar { background: var(--green-500); height: 100%; border-radius: var(--r-full); }
.court-bar.low-bar { background: var(--amber-500); }
.court-pct { font-size: 13px; font-weight: 600; width: 36px; text-align: right; color: var(--green-600); }
.court-pct.low-pct { color: var(--amber-500); }

.courts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.court-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 24px;
}
.court-card.maintenance { border-color: var(--warning-border); background: var(--warning-bg); }
.court-number { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.court-surface { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.court-status-badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--r-full); margin-bottom: 8px;
  background: var(--success-bg); color: var(--success-text);
}
.court-status-badge.maintenance-badge { background: var(--warning-bg); color: var(--warning-text); }
.court-util-label { font-size: 12px; color: var(--text-tertiary); }

/* ============================================================ MEMBERS TABLE */
.members-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg); overflow: hidden;
}
.data-table th {
  padding: 12px 16px; text-align: left;
  font-size: 12px; font-weight: 600; color: var(--text-tertiary);
  background: var(--bg-secondary); border-bottom: 1px solid var(--border-light);
  text-transform: uppercase; letter-spacing: 0.3px;
}
.data-table td {
  padding: 12px 16px; font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-secondary); }
.member-status { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-full); }
.member-status.active-status { background: var(--success-bg); color: var(--success-text); }
.member-status.risk-status { background: var(--danger-bg); color: var(--danger-text); }

/* ============================================================ ANNOUNCEMENTS */
.announcements-list { display: flex; flex-direction: column; gap: 10px; }
.announcement-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.announcement-item:last-child { border-bottom: none; }
.ann-title { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.ann-meta { font-size: 12px; color: var(--text-tertiary); }
.comms-compose { margin-bottom: 24px; }
.comms-compose h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.comms-meta { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* ============================================================ PLAYER: SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.skill-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.skill-name { font-size: 14px; font-weight: 500; }
.skill-score { font-size: 15px; font-weight: 700; }
.skill-score-prev { font-size: 12px; color: var(--text-tertiary); }
.skill-track { background: var(--bg-tertiary); border-radius: var(--r-full); height: 8px; overflow: hidden; }
.skill-fill { height: 100%; border-radius: var(--r-full); transition: width 1s ease; }

/* ============================================================ PLAYER: NOTES */
.note-meta { font-size: 12px; color: var(--text-tertiary); margin-bottom: 6px; }
.note-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.note-preview { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; }
.note-video {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--bg-secondary); border-radius: var(--r-md);
  cursor: pointer;
}
.video-thumb {
  width: 44px; height: 36px; border-radius: var(--r-sm);
  background: var(--red-500); display: flex; align-items: center; justify-content: center;
  color: var(--text-inverse); font-size: 14px; flex-shrink: 0;
}
.video-title { font-size: 13px; font-weight: 500; }
.video-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

.latest-note { cursor: pointer; }

/* ============================================================ PLAYER: FOCUS */
.focus-list { display: flex; flex-direction: column; gap: 10px; }
.focus-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--r-md); background: var(--bg-secondary);
}
.focus-item.active-focus { background: var(--green-50); border: 1px solid var(--green-100); }
.focus-item.completed-focus { opacity: 0.6; }
.focus-icon { font-size: 18px; width: 28px; text-align: center; }
.focus-text { flex: 1; }
.focus-name { font-size: 14px; font-weight: 500; }
.focus-status { font-size: 12px; color: var(--text-tertiary); }
.focus-progress { font-size: 16px; font-weight: 700; color: var(--green-500); }
.focus-progress.done { color: var(--text-tertiary); }

/* ============================================================ PLAYER: PLAN */
.plan-timeline { display: flex; flex-direction: column; gap: 16px; }
.plan-phase {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg); padding: 20px 24px;
}
.plan-phase.current-phase { border-color: var(--green-500); }
.phase-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.phase-header h3 { font-size: 16px; font-weight: 600; flex: 1; }
.phase-dates { font-size: 12px; color: var(--text-tertiary); }
.phase-badge {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-full);
}
.current-badge { background: var(--green-500); color: white; }
.upcoming-badge { background: var(--blue-100); color: var(--blue-700); }
.future-badge { background: var(--bg-tertiary); color: var(--text-secondary); }
.phase-goals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.goal-item { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--text-secondary); padding: 4px 0; }
.goal-check { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.goal-item.done-goal { color: var(--text-tertiary); text-decoration: line-through; }
.goal-item.active-goal { color: var(--text-primary); font-weight: 500; }
.current-check { color: var(--green-500); }

/* ============================================================ PLAYER: PRACTICE */
.homework-list { display: flex; flex-direction: column; gap: 10px; }
.hw-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.hw-check { margin-top: 3px; accent-color: var(--green-500); }
.hw-title { font-size: 14px; font-weight: 500; }
.hw-detail { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.hw-item.done-hw .hw-title { text-decoration: line-through; color: var(--text-tertiary); }
.practice-entries { display: flex; flex-direction: column; gap: 10px; }
.practice-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--bg-secondary); border-radius: var(--r-md);
}
.pe-left { flex: 1; min-width: 0; }
.pe-date { font-size: 12px; color: var(--text-tertiary); font-weight: 600; margin-bottom: 2px; }
.pe-detail { font-size: 13px; color: var(--text-primary); }
.pe-feel { font-size: 20px; flex-shrink: 0; }
.feel-great { background: var(--success-bg); color: var(--success-text); }
.feel-good { background: var(--green-50); color: var(--green-600); }
.feel-ok { background: var(--bg-tertiary); color: var(--text-secondary); }

/* ============================================================ NOTE MODAL */
.note-form { display: flex; flex-direction: column; gap: 20px; }
.note-client-select label,
.note-text-section label,
.skill-updates-section label,
.video-section label,
.note-date-row label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px;
}
.note-date-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.note-text-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.note-textarea {
  width: 100%; min-height: 130px; padding: 12px;
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  background: var(--bg-primary); font-size: 14px; color: var(--text-primary);
  resize: vertical; font-family: inherit; line-height: 1.6;
}
.note-textarea:focus { outline: none; border-color: var(--green-500); }

.voice-indicator {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--red-600); margin-top: 6px;
}
.voice-indicator.hidden { display: none; }
.voice-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red-600);
  animation: pulse-dot 1s infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.skill-updates-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.skill-update-item { display: flex; align-items: center; gap: 10px; }
.skill-update-name { font-size: 13px; flex: 1; }
.skill-update-input {
  width: 56px; padding: 4px 8px;
  border: 1px solid var(--border-medium); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; text-align: center;
  background: var(--bg-primary); color: var(--text-primary);
}

.video-input-row { display: flex; gap: 8px; }
.video-input-row input { flex: 1; margin-bottom: 0; }
.video-preview {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--bg-secondary); border-radius: var(--r-md);
  margin-top: 8px;
}
.video-preview.hidden { display: none; }
.video-thumb-large {
  width: 60px; height: 44px; background: #e22; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px; flex-shrink: 0;
}
.video-title-large { font-size: 14px; font-weight: 500; }

.note-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--border-light);
}
.share-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.share-toggle input { accent-color: var(--green-500); }
.note-actions { display: flex; gap: 8px; }
.payment-capture-section {
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: var(--bg-secondary);
  margin-bottom: 4px;
}
.payment-capture-header { margin-bottom: 12px; }
.payment-capture-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.payment-capture-fields label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.4px; margin-bottom: 5px;
}
.payment-capture-fields .auth-input,
.payment-capture-fields .select-input { font-size: 14px; }

/* ============================================================ SCHEDULE MODAL */
.schedule-form { display: flex; flex-direction: column; gap: 16px; }
.schedule-form label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.4px; text-transform: uppercase; margin-bottom: 6px; }
.schedule-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.full-width { width: 100%; }
.modal-footer-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }

/* ============================================================ FORM ELEMENTS */
.select-input {
  padding: 8px 12px;
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  background: var(--bg-primary); font-size: 14px; color: var(--text-primary);
  font-family: inherit; box-sizing: border-box;
}
.input-field {
  width: 100%; padding: 9px 12px; box-sizing: border-box;
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  background: var(--bg-primary); font-size: 14px; color: var(--text-primary);
  font-family: inherit;
}
.input-field:focus { outline: none; border-color: var(--green-500); }
.textarea-field {
  width: 100%; padding: 9px 12px; box-sizing: border-box;
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  background: var(--bg-primary); font-size: 14px; color: var(--text-primary);
  font-family: inherit; resize: vertical; min-height: 60px;
}
.textarea-field:focus { outline: none; border-color: var(--green-500); }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.form-error { font-size: 13px; color: var(--danger-text); padding: 8px 12px; background: var(--danger-bg); border-radius: var(--r-md); }
.search-input {
  padding: 8px 14px;
  border: 1px solid var(--border-medium); border-radius: var(--r-md);
  background: var(--bg-primary); font-size: 14px; color: var(--text-primary);
  width: 220px;
}
.search-input:focus, .select-input:focus { outline: none; border-color: var(--green-500); }

/* ============================================================ PLAYER: UPCOMING */
.player-upcoming h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* ============================================================ AI SUMMARY BOX */
.ai-summary-box {
  margin-top: 10px; padding: 12px 14px;
  background: linear-gradient(135deg, var(--green-50), var(--blue-50));
  border: 1px solid var(--green-100); border-radius: var(--r-md);
}
[data-theme="dark"] .ai-summary-box { background: rgba(45,158,79,0.1); border-color: rgba(45,158,79,0.25); }
.ai-summary-label { font-size: 11px; font-weight: 700; color: var(--green-600); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.ai-summary-body  { font-size: 13px; color: var(--text-primary); line-height: 1.6; white-space: pre-line; }

/* ============================================================ DRILL CARDS */
.drill-card {
  padding: 18px 20px; border-bottom: 1px solid var(--border-light);
  transition: opacity 0.2s;
}
.drill-card:last-child { border-bottom: none; }
.drill-card.drill-done { opacity: 0.55; }
.drill-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.drill-title  { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.drill-skill  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.drill-desc   { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.drill-meta   { font-size: 12px; color: var(--text-tertiary); margin-bottom: 8px; }
.drill-status-done { font-size: 12px; font-weight: 700; color: var(--green-600); background: var(--green-100); padding: 4px 10px; border-radius: var(--r-full); white-space: nowrap; }
.drill-video-link { font-size: 13px; font-weight: 600; color: var(--blue-600); text-decoration: none; }
.drill-video-link:hover { text-decoration: underline; }
.drill-badge-self  { font-size: 10px; font-weight: 700; background: var(--blue-100); color: var(--blue-700); padding: 2px 7px; border-radius: var(--r-full); vertical-align: middle; margin-left: 6px; }
.drill-badge-coach { font-size: 10px; font-weight: 700; background: var(--green-100); color: var(--green-700); padding: 2px 7px; border-radius: var(--r-full); vertical-align: middle; margin-left: 6px; }
.plan-list-card { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-light); gap: 12px; }
.plan-list-card:last-child { border-bottom: none; }
.plan-list-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.plan-list-sub  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ============================================================ SKILL DELTAS + FOCUS AREAS */
.skill-delta {
  font-size: 11px; font-weight: 700; padding: 2px 6px;
  border-radius: var(--r-full);
}
.delta-up   { background: var(--green-100); color: var(--green-700); }
.delta-down { background: var(--red-100,#fee2e2); color: var(--red-600); }
.delta-flat { background: var(--bg-secondary); color: var(--text-secondary); }
.focus-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--border-light);
}
.focus-item:last-child { border-bottom: none; }
.focus-left  { flex: 1; min-width: 0; }
.focus-skill { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.focus-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-full); white-space: nowrap; flex-shrink: 0; }

/* ============================================================ LESSON HISTORY */
.history-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--border-light);
}
.history-row:last-child { border-bottom: none; }
.history-date { text-align: center; min-width: 44px; flex-shrink: 0; }
.history-day  { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.history-year { font-size: 11px; color: var(--text-tertiary); }
.history-info { flex: 1; min-width: 0; }
.history-coach { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.history-meta  { font-size: 12px; color: var(--text-secondary); margin-top: 2px; text-transform: capitalize; }
.history-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.history-price { font-size: 14px; font-weight: 600; color: var(--text-primary); }

/* ============================================================ NOTIFICATION BELL + PANEL */
.nav-notif-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  background: none; border: none; border-radius: var(--r-md);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  cursor: pointer; text-align: left; position: relative;
  transition: background 0.15s, color 0.15s;
  margin-top: 4px;
}
.nav-notif-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.notif-badge {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: var(--red-500); color: var(--text-inverse);
  font-size: 10px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
}
.notif-backdrop {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.3);
}
.notif-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 360px; max-width: 100vw;
  background: var(--bg-primary); border-left: 1px solid var(--border-light);
  z-index: 900; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: panel-in 0.2s ease;
}
.notif-panel.hidden { display: none; }
@keyframes panel-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.notif-panel-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.notif-panel-actions { display: flex; align-items: center; gap: 8px; }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background 0.15s;
}
.notif-item:hover { background: var(--bg-secondary); }
.notif-item.unread { background: var(--green-50); }
[data-theme="dark"] .notif-item.unread { background: rgba(45,158,79,0.08); }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-500); flex-shrink: 0; margin-top: 6px;
}
.notif-item.read .notif-dot { background: transparent; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.notif-body  { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.notif-time  { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

/* Booking accept / decline actions inside notification */
.notif-item { align-items: flex-start; cursor: default; }
.notif-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-accept-btn, .notif-decline-btn {
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.notif-accept-btn  { background: var(--green-500); color: var(--text-inverse); }
.notif-decline-btn { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-medium); }
.notif-accept-btn:hover  { opacity: 0.85; }
.notif-decline-btn:hover { background: var(--danger-bg); color: var(--danger-text); border-color: transparent; }
.notif-accept-btn:disabled, .notif-decline-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================ TOAST */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 2000; pointer-events: none;
  max-width: 360px;
}
.toast {
  background: var(--text-primary); color: var(--bg-primary);
  border-radius: var(--r-md); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500;
  pointer-events: auto;
  animation: toast-in 0.25s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: var(--shadow-md);
}
.toast-error   { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.toast-success { background: var(--text-primary); color: var(--bg-primary); }
.toast-info    { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-light); }
.toast-icon  { flex-shrink: 0; font-size: 15px; }
.toast-msg   { flex: 1; }
.toast-close {
  background: none; border: none; padding: 0;
  cursor: pointer; opacity: 0.5; font-size: 18px;
  color: inherit; line-height: 1; flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }
@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================================ SPINNER */
.spinner {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2px solid var(--border-light);
  border-top-color: var(--green-500);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
}
.loading-state {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 32px 16px;
  color: var(--text-secondary); font-size: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Nav SVG icons */
.nav-icon svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============================================================ THEME TOGGLE */
#theme-toggle {
  position: fixed; bottom: 24px; left: 24px;
  background: var(--bg-primary); border: 1px solid var(--border-medium);
  border-radius: 50%; width: 36px; height: 36px;
  font-size: 16px; z-index: 500;
  box-shadow: var(--shadow-sm);
}

/* ============================================================ UTILS */
.hidden { display: none !important; }

/* ============================================================ RESPONSIVE */
@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .portals-grid { grid-template-columns: 1fr; }
  .stats-row, .stats-row.five-col { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .skills-grid { grid-template-columns: 1fr; }
  .earnings-overview { grid-template-columns: repeat(2, 1fr); }
  .phase-goals { grid-template-columns: 1fr; }
  .features-strip { flex-direction: column; }
  .feature-item { border-right: none; border-bottom: 1px solid var(--border-light); }
}

/* ============================================================ MOBILE MENU */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 198;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 199;
}
.sidebar-backdrop.active { display: block; }

@media (max-width: 640px) {
  .mobile-menu-btn { display: flex; }

  .sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100%;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 260px;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 28px rgba(0,0,0,0.35);
  }

  .main-content { margin-left: 0; padding-top: 0; }
  .view { padding: 16px; padding-top: 66px; }
  .hero { padding: 40px 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ============================================================ EMPTY STATES */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 8px;
}
.empty-icon {
  font-size: 36px;
  margin-bottom: 4px;
  opacity: 0.6;
}
.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0;
  line-height: 1.5;
}
.empty-state .btn-primary {
  margin-top: 8px;
}
.empty-inline {
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}


/* ============================================================
   PHASE 4: MARKETPLACE
   ============================================================ */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.pro-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.pro-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: var(--green-400);
}
.pro-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-500);
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pro-card-body { flex: 1; min-width: 0; }
.pro-card-name { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.pro-card-sport { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.pro-card-stars { font-size: 13px; color: var(--amber-500, #f59e0b); margin-top: 4px; }
.pro-card-rating { color: var(--text-secondary); font-size: 12px; }
.pro-card-certs { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pro-card-rate { font-size: 14px; font-weight: 600; color: var(--green-600); white-space: nowrap; }

.search-inline {
  max-width: 200px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

/* Coach profile modal */
.coach-profile-body { padding: 0 4px; }
.coach-profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.coach-modal-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green-500); color: var(--text-inverse);
  font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.coach-modal-meta { display: flex; flex-direction: column; gap: 4px; }
.coach-modal-sport { font-size: 13px; color: var(--text-secondary); }
.coach-modal-rate { font-size: 16px; font-weight: 700; color: var(--green-600); }
.star-display { font-size: 13px; color: var(--text-secondary); }
.coach-modal-bio { font-size: 14px; color: var(--text-primary); line-height: 1.6; margin-bottom: 12px; }
.coach-modal-certs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cert-badge {
  background: var(--green-50, #f0fdf4);
  border: 1px solid var(--green-200, #bbf7d0);
  color: var(--green-700, #15803d);
  border-radius: 100px;
  font-size: 11px;
  padding: 2px 10px;
}
[data-theme="dark"] .cert-badge {
  background: rgba(45,158,79,0.15);
  border-color: rgba(45,158,79,0.3);
  color: var(--green-400);
}


/* ============================================================
   PHASE 4: REVIEWS
   ============================================================ */
.star-picker { display: flex; gap: 4px; margin: 8px 0; }
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 28px; color: var(--border-card);
  padding: 0; line-height: 1;
  transition: color 0.1s, transform 0.1s;
}
.star-btn:hover, .star-btn.active { color: var(--amber-500); transform: scale(1.1); }

.review-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-card);
}
.review-card:last-child { border-bottom: none; }
.review-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.review-stars { color: var(--amber-500); font-size: 14px; }
.review-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.review-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.review-body { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }


/* ============================================================
   PHASE 4: PACKAGES
   ============================================================ */
.package-card {
  padding: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  margin-bottom: 12px;
}
.package-card.package-expired { opacity: 0.6; }
.package-header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.package-name { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.package-price { font-size: 16px; font-weight: 700; color: var(--green-600); }
.package-sessions-left { font-size: 14px; font-weight: 600; color: var(--green-600); }
.package-details { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.package-desc { font-size: 13px; color: var(--text-tertiary); margin-bottom: 8px; }
.package-actions { display: flex; gap: 8px; margin-top: 8px; }

.package-progress-bar {
  height: 6px;
  background: var(--border-card);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.package-progress-fill {
  height: 100%;
  background: var(--green-500);
  border-radius: 3px;
  transition: width 0.3s;
}

.package-summary {
  background: var(--surface-hover);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.view-sub-desc {
  margin: -8px 0 20px;
}
.view-sub-desc p {
  font-size: 13px;
  color: var(--text-secondary);
}


/* ============================================================
   PHASE 4: REFERRALS
   ============================================================ */

.referral-code-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.referral-code-display {
  flex: 1;
  padding: 10px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 13px;
  color: var(--text-primary);
  min-width: 0;
  word-break: break-all;
}
.referral-hint { font-size: 13px; color: var(--text-secondary); margin: 0; }
.referral-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.referral-stat { text-align: center; }
.referral-stat-value { display: block; font-size: 28px; font-weight: 700; color: var(--text-primary); }
.referral-stat-label { font-size: 12px; color: var(--text-muted); }
.referral-event-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-card); font-size: 13px; }
.referral-event-row:last-child { border-bottom: none; }
.referral-event-name { font-weight: 500; color: var(--text-primary); }
.referral-event-date { color: var(--text-muted); }

.btn-primary.small, .btn-ghost.small { padding: 6px 12px; font-size: 13px; }

/* ============================================================
   ONBOARDING CHECKLIST
   ============================================================ */
.onboarding-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.onboarding-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.onboarding-progress-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-tertiary);
  overflow: hidden;
  width: 200px;
}
.onboarding-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.onboarding-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.onboarding-step.done { color: var(--text-muted); text-decoration: line-through; }
.onboarding-step-icon {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.onboarding-step.done .onboarding-step-icon { color: var(--green); }

/* ============================================================
   PLAYER PORTAL — Phase 1
   ============================================================ */

/* --- Player profile chip in sidebar footer --- */
.player-profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: auto;
}
.player-profile-chip:hover { background: var(--bg-sidebar-hover); }
.player-profile-chip .chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  object-fit: cover;
  background: var(--green-500);
  flex-shrink: 0;
}
.player-profile-chip .chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sidebar-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-profile-chip .chip-role {
  font-size: 11px;
  color: var(--text-sidebar);
}

/* --- Today Dashboard --- */
.home-greeting-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.home-greeting-bar h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.home-greeting-bar p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 2px 0 0;
}
.btn-book-hero {
  flex-shrink: 0;
  padding: 10px 20px;
  background: var(--green-500);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-book-hero:hover { background: var(--green-600); }
.btn-book-hero:active { transform: scale(0.97); }

/* Next lesson hero card */
.next-lesson-hero {
  background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
  border-radius: var(--r-xl);
  padding: 24px;
  color: var(--text-inverse);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.next-lesson-hero::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.nlh-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 8px;
}
.nlh-time {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}
.nlh-date { font-size: 14px; opacity: 0.85; margin-bottom: 16px; }
.nlh-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.nlh-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
}
.nlh-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.nlh-btn {
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.nlh-btn:hover { opacity: 0.85; }
.nlh-btn-cancel {
  background: rgba(255,255,255,0.15);
  color: var(--text-inverse);
}

/* Empty hero */
.next-lesson-hero.empty-hero {
  background: none;
  border: 2px dashed var(--border-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 140px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.next-lesson-hero.empty-hero:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}
.empty-hero-icon { font-size: 32px; margin-bottom: 8px; }
.empty-hero-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.empty-hero-sub { font-size: 13px; }

/* ============================================================ QUICK ACTIONS */
.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.qa-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-card, var(--border-light));
  border-radius: var(--r-lg);
  cursor: pointer; transition: background 0.15s, transform 0.1s;
  text-align: center;
}
.qa-btn:hover  { background: var(--bg-hover, var(--bg-secondary)); }
.qa-btn:active { transform: scale(0.96); }
.qa-icon  { font-size: 22px; line-height: 1; }
.qa-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

/* ============================================================ WEEKLY ACTIVITY CARD */
.home-weekly-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-card, var(--border-light));
  border-radius: var(--r-xl);
  padding: 16px;
  margin-bottom: 16px;
}
.hwc-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.hwc-title  { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.hwc-count  { font-size: 12px; color: var(--text-secondary); }
.hwc-progress-track {
  height: 6px; border-radius: 100px;
  background: var(--bg-tertiary, var(--border-light));
  margin-bottom: 14px; overflow: hidden;
}
.hwc-progress-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--green-500), var(--green-400));
  transition: width 0.5s ease;
  width: 0%;
}
.week-dots-row-wrap { margin-top: 4px; }

/* Week activity strip */
.week-activity-card { margin-bottom: 20px; }
.week-activity-card h3 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0 0 12px; }
.week-dots-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}
.week-dot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.wd-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--bg-tertiary);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s;
}
.week-dot.has-session .wd-circle {
  background: var(--green-500);
  border-color: var(--green-500);
  color: var(--text-inverse);
}
.week-dot.today .wd-circle {
  border-color: var(--green-500);
  color: var(--green-500);
  font-weight: 800;
}
.week-dot.today.has-session .wd-circle {
  background: var(--green-600);
  border-color: var(--green-600);
  color: var(--text-inverse);
}
.wd-label {
  font-size: 10px;
  color: var(--text-muted, var(--text-secondary));
  font-weight: 500;
}
.week-dot.today .wd-label { color: var(--green-500); font-weight: 700; }
.week-dot.past-empty .wd-circle { opacity: 0.35; }
.week-dot.has-session .wd-circle { font-size: 13px; }

/* Home stats grid — 2×2 on all sizes */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.home-grid-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-card, var(--border-light));
  border-radius: var(--r-lg);
  padding: 16px 12px;
  text-align: center;
}
.hgc-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.hgc-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================================ PROGRESS SNAPSHOT */
.home-progress-snap {
  display: flex; align-items: stretch;
  background: var(--bg-primary);
  border: 1px solid var(--border-card, var(--border-light));
  border-radius: var(--r-xl);
  margin-bottom: 20px;
  overflow: hidden;
}
.hps-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 14px 8px; gap: 4px;
}
.hps-item-cta { cursor: pointer; transition: background 0.15s; }
.hps-item-cta:hover { background: var(--bg-hover, var(--bg-secondary)); }
.hps-val   { font-size: 20px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.hps-arrow { font-size: 18px; color: var(--green-500); }
.hps-label { font-size: 10px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }
.hps-divider { width: 1px; background: var(--border-light); flex-shrink: 0; margin: 10px 0; }

/* Responsive quick actions — 2×2 on very small screens */
@media (max-width: 380px) {
  .home-quick-actions { grid-template-columns: repeat(2, 1fr); }
}

/* Home latest note */
.home-note-card { margin-bottom: 0; }
.home-note-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-note-link {
  font-size: 13px;
  color: var(--green-500);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.home-note-link:hover { text-decoration: underline; }

/* ============================================================
   PLAYER BOOKING BOTTOM SHEET
   ============================================================ */
.book-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.book-sheet-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.book-sheet {
  background: var(--bg-primary);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0 0 env(safe-area-inset-bottom, 20px);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.book-sheet-overlay.open .book-sheet {
  transform: translateY(0);
}
.book-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-medium);
  border-radius: 2px;
  margin: 12px auto 0;
}
.book-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-light);
}
.book-sheet-header h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}
.book-sheet-close {
  width: 30px;
  height: 30px;
  border-radius: var(--r-full);
  border: none;
  background: var(--bg-tertiary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* Step indicator */
.book-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 16px 20px 0;
}
.bsi-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--bg-tertiary);
  border: 2px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.2s;
  flex-shrink: 0;
}
.bsi-dot.active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: var(--text-inverse);
}
.bsi-dot.done {
  background: var(--green-100);
  border-color: var(--green-500);
  color: var(--green-600);
}
.bsi-line {
  height: 2px;
  width: 40px;
  background: var(--border-medium);
  transition: background 0.2s;
}
.bsi-line.active { background: var(--green-500); }

/* Book panels */
.book-panel { padding: 20px; }

.book-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}
.book-field {
  margin-bottom: 20px;
}
.book-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.book-next-btn { margin-top: 4px; }
.book-confirm-btn { margin-bottom: 12px; }
.book-confirm-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 8px;
}

/* Pill group — alias so both class names work */
.pill-group, .pill-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pill-btn {
  padding: 8px 18px;
  border-radius: var(--r-full);
  border: 2px solid var(--border-medium);
  background: var(--bg-primary);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.pill-btn:hover { border-color: var(--green-500); color: var(--green-500); }
.pill-btn.active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: var(--text-inverse);
}

/* Day picker — .day-scroller is the HTML class, .day-pills-row is the CSS name; both work */
.day-scroller, .day-pills-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin-bottom: 20px;
}
.day-pills-row::-webkit-scrollbar, .day-scroller::-webkit-scrollbar { display: none; }
.day-pill {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  border: 2px solid var(--border-light);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 48px;
}
.day-pill:hover { border-color: var(--green-500); }
.day-pill.active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: var(--text-inverse);
}
.dp-day { font-size: 10px; font-weight: 700; text-transform: uppercase; opacity: 0.7; }
.dp-date { font-size: 16px; font-weight: 800; line-height: 1; }
.day-pill.active .dp-day { opacity: 1; }

/* Time grid */
.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.time-slot-btn {
  padding: 10px 4px;
  border-radius: var(--r-md);
  border: 2px solid var(--border-light);
  background: var(--bg-primary);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.time-slot-btn:hover:not(:disabled) { border-color: var(--green-500); color: var(--green-500); }
.time-slot-btn.active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: var(--text-inverse);
}
.time-slot-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Book confirm card */
.book-confirm-card {
  background: var(--bg-secondary);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 20px;
}
.confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.confirm-row:last-child { border-bottom: none; }
/* Both naming conventions supported */
.confirm-row-label, .confirm-label { color: var(--text-secondary); font-weight: 500; }
.confirm-row-value, .confirm-val  { color: var(--text-primary); font-weight: 600; }

/* Book footer */
.book-footer {
  padding: 0 20px 8px;
  display: flex;
  gap: 10px;
}
.book-footer .btn-primary { flex: 1; }
.book-footer .btn-ghost { flex-shrink: 0; }

/* ============================================================
   SESSION TIMELINE (player schedule)
   ============================================================ */
.timeline-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.timeline-empty-icon { font-size: 36px; margin-bottom: 12px; }
.timeline-empty-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }

.timeline-group { margin-bottom: 28px; }
.timeline-date-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 4px;
}

.session-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-card, var(--border-light));
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
  transition: box-shadow 0.15s;
}
.session-card:hover { box-shadow: var(--shadow-md); }
.session-card.past { opacity: 0.6; }
.session-card.pending-card { border-left: 3px solid var(--amber-500); background: var(--warning-bg); }

.sc-time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 44px;
}
.sc-time {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.sc-ampm {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.sc-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--green-500);
  margin-top: 4px;
}
.session-card.past .sc-dot { background: var(--text-tertiary); }

.sc-body { flex: 1; min-width: 0; }
.sc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.sc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}
.sc-status-badge.scheduled { background: var(--blue-50); color: var(--blue-600); }
.sc-status-badge.completed { background: var(--success-bg); color: var(--success-text); }
.sc-status-badge.cancelled { background: var(--danger-bg); color: var(--danger-text); }
.sc-status-badge.pending { background: var(--warning-bg); color: var(--warning-text); }

.sc-cancel-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-medium);
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.sc-cancel-btn:hover { border-color: var(--red-500); color: var(--red-500); }

/* ============================================================
   PLAYER PROFILE VIEW
   ============================================================ */
.profile-big-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}
.profile-big-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--r-full);
  object-fit: cover;
  background: var(--green-500);
  border: 3px solid var(--border-light);
}
.profile-big-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.profile-big-sport {
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-stats-row {
  display: flex;
  gap: 1px;
  background: var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  background: var(--bg-primary);
  gap: 2px;
}
.ps-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}
.ps-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

/* Coach chip in profile */
.coach-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  margin-bottom: 4px;
}
.coach-chip-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--green-100);
  object-fit: cover;
  flex-shrink: 0;
}
.coach-chip-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.coach-chip-sport {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Achievements */
.achieve-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.achieve-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
}
.achieve-badge.earned { border-color: var(--green-500); background: var(--green-50); }
.ab-icon { font-size: 22px; flex-shrink: 0; }
.ab-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.ab-desc { font-size: 11px; color: var(--text-secondary); }
.achieve-badge:not(.earned) .ab-name,
.achieve-badge:not(.earned) .ab-desc { opacity: 0.5; }

/* Dark mode overrides */
[data-theme="dark"] .next-lesson-hero.empty-hero {
  border-color: var(--border-medium);
}
[data-theme="dark"] .next-lesson-hero.empty-hero:hover {
  background: rgba(45, 158, 79, 0.08);
}
[data-theme="dark"] .book-sheet {
  background: var(--bg-secondary);
}
[data-theme="dark"] .book-confirm-card {
  background: var(--bg-tertiary);
}
[data-theme="dark"] .session-card {
  background: var(--bg-secondary);
}
[data-theme="dark"] .profile-stat {
  background: var(--bg-secondary);
}
[data-theme="dark"] .coach-chip,
[data-theme="dark"] .achieve-badge {
  background: var(--bg-tertiary);
}

@media (max-width: 480px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .home-grid-card { padding: 12px 8px; }
  .hgc-value { font-size: 22px; }
  .time-grid { grid-template-columns: repeat(3, 1fr); }
  .achieve-grid { grid-template-columns: 1fr; }
  .nlh-time { font-size: 22px; }
}

/* ============================================================
   PRO PROFILE — Avatar Upload
   ============================================================ */
.profile-avatar-upload-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 4px;
  margin-bottom: 12px;
}
.profile-upload-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--r-full);
  background: var(--green-500);
  border: 3px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-inverse);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.profile-upload-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
}
.upload-label {
  cursor: pointer;
  display: inline-block;
}
.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  object-fit: cover;
}

/* Pro card avatar photo */
.pro-card-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: var(--r-full);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
}

/* Location tag on pro cards */
.pro-card-location {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Status badge on pro cards */
.pro-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}
.pro-status-badge.open {
  background: var(--success-bg);
  color: var(--success-text);
}
.pro-status-badge.full {
  background: var(--warning-bg);
  color: var(--warning-text);
}

/* Marketplace filters row */
.marketplace-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.marketplace-filters .search-input,
.marketplace-filters .select-input {
  flex: 1;
  min-width: 140px;
}

/* Hiring filter bar */
.hiring-filter-bar {
  margin-bottom: 20px;
}
.hiring-filter-bar .search-input {
  width: 100%;
  max-width: 380px;
}

/* ============================================================
   SETTINGS VIEW
   ============================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) {
  .settings-grid { grid-template-columns: 1fr; }
}
.settings-section {
  padding: 4px 0;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.settings-row-sub {
  font-size: 12px;
  color: var(--text-secondary);
}
.danger-label { color: var(--red-600); }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-knob {
  position: absolute;
  inset: 0;
  background: var(--border-medium);
  border-radius: var(--r-full);
  transition: background 0.2s;
}
.toggle-knob::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: var(--r-full);
  background: var(--bg-primary);
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-knob { background: var(--green-500); }
.toggle-switch input:checked + .toggle-knob::before { transform: translateX(20px); }

/* Danger button */
.btn-danger {
  padding: 8px 16px;
  border: none;
  border-radius: var(--r-md);
  background: var(--red-500);
  color: var(--text-inverse);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: var(--red-600); }
.btn-danger.small { padding: 6px 12px; font-size: 13px; }

/* ============================================================
   PRO FORUM
   ============================================================ */
.forum-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.forum-cat-btn {
  padding: 6px 14px;
  border-radius: var(--r-full);
  border: 2px solid var(--border-medium);
  background: var(--bg-primary);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.forum-cat-btn:hover { border-color: var(--green-500); color: var(--green-500); }
.forum-cat-btn.active { background: var(--green-500); border-color: var(--green-500); color: var(--text-inverse); }

.forum-post-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-card, var(--border-light));
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.forum-post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green-500);
}
.fpc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.forum-cat-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.forum-pinned-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber-500);
}
.fpc-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-secondary);
}
.fpc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.fpc-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}
.fpc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}
.fpc-stats { font-weight: 600; }

.forum-comment {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.forum-comment:last-child { border-bottom: none; }
.fc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.fc-author { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.fc-time   { font-size: 12px; color: var(--text-secondary); margin-left: auto; }
.fc-body   { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.comment-compose {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* Dark mode overrides */
[data-theme="dark"] .forum-post-card { background: var(--bg-secondary); }
[data-theme="dark"] .toggle-knob::before { background: var(--bg-tertiary); }

/* ============================================================
   MARKETPLACE SMART SEARCH
   ============================================================ */
.marketplace-search-wrap {
  position: relative;
  flex: 1;
}
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 150;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}
.search-suggestions.visible { display: block; }
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--bg-secondary); }
.sug-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green-500);
  color: var(--text-inverse);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.sug-avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.sug-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.sug-meta { font-size: 12px; color: var(--text-secondary); }
.sug-rate { font-size: 12px; font-weight: 600; color: var(--green-600); margin-left: auto; }
.suggestion-header {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-secondary);
}
[data-theme="dark"] .search-suggestions { background: var(--bg-sidebar-hover); border-color: var(--bg-sidebar-active); }
[data-theme="dark"] .suggestion-item:hover { background: var(--bg-sidebar-active); }

/* ============================================================
   PLAYER PORTAL ENHANCEMENTS
   ============================================================ */

/* Global child-view banner — fixed at bottom so it never overlaps content */
.global-child-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--amber-500);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 300;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}
.global-child-banner.hidden { display: none; }
.global-child-banner .btn-ghost { background: rgba(0,0,0,0.12); color: #000; border-color: transparent; }

/* Booking — coach picker */
.book-coach-results {
  margin-top: 6px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
}
.book-coach-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
.book-coach-option:last-child { border-bottom: none; }
.book-coach-option:hover { background: var(--bg-secondary); }
.bco-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green-500);
  color: var(--text-inverse);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.bco-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.bco-meta { font-size: 12px; color: var(--text-secondary); }
.book-selected-coach {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-700);
}
[data-theme="dark"] .book-selected-coach { background: var(--bg-sidebar-hover); border-color: var(--green-700); color: var(--green-100); }

/* Marketplace — book-with button */
.pro-card-book-btn {
  margin-top: 8px;
  display: block;
  width: 100%;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--green-500);
  background: transparent;
  color: var(--green-600);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pro-card-book-btn:hover { background: var(--green-500); color: var(--text-inverse); }

/* Linked players list in settings */
.linked-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.linked-player-item:last-child { border-bottom: none; }
.lpi-info { display: flex; align-items: center; gap: 10px; }
.lpi-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue-500);
  color: var(--text-inverse);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.lpi-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.lpi-meta { font-size: 12px; color: var(--text-muted); }
.lpi-actions { display: flex; gap: 6px; }

/* Community board search bar */
#community-search { width: 100%; box-sizing: border-box; }

@media (max-width: 640px) {
  .global-child-banner { padding: 10px 14px; }
}

/* ============================================================ SMART REMINDERS */
.smart-reminder {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  margin-bottom: 16px; cursor: pointer;
  transition: opacity 0.15s;
}
.smart-reminder:hover { opacity: 0.85; }
.reminder-icon { font-size: 22px; flex-shrink: 0; }
.reminder-body { flex: 1; min-width: 0; }
.reminder-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.reminder-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.reminder-cta   { font-size: 13px; font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.reminder-note        { background: var(--blue-50); border: 1px solid var(--blue-100); }
.reminder-note .reminder-cta { color: var(--blue-600); }
.reminder-streak-risk { background: var(--warning-bg); border: 1px solid var(--warning-border); }
.reminder-streak-risk .reminder-cta { color: var(--amber-500); }
.reminder-book        { background: var(--success-bg); border: 1px solid var(--success-border); }
.reminder-book .reminder-cta { color: var(--green-600); }
.reminder-encourage   { background: var(--bg-secondary); border: 1px solid var(--border-light); }
.reminder-encourage .reminder-cta { color: var(--text-secondary); }

/* ============================================================ SKILL SPARKLINE */
.skill-spark { vertical-align: middle; flex-shrink: 0; }

/* ============================================================ HISTORY STATS BAR */
.history-stats-bar {
  display: flex; gap: 0;
  background: var(--bg-primary); border: 1px solid var(--border-light);
  border-radius: 12px; margin-bottom: 16px; overflow: hidden;
}
.hstat-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 16px 12px; border-right: 1px solid var(--border-light);
}
.hstat-item:last-child { border-right: none; }
.hstat-val   { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; color: var(--text-primary); }
.hstat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; font-weight: 500; }

/* ============================================================ FAVORITES VIEW */
.fav-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--bg-primary);
  border: 1px solid var(--border-light); border-radius: 12px;
  margin-bottom: 12px;
}
.fav-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--green-500); color: var(--text-inverse);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.fav-avatar-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fav-body  { flex: 1; min-width: 0; }
.fav-name  { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.fav-meta  { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.fav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ============================================================ FAVORITE HEART BUTTON */
.fav-heart-btn {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--text-tertiary); padding: 4px; line-height: 1;
  transition: color 0.15s, transform 0.1s;
}
.fav-heart-btn:hover         { transform: scale(1.15); color: var(--red-500); }
.fav-heart-btn.fav-active    { color: var(--red-500); }

/* Fav heart position inside pro card */
.pro-card-right {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 8px; flex-shrink: 0;
}
.pro-card-rate { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }

/* ============================================================ SET AS MY COACH */
.your-coach-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  color: var(--green-700, #15803d); background: var(--green-50, #f0fdf4);
  border: 1px solid var(--green-200, #bbf7d0);
  border-radius: 100px; padding: 2px 8px; margin-bottom: 4px;
}
.my-coach-card {
  border: 1.5px solid var(--green-300, #86efac);
  background: var(--green-50, #f0fdf4);
}
.btn-outline {
  padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, color 0.15s;
  background: transparent; color: var(--green-600, #16a34a);
  border: 1.5px solid var(--green-500, #22c55e);
}
.btn-outline:hover  { background: var(--green-50, #f0fdf4); }
.btn-outline:active { background: var(--green-100, #dcfce7); }

@media (max-width: 600px) {
  .history-stats-bar { flex-wrap: wrap; }
  .hstat-item { flex: 1 1 50%; border-bottom: 1px solid var(--border-light); }
  .hstat-item:nth-child(n+3) { border-bottom: none; }
  .hstat-item:nth-child(even) { border-right: none; }
  .fav-card { flex-wrap: wrap; }
}

/* ============================================================ GOAL COMPLETION */
.goal-check-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 6px 0 0;
  color: var(--text-tertiary); transition: color 0.15s;
  flex-shrink: 0;
}
.goal-item { display: flex; align-items: flex-start; gap: 4px; }
.goal-text  { flex: 1; }
.done-goal .goal-check-btn { color: var(--green-500); }
.done-goal .goal-text      { text-decoration: line-through; color: var(--text-tertiary); }

/* ============================================================ SKELETON LOADING */
@keyframes skeleton-pulse {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease infinite;
  border-radius: 6px;
}
.skeleton-card {
  width: 100%; border-radius: 12px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease infinite;
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.short  { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long   { width: 90%; }

/* ============================================================ BILLING UI */
.billing-section { display: flex; flex-direction: column; gap: 12px; }

.billing-tier-badge {
  font-size: 18px; font-weight: 700; letter-spacing: -0.3px;
}

.billing-promo-notice {
  font-size: 13px; color: var(--green-700);
  background: var(--green-50, #f0fdf4); border: 1px solid var(--green-200, #bbf7d0);
  border-radius: 8px; padding: 8px 12px;
}
[data-theme="dark"] .billing-promo-notice {
  background: rgba(45,158,79,0.12); border-color: rgba(45,158,79,0.3); color: var(--green-400, #4ade80);
}

.billing-renewal { font-size: 13px; color: var(--text-secondary); }

.billing-warning {
  font-size: 13px; color: var(--error); background: var(--error-bg);
  border-radius: 8px; padding: 8px 12px;
}
.billing-canceled { font-size: 13px; color: var(--text-muted); }

.billing-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.feature-table { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: 4px; }
.feature-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: none; }
.feature-inactive { color: var(--text-tertiary); }
.feature-name { flex: 1; }
.feature-value { font-weight: 600; min-width: 60px; text-align: right; }
.feature-yes { color: var(--green-600, #16a34a); }
[data-theme="dark"] .feature-yes { color: var(--green-400, #4ade80); }

/* ── Upgrade modal ──────────────────────────────────────────── */
.upgrade-modal {
  max-width: 540px; text-align: center;
  padding: 32px 24px 24px;
}
.upgrade-icon { font-size: 32px; margin-bottom: 8px; }
.upgrade-modal h2 { font-size: 20px; margin: 0 0 8px; }
.upgrade-message { color: var(--text-secondary); font-size: 14px; margin: 0 0 20px; }

.upgrade-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 480px) { .upgrade-options { grid-template-columns: 1fr; } }

.upgrade-card {
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 16px 14px; text-align: left; position: relative;
}
.upgrade-featured {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,158,79,0.12);
}
.upgrade-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: var(--text-inverse); font-size: 10px; font-weight: 700;
  padding: 2px 10px; border-radius: 20px; white-space: nowrap; letter-spacing: 0.5px;
}
.upgrade-card h3 { font-size: 15px; margin: 0 0 6px; }
.upgrade-price { font-size: 24px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.upgrade-price span { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.upgrade-features {
  list-style: none; padding: 0; margin: 0 0 14px;
  font-size: 12px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 4px;
}
.upgrade-features li::before { content: '✓ '; color: var(--green); font-weight: 700; }
.upgrade-card .btn-primary { width: 100%; font-size: 13px; }

.promo-entry {
  display: flex; gap: 8px; max-width: 340px; margin: 0 auto 12px;
}
.promo-entry input {
  flex: 1; height: 38px; padding: 0 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg-primary); color: var(--text-primary);
  font-size: 13px; font-family: inherit;
}
.promo-entry input:focus { border-color: var(--green); outline: none; }
.promo-entry .btn-secondary { height: 38px; padding: 0 14px; font-size: 13px; white-space: nowrap; }

.upgrade-dismiss { font-size: 13px; color: var(--text-muted); display: block; margin: 0 auto; }

/* ── Promo success overlay ──────────────────────────────────── */
.promo-success-content {
  text-align: center; padding: 40px 32px; max-width: 440px;
}
.promo-success-icon { font-size: 64px; margin-bottom: 16px; display: block; }
.promo-success-tier {
  font-size: 18px; font-weight: 700; color: var(--green); margin-bottom: 8px;
}
.promo-success-date { font-size: 16px; margin-bottom: 16px; color: var(--text-primary); }
.promo-success-features {
  font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.6;
}
.promo-success-note { font-size: 12px; color: var(--text-secondary); margin-top: 14px; }

/* ── Promo onboarding banner ────────────────────────────────── */
.promo-onboarding-banner {
  background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.08));
  border: 1px solid rgba(102,126,234,0.25);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
}
.promo-banner-text {
  flex: 1; font-size: 14px; min-width: 180px; color: var(--text-primary); line-height: 1.5;
}
.promo-banner-input-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.promo-banner-input-row input {
  width: 148px; padding: 8px 10px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; letter-spacing: 1px; font-weight: 600;
  background: var(--bg-primary); color: var(--text-primary);
  font-family: inherit;
}
.promo-banner-input-row input:focus { border-color: var(--green); outline: none; }
.promo-banner-input-row input.input-error { border-color: var(--error, #ef4444); }

/* ── Inline promo error ─────────────────────────────────────── */
.promo-input-error {
  color: var(--error, #ef4444); font-size: 12px; margin-top: 4px; display: none; line-height: 1.4;
}
.promo-input-error.visible { display: block; }

/* ── Promo entry in upgrade modal ───────────────────────────── */
.promo-entry { margin-top: 16px; }
.promo-entry-label {
  font-size: 12px; color: var(--text-secondary); margin: 0 0 8px; text-align: center;
}
.promo-entry-row { display: flex; gap: 8px; justify-content: center; }
.promo-entry-row input {
  width: 180px; height: 38px; padding: 0 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg-primary); color: var(--text-primary);
  font-size: 13px; font-family: inherit; letter-spacing: 1px; font-weight: 600;
}
.promo-entry-row input:focus { border-color: var(--green); outline: none; }
.promo-entry-row input.input-error { border-color: var(--error, #ef4444); }
.promo-entry-row .btn-secondary { height: 38px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
#promo-modal-error { text-align: center; margin-top: 6px; }

/* ── Expiry reminder banner ─────────────────────────────────── */
.expiry-banner {
  background: var(--warning-bg); border: 1px solid rgba(245,158,11,0.4);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; display: none;
}
[data-theme="dark"] .expiry-banner {
  border-color: rgba(245,158,11,0.35);
}
.expiry-banner-content { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.expiry-icon { font-size: 20px; flex-shrink: 0; }
.expiry-text {
  flex: 1; font-size: 13px; color: var(--warning-text); min-width: 200px; line-height: 1.5;
}

/* ── Billing promo active state card ────────────────────────── */
.billing-promo-card {
  background: var(--green-50, #f0fdf4);
  border: 1.5px solid var(--green-200, #bbf7d0);
  border-radius: 12px; padding: 18px 16px;
}
[data-theme="dark"] .billing-promo-card {
  background: rgba(45,158,79,0.1); border-color: rgba(45,158,79,0.3);
}
.billing-promo-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; color: var(--green-700, #15803d); margin-bottom: 8px;
}
[data-theme="dark"] .billing-promo-header { color: var(--green-400, #4ade80); }
.billing-promo-date { font-size: 15px; margin-bottom: 10px; color: var(--text-primary); }
.billing-promo-body { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; line-height: 1.5; }
.billing-setup-note { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* ── Collapsible promo entry in billing section ─────────────── */
.billing-promo-toggle { margin-top: 12px; }

/* ── Admin promo table ──────────────────────────────────────── */
.admin-section-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.admin-section-header h3 { margin: 0; font-size: 15px; }
.promo-codes-table { display: flex; flex-direction: column; gap: 8px; }
.promo-code-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-primary); flex-wrap: wrap;
  transition: opacity 0.2s;
}
.promo-inactive { opacity: 0.45; }
.promo-code-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.promo-code-text {
  font-family: monospace; font-size: 15px; font-weight: 700;
  letter-spacing: 1.5px; color: var(--green);
}
.promo-type-badge {
  font-size: 11px; background: var(--bg-tertiary);
  color: var(--text-secondary); padding: 2px 8px; border-radius: 10px;
}
.pro-badge {
  font-size: 11px; background: rgba(139,92,246,0.12);
  color: var(--purple-500); padding: 2px 8px; border-radius: 10px; font-weight: 700;
}
.solo-badge {
  font-size: 11px; background: rgba(59,130,246,0.12);
  color: var(--blue-500); padding: 2px 8px; border-radius: 10px; font-weight: 700;
}
.inactive-badge {
  font-size: 11px; background: var(--red-100); color: var(--red-600);
  padding: 2px 8px; border-radius: 10px; font-weight: 600;
}
.promo-code-stats {
  display: flex; gap: 14px; font-size: 12px; color: var(--text-secondary); flex-wrap: wrap;
}
.promo-code-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.form-hint { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ============================================================ AVATAR */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 24px;  height: 24px;  font-size: 10px; }
.avatar-md { width: 32px;  height: 32px;  font-size: 12px; }
.avatar-lg { width: 40px;  height: 40px;  font-size: 14px; }
.avatar-xl { width: 56px;  height: 56px;  font-size: 18px; }
.avatar-initial {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-100); color: var(--green-700);
  font-weight: 700; letter-spacing: 0.5px;
}
[data-theme="dark"] .avatar-initial { background: var(--bg-sidebar-hover); color: var(--text-sidebar-active); }

/* ============================================================ MESSAGE THREAD */
.msg-thread-box {
  display: flex; flex-direction: column;
  max-width: 560px; height: 70vh; max-height: 640px; padding: 0;
}
.msg-thread-box .modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border-light); flex-shrink: 0;
}
.msg-thread-body {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.msg-empty { text-align: center; padding: 24px 0; }
.msg-thread-compose {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 12px 16px; border-top: 1px solid var(--border-light); flex-shrink: 0;
}
.msg-input {
  flex: 1; resize: none; border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 8px 12px;
  font-family: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--bg-primary); line-height: 1.5;
}
.msg-input:focus { outline: none; border-color: var(--green-500); }
.msg-send-btn { align-self: flex-end; flex-shrink: 0; }
.msg-bubble-wrap { display: flex; justify-content: flex-start; }
.msg-bubble-wrap.self { justify-content: flex-end; }
.msg-bubble {
  max-width: 72%; background: var(--bg-secondary);
  border-radius: 16px 16px 16px 4px;
  padding: 8px 12px;
}
.msg-bubble.msg-self {
  background: var(--green-500); color: var(--text-inverse);
  border-radius: 16px 16px 4px 16px;
}
.msg-body { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg-time { font-size: 11px; opacity: 0.6; margin-top: 3px; }
.msg-bubble.msg-self .msg-time { text-align: right; }
[data-theme="dark"] .msg-input { background: var(--bg-secondary); }
