:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --ink: #17211b;
  --muted: #657269;
  --line: #d8dfda;
  --soft: #ecf1ee;
  --club: #166534;
  --club-2: #0f766e;
  --accent: #ea580c;
  --blue: #2563eb;
  --amber: #d97706;
  --danger: #dc2626;
  --good: #15803d;
  --shadow: 0 18px 44px rgba(23, 33, 27, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font-size: 17px;
  line-height: 1.1;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--club), var(--club-2));
  border-radius: 8px;
  font-weight: 800;
}

.topbar-actions,
.report-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-language {
  display: none;
  gap: 4px;
  min-width: 132px;
}

.athlete-mode .topbar-language {
  display: grid;
}

.topbar-language span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.topbar-language select {
  min-height: 36px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.sidebar {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar-language {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.sidebar-language span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-button {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  gap: 10px;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
}

.nav-button span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.nav-button b {
  font: inherit;
}

.nav-button.is-active {
  color: var(--ink);
  background: var(--soft);
  border-color: var(--line);
  font-weight: 700;
}

.nav-button.is-active span {
  background: var(--accent);
}

.sidebar-session {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.is-hidden {
  display: none !important;
}

.club-context-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.main-area {
  grid-row: 2;
  min-width: 0;
  padding: 28px;
}

.athlete-mode .app-shell {
  grid-template-columns: 1fr;
}

.athlete-mode .sidebar,
.athlete-mode #globalTeam,
.athlete-mode #resetDemo,
.athlete-mode #responsePill,
.athlete-mode .capture-info-panel {
  display: none;
}

.athlete-mode .topbar {
  justify-content: space-between;
}

.athlete-mode .topbar-actions {
  margin-left: auto;
}

.athlete-mode .main-area {
  grid-column: 1;
  width: min(100%, 840px);
  margin: 0 auto;
}

.athlete-mode .capture-grid {
  grid-template-columns: 1fr;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

#view-product.is-active {
  margin-top: 26px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-head h1 {
  margin: 3px 0 0;
  font-size: 32px;
  line-height: 1.12;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.cadence-pill,
.status-badge,
.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
  white-space: normal;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 27, 0.04);
}

.toolbar-wide {
  grid-column: 1 / -1;
}

.toolbar textarea {
  min-height: 82px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--club);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

input[type="range"] {
  min-height: 30px;
  padding: 0;
  accent-color: var(--club);
}

input[type="color"] {
  padding: 4px;
}

.primary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-button {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
}

.primary-button:hover {
  background: #000000;
  border-color: #000000;
}

.ghost-button {
  color: #111827;
  background: #e5e7eb;
  border-color: #111827;
}

.ghost-button:hover {
  color: #ffffff;
  background: #111827;
  border-color: #111827;
}

.danger-button {
  color: #ffffff;
  background: #dc2626;
  border-color: #dc2626;
}

.danger-button:hover {
  background: #991b1b;
  border-color: #991b1b;
}

.small-button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-tile {
  min-height: 118px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--club);
  border-radius: 8px;
}

.metric-tile:nth-child(2) {
  border-left-color: var(--blue);
}

.metric-tile:nth-child(3) {
  border-left-color: var(--accent);
}

.metric-tile:nth-child(4) {
  border-left-color: var(--amber);
}

.metric-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.metric-tile small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.cockpit-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: -4px 0 18px;
}

.cockpit-card {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--club);
  border-radius: 8px;
  background: #ffffff;
}

.cockpit-card span,
.cockpit-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cockpit-card span {
  text-transform: uppercase;
}

.cockpit-card strong {
  display: block;
  margin-top: 7px;
  color: #111827;
  font-size: 20px;
  line-height: 1.1;
}

.cockpit-card small {
  margin-top: 7px;
  line-height: 1.35;
}

.kpi-green {
  border-color: #bbf7d0 !important;
  border-left-color: #16a34a !important;
  background: #f0fdf4 !important;
}

.kpi-yellow {
  border-color: #fde68a !important;
  border-left-color: #d97706 !important;
  background: #fffbeb !important;
}

.kpi-orange {
  border-color: #fed7aa !important;
  border-left-color: #ea580c !important;
  background: #fff7ed !important;
}

.kpi-red {
  border-color: #fecaca !important;
  border-left-color: #dc2626 !important;
  background: #fef2f2 !important;
}

.dashboard-grid,
.product-grid,
.login-grid,
.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.capture-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 14px;
}

