/* dashboard.css — extends theme.css for the cognitive dashboard pages */

/* Team switcher */
.team-bar {
  border-bottom: 1px solid var(--border);
  padding: 0 0 0 0;
}
.team-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.team-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
}

/* Dashboard hero strip */
.dash-header {
  padding: 48px 0 32px;
}
.dash-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.dash-title {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--fg);
}
.dash-title-sub {
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* Summary metrics strip */
.metrics-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 32px;
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto 40px;
  padding-left: 32px;
  padding-right: 32px;
}
.metrics-strip .mstat {
  flex: 1;
  text-align: center;
  padding: 0 16px;
}
.metrics-strip .mstat + .mstat {
  border-left: 1px solid var(--border);
}
.metrics-strip .mstat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.metrics-strip .mstat-val {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}
.metrics-strip .mstat-sub {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
}

/* Athlete roster */
.roster-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.roster-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--fg);
}
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.athlete-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.athlete-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(79, 155, 245, 0.08);
}
.athlete-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.athlete-name {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}
.athlete-position {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
}
.athlete-session-date {
  font-size: 11px;
  color: var(--fg-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
}
.athlete-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.athlete-metric {
  text-align: center;
}
.athlete-metric-val {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 2px;
}
.athlete-metric-label {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.athlete-metric-good { color: var(--accent); }

/* Athlete detail page */
.athlete-detail-header {
  padding: 48px 0 32px;
}
.athlete-detail-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.back-link {
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--fg); }
.athlete-info h1 {
  font-family: 'Syne', sans-serif;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.athlete-info .meta {
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* Charts grid */
.charts-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 48px;
}
.charts-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--fg);
}
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.chart-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}
.chart-card .chart-sub {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 20px;
}
canvas {
  max-width: 100%;
}

/* Session history */
.history-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.history-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--fg);
}
.history-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.history-table table {
  width: 100%;
  border-collapse: collapse;
}
.history-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.history-table td {
  font-size: 14px;
  color: var(--fg);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: var(--surface-2); }

/* Responsive */
@media (max-width: 768px) {
  .dash-header-inner { flex-direction: column; align-items: flex-start; }
  .metrics-strip { flex-wrap: wrap; }
  .metrics-strip .mstat { flex: 1 1 40%; }
  .roster-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .athlete-detail-header-inner { flex-direction: column; gap: 16px; }
  .history-table { overflow-x: auto; display: block; }
}

/* Compare page */
.compare-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 24px;
}
.compare-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.compare-chart-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
}
.compare-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.legend-item {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}
.legend-reaction { background: rgba(79,155,245,0.2); color: #4F9BF5; }
.legend-agility { background: rgba(160,210,255,0.25); color: #7BAAE0; }
.legend-readiness { background: rgba(123,139,168,0.2); color: #7B8BA8; }

.compare-table-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
}
.compare-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.compare-table td {
  font-size: 14px;
  color: var(--fg);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: var(--surface-2); }