.studio-client-area:has(.coach-client-workspace) { max-width: 1360px; }
.coach-client-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.coach-client-directory h2, .coach-client-hero h2 { margin: 0; font-size: 1.5rem; }
.coach-client-hero p:not(.studio-kicker) { margin: 4px 0 0; color: var(--muted); }
.coach-client-content, .coach-client-history, .coach-client-log-history, .coach-client-records { display: grid; gap: 12px; }
.coach-client-nav { align-self: start; padding: 13px 12px; }
.coach-client-nav-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.coach-client-nav-group {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f5f4fa;
}
.coach-client-nav-group.is-current { background: var(--studio-purple-soft, #efebff); border-color: #c9b9ec; }
.coach-client-nav-groups p { margin: 0 0 5px; padding: 0 7px; color: var(--muted); font-size: .75rem; font-weight: 750; }
.coach-client-nav-links { display: flex; flex-wrap: wrap; gap: 3px; }
.coach-client-nav-links .studio-button { justify-content: flex-start; text-align: left; min-height: 36px; }
.coach-client-nav-links .studio-button.quiet { background: transparent; border-color: transparent; }
.coach-client-nav-links .studio-button.quiet:hover { background: #fff; }
.coach-client-nav-compact { display: none; }
.coach-client-filterbar, .coach-client-extra, .coach-client-records, .coach-client-gallery { margin-block-start: 14px; }
.coach-client-roster { display: grid; list-style: none; padding: 0; margin: 0; }
.coach-client-roster > li { border-block-start: 1px solid var(--line); }
.coach-client-roster-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.coach-client-roster-row:hover { background: var(--studio-purple-soft, #f1eff8); }
.coach-client-roster-person { display: grid; gap: 4px; overflow-wrap: anywhere; }
.coach-client-roster-chevron { font-size: 1.35rem; color: var(--green); }
.coach-client-roster small { color: var(--muted); }
.coach-client-roster .coach-client-badge { justify-self: start; }
.coach-client-list-chips, .coach-client-list-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.coach-client-list-chips { margin-block-start: 5px; }
.coach-client-list-chip, .coach-client-list-name { display: inline-flex; align-items: baseline; gap: 6px; }
.coach-client-list-chip { padding: 2px 8px; border: 1px solid var(--line); border-radius: 99px; font-size: .78rem; }
.coach-client-list-dot { width: .65em; height: .65em; border-radius: 50%; display: inline-block; flex: 0 0 .65em; background: var(--client-list-color); }
.coach-client-list-toolbar { margin-block-end: 12px; }
.coach-client-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.coach-client-shortcuts .studio-button { display: grid; align-content: start; justify-items: start; gap: 5px; padding: 14px; text-align: left; }
.coach-client-shortcuts small { color: var(--muted); font-weight: 500; }
.coach-client-overview-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 12px;
}
.coach-client-overview-charts .coach-chart { min-width: 0; }
.coach-client-panel .coach-list li small { display: block; }
.coach-client-content { min-width: 0; }
.coach-client-content > .studio-status { margin: 0; }
.coach-client-tabs, .coach-client-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.coach-client-header { justify-content: space-between; }
.coach-client-badge { display: inline-flex; align-items: center; min-height: 28px; border-radius: 99px; background: #e4f1ea; padding: 4px 11px; color: var(--green); font-size: .82rem; font-weight: 750; }
.coach-client-panel form { margin-top: 14px; }
.coach-client-panel h4 { margin: 0; }
.coach-client-filter { max-width: 370px; margin-top: 12px; }
.coach-client-fields, .coach-client-stats, .coach-client-gallery, .coach-client-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.coach-client-question { display: grid; grid-template-columns: 1fr 1.25fr auto; gap: 8px; align-items: end; margin-block: 10px; }
.coach-client-fieldset { min-width: 0; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.coach-client-fieldset legend { color: var(--green); font-size: .95rem; padding-inline: 4px; font-weight: 700; }
.coach-client-expand, .coach-client-history details, .coach-client-assignment { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf8; }
.coach-client-expand summary, .coach-client-history summary { cursor: pointer; font-weight: 700; }
.coach-client-expand[open] > summary, .coach-client-history details[open] > summary { margin-bottom: 12px; }
.coach-client-facts { margin-block: 8px; }
.coach-client-facts dt { color: var(--muted); }
.coach-client-facts dd { font-weight: 700; margin-left: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.coach-client-gallery figure { margin: 0; }
.coach-client-gallery img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; border-radius: 10px; background: #e8efeb; }
.coach-client-gallery figcaption { font-size: .85rem; margin-block-start: 5px; color: var(--muted); }
.coach-client-assignment .studio-actions { margin-top: 8px; }
.coach-client-set-list { display: grid; gap: 7px; }
.coach-client-set-list + button, .coach-client-set-list ~ label, .coach-client-fields + label { margin-top: 10px; }
.coach-client-fieldset > label:last-child, .coach-client-fieldset details { margin-top: 10px; }
.coach-client-set { display: grid; grid-template-columns: minmax(45px, auto) repeat(4, minmax(0, 1fr)); gap: 7px; align-items: end; }
.coach-client-set > strong { align-self: center; font-size: .85rem; }
.coach-set-target { display: block; font-size: .77rem; font-weight: 500; color: var(--muted); }
.coach-log-exercise { border: 1px solid var(--line); border-radius: 13px; padding: 12px 15px; min-width: 0; }
.coach-log-exercise > summary { cursor: pointer; }
.coach-log-exercise > summary > span { display: inline-block; margin-left: .7rem; font-size: .83rem; color: var(--muted); }
.coach-log-exercise > [data-log-exercise] { margin-top: 12px; }
.coach-load-calculator { margin-top: 12px; }
.coach-load-calculator output { display: block; margin: .65rem 0; font-weight: 650; }
.coach-client-phases, .coach-client-log-history ul { padding-inline-start: 20px; }
.coach-client-table { overflow-x: auto; }
.coach-client-table table { width: 100%; border-collapse: collapse; text-align: left; }
.coach-client-table th, .coach-client-table td { padding: 8px; border-bottom: 1px solid var(--line); }
.coach-chart { margin: 12px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf8; }
.coach-chart figcaption { display: flex; flex-wrap: wrap; gap: 5px 14px; justify-content: space-between; align-items: baseline; }
.coach-chart figcaption span { font-size: .86rem; color: var(--muted); }
.coach-chart svg { width: 100%; max-height: 210px; }
.coach-chart svg .coach-chart-grid { stroke: #bdd0c6; fill: none; }
.coach-chart svg polyline { stroke: var(--green); stroke-width: 2.5; fill: none; }
.coach-chart svg circle { fill: var(--green); stroke: #fff; stroke-width: 1; }
.coach-chart svg text { fill: var(--muted); font-size: 12px; }
.coach-chart summary { cursor: pointer; color: var(--muted); font-size: .86rem; }
.coach-chart ul { padding-inline-start: 18px; }
.coach-chart-empty p { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }
.coach-history-tabs { margin-top: 12px; }
.coach-history-comparison { padding: 7px 9px; border-radius: 8px; background: #eeebf8; font-size: .85rem; }
.coach-reported-loads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); gap: 8px; align-items: start; }
.coach-reported-loads summary small { display: block; margin-inline-start: 15px; color: var(--muted); font-weight: 500; }
.coach-nutrition-draft { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #f5f4fa; }
.coach-nutrition-draft details { margin-block-start: 12px; font-size: .9rem; }
.coach-nutrition-draft summary { cursor: pointer; font-weight: 650; }
@media (max-width: 590px) {
  .coach-client-nav-groups { display: none; }
  .coach-client-nav-compact { display: block; }
}
@media (max-width: 560px) {
  .coach-client-roster-row { gap: 7px; }
  .coach-client-set { grid-template-columns: 1fr 1fr; }
  .coach-client-set > strong, .coach-client-question > button { grid-column: 1 / -1; }
  .coach-client-question { grid-template-columns: 1fr; }
}

.coach-client-check { display: flex; align-items: center; gap: 8px; }
.coach-client-check input { width: 18px; min-height: 18px; height: 18px; }
.coach-client-comparison { display: grid; margin: 14px 0; gap: 10px; }
.coach-client-comparison figcaption { font-weight: 700; }
.coach-client-comparison > div { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f7faf8; }
.coach-client-comparison meter { width: 100%; height: .75rem; accent-color: var(--green); }
.coach-client-comparison label { font-weight: 500; }
.coach-client-comparison label:first-of-type meter::-webkit-meter-optimum-value { background: #849a93; }

.coach-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 16px;
}
.coach-history-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
}
.coach-history-card h4, .coach-history-card p { margin: 0; }
.coach-history-card time { color: var(--green); font-size: .9rem; font-weight: 700; }
.coach-history-card header p, .coach-history-exercises { color: var(--muted); font-size: .88rem; }
.coach-history-card details > summary { cursor: pointer; font-weight: 650; }
.coach-history-card details[open] > summary { margin-bottom: 10px; }
.coach-history-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.coach-history-metrics > li {
  padding: 3px 8px;
  border-radius: 8px;
  background: #e9f2ed;
  font-size: .8rem;
  font-weight: 600;
}
.coach-client-documents { display: grid; gap: 8px; list-style: none; padding: 0; }
.coach-client-documents > li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 15px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.coach-client-documents small { display: block; color: var(--muted); }
