/* Home's four metrics keep equal grid tracks with compact, readable content. */
.main-shell[data-page='overview'] .stats-grid > .stat-card {
  padding: 10px 12px;
  min-height: 0;
}
.main-shell[data-page='overview'] .stats-grid > .stat-card > strong {
  font-size: 28px;
  line-height: 1.1;
  margin-block: 3px;
}
.main-shell[data-page='overview'] .stats-grid .stat-detail {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.3;
}

/* Home grid owns spacing between sections; nested cards need no extra margin. */
.main-shell .client-allowance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #173e75;
  border-radius: var(--ui-radius);
  background: #173e75;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none;
}
.client-allowance-bar .icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.screen-deck:has(> .client-allowance-bar) {
  gap: 8px;
}

.workspace-home-grid > div > #checkin-reminder > .checkin-reminder,
.workspace-home-grid > div > #upcoming-sessions > .upcoming-sessions {
  margin-bottom: 0;
}

.session-cash-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--white);
}
.session-cash-panel h3 {
  margin: 0 0 8px;
}
.session-cash-panel .booking-cash-form {
  margin-top: 14px;
}
.session-cash-history {
  margin-top: 14px;
}
.session-cash-history summary {
  font-size: 13px;
  font-weight: 700;
  padding: 8px 0;
  cursor: pointer;
}

/* The client identity link covers its entire row, including empty space. */
.client-table tbody tr {
  position: relative;
}
.client-table .client-identity::after {
  content: '';
  position: absolute;
  inset: 0;
}
.client-table td:last-child .icon-btn {
  position: relative;
  z-index: 1;
}
.client-roster-table td {
  white-space: normal;
  vertical-align: middle;
}
/* Roster rows are a collapsed table on desktop and a grid on phones. Keep the
   filter/header boundary intact and inset only the separators between clients. */
