/* ============================================================
   AURON — Global Styles
   Design: Premium dark, gold accent, Inter typeface
   ============================================================ */

:root {
  --bg:       #0B0B0B;
  --surface:  #111111;
  --surface2: #161616;
  --border:   #222222;
  --gold:     #D4AF37;
  --gold-dim: #a88a2a;
  --white:    #F8F8F8;
  --muted:    #666666;
  --danger:   #e55353;
  --warn:     #f59e0b;
  --success:  #22c55e;
  --sidebar-w: 240px;
  --radius:   12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-dim); }
input,select,textarea,button { font-family: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Logo ── */
.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
}

/* ════════════════════════════════════════════
   LAYOUT — Sidebar + Main + Bottom Nav
   ════════════════════════════════════════════ */

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 1.5rem 0;
}

.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 0.75rem; }

.sidebar-footer { padding: 1rem 0.75rem; border-top: 1px solid var(--border); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 2px;
  cursor: pointer;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { color: var(--white); background: var(--surface2); }
.nav-item.active { color: var(--gold); background: rgba(212,175,55,0.08); }
.logout-btn:hover { color: var(--danger); }

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 2rem;
  max-width: 900px;
}

.bottom-nav { display: none; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 1rem 1rem 6rem; }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
  }
  .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.25rem 0;
    transition: color 0.15s;
  }
  .bn-item svg { width: 20px; height: 20px; }
  .bn-item.active { color: var(--gold); }
  .bn-item span { display: block; }
}

