:root {
  --panel-bg: rgba(15, 21, 31, 0.9);
  --panel-strong: #101823;
  --panel-soft: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-muted: #9eabbc;
  --panel-text: #f5f7fb;
  --panel-blue: #4e8dfb;
  --panel-green: #2edb7f;
  --panel-gold: #edc765;
  --panel-red: #ff6b6b;
}

.panel-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
}

.panel-page {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(32px + env(safe-area-inset-bottom, 0px));
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding: 14px 16px;
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--panel-text);
  font-weight: 700;
}

.panel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--panel-blue), #2f72ea);
  color: #fff;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(78, 141, 251, 0.22);
}

.panel-button.secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  box-shadow: none;
}

.panel-button.ghost {
  background: transparent;
  border: 1px solid var(--panel-border);
  box-shadow: none;
}

.panel-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  align-items: stretch;
}

.auth-hero,
.auth-card,
.dashboard-hero,
.summary-card,
.chart-card,
.data-card,
.empty-card,
.report-preview {
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.auth-hero,
.auth-card,
.dashboard-hero,
.summary-card,
.chart-card,
.data-card,
.empty-card,
.report-preview {
  border-radius: 28px;
}

.auth-hero {
  padding: 32px;
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(237, 199, 101, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(19, 27, 39, 0.98), rgba(11, 16, 24, 0.98));
}

.auth-hero h1,
.dashboard-hero h1,
.section-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.auth-hero h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.96;
  max-width: 10ch;
}

.auth-hero p,
.auth-card p,
.dashboard-subtitle,
.metric-copy,
.empty-card p,
.table-subtitle {
  color: var(--panel-muted);
  line-height: 1.68;
}

.auth-bullets {
  display: grid;
  gap: 12px;
}

.auth-bullet {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.auth-bullet strong {
  display: block;
  margin-bottom: 6px;
}

.session-exercise-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.session-exercise-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--panel-text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.session-exercise-empty {
  margin-top: 12px;
  color: var(--panel-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-card {
  padding: 28px;
}

.auth-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.auth-card h2 {
  margin: 10px 0 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: var(--panel-text);
  font-size: 0.92rem;
  font-weight: 800;
}

.field-group input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--panel-text);
  font: inherit;
}

.field-group input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.field-group input:focus {
  outline: none;
  border-color: rgba(78, 141, 251, 0.55);
  box-shadow: 0 0 0 4px rgba(78, 141, 251, 0.12);
}

.inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.helper-button {
  border: 0;
  background: transparent;
  color: var(--panel-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.status-box {
  min-height: 22px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.status-box.error {
  color: var(--panel-red);
}

.status-box.success {
  color: var(--panel-green);
}

.status-box.info {
  color: var(--panel-muted);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(78, 141, 251, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(18, 26, 38, 0.96), rgba(11, 16, 24, 0.96));
}

.dashboard-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-shell {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-shell span {
  font-size: 1.55rem;
  font-weight: 800;
}

.dashboard-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 0.98;
}

.dashboard-subtitle {
  margin-top: 10px;
  max-width: 48rem;
}

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

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--panel-text);
  font-size: 0.86rem;
  font-weight: 700;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.section-stack {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.summary-grid,
.charts-grid,
.data-grid {
  display: grid;
  gap: 18px;
}

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

.summary-card {
  padding: 20px;
}

.summary-card strong {
  display: block;
  margin-top: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
}

.summary-card span {
  color: var(--panel-muted);
  font-size: 0.9rem;
}

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

.chart-card {
  padding: 22px;
}

.card-topline {
  color: var(--panel-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.chart-head strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
}

.chart-head span {
  color: var(--panel-muted);
  font-size: 0.88rem;
}

.chart-shell {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: stretch;
}

.chart-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--panel-muted);
  font-size: 0.74rem;
  padding: 2px 0;
}

.chart-bars {
  height: 168px;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  padding-bottom: 8px;
}

.chart-bar-wrap {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 100%;
}

.chart-bar {
  width: 100%;
  min-height: 6px;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
}

.chart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--panel-muted);
  font-size: 0.8rem;
}

.priority-stack {
  display: grid;
  gap: 12px;
}

.priority-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.priority-card > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.priority-card strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
}