.surface {
  min-width: 0;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 27, 0.04);
}

.wide {
  grid-column: 1 / -1;
}

.surface-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.surface h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.surface p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.chart-frame {
  min-height: 280px;
  overflow: hidden;
}

.trend-svg {
  width: 100%;
  height: 280px;
  display: block;
}

.axis-label {
  fill: #657269;
  font-size: 11px;
  font-weight: 700;
}

.chart-gridline {
  stroke: #e7ece8;
  stroke-width: 1;
}

.trend-area {
  fill: rgba(22, 101, 52, 0.12);
}

.trend-line {
  fill: none;
  stroke: var(--club);
  stroke-width: 3;
}

.trend-dot {
  fill: #ffffff;
  stroke: var(--club);
  stroke-width: 2;
}

.alert-list,
.recent-list,
.club-list,
.plan-list,
.roadmap {
  display: grid;
  gap: 10px;
}

.club-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.club-list-row.is-active {
  border-color: rgba(22, 101, 52, 0.36);
  background: rgba(22, 101, 52, 0.07);
}

.club-list-row strong,
.club-list-row span {
  display: block;
}

.club-list-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.brand-logo-panel {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.logo-actions {
  display: grid;
  gap: 8px;
}

.brand-logo-preview {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  color: #ffffff;
  background: var(--club);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
}

.coach-logo-preview {
  background: #111827;
}

.brand-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 8px;
}

.alert-row,
.recent-row,
.plan-row,
.roadmap div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.alert-row:last-child,
.recent-row:last-child,
.plan-row:last-child {
  border-bottom: 0;
}

.alert-row strong,
.recent-row strong,
.plan-row strong {
  display: block;
}

.alert-row span,
.recent-row span,
.plan-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.risk-badge {
  color: #ffffff;
  border: 0;
  font-weight: 800;
}

.risk-low {
  background: var(--good);
}

.risk-medium {
  background: var(--amber);
}

.risk-high {
  background: var(--danger);
}

.team-bars {
  display: grid;
  gap: 14px;
}

.team-bar {
  display: grid;
  gap: 8px;
}

.team-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}

.bar-track {
  height: 14px;
  overflow: hidden;
  background: var(--soft);
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--club), var(--accent));
  border-radius: inherit;
  transition: width 220ms ease;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-weight: 650;
}

.number {
  text-align: right;
}

.status-badge {
  justify-content: center;
  min-width: 78px;
  border-radius: 8px;
  font-weight: 800;
}

.status-good {
  color: var(--good);
  border-color: rgba(21, 128, 61, 0.25);
  background: rgba(21, 128, 61, 0.08);
}

.status-watch {
  color: var(--amber);
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(217, 119, 6, 0.1);
}

.status-risk {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.08);
}

.form-surface {
  padding: 20px;
}

.login-grid {
  align-items: stretch;
  max-width: 1120px;
}

.login-panel h1 {
  margin: 3px 0 0;
  font-size: 34px;
  line-height: 1.1;
}

.login-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.full-button {
  width: 100%;
  margin-top: 12px;
}

.setup-steps {
  display: grid;
  gap: 10px;
}

.setup-steps div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.setup-steps strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: var(--club);
  border-radius: 8px;
}

.setup-steps span {
  color: var(--ink);
  font-weight: 750;
  line-height: 1.35;
}

.roster-list {
  display: grid;
  gap: 14px;
}

