* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: #1f1f1f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 30px 70px;
  background: #ffffff;
  min-height: 100vh;
  box-shadow: none;
}

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

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 760;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 18px;
  font-weight: 760;
}

h2 small {
  margin-left: 4px;
  color: #7b766d;
  font-size: 0.72rem;
  font-weight: 600;
}

h3 {
  font-size: 1rem;
  margin: 22px 0 14px;
  font-weight: 760;
}

h3 small {
  color: #878278;
  font-size: 0.9rem;
  font-weight: 650;
}

.header p {
  margin-top: 8px;
  color: #5f5a52;
}


.refresh {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d9d2c6;
  border-radius: 8px;
  background: #ffffff;
  color: #2c2a27;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.refresh:hover {
  background: #f7f3ec;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.kpi-card {
  min-height: 94px;
  padding: 18px 20px;
  border-radius: 8px;
  background: #f2f0eb;
  border: 1px solid #ece7dd;
}

.kpi-card span {
  display: block;
  color: #5f5a52;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.kpi-card strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
}

.divider {
  height: 1px;
  background: #e3ded4;
  margin: 0 0 24px;
}

.theme-panel {
  width: 100%;
}

.theme-divider {
  margin-top: 36px;
  margin-bottom: 22px;
}

.coach-filter-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 12px 18px;
  margin-bottom: 26px;
  border-radius: 8px;
  background: #f2f0eb;
  color: #5a5650;
  font-size: 1rem;
  font-weight: 650;
}

.coach-filter-panel label {
  flex: 0 0 auto;
}

.coach-filter-dropdown {
  width: 190px;
  color: #222222;
  font-weight: 600;
}

.coach-filter-dropdown .Select-control {
  min-height: 36px;
  border-color: #cfc9bd;
  border-radius: 8px;
}

.theme-two h2 {
  margin-top: 0;
}

.compact-chart-panel {
  margin-top: 0;
}

.density-note {
  margin-top: 2px;
  font-size: 0.9rem;
}

.chart-panel {
  margin-top: 28px;
}

.error-message {
  margin-bottom: 14px;
  color: #b42318;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.92rem;
}

.summary-table th,
.summary-table td {
  border-bottom: 1px solid #e6e0d6;
  padding: 11px 8px;
  text-align: left;
  vertical-align: middle;
}

.summary-table th {
  color: #565149;
  font-weight: 650;
}

.summary-table td:nth-child(n + 2),
.summary-table th:nth-child(n + 2) {
  text-align: right;
}

.summary-table th:nth-child(1),
.summary-table td:nth-child(1) {
  width: 28%;
}

.summary-table th:nth-child(2),
.summary-table td:nth-child(2),
.summary-table th:nth-child(3),
.summary-table td:nth-child(3),
.summary-table th:nth-child(4),
.summary-table td:nth-child(4) {
  width: 24%;
}

.below-target {
  color: #b23b3b;
  font-weight: 750;
}

.section-note {
  margin-top: 10px;
  color: #756f66;
  font-size: 0.84rem;
  font-style: italic;
}

.js-plotly-plot,
.dash-graph {
  border-radius: 8px;
}

@media (max-width: 760px) {
  .page {
    width: 100%;
    padding: 28px 18px 48px;
  }

  .header {
    flex-direction: column;
  }

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

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .summary-table {
    min-width: 640px;
  }

  .coach-filter-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .coach-filter-panel label {
    flex: 0 0 auto;
  }

  .coach-filter-dropdown {
    width: 100%;
    flex: 1 1 auto;
  }

  .coach-filter-dropdown .Select,
  .coach-filter-dropdown .Select-control {
    width: 100%;
  }
}