/* ════════════════════════════════════════════
   COMPONENTS
   ════════════════════════════════════════════ */

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: #333; }
.card-warn { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.04); }
.card-title { font-size: 0.875rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.link-sm { font-size: 0.8rem; color: var(--gold); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-dim); color: #000; }
.btn-ghost { background: var(--surface2); color: var(--white); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: #444; }
.btn-outline { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }
.btn-outline:hover { background: rgba(212,175,55,0.08); }
.btn-danger { background: rgba(229,83,83,0.15); color: var(--danger); border: 1px solid rgba(229,83,83,0.3); }
.btn-danger:hover { background: rgba(229,83,83,0.25); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); }
.form-group input[type="file"] { cursor: pointer; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-full { grid-column: 1 / -1; }
.form-row-space { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.form-hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; display: block; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; cursor: pointer; color: var(--white); }
.checkbox-label input { width: auto; }
.checkbox-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 200px; overflow-y: auto; }

/* ── Modal ── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card h3 { margin-bottom: 1.25rem; font-size: 1.1rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ── Page Header ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.page-title { font-size: 1.6rem; font-weight: 800; }
.page-sub { color: var(--muted); font-size: 0.875rem; margin-top: 0.2rem; }
.section-title { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 1.25rem; right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideIn 0.2s ease;
  max-width: 300px;
}
.toast-success { border-color: var(--success); color: var(--success); }
.toast-error   { border-color: var(--danger);  color: var(--danger); }
.toast-info    { border-color: var(--gold);    color: var(--gold); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ── Progress Bars ── */
.progress-bar-wrap {
  background: var(--surface2);
  border-radius: 999px;
  height: 6px;
  margin: 0.5rem 0;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.5s ease;
  min-width: 2px;
}

/* ── Rank Badges ── */
.rank-badge, .header-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.rank-elite  { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid var(--gold); }
.rank-gold   { background: rgba(212,175,55,0.1);  color: #c9a227; border: 1px solid #c9a227; }
.rank-silver { background: rgba(192,192,192,0.1); color: #c0c0c0; border: 1px solid #c0c0c0; }
.rank-bronze { background: rgba(205,127,50,0.1);  color: #cd7f32; border: 1px solid #cd7f32; }
.rank-iron   { background: rgba(100,100,100,0.1); color: #888;    border: 1px solid #555; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--white); margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.5rem; }

/* ── Quick Buttons ── */
.quick-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.stat-big   { display: block; font-size: 1.75rem; font-weight: 800; }
.stat-small { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-warn  { color: var(--warn); }

/* ── Filter Row ── */
.filter-row { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  background: transparent;
  transition: all 0.15s;
}
.filter-btn.active { background: var(--gold); color: #000; border-color: var(--gold); }

/* ════════════════════════════════════════════
   LANDING PAGE
   ════════════════════════════════════════════ */

.landing { min-height: 100vh; display: flex; flex-direction: column; }

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
}
.landing-nav-links { display: flex; gap: 0.75rem; align-items: center; }

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(212,175,55,0.1);
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.3);
  padding: 0.3rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.gold { color: var(--gold); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.feature-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

.landing-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.landing-footer .logo-text { display: block; margin-bottom: 0.5rem; }

/* ════════════════════════════════════════════
   AUTH PAGES
   ════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}
.auth-card-wide { max-width: 640px; }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-title { text-align: center; font-size: 1.4rem; margin-bottom: 0.3rem; }
.auth-sub { text-align: center; color: var(--muted); font-size: 0.875rem; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 1.25rem; }
.forgot-link { font-size: 0.8rem; color: var(--gold); }

.role-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 1.5rem;
}
.role-btn {
  flex: 1;
  padding: 0.5rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.role-btn.active { background: var(--gold); color: #000; }

/* ════════════════════════════════════════════
   USER DASHBOARD
   ════════════════════════════════════════════ */

.score-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.score-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.score-ring { transform: rotate(-90deg); }
.score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-number { font-size: 2rem; font-weight: 800; line-height: 1; }
.score-label  { font-size: 0.65rem; color: var(--muted); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.score-stats { display: flex; align-items: center; gap: 1.5rem; }
.stat-item { text-align: center; }
.stat-value { display: block; font-size: 1.5rem; font-weight: 800; }
.stat-label { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color 0.2s;
}
.goal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.goal-icon  { font-size: 1.25rem; }
.goal-name  { flex: 1; font-weight: 600; font-size: 0.9rem; }
.goal-pts   { font-size: 0.7rem; color: var(--gold); font-weight: 700; background: rgba(212,175,55,0.1); padding: 0.15rem 0.5rem; border-radius: 999px; }
.goal-status { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.goal-status.done { color: var(--success); }
.goal-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.5rem; }

/* ════════════════════════════════════════════
   WORKOUTS
   ════════════════════════════════════════════ */

.workout-card { margin-bottom: 0.75rem; }
.workout-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.workout-name { font-size: 1rem; font-weight: 700; }
.workout-date { font-size: 0.78rem; color: var(--muted); }
.workout-volume { text-align: right; }
.volume-num   { display: block; font-size: 1.25rem; font-weight: 800; color: var(--gold); }
.volume-label { font-size: 0.7rem; color: var(--muted); }
.exercise-list { margin-bottom: 0.75rem; }
.exercise-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.ex-name   { font-weight: 500; }
.ex-detail { color: var(--muted); }
.workout-notes { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; font-style: italic; }

/* ════════════════════════════════════════════
   NUTRITION
   ════════════════════════════════════════════ */

.macro-row { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }
.macro-item { text-align: center; }
.macro-circle { position: relative; width: 90px; height: 90px; margin: 0 auto 0.5rem; }
.macro-circle svg { transform: rotate(-90deg); }
.macro-center {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.macro-val  { font-size: 0.9rem; font-weight: 700; }
.macro-circle-plain { width: 90px; height: 90px; border-radius: 50%; border: 5px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 0.5rem; }
.macro-big  { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.macro-unit { font-size: 0.65rem; color: var(--muted); }
.macro-label { display: block; font-size: 0.8rem; font-weight: 600; }
.macro-goal  { display: block; font-size: 0.72rem; color: var(--muted); }

.meal-row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.meal-time { font-size: 0.72rem; color: var(--muted); display: block; }
.meal-notes { font-size: 0.875rem; }
.meal-protein { font-weight: 600; color: var(--gold); }
.meal-cals    { font-size: 0.78rem; color: var(--muted); }
.history-row { display: flex; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.history-date { color: var(--muted); min-width: 90px; }
.history-val  { flex: 1; }
.history-cals { color: var(--muted); }

/* ════════════════════════════════════════════
   TIMELINE
   ════════════════════════════════════════════ */

.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content:''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 1.25rem;
  width: 14px; height: 14px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--bg);
}
.timeline-date { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.5rem; font-weight: 600; }
.timeline-photo { width: 100%; max-height: 250px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 0.75rem; }
.metrics-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.metric { background: var(--surface2); border-radius: var(--radius-sm); padding: 0.4rem 0.75rem; text-align: center; }
.metric-val { display: block; font-size: 1rem; font-weight: 700; color: var(--gold); }
.metric-lbl { font-size: 0.65rem; color: var(--muted); }
.timeline-notes { font-size: 0.85rem; color: var(--muted); font-style: italic; }

/* ════════════════════════════════════════════
   LEADERBOARD
   ════════════════════════════════════════════ */

.leaderboard { display: flex; flex-direction: column; gap: 0.5rem; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  transition: border-color 0.15s;
}
.lb-row:hover { border-color: #333; }
.lb-top { border-color: rgba(212,175,55,0.3); }
.lb-rank { font-size: 1.1rem; min-width: 2rem; text-align: center; font-weight: 700; }
.lb-avatar img, .lb-avatar .avatar-placeholder { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-placeholder {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  color: var(--gold);
}
.lb-info { flex: 1; }
.lb-name  { display: block; font-weight: 600; font-size: 0.9rem; }
.lb-sub   { display: block; font-size: 0.75rem; color: var(--muted); }
.lb-score { text-align: right; }
.lb-score-num   { display: block; font-size: 1.25rem; font-weight: 800; color: var(--gold); }
.lb-score-label { font-size: 0.65rem; color: var(--muted); }

/* ════════════════════════════════════════════
   PROFILE
   ════════════════════════════════════════════ */

.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.avatar-large {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; font-weight: 800; color: var(--gold);
  flex-shrink: 0;
}
.profile-name { font-size: 1.25rem; font-weight: 800; }
.profile-goal { font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0.5rem; }

/* ════════════════════════════════════════════
   TRAINER
   ════════════════════════════════════════════ */

.client-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.client-row:last-child { border-bottom: none; }
.client-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: var(--gold);
  flex-shrink: 0;
}
.client-info { flex: 1; }
.client-name { display: block; font-weight: 600; font-size: 0.9rem; }
.client-score { display: block; font-size: 0.75rem; color: var(--muted); }
.score-low { color: var(--danger); }
.client-rank { font-size: 0.72rem; }

.client-card { margin-bottom: 0.75rem; }
.client-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.client-avatar-lg {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: var(--gold); flex-shrink: 0;
}
.client-card-info { flex: 1; }
.client-name-lg { font-size: 1rem; font-weight: 700; }
.client-score-circle {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: var(--gold);
}
.compliance-bars { margin-bottom: 0.75rem; }
.comp-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; }
.comp-label { font-size: 0.75rem; color: var(--muted); min-width: 55px; }
.comp-bar { flex: 1; height: 5px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
.comp-bar div { height: 100%; background: var(--gold); border-radius: 999px; transition: width 0.5s ease; }
.comp-pct { font-size: 0.72rem; color: var(--muted); min-width: 32px; text-align: right; }
.client-card-footer { display: flex; justify-content: space-between; align-items: center; }
.streak-tag { font-size: 0.78rem; color: var(--muted); }
.client-actions { display: flex; gap: 0.5rem; }

.back-btn { font-size: 0.85rem; color: var(--muted); display: inline-block; margin-bottom: 0.5rem; }
.back-btn:hover { color: var(--white); }

.message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.5rem;
}
.msg-unread { border-color: rgba(212,175,55,0.3); }
.msg-recipient { font-size: 0.75rem; color: var(--gold); margin-bottom: 0.4rem; }
.msg-content   { font-size: 0.9rem; margin-bottom: 0.4rem; }
.msg-time      { font-size: 0.72rem; color: var(--muted); }

.program-card { margin-bottom: 0.75rem; }
.program-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.program-name  { font-size: 1rem; font-weight: 700; }
.program-desc  { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; }
.program-meta  { font-size: 0.75rem; color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.photo-item { position: relative; }
.photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.photo-date { position: absolute; bottom: 4px; left: 4px; font-size: 0.65rem; color: var(--white); background: rgba(0,0,0,0.6); padding: 1px 4px; border-radius: 3px; }

/* ════════════════════════════════════════════
   UTILITIES
   ════════════════════════════════════════════ */

.text-muted { color: var(--muted); font-size: 0.875rem; }

/* ── Mobile Responsive ── */
@media (max-width: 480px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .stat-big { font-size: 1.25rem; }
  .score-section { flex-direction: column; text-align: center; }
  .hero-title { font-size: 2rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .goals-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════
   AVATAR UPLOAD — Profile Page
   ════════════════════════════════════════════ */

.profile-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.avatar-upload-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}

/* ── Ring around avatar ── */
.avatar-ring {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  /* Gold gradient ring */
  background: conic-gradient(var(--gold) 0%, var(--gold-dim) 50%, #3a3118 100%);
  padding: 3px;
  cursor: pointer;
  transition: transform .2s;
}
.avatar-ring:hover { transform: scale(1.04); }
.avatar-ring.avatar-uploading { animation: spinRing 1s linear infinite; }

@keyframes spinRing {
  to { background-position-x: 100%; }
}

/* ── Actual image or initials inside ring ── */
.avatar-img,
.avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--bg);       /* tiny gap between image and gold ring */
}

.avatar-img {
  object-fit: cover;
  display: block;
}

.avatar-initials {
  background: #1e1e1e;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .02em;
}

/* ── Camera overlay (label triggers file input) ── */
.avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  color: transparent;
  cursor: pointer;
  transition: background .18s, color .18s;
  stroke: white;
}
.avatar-overlay svg {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.avatar-ring:hover .avatar-overlay {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}

/* ── Text below avatar ── */
.avatar-meta { margin-top: .75rem; }
.profile-name  { font-size: 1.3rem; font-weight: 800; }
.profile-email { font-size: .8rem; color: var(--muted); display: block; margin-top: .15rem; }

/* ── Remove photo button ── */
.btn-text-danger {
  background: none;
  border: none;
  color: var(--danger);
  font-size: .78rem;
  cursor: pointer;
  padding: 0;
  opacity: .7;
  transition: opacity .15s;
  text-decoration: underline;
}
.btn-text-danger:hover { opacity: 1; }

/* ── Upload progress overlay ── */
.avatar-upload-progress {
  position: absolute;
  inset: 0;
  background: rgba(11,11,11,.75);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  font-size: .85rem;
  color: var(--gold);
  z-index: 10;
  backdrop-filter: blur(4px);
}

.upload-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(212,175,55,.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Sidebar / leaderboard avatar image support ── */
.lb-avatar img.avatar-img,
.sidebar-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
}

/* ── Sidebar user block ── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .5rem;
}
.sidebar-avatar-img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.sidebar-avatar-initials {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #1e1e1e;
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 800; color: var(--gold);
  flex-shrink: 0;
}
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; }
.sidebar-username   { font-size: .85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-edit-link  { font-size: .72rem; color: var(--muted); transition: color .15s; }
.sidebar-edit-link:hover { color: var(--gold); }

/* ════════════════════════════════════════════
   INBOX / MESSAGES — Split pane
   ════════════════════════════════════════════ */

.inbox-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: calc(100vh - 140px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.inbox-sidebar {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--surface);
}

.inbox-thread {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--white);
  transition: background .15s;
  cursor: pointer;
}
.inbox-thread:hover  { background: var(--surface2); }
.inbox-thread.active { background: rgba(212,175,55,.08); border-left: 3px solid var(--gold); }

.it-avatar { position: relative; flex-shrink: 0; }
.it-avatar img,
.it-initials {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover;
}
.it-initials {
  background: var(--border); display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; color: var(--gold); font-size: 1rem;
}
.it-badge {
  position: absolute; top: -3px; right: -3px;
  background: var(--gold); color: #000;
  border-radius: 999px; font-size: .6rem; font-weight: 800;
  padding: 1px 5px; min-width: 16px; text-align: center;
  line-height: 14px;
}
.it-info  { flex: 1; min-width: 0; }
.it-name  { display: block; font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-preview { display: block; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.it-time  { font-size: .7rem; color: var(--muted); flex-shrink: 0; }

.inbox-thread-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.thread-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.thread-trainer-info  { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.thread-trainer-avatar,
.thread-trainer-initials {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
}
.thread-trainer-initials {
  background: var(--border); display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; color: var(--gold);
}

.thread-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.msg-bubble {
  max-width: 72%;
  padding: .65rem 1rem;
  border-radius: 16px;
  font-size: .875rem;
  line-height: 1.5;
  word-break: break-word;
}
.msg-in {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.msg-out {
  background: rgba(212,175,55,.12);
  border: 1px solid rgba(212,175,55,.25);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  text-align: right;
}
.msg-ts { font-size: .65rem; color: var(--muted); margin-top: .25rem; }

.thread-compose {
  padding: .9rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  flex-shrink: 0;
  background: var(--surface);
}
.thread-compose textarea {
  flex: 1;
  resize: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  padding: .6rem .9rem;
  font-family: inherit;
  font-size: .875rem;
  outline: none;
  transition: border-color .15s;
}
.thread-compose textarea:focus { border-color: var(--gold); }
.thread-compose form { display: flex; gap: .75rem; align-items: flex-end; width: 100%; }

.thread-empty,
.inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
  gap: .5rem;
}
.thread-empty h3 { color: var(--white); margin: .5rem 0; }

/* Mobile inbox */
@media (max-width: 768px) {
  .inbox-layout { grid-template-columns: 1fr; height: calc(100vh - 120px); }
  .inbox-hidden-mobile { display: none; }
}

/* ════════════════════════════════════════════
   SEARCH DROPDOWN
   ════════════════════════════════════════════ */

.search-dropdown {
  margin-top: .4rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}
.search-dropdown:empty { display: none; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  cursor: pointer;
  transition: background .12s;
  font-size: .875rem;
}
.search-result-item:hover { background: var(--border); }
.search-result-item strong { display: block; font-weight: 600; }

.sr-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.sr-initials {
  background: var(--border); display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; color: var(--gold); font-size: .85rem;
}
.sr-sub { display: block; font-size: .72rem; color: var(--muted); margin-top: 1px; text-transform: capitalize; }

.selected-user-chip {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .9rem;
  background: rgba(212,175,55,.08);
  border: 1px solid rgba(212,175,55,.25);
  border-radius: var(--radius-sm);
  margin-top: .5rem;
  font-size: .875rem;
}

/* ════════════════════════════════════════════
   LEADERBOARD — Scope tabs & filters
   ════════════════════════════════════════════ */

.lb-scope-row {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
  overflow-x: auto;
  padding-bottom: .25rem;
}
.scope-btn {
  padding: .35rem .9rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  background: transparent;
  white-space: nowrap;
  transition: all .15s;
  text-decoration: none;
  display: inline-block;
}
.scope-btn.active { background: var(--gold); color: #000; border-color: var(--gold); }

.lb-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.filter-group { display: flex; gap: .4rem; }

.lb-actions { margin-left: auto; margin-right: .5rem; }
.lb-me { border-color: rgba(212,175,55,.5) !important; background: rgba(212,175,55,.04); }
.lb-loc { display: block; font-size: .72rem; color: var(--muted); }

/* ════════════════════════════════════════════
   NAV UNREAD BADGE
   ════════════════════════════════════════════ */

.nav-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #000;
  border-radius: 999px;
  font-size: .6rem;
  font-weight: 800;
  padding: 1px 5px;
  min-width: 16px;
  line-height: 14px;
  margin-left: .35rem;
}

.bn-badge {
  position: absolute;
  top: 0; right: 12px;
  background: var(--gold);
  color: #000;
  border-radius: 999px;
  font-size: .55rem;
  font-weight: 800;
  padding: 1px 4px;
  min-width: 14px;
  text-align: center;
  line-height: 12px;
}

/* ════════════════════════════════════════════
   TRAINER DASHBOARD unread badge
   ════════════════════════════════════════════ */

.dashboard-unread-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(212,175,55,.1);
  border: 1px solid rgba(212,175,55,.3);
  color: var(--gold);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  padding: .3rem .9rem;
}

/* ════════════════════════════════════════════
   LANDING — Live leaderboard section
   ════════════════════════════════════════════ */

.landing-lb-section {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}
.landing-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
}
.landing-lb-tabs {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.llb-tab {
  padding: .35rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.llb-tab.active { background: var(--gold); color: #000; border-color: var(--gold); }
.landing-lb { display: flex; flex-direction: column; gap: .4rem; min-height: 60px; }
.landing-lb-loading { text-align: center; color: var(--muted); padding: 1.5rem; font-size: .875rem; }
.llb-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.llb-rank { font-size: .95rem; min-width: 2.2rem; text-align: center; font-weight: 700; }
.llb-avatar img, .llb-initials {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.llb-initials { background: var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--gold); font-size: .85rem; }
.llb-info  { flex: 1; }
.llb-name  { display: block; font-weight: 600; font-size: .875rem; }
.llb-loc   { display: block; font-size: .7rem; color: var(--muted); }
.llb-score { font-size: 1.1rem; font-weight: 800; color: var(--gold); }

/* ════════════════════════════════════════════
   INVITE BANNER (signup page)
   ════════════════════════════════════════════ */

.invite-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(212,175,55,.08);
  border: 1px solid rgba(212,175,55,.3);
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: .875rem;
}
.invite-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); flex-shrink: 0;
}
.invite-avatar-initials {
  width: 44px; height: 44px; border-radius: 50%; background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; color: var(--gold); flex-shrink: 0;
}

/* ════════════════════════════════════════════
   INVITE LINK BOX (trainer profile)
   ════════════════════════════════════════════ */

.invite-link-box {
  display: flex;
  gap: .6rem;
  align-items: center;
}
.invite-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  padding: .6rem .9rem;
  font-size: .82rem;
  outline: none;
  font-family: monospace;
}

/* ════════════════════════════════════════════
   PRICING PAGE
   ════════════════════════════════════════════ */

.pricing-page { min-height:100vh; display:flex; flex-direction:column; }

.pricing-hero {
  text-align: center;
  padding: 4rem 2rem 2rem;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}
.pricing-title { font-size: clamp(2rem,5vw,3rem); font-weight:800; margin-bottom:.75rem; letter-spacing:-.02em; }
.pricing-sub   { color:var(--muted); font-size:1rem; margin-bottom:2rem; }

.billing-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.btog-btn {
  padding: .45rem 1.1rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.btog-btn.active { background: var(--gold); color: #000; }
.discount-chip {
  background: rgba(34,197,94,.15);
  color: #22c55e;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 2rem 3rem;
  width: 100%;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  transition: border-color .2s, transform .2s;
}
.pricing-card:hover { border-color: #333; transform: translateY(-2px); }
.pricing-card-featured { border-color: var(--gold); }
.pricing-card-featured:hover { border-color: var(--gold-dim); }

.pc-popular {
  position: absolute;
  top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #000;
  font-size: .7rem; font-weight: 800;
  padding: .2rem .9rem; border-radius: 999px;
  letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}
.pc-header { margin-bottom: 1.5rem; }
.pc-name   { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .5rem; }
.pc-price  { display: flex; align-items: baseline; gap: .2rem; margin-bottom: .4rem; }
.pc-amount { font-size: 2.5rem; font-weight: 800; color: var(--white); }
.pc-period { font-size: .9rem; color: var(--muted); }
.pc-desc   { font-size: .78rem; color: var(--muted); }
.pc-savings { margin-top: .3rem; font-size: .78rem; color: #22c55e; font-weight: 600; }

.pc-features {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.pc-features li { font-size: .86rem; }
.pc-features .pc-no { color: var(--muted); }

.pricing-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .82rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}
.trust-item { display: flex; align-items: center; gap: .4rem; }

.pricing-faq {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 2rem 4rem;
  width: 100%;
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0; cursor: pointer; font-weight: 600; font-size: .9rem;
  transition: color .15s; user-select: none;
}
.faq-q:hover { color: var(--gold); }
.faq-q span  { font-size: 1.2rem; color: var(--muted); }
.faq-a { padding: 0 0 1rem; font-size: .875rem; color: var(--muted); line-height: 1.7; display:none; }

/* ════════════════════════════════════════════
   LEGAL PAGES
   ════════════════════════════════════════════ */

.legal-page { min-height:100vh; display:flex; flex-direction:column; }

.legal-body {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 2rem 4rem;
  width: 100%;
  line-height: 1.8;
}
.legal-body h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.legal-body h2 { font-size: 1.05rem; font-weight: 700; margin: 2rem 0 .6rem; color: var(--white); }
.legal-body p  { margin-bottom: 1rem; color: #ccc; font-size: .9rem; }
.legal-body a  { color: var(--gold); }
.legal-updated { font-size: .82rem; color: var(--muted); margin-bottom: .25rem; }
.legal-brand   { font-size: .82rem; color: var(--gold); font-weight: 600; margin-bottom: 2rem; }

.footer-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-top: .5rem;
  flex-wrap: wrap;
}
.footer-links a { font-size: .82rem; color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--gold); }

/* ════════════════════════════════════════════
   ASSIGNED PROGRAMS (user dashboard + client detail)
   ════════════════════════════════════════════ */

.assigned-prog-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.assigned-prog-row:last-child { border-bottom: none; }
.ap-icon { font-size: 1.4rem; flex-shrink: 0; }
.ap-info { flex: 1; min-width: 0; }
.ap-name { display: block; font-weight: 600; font-size: .9rem; }
.ap-desc { display: block; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.prog-assigned-count {
  font-size: .75rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .2rem .65rem;
}

/* ════════════════════════════════════════════
   PROGRAMS — Assign modal extras
   ════════════════════════════════════════════ */

.assign-all-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1rem;
  background: rgba(212,175,55,.06);
  border: 1px solid rgba(212,175,55,.2);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
}
.assign-divider {
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  margin: .75rem 0;
  position: relative;
}
.assign-divider::before, .assign-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border);
}
.assign-divider::before { left: 0; }
.assign-divider::after  { right: 0; }

/* ════════════════════════════════════════════
   LEADERBOARD — self row highlight (not ranked)
   ════════════════════════════════════════════ */

.lb-not-ranked {
  border-style: dashed !important;
  opacity: .85;
}

/* ════════════════════════════════════════════
   PUBLIC PROFILES
   ════════════════════════════════════════════ */

.pub-profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1rem;
}

.pub-avatar-wrap { position: relative; flex-shrink: 0; }

.pub-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--border);
}
.pub-avatar-initials {
  background: #1e1e1e;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800; color: var(--gold);
}
.pub-rank-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  pointer-events: none;
}

.pub-info { flex: 1; min-width: 0; }
.pub-name { font-size: 1.4rem; font-weight: 800; margin-bottom: .2rem; }
.pub-location { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.pub-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.pub-goal-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  padding: .2rem .7rem; color: var(--muted);
  text-transform: capitalize;
}

/* mini bar chart */
.pub-mini-chart {
  display: flex;
  align-items: flex-end;
  gap: .4rem;
  height: 80px;
  padding-top: .5rem;
}
.pub-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .25rem; height: 100%; justify-content: flex-end; }
.pub-bar { width: 100%; border-radius: 4px 4px 0 0; min-height: 4px; transition: height .5s ease; }
.pub-bar-label { font-size: .6rem; color: var(--muted); white-space: nowrap; }

/* client grid */
.pub-client-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: .25rem;
}
.pub-client-chip {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color .15s, transform .15s;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.pub-client-chip:hover { border-color: var(--gold); transform: scale(1.08); }
.pub-client-chip img { width: 100%; height: 100%; object-fit: cover; }
.pub-client-initials { font-size: .85rem; font-weight: 700; color: var(--gold); background: #1e1e1e; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pub-client-more { background: var(--surface2); font-size: .7rem; color: var(--muted); font-weight: 700; border: 2px dashed var(--border); }

/* ════════════════════════════════════════════
   LEADERBOARD — Location filter bar
   ════════════════════════════════════════════ */

.lb-location-filters {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  margin-bottom: .75rem;
}
.lb-loc-group { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 140px; }
.lb-loc-group label { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lb-loc-group select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  padding: .5rem .75rem;
  font-size: .85rem;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.lb-loc-group select:focus { border-color: var(--gold); }

/* clickable lb name */
.lb-name-link { text-decoration: none; color: inherit; transition: color .15s; }
.lb-name-link:hover { color: var(--gold); }

@media (max-width: 480px) {
  .pub-profile-hero { flex-direction: column; align-items: center; text-align: center; }
  .pub-badges { justify-content: center; }
  .lb-location-filters { flex-direction: column; }
  .lb-loc-group { min-width: 100%; }
}

/* ════════════════════════════════════════════
   LANDING — Pricing teaser + Footer
   ════════════════════════════════════════════ */

.landing-pricing-teaser {
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem;
}
.lpt-inner {
  max-width: 860px;
  margin: 0 auto;
}
.lpt-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}
.lpt-sub {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 1.5rem;
}
.lpt-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
}
.lpt-plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  transition: border-color .2s;
}
.lpt-plan:hover { border-color: #333; }
.lpt-plan-featured {
  border-color: rgba(212,175,55,.4);
  background: rgba(212,175,55,.04);
}
.lpt-plan-name  { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lpt-plan-price { font-size: 1.4rem; font-weight: 800; color: var(--white); }
.lpt-plan-featured .lpt-plan-price { color: var(--gold); }
.lpt-plan-desc  { font-size: .75rem; color: var(--muted); line-height: 1.5; }

/* ── Footer ── */
.landing-footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  max-width: 700px;
  margin: 2rem auto 0;
  text-align: left;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.lfl-group { display: flex; flex-direction: column; gap: .45rem; }
.lfl-heading {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .2rem;
}
.lfl-group a {
  font-size: .82rem;
  color: #888;
  text-decoration: none;
  transition: color .15s;
}
.lfl-group a:hover { color: var(--gold); }

.lfl-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .landing-footer-links { grid-template-columns: 1fr 1fr; }
  .lfl-bottom { flex-direction: column; text-align: center; }
}

/* pricing teaser discount note */
.lpt-discount-note {
  margin-top: 1.1rem;
  font-size: .85rem;
  color: var(--muted);
  background: rgba(34,197,94,.07);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  display: inline-block;
}