/* ===================================================================
   PAGE-SPECIFIC STYLES
   =================================================================== */

/* ---------- DASHBOARD HERO ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px 40px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(700px 260px at 90% -20%, rgba(192,0,0,0.25), transparent 60%),
    linear-gradient(135deg, var(--bg-2), var(--bg-0));
  border: 1px solid var(--border-1);
  margin-bottom: 28px;
  overflow: hidden;
  animation: fadeUp var(--t-slow) var(--ease) both;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 40px);
  pointer-events: none;
}
.hero-logo {
  width: 92px; height: 92px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow-red);
  flex-shrink: 0;
  position: relative;
}
.hero-text { position: relative; }
.hero-text .eyebrow { color: var(--ets-red-bright); margin-bottom: 8px; }
.hero-text h1 { font-size: 34px; margin-bottom: 8px; }
.hero-text p { color: var(--text-2); font-size: 15px; max-width: 560px; }
.hero-meta {
  margin-left: auto;
  display: flex;
  gap: 28px;
  position: relative;
  flex-wrap: wrap;
}
.hero-meta .stat-inline__value { font-size: 26px; }

@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: flex-start; padding: 28px; }
  .hero-meta { margin-left: 0; gap: 20px; }
}

/* ---------- ATHLETE PROFILE ---------- */
.profile-header {
  display: flex;
  gap: 26px;
  align-items: center;
  padding: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.profile-photo {
  width: 110px; height: 110px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--bg-4), var(--bg-3));
  border: 2px solid var(--border-2);
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--text-1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.profile-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(192,0,0,0.25));
}
.profile-info { flex: 1; min-width: 240px; }
.profile-info h1 { font-size: 26px; margin-bottom: 6px; }
.profile-info__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px 24px;
  margin-left: auto;
  padding-left: 24px;
  border-left: 1px solid var(--border-1);
}
@media (max-width: 900px) {
  .profile-detail-grid { border-left: none; padding-left: 0; margin-left: 0; width: 100%; padding-top: 16px; border-top: 1px solid var(--border-1); }
}

.test-compare-card { padding: 20px; }
.test-compare-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-1);
}
.test-compare-row:last-child { border-bottom: none; }
.test-compare-row.is-header {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding-bottom: 10px;
}
.test-compare-metric { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-0); font-size: 13.5px; }
.test-compare-metric__icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(192,0,0,0.15);
  color: var(--ets-red-bright);
  flex-shrink: 0;
}
.test-compare-metric__icon svg { width: 15px; height: 15px; }
.test-compare-val { font-size: 15px; font-weight: 700; color: var(--text-1); text-align: center; font-variant-numeric: tabular-nums; }
.test-compare-val--diff { font-weight: 800; }
.test-compare-val--pct { font-weight: 800; font-size: 15px; }

@media (max-width: 760px) {
  .test-compare-row { grid-template-columns: 1fr; gap: 4px; }
  .test-compare-val { text-align: left; display: flex; justify-content: space-between; }
  .test-compare-val::before { content: attr(data-label); color: var(--text-3); font-weight: 600; font-size: 11px; text-transform: uppercase; }
  .test-compare-row.is-header { display: none; }
}

/* ---------- ANALYTICS GROUP COMPARE ---------- */
.group-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .group-compare-grid { grid-template-columns: 1fr; } }
.group-card { padding: 22px; }
.group-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
}
.group-card__badge--a { background: rgba(120,190,255,0.14); color: #7ec0ff; border: 1px solid rgba(120,190,255,0.3); }
.group-card__badge--b { background: rgba(192,0,0,0.16); color: var(--ets-red-bright); border: 1px solid rgba(192,0,0,0.35); }

/* ---------- LEADERBOARD LIST ---------- */
.card-list { padding: 6px 0; }

/* ---------- SETTINGS ---------- */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border-1);
}
.settings-row:last-child { border-bottom: none; }
.settings-row__label strong { display: block; font-size: 13.5px; color: var(--text-0); margin-bottom: 3px; }
.settings-row__label span { font-size: 12px; color: var(--text-3); }

.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.switch-track::before {
  content: '';
  position: absolute;
  left: 3px; top: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-2);
  transition: all var(--t-fast) var(--ease);
}
.switch input:checked + .switch-track { background: var(--ets-red); border-color: var(--ets-red); }
.switch input:checked + .switch-track::before { transform: translateX(20px); background: #fff; }

/* ---------- REPORT CARD ---------- */
.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.report-card {
  background: #fff;
  color: #111;
  border-radius: var(--r-lg);
  padding: 40px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.report-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--ets-red);
  margin-bottom: 26px;
}
.report-header img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.report-header h2 { color: #111; font-size: 22px; margin-bottom: 4px; }
.report-header p { color: #666; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.report-header__right { margin-left: auto; text-align: right; }
.report-header__right .report-score-value { font-size: 30px; font-weight: 800; color: var(--ets-red); }
.report-header__right span { font-size: 11px; color: #888; font-weight: 700; text-transform: uppercase; }

.report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.report-info-item { background: #f6f6f7; border-radius: 10px; padding: 12px 14px; }
.report-info-item span { display: block; font-size: 10px; color: #888; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.report-info-item strong { font-size: 13.5px; color: #111; }

.report-section-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #111;
  margin: 26px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5;
}
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table th { text-align: left; padding: 8px 10px; background: #f6f6f7; color: #666; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.report-table td { padding: 10px; border-bottom: 1px solid #eee; color: #222; font-weight: 600; }
.report-table td.up { color: #1a7a3f; font-weight: 800; }
.report-table td.down { color: #c00000; font-weight: 800; }

.report-notes { background: #f6f6f7; border-radius: 10px; padding: 16px; font-size: 13px; color: #333; line-height: 1.6; }
.report-footer { margin-top: 30px; padding-top: 16px; border-top: 1px solid #e5e5e5; font-size: 11px; color: #999; display: flex; justify-content: space-between; }

@media (max-width: 700px) {
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .report-card { padding: 24px; }
}

/* ---------- LOGIN / SPLASH (optional entry) ---------- */
.splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(192,0,0,0.18), transparent 60%),
    radial-gradient(700px 400px at 90% 110%, rgba(192,0,0,0.12), transparent 60%),
    var(--bg-0);
  text-align: center;
  padding: 24px;
}
.splash img { width: 120px; height: 120px; margin: 0 auto 24px; border-radius: 24px; box-shadow: var(--shadow-red); animation: popIn 0.6s var(--ease); }
.splash h1 { font-size: 32px; margin-bottom: 10px; animation: fadeUp 0.6s var(--ease) 0.1s both; }
.splash p { color: var(--text-3); font-size: 15px; margin-bottom: 30px; animation: fadeUp 0.6s var(--ease) 0.2s both; }
.splash .btn { animation: fadeUp 0.6s var(--ease) 0.3s both; }