.main-shell .client-table.client-roster-table tbody td {
  border-bottom-color: transparent;
}
.main-shell .client-table.client-roster-table tbody tr + tr {
  border-top-color: transparent;
}
.client-roster-table tbody tr + tr::before {
  content: '';
  position: absolute;
  inset-inline: var(--row-divider-inset);
  top: -1px;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.client-roster-table .client-identity {
  align-items: center;
}
.client-roster-table .client-identity > span:not(.avatar) {
  min-width: 0;
}
.client-roster-table .client-identity span > span {
  max-width: none;
  white-space: normal;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.client-roster-facts {
  display: grid;
  gap: 7px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.client-roster-facts > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
}
.client-roster-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.client-roster-facts dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.client-roster-access {
  margin-top: 7px;
}
.client-roster-notice .tag {
  gap: 6px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  font-size: 11px;
  letter-spacing: 0;
  text-align: left;
}
.client-roster-notice .tag .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .screen-stage .client-table.client-roster-table tr {
    gap: 6px 0;
    padding: 12px;
  }
  .screen-stage .client-table.client-roster-table .client-identity {
    gap: 10px;
  }
  .screen-stage .client-roster-table .avatar {
    width: 32px;
    height: 32px;
    flex: none;
  }
  .screen-stage .client-table.client-roster-table td.client-roster-notice {
    grid-column: 1;
    padding-left: 42px !important;
    line-height: 1.4;
  }
  .screen-stage .client-table.client-roster-table td.client-roster-notice.is-empty {
    display: none !important;
  }
  .screen-stage .client-table.client-roster-table td:last-child {
    grid-column: 2;
    grid-row: 1 / 3;
    padding-left: 0 !important;
    align-self: center;
  }
  .screen-stage .client-roster-table .client-identity span > span {
    font-size: 12px;
    margin-top: 4px;
  }
}
@media (hover: none) {
  .client-table tbody tr:hover:where(html:not([data-touch-input]) *) {
    background: transparent;
  }
}

/* Calendar view filters activate only from their fields. */
.calendar-filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.calendar-filters .calendar-filter-field > select {
  margin: 0;
  min-height: 44px;
  border-radius: var(--ui-radius);
  color: var(--navy);
}
.calendar-filters > .calendar-filter-field {
  flex: 1;
  min-width: 150px;
}
@media (max-width: 760px) {
  .screen-stage .calendar-filter-field {
    min-width: 0;
    font-size: 12px;
    font-weight: 650;
    color: var(--muted);
  }
}

.conversation-search {
  margin: 12px;
  width: calc(100% - 24px);
  box-sizing: border-box;
}
.conversation-search input {
  min-width: 0;
  width: 100%;
}
.conversation-row[hidden],
.conversation-search-empty[hidden] {
  display: none;
}
.conversation-search-empty {
  padding: 0 12px;
}
.conversation-copy-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.conversation-copy-heading > strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-copy-heading > time {
  flex-shrink: 0;
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.messages-all-clients {
  white-space: nowrap;
}

.client-session-history {
  display: grid;
}
.client-session-history > .panel {
  margin: 0;
  min-width: 0;
}
.client-history-date {
  font-size: 13px;
  margin: 18px 0 8px;
  color: var(--muted);
}
.client-history-session:first-of-type .client-history-date {
  margin-top: 0;
}

/* Compact client session cards, with dates inset from the panel edge. */
.client-history-session + .client-history-session {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.client-session-history .client-history-date {
  margin: 0 0 10px;
}
.client-session-history .booking-card {
  padding: 0;
  border: 0;
  gap: 10px;
}
.client-session-history .booking-time {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.client-session-history .booking-time small {
  margin: 0;
}
.client-session-history .booking-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.client-session-history .booking-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  gap: 6px;
}
.client-session-history .booking-actions .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.client-session-history .booking-change-cutoff {
  grid-column: 1 / -1;
}
.client-session-history .booking-info > p {
  margin: 5px 0;
}
.client-session-history > .panel > .panel-heading {
  padding: 0;
}

/* Keep mobile heading actions compact while titles stay on the same baseline. */
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .main-shell .page-heading:has(> .btn, > .calendar-create-actions) {
    min-height: 44px;
  }
  .main-shell .screen-deck > .page-heading > .btn,
  .main-shell .screen-document-content > .page-heading > .btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.2;
    gap: 5px;
  }
  .main-shell .page-heading > .btn > .icon {
    width: 14px;
    height: 14px;
  }
  .main-shell
    .screen-stage
    :is(
      .panel-heading,
      .group-actions,
      .list-toolbar,
      .notification-controls,
      .client-review-actions
    )
    .btn {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.2;
    gap: 5px;
  }
  .main-shell
    .screen-stage
    :is(
      .panel-heading,
      .group-actions,
      .list-toolbar,
      .notification-controls,
      .client-review-actions
    )
    .btn
    > .icon {
    width: 14px;
    height: 14px;
  }
  .main-shell[data-page='calendar'] .screen-deck.screen-inline.screen-with-heading {
    grid-template-rows: auto 44px minmax(0, 1fr);
  }
  .main-shell[data-page='calendar'] .screen-inline-controls .section-tabs {
    height: 44px;
  }
  .main-shell[data-page='calendar'] .section-tabs button {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.2;
  }
  .main-shell .screen-stage .calendar-week-controls {
    grid-template-columns: 36px minmax(0, 1fr) 36px 36px;
  }
  .main-shell .screen-stage .calendar-week-controls > .icon-btn {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 6px;
  }
  .main-shell .screen-stage .calendar-week-controls > .icon-btn .icon {
    width: 16px;
    height: 16px;
  }
  .main-shell .screen-stage .calendar-range-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .main-shell .screen-stage .calendar-range-controls > [data-action='calendar-today'] {
    flex: none;
    width: auto;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.2;
    gap: 5px;
  }
  .main-shell .screen-stage .calendar-range-controls > [data-action='calendar-today'] .icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }
  .main-shell .screen-stage .calendar-week-controls .calendar-view-toggle {
    margin-left: auto;
    padding: 2px;
    border: 1px solid var(--line);
    background: var(--paper);
    gap: 0;
  }
  .main-shell .screen-stage .calendar-week-controls .calendar-view-toggle button {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1.2;
    border: 0;
  }
}

