:root {
  --platform-surface: #151513;
  --platform-surface-soft: #1d1c19;
  --platform-line: rgba(180, 155, 110, 0.22);
  --platform-gold: #b49b6e;
  --platform-cream: #f5f1e8;
  --platform-muted: #aaa59b;
}

.platform-workspace {
  width: min(1380px, calc(100% - 40px));
  margin: 22px auto 48px;
  padding: clamp(20px, 3vw, 38px);
  border: 1px solid var(--platform-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 0%, rgba(180, 155, 110, 0.12), transparent 34%),
    var(--platform-surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.platform-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.platform-heading h2 {
  margin: 3px 0 0;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  letter-spacing: -0.045em;
}

.platform-kicker {
  color: var(--platform-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.platform-count,
.workout-last {
  color: var(--platform-muted);
  font-size: 0.82rem;
}

.segmented-control {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: #0b0b0a;
}

.segmented-control button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--platform-muted);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.segmented-control button.is-active {
  color: #111;
  background: var(--platform-gold);
}

.segment-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 7px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #111;
  background: #f5f1e8;
  font-size: 0.64rem;
  font-weight: 850;
}

.platform-client-picker {
  display: grid;
  grid-template-columns: auto minmax(180px, 340px);
  align-items: center;
  gap: 12px;
  margin: -4px 0 18px;
  color: var(--platform-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.platform-client-picker select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #111;
  background: #fff;
  font: inherit;
}

.coach-chat-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  min-height: min(68vh, 760px);
  gap: 16px;
}

.chat-conversation-sidebar,
.chat-conversation-pane {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #0d0d0c;
  overflow: hidden;
}

.chat-conversation-sidebar {
  display: flex;
  max-height: min(76vh, 830px);
  flex-direction: column;
}

.chat-conversation-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-conversation-sidebar__head strong { font-size: 0.9rem; }
.chat-conversation-sidebar__head span { color: var(--platform-muted); font-size: 0.68rem; }

.chat-conversation-list {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-color: var(--platform-gold) transparent;
}

.chat-conversation-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--platform-cream);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-conversation-item:hover { background: rgba(255, 255, 255, 0.045); }
.chat-conversation-item.is-active {
  border-color: rgba(180, 155, 110, 0.3);
  background: rgba(180, 155, 110, 0.11);
}

.chat-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(180, 155, 110, 0.34);
  border-radius: 50%;
  color: #17140e;
  background: linear-gradient(145deg, #d4bf91, #9f8557);
  font-size: 0.72rem;
  font-weight: 850;
}

.chat-avatar--large { width: 46px; height: 46px; }

.chat-conversation-item__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.chat-conversation-item__copy strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conversation-item__copy > span {
  overflow: hidden;
  color: var(--platform-muted);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conversation-item.has-unread .chat-conversation-item__copy strong { color: #fff; }
.chat-conversation-item.has-unread .chat-conversation-item__copy > span { color: rgba(245, 241, 232, 0.82); }

.chat-conversation-item__meta {
  display: grid;
  align-self: stretch;
  justify-items: end;
  align-content: space-between;
  gap: 5px;
}

.chat-conversation-item__meta time { color: var(--platform-muted); font-size: 0.59rem; white-space: nowrap; }
.chat-conversation-item__meta b {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #12100c;
  background: var(--platform-gold);
  font-size: 0.62rem;
}

.chat-conversation-pane {
  display: flex;
  min-height: min(68vh, 760px);
  flex-direction: column;
}

.chat-conversation-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.chat-conversation-header div { display: grid; gap: 2px; }
.chat-conversation-header strong { font-size: 0.92rem; }
.chat-conversation-header span:not(.chat-avatar) { color: var(--platform-muted); font-size: 0.68rem; }

.chat-thread {
  display: flex;
  min-height: min(48vh, 560px);
  max-height: min(65vh, 720px);
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: #0d0d0c;
  scrollbar-color: var(--platform-gold) transparent;
}

.chat-message {
  width: fit-content;
  max-width: min(76%, 680px);
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px 18px 18px 18px;
  background: var(--platform-surface-soft);
}

.chat-message--own {
  align-self: flex-end;
  border-color: rgba(180, 155, 110, 0.35);
  border-radius: 18px 6px 18px 18px;
  background: rgba(180, 155, 110, 0.16);
}

.chat-message__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 7px;
  color: var(--platform-muted);
  font-size: 0.68rem;
}

.chat-message__meta strong { color: var(--platform-gold); }
.chat-message p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.chat-message img { display: block; width: min(100%, 460px); max-height: 520px; margin-top: 10px; border-radius: 13px; object-fit: cover; }
.chat-message audio { display: block; width: min(100%, 360px); margin-top: 8px; }

.chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: #0d0d0c;
}

.chat-composer textarea {
  min-height: 46px;
  max-height: 160px;
  resize: vertical;
  border: 0;
  background: transparent;
}

.chat-composer__actions { display: flex; align-items: center; gap: 8px; }

.chat-media-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(180, 155, 110, 0.24);
  border-radius: 13px;
  background: rgba(180, 155, 110, 0.08);
}
.chat-media-preview[hidden] { display: none; }
.chat-media-preview img { width: 58px; height: 58px; border-radius: 9px; object-fit: cover; }
.chat-media-preview > div,
.chat-media-preview__audio { display: grid; gap: 3px; min-width: 0; }
.chat-media-preview strong { color: var(--platform-cream); font-size: 0.78rem; }
.chat-media-preview span { overflow: hidden; color: var(--platform-muted); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-media-preview button { border: 0; color: #ff8b8b; background: transparent; font: inherit; font-size: 0.7rem; font-weight: 800; }

.platform-icon-button {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--platform-cream);
  background: #191917;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.platform-icon-button.is-recording { color: #ff8b8b; border-color: rgba(255, 86, 86, 0.5); }

.workout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.workout-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: linear-gradient(145deg, #1d1d1a, #121211);
}

.workout-card h3 { margin: 10px 0 8px; font-size: 1.15rem; }
.workout-card p { margin: 0 0 20px; color: var(--platform-muted); line-height: 1.55; }
.workout-card .button { margin-top: auto; }
.workout-card__clients { margin-top: auto; color: var(--platform-muted); font-size: 0.75rem; line-height: 1.5; }
.workout-card__actions { display: flex; gap: 8px; margin-top: 16px; }

.progress-workspace {
  background:
    radial-gradient(circle at 14% 0%, rgba(180, 155, 110, 0.14), transparent 30rem),
    linear-gradient(180deg, #171714, #10100f);
}

.progress-heading { align-items: flex-end; }
.progress-heading p { max-width: 620px; margin: 8px 0 0; color: var(--platform-muted); }
.progress-heading .platform-client-picker { margin: 0; }

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

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

.progress-bar-card,
.progress-chart-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 62%),
    #11110f;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.progress-bar-card__top,
.progress-bar-card__bottom,
.progress-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-bar-card__top strong { font-size: 0.88rem; }
.progress-bar-card__top span {
  color: var(--platform-gold);
  font-size: 0.82rem;
  font-weight: 850;
}

.progress-meter {
  height: 11px;
  margin: 17px 0 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: #080807;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.progress-meter i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #947846, #b49b6e 58%, #dbc494);
  box-shadow: 0 0 18px rgba(180, 155, 110, 0.38);
  transition: width 0.5s ease;
}

.progress-bar-card__bottom { align-items: flex-end; }
.progress-bar-card__bottom p { margin: 0; color: var(--platform-muted); font-size: 0.7rem; line-height: 1.5; }
.progress-credit-note { color: var(--platform-muted); font-size: 0.65rem; white-space: nowrap; }

.progress-check-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(180, 155, 110, 0.32);
  border-radius: 999px;
  color: var(--platform-gold);
  background: rgba(180, 155, 110, 0.08);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
}

.progress-check-button.is-complete { color: #17130b; background: var(--platform-gold); }

.progress-chart-card { margin-bottom: 16px; }
.progress-card-heading h3 { margin: 3px 0 0; font-size: 1.12rem; }
.progress-card-heading > strong { color: var(--platform-gold); font-size: 1.35rem; }

.progress-chart-scroll { width: 100%; margin-top: 10px; overflow-x: auto; }
.progress-chart { display: block; width: 100%; min-width: 540px; height: auto; }
.progress-chart__grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.progress-chart__line { fill: none; stroke: #b49b6e; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 5px 7px rgba(180, 155, 110, 0.23)); }
.progress-chart__point { fill: #dec99c; stroke: #17130d; stroke-width: 4; cursor: help; }
.progress-chart__label { fill: var(--platform-muted); font-size: 12px; }
.progress-chart__value { fill: var(--platform-gold); font-size: 12px; font-weight: 800; }

.progress-detail-stack { display: grid; gap: 12px; margin-top: 16px; }
.progress-section,
.progress-series-card,
.cardio-log-panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: #11110f;
  overflow: hidden;
}

.progress-section > summary,
.progress-series-card > summary,
.cardio-log-panel > summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  list-style: none;
  cursor: pointer;
}

.progress-section > summary::-webkit-details-marker,
.progress-series-card > summary::-webkit-details-marker,
.cardio-log-panel > summary::-webkit-details-marker { display: none; }

.progress-section > summary span { display: grid; gap: 2px; }
.progress-section > summary small { color: var(--platform-gold); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.progress-section > summary strong { font-size: 0.92rem; }
.progress-section > summary b,
.progress-series-card > summary b { color: var(--platform-muted); font-size: 0.7rem; }
.progress-section[open] > summary { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

.progress-disclosure-content { display: grid; gap: 10px; padding: 14px; }
.progress-series-card > summary { min-height: 56px; padding: 12px 15px; }
.progress-series-card > summary span { font-size: 0.78rem; font-weight: 750; }
.progress-series-card > div { padding: 0 12px 12px; border-top: 1px solid rgba(255, 255, 255, 0.06); }

.progress-empty {
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  color: var(--platform-muted);
  font-size: 0.76rem;
  line-height: 1.6;
  text-align: center;
}

.progress-settings-form,
.cardio-log-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.progress-settings-form label,
.cardio-log-form label {
  display: grid;
  gap: 6px;
  color: var(--platform-muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.progress-settings-form input,
.progress-settings-form select,
.cardio-log-form input,
.cardio-log-form select { min-height: 46px; }

.cardio-log-panel { border-color: rgba(180, 155, 110, 0.2); background: rgba(180, 155, 110, 0.055); }
.cardio-log-panel > summary { min-height: 52px; color: var(--platform-gold); font-size: 0.76rem; font-weight: 800; }
.cardio-log-form { grid-template-columns: repeat(5, minmax(100px, 1fr)); }
.cardio-log-form__notes { grid-column: span 4; }
.progress-score-explanation { margin: 2px 4px 7px; color: var(--platform-muted); font-size: 0.68rem; line-height: 1.55; }

.workout-builder {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid rgba(180, 155, 110, 0.28);
  border-radius: 20px;
  background: #0e0e0d;
}

.client-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.client-check-grid label {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.73rem;
}

.exercise-builder-list { display: grid; gap: 10px; }
.exercise-library-picker {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  margin: 18px 0 14px;
  padding: 14px;
  border: 1px solid rgba(180, 155, 110, 0.24);
  border-radius: 16px;
  background: rgba(180, 155, 110, 0.07);
}

.exercise-library-picker .field { margin: 0; }
.exercise-library-picker select { color: var(--platform-cream); background: #171714; }
.exercise-builder-row {
  display: grid;
  grid-template-columns: 32px minmax(160px, 1.6fr) 75px 110px 100px minmax(160px, 1fr);
  align-items: end;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #181816;
}
.exercise-builder-row--cardio { grid-template-columns: 32px minmax(150px, 1.4fr) 72px 80px 105px 145px minmax(150px, 1fr); }

.exercise-builder-row label { display: grid; gap: 6px; }
.exercise-builder-row label span { color: var(--platform-muted); font-size: 0.65rem; font-weight: 700; }
.exercise-number { align-self: center; color: var(--platform-gold); font-weight: 800; }

.workout-session-modal { width: min(900px, calc(100% - 24px)); max-height: 92vh; overflow-y: auto; }
.workout-session-list { display: grid; gap: 16px; margin: 20px 0; }
.exercise-log { padding: 18px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 16px; background: #111110; }
.exercise-log__head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.exercise-log__head h3 { margin: 0 0 4px; }
.exercise-log__head p, .exercise-log__head > span { margin: 0; color: var(--platform-muted); font-size: 0.75rem; }
.set-grid { display: grid; grid-template-columns: 54px 1fr 1fr 54px; align-items: center; gap: 8px; margin-top: 7px; }
.set-grid--head { color: var(--platform-muted); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; }
.set-grid input { min-width: 0; }
.set-grid input[type="checkbox"] { width: 20px; height: 20px; justify-self: center; accent-color: var(--platform-gold); }
.cardio-interval-grid { display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; gap: 8px 14px; }
.cardio-interval-grid > span { color: var(--platform-muted); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; }
.cardio-interval-grid > span:last-of-type { text-align: center; }
.cardio-interval-grid strong { padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 0.85rem; }
.cardio-interval-grid input { width: 21px; height: 21px; justify-self: center; accent-color: var(--platform-gold); }

.notification-strip {
  display: flex;
  width: min(1380px, calc(100% - 40px));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--platform-line);
  border-radius: 16px;
  background: rgba(180, 155, 110, 0.08);
}

.notification-strip div { display: grid; gap: 3px; }
.notification-strip span { color: var(--platform-muted); font-size: 0.75rem; }

.platform-admin-panel { overflow: visible; }
.checkin-settings-form { display: grid; grid-template-columns: repeat(2, minmax(120px, 180px)) minmax(180px, 1fr) auto; align-items: end; gap: 12px; margin: 18px 0; }
.checkin-settings-form label { display: grid; gap: 7px; color: var(--platform-muted); font-size: 0.72rem; font-weight: 700; }
.toggle-field { display: flex !important; min-height: 46px; flex-direction: row; align-items: center; }
.toggle-field input { width: 20px; height: 20px; accent-color: var(--platform-gold); }
.checkin-settings-form--builder { grid-template-columns: minmax(180px, .7fr) minmax(160px, .5fr) minmax(280px, 1.8fr); align-items: start; padding: 16px; border: 1px solid rgba(180,155,110,.18); border-radius: 18px; background: rgba(180,155,110,.045); }
.checkin-settings-form--builder .checkin-question-builder { grid-column: 3; grid-row: span 2; }
.checkin-question-builder textarea { min-height: 142px; resize: vertical; }
.checkin-question-builder small { color: rgba(255,255,255,.42); font-size: .64rem; font-weight: 500; line-height: 1.5; }
.checkin-settings-form--builder > .button { align-self: end; }
.checkin-history { display: flex; flex-wrap: wrap; gap: 8px; }
.checkin-history button { display: grid; gap: 3px; min-width: 120px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; color: var(--platform-cream); background: #161614; text-align: left; cursor: pointer; }
.checkin-history span { color: var(--platform-muted); font-size: .68rem; }

.checkin-backdrop {
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(12px);
}
.checkin-modal {
  width: min(680px, calc(100% - 24px));
  max-height: 92vh;
  overflow-y: auto;
  isolation: isolate;
  background: #11110f !important;
  opacity: 1 !important;
}
.checkin-form { display: grid; gap: 14px; }
.checkin-range > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.checkin-range input { accent-color: var(--platform-gold); }
.checkin-question-hint {
  display: block;
  margin: -2px 0 2px;
  color: var(--platform-gold);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.45;
}
.checkin-checkbox-field { margin: 0; padding: 0; border: 0; }
.checkin-checkbox-field legend { margin-bottom: 8px; color: var(--platform-cream); font-weight: 650; }
.checkin-checkbox-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.checkin-checkbox-grid label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #181816;
  font-size: 0.72rem;
  cursor: pointer;
}
.checkin-checkbox-grid input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--platform-gold); }
.checkin-answer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.checkin-answer-grid > div { display: grid; gap: 7px; padding: 14px; border-radius: 14px; background: #181816; }
.checkin-answer-grid span { color: var(--platform-muted); font-size: .7rem; }
.checkin-answer-grid strong { line-height: 1.45; }
.platform-empty { grid-column: 1 / -1; padding: 30px; border: 1px dashed rgba(255,255,255,.12); border-radius: 16px; color: var(--platform-muted); text-align: center; }

@media (max-width: 1400px) and (min-width: 861px) {
  .topbar--planner { grid-template-columns: minmax(0, 1fr); }
  .top-actions--planner { width: 100%; }
  .topbar-session { margin-left: auto; }
}

/* Planner refinement: warmer contrast, clearer time rhythm and stronger focus. */
.planner-stage--minimal {
  border: 1px solid rgba(180, 155, 110, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% -10%, rgba(180, 155, 110, 0.11), transparent 34%),
    linear-gradient(180deg, #161613 0%, #0c0c0b 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.planner-toolbar {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.025);
}

.legend-chip--minimal {
  border-color: rgba(var(--item-accent-rgb, 180, 155, 110), 0.28);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.day-column--minimal {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.095);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 9rem),
    #1a1a17;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.day-column.is-today {
  border-color: rgba(180, 155, 110, 0.72);
  box-shadow: inset 0 0 0 1px rgba(180, 155, 110, 0.13), 0 22px 52px rgba(0, 0, 0, 0.3);
}

.day-column.is-today::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, #d6bd8c, transparent);
  box-shadow: 0 0 22px rgba(180, 155, 110, 0.45);
}

.day-header--minimal {
  min-height: 52px;
  align-items: center;
  padding: 0.15rem 0.15rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.day-heading strong {
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  text-transform: capitalize;
}

.day-heading span { color: rgba(245, 241, 232, 0.55); }

.day-timeline {
  border-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018), transparent 34%),
    #11110f;
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, 0.22);
}

.timeline-marker span {
  color: rgba(245, 241, 232, 0.62);
  font-size: 0.61rem;
  letter-spacing: 0.045em;
}

.timeline-marker::after { border-color: rgba(255, 255, 255, 0.105); }

.planner-item--timeline {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 11px;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.planner-item--timeline h4 { font-weight: 750; letter-spacing: -0.018em; }

.day-tabs .chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #171715;
}

.day-tabs .chip--active {
  border-color: rgba(180, 155, 110, 0.58);
  color: #111;
  background: linear-gradient(135deg, #d6bd8c, #a98e5e);
  box-shadow: 0 8px 20px rgba(180, 155, 110, 0.18);
}

@media (max-width: 860px) {
  .platform-workspace { width: calc(100% - 20px); margin-top: 12px; padding: 18px; border-radius: 22px; }
  .platform-heading { align-items: flex-start; }
  .exercise-builder-row { grid-template-columns: 28px 1fr 72px; }
  .exercise-builder-row .exercise-notes { grid-column: 2 / -1; }
  .exercise-library-picker { grid-template-columns: 1fr auto auto; }
  .checkin-settings-form { grid-template-columns: 1fr 1fr; }
  .checkin-settings-form--builder { grid-template-columns: 1fr 1fr; }
  .checkin-settings-form--builder .checkin-question-builder { grid-column: 1 / -1; grid-row: auto; }
  .checkin-checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coach-chat-layout { grid-template-columns: 1fr; min-height: 0; }
  .chat-conversation-sidebar { max-height: none; }
  .chat-conversation-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 72vw);
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
  }
  .chat-conversation-pane { min-height: 68vh; }
  .chat-thread { min-height: 54vh; }
  .notification-strip { width: calc(100% - 20px); }
  .weekly-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekly-progress-grid .progress-bar-card:last-child { grid-column: 1 / -1; }
  .progress-settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-settings-form .button { width: 100%; }
  .cardio-log-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cardio-log-form__notes { grid-column: span 2; }

  .planner-stage--minimal {
    border-radius: 24px;
    padding: 0.65rem;
  }

  .planner-toolbar { padding: 0.55rem; border-radius: 17px; }

  .day-tabs {
    position: sticky;
    top: max(0.35rem, env(safe-area-inset-top));
    z-index: 30;
    padding: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    background: rgba(10, 10, 9, 0.92);
    backdrop-filter: blur(12px);
  }

  .day-column--mobile {
    padding: 0.75rem;
    border-radius: 22px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 9rem),
      #181815;
  }

  .day-timeline--mobile { border-radius: 18px; }
}

@media (max-width: 580px) {
  .topbar--admin .topbar-tabs--planner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: unset;
    width: 100%;
    overflow: visible;
  }
  .topbar-tabs--planner .tab-button {
    width: 100%;
    min-width: 0;
    padding-inline: 0.45rem;
    font-size: 0.74rem;
  }
  .platform-heading { display: grid; }
  .segmented-control { width: 100%; }
  .segmented-control button { flex: 1; }
  .platform-client-picker { grid-template-columns: 1fr; }
  .chat-workspace { width: 100%; min-width: 0; padding: 8px; }
  .chat-conversation-list { grid-auto-columns: minmax(230px, 84vw); }
  .chat-conversation-item { min-height: 62px; }
  .chat-conversation-header { min-height: 66px; padding: 10px 12px; }
  .chat-conversation-pane { min-width: 0; min-height: calc(100dvh - 190px); }
  .chat-thread { min-height: 44vh; max-height: calc(100dvh - 350px); padding: 10px; }
  .chat-message { max-width: 90%; }
  .chat-composer { grid-template-columns: 1fr; }
  .chat-composer__actions { justify-content: space-between; overflow: visible; }
  .platform-icon-button { padding: 0 10px; }
  .chat-composer__actions .button { width: auto; min-width: 92px; }
  .chat-media-preview { grid-template-columns: auto minmax(0, 1fr); }
  .chat-media-preview button { grid-column: 2; justify-self: start; padding: 0; }
  .workout-grid { grid-template-columns: 1fr; }
  .exercise-builder-row { grid-template-columns: 24px 1fr 65px; padding: 9px; }
  .exercise-builder-row label:nth-of-type(3), .exercise-builder-row label:nth-of-type(4) { grid-column: span 1; }
  .exercise-log { padding: 12px; }
  .exercise-log__head { display: grid; }
  .set-grid { grid-template-columns: 38px 1fr 1fr 40px; }
  .notification-strip { align-items: flex-start; }
  .notification-strip span { display: none; }
  .progress-workspace { width: calc(100% - 14px); padding: 14px; }
  .progress-heading { display: grid; align-items: start; }
  .progress-heading .platform-client-picker { grid-template-columns: 1fr; width: 100%; }
  .weekly-progress-grid,
  .progress-secondary-grid { grid-template-columns: 1fr; }
  .weekly-progress-grid .progress-bar-card:last-child { grid-column: auto; }
  .progress-bar-card,
  .progress-chart-card { padding: 16px; border-radius: 17px; }
  .progress-bar-card__bottom { align-items: center; }
  .progress-card-heading { align-items: flex-start; }
  .progress-chart { min-width: 500px; }
  .progress-section > summary { min-height: 62px; padding: 13px 14px; }
  .progress-settings-form,
  .cardio-log-form { grid-template-columns: 1fr; }
  .cardio-log-form__notes { grid-column: auto; }
  .progress-settings-form input,
  .progress-settings-form select,
  .cardio-log-form input,
  .cardio-log-form select { min-height: 50px; font-size: 16px; }
  .checkin-settings-form, .checkin-answer-grid { grid-template-columns: 1fr; }
  .checkin-settings-form--builder { gap: 14px; padding: 12px; }
  .checkin-settings-form--builder input[type="time"],
  .checkin-settings-form--builder textarea { width: 100%; min-height: 50px; font-size: 16px; }
  .checkin-settings-form--builder .checkin-question-builder { grid-column: auto; }
  .checkin-settings-form--builder .toggle-field { min-height: 42px; }
  .checkin-settings-form--builder > .button { width: 100%; min-height: 50px; }
  .exercise-library-picker { grid-template-columns: 1fr 1fr; }
  .exercise-library-picker .field { grid-column: 1 / -1; }
  .exercise-library-picker .button,
  .exercise-library-picker .ghost-button { width: 100%; }
  .checkin-checkbox-grid { grid-template-columns: 1fr 1fr; }
  .checkin-form .field { gap: 8px; }
  .checkin-form input,
  .checkin-form select,
  .checkin-form textarea { min-height: 50px; font-size: 16px; }
  .checkin-form input[type="range"] { min-height: 34px; }
  .checkin-form textarea { min-height: 110px; }
  .checkin-modal .section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .checkin-modal .section-header > div { min-width: 0; }
  .checkin-modal .section-header > .ghost-button {
    width: auto;
    min-width: 82px;
    padding-inline: 0.85rem;
  }
  .checkin-modal .section-header h2 { font-size: 1.35rem; }

  .planner-stage--minimal { width: 100%; padding: 0.5rem; border-radius: 21px; }
  .planner-toolbar { padding: 0.5rem; }
  .planner-legend-list--minimal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend-chip--minimal { min-height: 46px; justify-content: center; text-align: center; }
  .day-tabs { gap: 0.3rem; padding: 0.35rem; }
  .day-tabs .chip { min-height: 44px; border-radius: 11px; }
  .day-column--mobile { padding: 0.65rem; }
  .day-header--minimal { min-height: 58px; }
  .timeline-marker span { font-size: 0.65rem; font-weight: 750; }
  .checkin-modal, .workout-session-modal { width: 100%; max-height: 96vh; border-radius: 22px 22px 0 0; }
}