.roster-team {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.roster-team-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.roster-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.roster-team-head strong,
.roster-player strong {
  display: block;
}

.roster-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.roster-team-head span,
.roster-player span,
.roster-player a {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.roster-players {
  display: grid;
  gap: 8px;
}

.roster-player-panel {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.roster-player-panel summary {
  cursor: pointer;
  color: #111827;
  font-weight: 900;
}

.roster-player-panel .roster-players {
  margin-top: 8px;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

.team-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(22, 101, 52, 0.22);
  border-radius: 8px;
  background: rgba(22, 101, 52, 0.06);
}

.team-link-card strong,
.team-link-card span,
.team-link-card a {
  display: block;
}

.team-link-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.team-link-card a {
  max-width: 100%;
  overflow-wrap: anywhere;
  margin-top: 6px;
  color: var(--club);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.roster-player {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.roster-player a {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: var(--club);
  font-weight: 750;
  text-decoration: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.compact {
  margin-bottom: 14px;
}

.form-actions-inline {
  display: grid;
  align-items: end;
}

.full {
  grid-column: 1 / -1;
}

label strong {
  color: var(--ink);
  font-size: 18px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  padding-top: 20px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: #111827;
}

.checkbox-row span {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.calc-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#liveLoad {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

.mini-pitch {
  position: relative;
  height: 172px;
  margin: 6px 0 16px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 50%, transparent 50%),
    linear-gradient(180deg, #166534, #0f766e);
  background-size: 44px 100%, 100% 100%;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.mini-pitch::before,
.mini-pitch::after,
.mini-pitch div,
.mini-pitch span {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.82);
}

.mini-pitch::before {
  inset: 14px;
}

.mini-pitch::after {
  width: 58px;
  height: 58px;
  left: calc(50% - 29px);
  top: calc(50% - 29px);
  border-radius: 999px;
}

.mini-pitch div {
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 0;
  border-left: 0;
}

.mini-pitch span {
  left: 18px;
  top: calc(50% - 42px);
  width: 58px;
  height: 84px;
}

.report-page {
  max-width: 940px;
  margin: 0 auto;
  padding: 34px;
  color: #111827;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 4px solid var(--club);
}

.report-hero h2 {
  margin: 0;
  font-size: 30px;
}

.report-hero p {
  margin: 8px 0 0;
  color: #4b5563;
}

.report-brand {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: #ffffff;
  background: var(--club);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
}

.report-brand.has-logo {
  width: 92px;
  height: 92px;
  background: transparent;
  color: var(--club);
}

.report-brand-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.report-brand img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 0;
}

.report-signature-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 0;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.report-meta span {
  padding: 7px 9px;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.report-kpi {
  min-height: 96px;
  padding: 13px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #d1d5db;
  border-radius: 8px;
}

.report-kpi span {
  display: block;
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-kpi strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 24px;
}

.report-kpi small {
  display: block;
  margin-top: 7px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.report-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.report-section {
  margin-bottom: 20px;
}

.report-section h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 16px;
}

.report-section p,
.report-section li {
  color: #374151;
  line-height: 1.5;
}

.report-section ul {
  margin: 0;
  padding-left: 18px;
}

.report-chart {
  display: grid;
  gap: 8px;
}

.report-visual {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.report-svg {
  display: block;
  width: 100%;
  height: auto;
}

.report-gridline {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.report-axis-label {
  fill: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

.report-load-bar {
  fill: rgba(22, 101, 52, 0.72);
}

.report-load-line {
  fill: none;
  stroke: #ea580c;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-chart-caption {
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.report-bar {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 800;
}

.report-bar-track {
  height: 11px;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: 999px;
}

.report-bar-fill {
  height: 100%;
  background: var(--club);
  border-radius: inherit;
}

.report-player-bars {
  display: grid;
  gap: 9px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.report-player-bar {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
}

.report-player-bar span {
  min-width: 0;
  overflow: hidden;
  color: #374151;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-player-bar strong {
  color: #111827;
  text-align: right;
}

.report-table {
  width: 100%;
  min-width: 0;
}

.report-table th,
.report-table td {
  padding: 8px 7px;
  font-size: 12px;
}

.rpe-badge {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #111827;
  font-weight: 900;
}

.rpe-green {
  background: #dcfce7;
  color: #166534;
}

.rpe-yellow {
  background: #fef3c7;
  color: #92400e;
}

.rpe-orange {
  background: #fed7aa;
  color: #9a3412;
}

.rpe-red {
  background: #fecaca;
  color: #991b1b;
}

.fatigue-alert-list {
  display: grid;
  gap: 8px;
}

.fatigue-alert-row,
.text-button,
.report-detail-button,
.report-detail-close {
  border: 0;
  font: inherit;
}

.fatigue-alert-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #111827;
  text-align: left;
}

.fatigue-alert-row span {
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--club);
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.report-detail-button,
.report-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.report-detail-button:hover,
.report-detail-close:hover {
  background: #991b1b;
}

.detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-card-head h3 {
  margin: 0;
}

.report-detail-close {
  background: #7f1d1d;
  white-space: nowrap;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.detail-metrics div {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.detail-metrics span,
.detail-metrics strong {
  display: block;
}

.detail-metrics span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-metrics strong {
  margin-top: 4px;
  font-size: 18px;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 12px;
}

.report-signature {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: #374151;
  text-align: right;
}

.report-signature-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.report-signature span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-signature strong {
  font-size: 14px;
}

.report-page.template-academy {
  --club: #2563eb;
}

.report-page.template-matchday {
  --club: #b91c1c;
}

.plan-row {
  grid-template-columns: 150px minmax(0, 1fr);
}

.plan-row.is-featured {
  color: var(--club);
}

.roadmap {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.roadmap div {
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.roadmap strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  background: var(--club);
  border-radius: 8px;
}

.roadmap span {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(560px, calc(100vw - 44px));
  padding: 12px 14px;
  color: #ffffff;
  background: #111827;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  transition: 180ms ease;
  pointer-events: none;
  line-height: 1.4;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .topbar,
  .sidebar,
  .main-area {
    grid-column: 1;
  }

  .sidebar {
    grid-row: 2;
    padding: 10px 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar nav {
    display: flex;
    min-width: max-content;
  }

  .main-area {
    grid-row: 3;
    padding: 20px;
  }

  .athlete-mode .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .athlete-mode .main-area {
    grid-row: 2;
  }

  .dashboard-grid,
  .capture-grid,
  .product-grid,
  .login-grid,
  .setup-grid,
  .report-columns {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .kpi-grid,
  .cockpit-insights,
  .report-kpis,
  .roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar,
  .section-head,
  .submit-row,
  .roster-team-head,
  .roster-player,
  .report-hero,
  .report-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
  }

  .section-head h1 {
    font-size: 26px;
  }

  .toolbar,
  .kpi-grid,
  .cockpit-insights,
  .form-grid,
  .report-kpis,
  .roadmap {
    grid-template-columns: 1fr;
  }

  .roster-team-head,
  .roster-player,
  .team-link-card,
  .brand-logo-panel,
  .fatigue-alert-row,
  .club-list-row,
  .club-context-row {
    grid-template-columns: 1fr;
  }

  .fatigue-alert-row span {
    text-align: left;
  }

  .main-area {
    padding: 14px;
  }

  .surface,
  .report-page {
    padding: 15px;
  }

  .report-bar {
    grid-template-columns: 76px minmax(0, 1fr) 58px;
  }

  .report-player-bar {
    grid-template-columns: 100px minmax(0, 1fr) 70px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    background: #ffffff;
  }

  .topbar,
  .sidebar,
  .main-area > .view:not(#view-reports),
  #view-reports > .section-head,
  #view-reports > .toolbar,
  .toast {
    display: none !important;
  }

  .app-shell,
  .main-area,
  #view-reports {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #view-reports {
    display: block !important;
  }

  .report-page {
    max-width: none;
    min-height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