.month-cell:disabled {
  cursor: default;
  opacity: 0.48;
  box-shadow: none;
}
.calendar-availability-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.calendar-availability-error {
  color: var(--ink);
}
.calendar-loading-indicator {
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border: 2px solid var(--line);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: calendar-availability-spin 0.8s linear infinite;
}
@keyframes calendar-availability-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .calendar-loading-indicator {
    animation: none;
  }
}
#app .month-cell:is(.month-loading, .month-load-error) {
  opacity: 1;
  background: var(--white);
  border-color: var(--line);
  border-style: dashed;
}
#app .month-cell:is(.month-loading, .month-load-error) .month-cell-count {
  color: var(--muted);
}
#app button.week-slot:is(.client-slot-loading, .client-slot-error) {
  background: var(--white);
  border-top-style: dashed;
  cursor: default;
}
#app button.week-slot.client-slot-past {
  background: var(--calendar-past-bg);
}
.calendar-past-dot {
  background: var(--calendar-past-bg);
  border: 1px solid var(--line);
}
.week-day-heading:disabled {
  cursor: default;
  opacity: 0.48;
}
.calendar-week-controls > .icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.booking-payment-choice {
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  padding: 14px;
  margin: 16px 0;
  min-width: 0;
  background: var(--surface);
}
.booking-payment-choice legend {
  font-weight: 700;
  padding: 0 5px;
}
.booking-payment-choice p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 10px;
}
.booking-payment-choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.booking-payment-choice input[type='radio'] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
}
.booking-payment-choice input[type='radio'] {
  min-height: 18px;
  padding: 0;
  box-shadow: none;
}

/* My sessions: compact rows with all actions in the shared overflow menu. */
.client-session-history {
  gap: 12px;
}
.client-session-history > .panel {
  padding: 12px;
  overflow: visible;
}
.client-session-history > .workspace-fold {
  padding: 0;
}
.client-session-history .panel-heading {
  margin-bottom: 6px;
}
.client-session-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 0 10px 10px;
  border-left: 3px solid var(--sport-blue);
  min-width: 0;
}
.client-session-row + .client-session-row {
  border-top: 1px solid var(--line);
}
.client-session-copy {
  flex: 1;
  min-width: 0;
}
.client-session-when {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
  line-height: 1.4;
}
.client-session-when strong {
  font-size: 14px;
  color: var(--navy);
}
.client-session-when time {
  color: var(--muted);
}
.client-session-copy h3 {
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.client-session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.client-session-meta > span + span::before {
  content: '·';
  margin-right: 8px;
}
.client-session-row > .action-menu > summary {
  background: transparent;
  color: var(--navy);
}
.client-session-row .action-menu-items {
  border-radius: var(--ui-radius);
}
.client-session-row.is-cancelled .client-session-copy {
  opacity: 0.65;
}

.self-booking-slots:has(.booking-hour-picker) {
  display: block;
}
.booking-hour-picker {
  width: 100%;
}
.booking-time-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--muted);
}
.booking-hour-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}
.booking-minute-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.booking-hour-grid .self-booking-slot,
.booking-minute-grid .self-booking-slot {
  min-width: 0;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 13px;
}

.self-booking-selection.has-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px;
  margin: 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--palette-edf2ff, #edf2ff);
  line-height: 1.3;
}
.self-booking-selection.has-selection > span {
  font-size: 11px;
  color: var(--muted);
}
.self-booking-selection.has-selection > strong {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.self-booking-selection.has-selection > small {
  font-size: 12px;
  color: var(--muted);
}

/* Keep the booking flow short on mobile; use the calendar's existing time zone. */
.client-booking-modal > .modal-description {
  margin: 0 0 10px;
}
#self-booking-form .booking-form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
#self-booking-form .booking-date-content > .fine-print {
  margin: 8px 12px 14px;
}
#self-booking-form .booking-form-grid input {
  margin-top: 6px;
}
#self-booking-form .booking-zone-note {
  margin: 5px 0 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