.priority-card span,
.priority-card p,
.mini-pulse-card span {
  color: var(--panel-muted);
}

.priority-card p {
  margin: 0;
  line-height: 1.62;
}

.priority-card small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.priority-card.risk-high {
  border-color: rgba(255, 107, 107, 0.22);
  background: rgba(255, 107, 107, 0.08);
}

.priority-card.risk-mid {
  border-color: rgba(237, 199, 101, 0.22);
  background: rgba(237, 199, 101, 0.08);
}

.priority-card.risk-low {
  border-color: rgba(78, 141, 251, 0.22);
  background: rgba(78, 141, 251, 0.08);
}

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

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

.selector-head {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.selector-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.selector-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--panel-muted);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}

.selector-chip:hover {
  border-color: rgba(78, 141, 251, 0.28);
  color: var(--panel-text);
}

.selector-chip.is-active {
  background: rgba(78, 141, 251, 0.16);
  border-color: rgba(78, 141, 251, 0.32);
  color: #eef4ff;
}

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

.mini-pulse-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.mini-pulse-card strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
}

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

.detail-metric {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.detail-metric span {
  display: block;
  color: var(--panel-muted);
}

.detail-metric strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
}

.detail-note {
  margin: 16px 0 0;
  color: var(--panel-muted);
  line-height: 1.65;
}

.coach-roster-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.coach-athlete-card {
  text-align: left;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--panel-text);
  font: inherit;
  cursor: pointer;
  transition: 180ms ease;
}

.coach-athlete-card:hover {
  border-color: rgba(78, 141, 251, 0.24);
  transform: translateY(-1px);
}

.coach-athlete-card.is-active {
  border-color: rgba(78, 141, 251, 0.35);
  background: rgba(78, 141, 251, 0.12);
}

.coach-athlete-card.is-risk {
  border-color: rgba(255, 107, 107, 0.22);
}

.coach-athlete-card.is-watch {
  border-color: rgba(237, 199, 101, 0.22);
}

.coach-athlete-card.is-missing {
  border-color: rgba(78, 141, 251, 0.22);
}

.coach-athlete-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.coach-athlete-card__head strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
}

.coach-athlete-card__head span,
.coach-athlete-card__stats span,
.coach-athlete-card p {
  color: var(--panel-muted);
}