#self-booking-form .self-booking-slots {
  margin: 10px 0;
}
#self-booking-form .booking-time-label {
  margin-bottom: 6px;
}
#self-booking-form .booking-hour-grid {
  margin-bottom: 10px;
}
#self-booking-form .self-booking-selection.has-selection {
  padding: 9px 12px;
  margin: 10px 0 6px;
  gap: 2px;
}
#self-booking-form > .text-link {
  display: block;
  margin: 0 0 10px;
  padding: 4px 0;
}
#self-booking-form .booking-payment-choice {
  margin: 10px 0;
  padding: 10px 12px;
}
#self-booking-form .booking-payment-choice p {
  margin: 4px 0 0;
}
#self-booking-form .booking-payment-choice label {
  padding: 8px 0;
}
#self-booking-form > label[for='self-booking-note'] {
  margin-bottom: 6px;
}
#self-booking-form > textarea {
  margin-top: 0;
}
#self-booking-form .modal-actions {
  margin-top: 12px;
}
.client-sessions-left {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.client-session-history > .client-sessions-left {
  padding-inline: 12px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.calendar-filters #calendar-zone {
  font-weight: 400;
}

/* Client Home: one consistent stack, led by the current workout. */
.client-home-dashboard {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.client-home-dashboard > .panel,
.client-home-dashboard > nav {
  margin: 0;
}
.client-home-dashboard .panel {
  border-radius: var(--ui-radius);
}
.client-home-dashboard > :is(#upcoming-sessions, #checkin-reminder) {
  display: grid;
  gap: inherit;
}
.client-home-dashboard > :is(#upcoming-sessions, #checkin-reminder) > * {
  margin-block: 0;
}
.checkin-reminder.checkin-overdue {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 16px;
  background: #fff0ec;
  border: 1px solid #e9c3b9;
  border-left: 4px solid #d77b65;
  border-radius: var(--ui-radius);
}
.checkin-reminder.checkin-overdue > .icon {
  width: 20px;
  height: 20px;
  align-self: center;
  color: #a34d3a;
}
.checkin-overdue strong {
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 20px;
  color: #793e32;
}
.checkin-overdue p {
  grid-column: 2;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #80574e;
}
.checkin-reminder.checkin-overdue > .btn {
  grid-column: 2;
  justify-self: start;
  max-width: 100%;
  background: #fffaf8;
  border-color: #d5a295;
  color: #703b30;
  box-shadow: none;
  flex-direction: row-reverse;
}
.checkin-reminder.checkin-overdue > .btn:hover:where(html:not([data-touch-input]) *) {
  background: #fae4de;
}
.client-home-dashboard > #upcoming-sessions:empty,
.client-home-dashboard > #checkin-reminder:empty {
  display: none;
}
.client-home-dashboard .client-next-session {
  margin: 0;
  padding: 0;
}
.client-home-dashboard :is(.client-next-session, .nutrition-home-summary) > .panel-heading {
  min-height: 62px;
  padding: 8px 16px;
  margin: 0;
  flex-wrap: nowrap;
}
.client-home-dashboard :is(.client-next-session, .nutrition-home-summary) > .panel-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  flex: 1 1 0;
}
.client-home-dashboard .nutrition-home-summary > .panel-heading > .icon {
  flex-shrink: 0;
}
.client-home-dashboard .client-next-session-heading .text-link {
  font-size: 12px;
  gap: 6px;
}
.client-home-dashboard .client-session-link {
  padding: 16px;
  gap: 12px;
}
.client-home-dashboard .client-session-link strong {
  font-size: 16px;
}
.client-home-dashboard .client-session-link small {
  margin-top: 3px;
  font-size: 12px;
}
.client-home-dashboard .client-session-icon {
  border-radius: var(--ui-radius);
  padding: 10px;
}
.client-home-dashboard .client-session-link .session-zone {
  display: none;
}
.client-home-dashboard .next-workout-card {
  padding: 18px;
  border-left: 0;
}
.client-home-dashboard .next-workout-heading {
  gap: 8px;
}
.client-home-dashboard .next-workout-heading .tag {
  font-size: 9px;
  padding: 5px 7px;
}
.client-home-dashboard .next-workout-heading .text-link {
  font-size: 11px;
  white-space: nowrap;
}
.main-shell[data-page='overview'] .client-home-dashboard .next-workout-card h2 {
  font-size: 26px;
  margin: 6px 0 5px;
  line-height: 1.15;
}
.client-home-dashboard .next-workout-card p {
  margin: 0;
  line-height: 1.5;
  font-size: 12px;
}
.client-home-dashboard .next-workout-card .weekly-plan-note {
  margin-top: 6px;
  font-size: 11px;
}
.client-home-dashboard .next-workout-card > .btn {
  margin-top: 14px;
  min-height: 36px;
}
.client-week-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 7px;
  font-size: 11px;
  color: #c1d1e5;
}
.client-week-progress strong {
  font-weight: 600;
}
.client-home-resume progress {
  display: block;
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: #ffffff24;
  overflow: hidden;
}
.client-home-resume progress::-webkit-progress-bar {
  background: #ffffff24;
  border-radius: 8px;
}
.client-home-resume progress::-webkit-progress-value {
  background: var(--palette-075bff, #075bff);
  border-radius: 8px;
}
.client-home-resume progress::-moz-progress-bar {
  background: var(--palette-075bff, #075bff);
}
.client-home-dashboard .nutrition-home-summary {
  display: block;
  margin: 0;
  padding: 0;
}
.client-home-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.client-home-dashboard .nutrition-home-summary > div {
  flex: 1;
  min-width: 0;
}
.client-home-dashboard .nutrition-home-summary > div > strong {
  font-size: 15px;
}
.client-home-dashboard .nutrition-home-icon {
  border-radius: var(--ui-radius);
}
.client-home-dashboard .nutrition-home-values {
  flex: 1;
  gap: 12px;
  margin: 0;
}
.client-home-dashboard .nutrition-home-values b {
  font-size: 15px;
  line-height: 1.4;
}
.client-home-dashboard .nutrition-home-values small {
  font-size: 10px;
}
.client-home-dashboard .client-home-links {
  margin: 0;
  gap: 10px;
}
.client-home-dashboard .client-home-links .btn {
  border-radius: var(--ui-radius);
  min-height: 36px;
  padding: 8px 10px;
}

.client-home-dashboard .client-home-prompt {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.client-home-prompt .next-workout-heading {
  justify-content: space-between;
}
.client-home-prompt .next-workout-heading > .icon {
  color: #c7e0ff;
  width: 22px;
  height: 22px;
}
.client-home-dashboard .client-home-prompt > p {
  margin-bottom: 14px;
}
.client-home-dashboard .client-home-prompt > .btn {
  margin-top: auto;
}

/* Client and coach introductions share the same Home welcome-card treatment. */
.main-shell[data-page='overview'] .client-home-dashboard .intake-prompt,
.main-shell[data-page='overview'] .coach-setup-card,
html[data-theme='night'] .main-shell[data-page='overview'] .client-home-dashboard .intake-prompt,
html[data-theme='night'] .main-shell[data-page='overview'] .coach-setup-card {
  padding: 18px;
  background: var(--workspace-hero);
  color: #fff;
  border: 1px solid #3c5778;
  border-left: 3px solid var(--palette-4d9aff, #4d9aff);
  box-shadow:
    0 10px 24px var(--palette-10213926, #10213926),
    inset 0 1px 0 #ffffff14;
}
.client-home-dashboard .intake-prompt h2,
.main-shell[data-page='overview'] .coach-setup-card h2 {
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
  margin: 14px 0 8px;
}
.client-home-dashboard .intake-prompt p,
.main-shell[data-page='overview'] .coach-setup-card p {
  color: #c1d1e5;
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 14px;
}
.main-shell[data-page='overview'] .coach-setup-card small {
  color: #c1d1e5;
}
.client-home-dashboard .intake-prompt .tag-blue,
.main-shell[data-page='overview'] .coach-setup-card .tag-blue {
  color: #c7e0ff;
  background: var(--palette-2a496c, #2a496c);
  border-color: #49698e;
  font-size: 9px;
}
.main-shell[data-page='overview'] .client-home-dashboard .intake-prompt > .btn,
.main-shell[data-page='overview'] .coach-setup-card > .btn {
  background: var(--palette-2a4565, #2a4565);
  color: #edf4ff;
  border-color: #557493;
  min-height: 40px;
  padding: 9px 14px;
  font-size: 13px;
}

/* Match the compact mobile card spacing across screens, including nested stacks. */
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .main-shell
    :is(
      .workspace-home-grid,
      .workspace-home-grid > div,
      .client-home-dashboard,
      .dashboard-grid,
      .stats-grid,
      .plan-grid,
      .exercise-grid,
      .training-library-grid,
      .account-grid,
      .package-grid,
      .client-section,
      .progress-sections,
      .notification-list,
      .notebook-list,
      .workout-detail-list,
      .coach-statistics-layout,
      .client-session-history,
      .attention-client-list
    ) {
    gap: 10px;
  }
  .main-shell
    :is(
      .workspace-home-grid > div,
      .client-home-dashboard,
      .dashboard-grid,
      .account-grid,
      .package-grid,
      .client-section,
      .coach-statistics-layout
    )
    > .panel {
    margin-block: 0;
  }
  .main-shell .screen-stage > .panel {
    margin-bottom: 10px;
  }
  .main-shell
    :is(.screen-stage, .screen-document-content)
    > :is(
      .package-notice,
      .package-single-reference,
      .package-grid,
      .client-access-card,
      .package-history
    ) {
    margin-bottom: 10px;
  }
}

:is(.plan-heading-actions, .client-heading-actions) {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 760px), (max-width: 960px) and (max-height: 500px) {
  .main-shell .page-heading:has(> :is(.plan-heading-actions, .client-heading-actions)) {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .main-shell
    .page-heading:has(> :is(.plan-heading-actions, .client-heading-actions))
    > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .main-shell .page-heading > :is(.plan-heading-actions, .client-heading-actions) {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: auto;
    gap: 6px;
  }
  .main-shell .page-heading :is(.plan-heading-actions, .client-heading-actions) .btn {
    min-width: 0;
    max-width: none;
    min-height: 36px;
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1.2;
    gap: 4px;
    white-space: nowrap;
  }
  .main-shell .page-heading :is(.plan-heading-actions, .client-heading-actions) .icon {
    display: none;
  }
}

.session-review-card > .panel-heading {
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
}
.session-review-card .context-help {
  flex: 1;
  margin: 0;
}
.session-review-card > .client-session-row {
  align-items: center;
  margin: 8px 16px;
  padding: 2px 0 2px 8px;
  gap: 8px;
}
.session-review-card .client-session-when {
  font-size: 11px;
  line-height: 1.3;
}
.session-review-card .client-session-copy h3 {
  margin-block: 2px;
  line-height: 1.3;
}
.session-review-card .client-session-meta {
  line-height: 1.3;
}
.session-review-card .client-session-row > .btn {
  flex-shrink: 0;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

#coach-session-now:empty,
#session-review:empty {
  display: none;
}

.session-outcome-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  background: var(--sky-soft);
  color: var(--ink);
}
.session-outcome-notice > .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.session-outcome-notice strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}
.session-outcome-notice span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.4;
}
.session-outcome-charged {
  border-color: #b78a42;
  background: color-mix(in srgb, var(--white) 88%, #d99825);
}
.client-outcome-body {
  padding: 0 16px 14px;
}
.client-outcome-card .panel-heading .btn {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}
.session-outcome-choices {
  padding: 0;
  margin: 0;
  border: 0;
  display: grid;
  gap: 8px;
}
.session-outcome-legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.session-outcome-choice {
  display: block;
  position: relative;
  margin: 0;
}
.session-outcome-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.session-outcome-choice > span {
  display: block;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  color: var(--ink);
  cursor: pointer;
}
.session-outcome-choice strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}
.session-outcome-choice small {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 3px;
  color: var(--muted);
}
.session-outcome-choice input:checked + span {
  border-color: var(--sport-blue);
  background: var(--sky-soft);
  box-shadow: inset 0 0 0 1px var(--sport-blue);
}
.session-outcome-choice input:focus-visible + span {
  outline: 2px solid var(--sport-blue);
  outline-offset: 2px;
}
.session-outcome-choice input:disabled + span {
  opacity: 0.5;
  cursor: not-allowed;
}