.coach-athlete-card__stats {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.coach-athlete-card p {
  margin: 14px 0 0;
  line-height: 1.55;
}

.data-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.data-card,
.empty-card {
  padding: 22px;
}

.report-config-card {
  display: grid;
  gap: 18px;
}

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

.report-config-block {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.report-config-block strong {
  display: block;
  margin-bottom: 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.report-config-block p {
  margin: 0;
  color: var(--panel-muted);
  line-height: 1.62;
}

.report-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.report-chip {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--panel-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: 180ms ease;
}

.report-chip.is-active {
  background: rgba(78, 141, 251, 0.16);
  border-color: rgba(78, 141, 251, 0.34);
  color: #eef4ff;
}

.report-check-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.report-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.report-check input {
  margin-top: 4px;
  accent-color: var(--panel-blue);
}

.report-check strong {
  display: block;
  margin: 0 0 4px;
  font-size: 1rem;
  font-family: inherit;
}

.report-check span {
  color: var(--panel-muted);
  line-height: 1.55;
}

.report-config-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-title {
  font-size: 1.6rem;
}

.table-subtitle {
  margin: 8px 0 0;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

.history-table th,
.history-table td {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 0.94rem;
}

.history-table th {
  color: var(--panel-muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-table tr:last-child td {
  border-bottom: 0;
}

.empty-card {
  display: grid;
  gap: 10px;
}

.report-preview {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 794px;
  padding: 0;
  color: #eef4ff;
  background: transparent;
  box-shadow: none;
}

.report-page {
  width: 794px;
  min-height: 1123px;
  padding: 28px;
  color: #eef4ff;
  background: #0a121b;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.report-page + .report-page {
  margin-top: 20px;
}

.report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.report-head h2 {
  margin: 8px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.report-stat {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
}

.report-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 1.7rem;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 22px;
}

.report-table th,
.report-table td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 0.9rem;
}

.report-table th {
  color: #a9b3c1;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-section {
  margin-top: 22px;
}

.report-section:first-child {
  margin-top: 0;
}

.report-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.report-list-item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.report-list-item strong {
  display: block;
  margin-bottom: 6px;
}

.report-list-item span {
  color: #a9b3c1;
  line-height: 1.6;
}

.report-mini-chart {
  height: 142px;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  margin-top: 14px;
}

.report-mini-bar {
  height: 100%;
  display: flex;
  align-items: end;
}

.report-mini-bar span {
  display: block;
  width: 100%;
  min-height: 6px;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, #4e8dfb, #2f72ea);
}

@media (max-width: 1040px) {
  .auth-layout,
  .data-grid,
  .dashboard-hero,
  .summary-grid,
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .report-config-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

  .selected-athlete-grid,
  .detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coach-roster-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .panel-page {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(104px + env(safe-area-inset-bottom, 0px));
  }

  .panel-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    padding: 12px;
  }

  .panel-header,
  .dashboard-identity {
    gap: 12px;
  }

  .panel-header-actions {
    width: 100%;
    justify-content: flex-start;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel-header .brand {
    min-width: 0;
  }

  .panel-header .brand-copy span {
    display: none;
  }

  .language-switcher {
    width: 100%;
    justify-content: stretch;
  }

  .language-switcher .lang-button {
    width: 100%;
  }

  .panel-link {
    width: 100%;
    min-height: 48px;
  }

  .auth-hero,
  .auth-card,
  .dashboard-hero,
  .summary-card,
  .chart-card,
  .data-card,
  .empty-card {
    border-radius: 24px;
    padding: 18px;
  }

  .auth-hero h1,
  .dashboard-hero h1 {
    font-size: clamp(1.65rem, 9.2vw, 2.45rem);
    line-height: 0.94;
  }

  .summary-grid,
  .charts-grid,
  .data-grid {
    gap: 14px;
  }

  .report-config-actions {
    justify-content: stretch;
  }

  .report-config-actions .panel-button {
    width: 100%;
  }

  .coach-pulse-grid {
    grid-template-columns: 1fr;
  }

  .selected-athlete-grid,
  .detail-metrics {
    grid-template-columns: 1fr;
  }

  .coach-roster-board {
    grid-template-columns: 1fr;
  }

  .chart-bars {
    gap: 6px;
    height: 150px;
  }

  .history-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .panel-page {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(118px + env(safe-area-inset-bottom, 0px));
  }

  .panel-header {
    padding: 10px;
    border-radius: 20px;
    gap: 10px;
  }

  .auth-layout {
    gap: 16px;
  }

  .auth-hero,
  .auth-card {
    padding: 16px;
    border-radius: 22px;
  }

  .auth-hero h1 {
    max-width: 8ch;
    font-size: clamp(1.52rem, 8.8vw, 2.1rem);
    line-height: 0.93;
  }

  .auth-hero p,
  .auth-card p {
    font-size: 0.95rem;
    line-height: 1.56;
  }

  .auth-bullet {
    padding: 14px 15px;
    border-radius: 16px;
  }

  .auth-card h2 {
    font-size: 1.55rem;
  }

  .field-group input {
    min-height: 50px;
    border-radius: 14px;
  }

  .panel-button {
    min-height: 46px;
    border-radius: 14px;
  }
}
