html,
body {
  min-height: 100%;
}

:root {
  --color-text: #303437;
  --color-muted: #697571;
  --color-brand: #60756c;
  --color-brand-rgb: 96, 117, 108;
  --color-brand-soft: #eef5f1;
  --color-brand-line: #d7e2dc;
  --color-action: #d8ca85;
  --color-action-soft: #fbf7e7;
  --color-surface: #fdfefd;
  --color-page: #f6f8f5;
  --color-panel: #ffffff;
  --color-panel-soft: #f3f6f4;
  --color-line: #dfe6e2;
  --color-success: #6bb98b;
  --color-warning: #e0bf71;
  --shadow-soft: 0 8px 20px rgba(42, 51, 48, 0.06);
  --shadow-button: 0 1px 3px rgba(42, 51, 48, 0.12), 0 1px 2px rgba(42, 51, 48, 0.08);
  --shadow-button-hover: 0 4px 10px rgba(42, 51, 48, 0.14), 0 2px 4px rgba(42, 51, 48, 0.08);
}

body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(253, 253, 254, 0.96);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 1px 10px rgba(51, 50, 53, 0.04);
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  padding: 14px 22px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-shell:has([data-mode-view="instructor"].is-active) .topbar {
  position: static;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  background: var(--color-brand);
  border-radius: 8px;
  color: var(--color-surface);
  display: flex;
  font-size: 24px;
  font-weight: 600;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand-block h1,
.section-head h2,
.pin-box h2,
.modal-title {
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
}

.brand-block p,
.pin-box p {
  color: var(--color-muted);
  margin: 2px 0 0;
}

.eyebrow {
  color: var(--color-brand);
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.mode-tabs {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
}

.mode-tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--color-muted);
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
}

.mode-tab.is-active {
  background: var(--color-panel);
  color: var(--color-brand);
  box-shadow: var(--shadow-soft);
}

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

.system-interface-switch {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  color: var(--color-brand);
  display: inline-flex;
  gap: 6px;
  min-height: 38px;
  padding: 3px 8px;
}

.system-interface-switch-label {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.system-interface-switch .form-select {
  background-color: transparent;
  border: 0;
  box-shadow: none;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  min-height: 30px;
  min-width: 148px;
  padding-bottom: 0;
  padding-top: 0;
}

.system-interface-switch .form-select:focus {
  box-shadow: none;
}

.language-switch {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  display: flex;
  gap: 2px;
  padding: 3px;
}

.language-switch button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  min-height: 30px;
  min-width: 36px;
}

.language-switch button.is-active {
  background: var(--color-panel);
  color: var(--color-brand);
  box-shadow: 0 1px 5px rgba(51, 50, 53, 0.08);
}

.status-dot {
  background: var(--color-success);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.icon-button,
.primary-button,
.secondary-button,
.status-button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
}

.icon-button {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-brand);
  min-width: 42px;
}

[data-pwa-install]:not([hidden]) {
  position: fixed;
  right: 126px;
  top: 14px;
  z-index: 80;
}

.primary-button {
  background: var(--color-brand);
  border: 1px solid var(--color-brand);
  color: #ffffff;
  font-weight: 700;
  padding: 0 14px;
}

.secondary-button {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-text);
  padding: 0 14px;
}

.workspace {
  padding: 14px 16px 24px;
}

.mode-view {
  display: none;
}

.mode-view.is-active {
  display: block;
}

.instructor-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(300px, 330px) minmax(0, 1fr);
}

.instructor-grid.is-session-open {
  grid-template-columns: minmax(0, 1fr);
}

.instructor-grid.is-session-open .queue-panel {
  display: none;
}

.instructor-grid.is-session-open .active-panel {
  min-height: calc(100vh - 28px);
}

.desktop-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.queue-panel,
.active-panel,
.admin-day,
.manual-panel,
.doctor-patients,
.doctor-view,
.pin-box {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.queue-panel,
.active-panel,
.admin-day,
.manual-panel,
.doctor-patients,
.doctor-view {
  padding: 14px;
}

.section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.planning-date-control {
  align-items: center;
  color: var(--color-muted);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 6px;
  margin: 0;
  text-transform: uppercase;
}

.planning-date-control .form-control {
  font-size: 0.88rem;
  min-height: 34px;
  padding: 5px 8px;
  width: 142px;
}

.queue-panel .section-head {
  align-items: stretch;
  flex-direction: column;
}

.queue-panel .section-actions {
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}

.instructor-select-control {
  color: var(--color-muted);
  display: grid;
  flex: 1 1 100%;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 4px;
  margin: 0;
  text-transform: uppercase;
}

.instructor-select-control .form-select {
  font-size: 0.92rem;
  min-height: 38px;
  padding: 6px 8px;
}

.queue-panel .planning-date-control span {
  display: none;
}

.queue-panel .planning-date-control .form-control {
  width: 132px;
}

.queue-list {
  display: grid;
  gap: 10px;
}

.day-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.load-metric {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 10px;
}

.load-metric strong {
  color: var(--color-brand);
  display: block;
  font-size: 24px;
  line-height: 1;
}

.load-metric span {
  color: var(--color-muted);
  display: block;
  font-size: 12px;
  margin-top: 5px;
}

.day-schedule {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.schedule-slot {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 10px;
}

.schedule-slot.is-selected {
  border-color: var(--color-brand);
  box-shadow: inset 0 0 0 1px var(--color-brand);
}

.schedule-slot.is-break {
  cursor: default;
}

.slot-time {
  color: var(--color-brand);
  font-weight: 600;
  padding-top: 2px;
}

.slot-clients {
  display: grid;
  gap: 6px;
}

.slot-client {
  background: var(--color-panel-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 8px;
}

.slot-client.is-mine {
  background: var(--color-action-soft);
  border-color: var(--color-action);
}

.slot-client.is-break {
  background: #fbf3e3;
  border-color: #ead7ad;
}

.slot-client.is-free {
  background: #eef5f1;
  border-color: var(--color-brand-line);
}

.slot-client span {
  font-weight: 600;
}

.slot-client small,
.slot-client em {
  color: var(--color-muted);
  font-size: 12px;
  font-style: normal;
}

.queue-title {
  margin: 4px 0 10px;
}

.queue-title h3 {
  font-size: 18px;
  margin: 0;
}

.queue-item,
.active-client,
.exercise-row,
.history-row,
.doctor-summary-row {
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-panel);
}

.queue-item {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.queue-item h3,
.active-client h3,
.exercise-title {
  font-size: 17px;
  line-height: 1.2;
  margin: 0;
}

.meta-line {
  align-items: center;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
}

.pill {
  background: var(--color-brand-soft);
  border-radius: 999px;
  color: var(--color-brand);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.pill.alert {
  background: var(--color-action-soft);
  color: var(--color-brand);
}

.capacity {
  background: var(--color-panel-soft);
  border-radius: 8px;
  font-weight: 600;
  padding: 9px 12px;
}

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

.active-client {
  cursor: pointer;
  min-height: 104px;
  padding: 12px;
}

.active-client-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.active-client-head button {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-muted);
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.active-client-head button:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.active-client.is-selected {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(var(--color-brand-rgb), 0.12);
}

.active-client.is-empty {
  align-items: center;
  color: var(--color-muted);
  display: flex;
  justify-content: center;
}

.progress-line {
  background: var(--color-panel-soft);
  border-radius: 999px;
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-line span {
  background: var(--color-brand);
  display: block;
  height: 100%;
}

.training-board {
  min-height: 430px;
}

.client-header {
  border-bottom: 1px solid var(--color-line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.client-header h2 {
  font-size: 28px;
  margin: 0;
}

.medical-note {
  background: var(--color-brand-soft);
  border-left: 4px solid var(--color-brand);
  border-radius: 8px;
  color: var(--color-text);
  margin-top: 10px;
  padding: 10px 12px;
}

.exercise-list {
  display: grid;
  gap: 10px;
}

.exercise-row {
  align-items: center;
  cursor: default;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) 154px 36px;
  min-height: 96px;
  padding: 10px;
}

.exercise-row:hover {
  border-color: var(--color-brand-line);
}

.exercise-position {
  align-items: center;
  background: var(--color-panel-soft);
  border-radius: 8px;
  display: flex;
  font-weight: 600;
  height: 42px;
  justify-content: center;
}

.exercise-timeline {
  display: grid;
  gap: 8px;
  grid-template-columns: 0.72fr minmax(360px, 1.55fr) 0.72fr;
}

.timeline-cell {
  background: var(--color-panel-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
}

.timeline-cell span {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.timeline-cell strong {
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.timeline-cell em {
  color: var(--color-brand);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
}

.timeline-cell.is-current {
  background: var(--color-panel);
  border-color: var(--color-brand-line);
}

.timeline-cell.is-next.is-changed {
  background: var(--color-action-soft);
  border-color: var(--color-action);
}

.current-line {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) 190px;
}

.current-exercise-title {
  margin-bottom: 2px;
}

.weight-stepper,
.quick-weight {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 34px minmax(74px, 1fr) 34px;
}

.weight-stepper button,
.quick-weight button {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  font-weight: 600;
  height: 36px;
}

.weight-value,
.quick-weight input {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  font-size: 19px;
  font-weight: 600;
  height: 36px;
  min-width: 74px;
  padding: 3px 6px;
  text-align: center;
}

.compact-exercise-select {
  min-width: 220px;
}

.row-disclosure {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-brand);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  opacity: 0.72;
  text-align: center;
  width: 36px;
}

.row-disclosure:hover {
  border-color: var(--color-brand);
  opacity: 1;
}

.status-button {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.18;
  min-width: 0;
  padding: 0 10px;
}

.status-button.is-done {
  background: #e9faef;
  border-color: #9be0b1;
  color: #166333;
}

.status-button.is-skipped {
  background: #fff4e4;
  border-color: var(--color-warning);
  color: #7a4a0c;
}

.status-button.is-replaced {
  background: var(--color-brand-soft);
  border-color: #a697c8;
  color: var(--color-brand);
}

.active-panel {
  padding: 14px;
}

.active-panel .section-head {
  margin-bottom: 10px;
}

.pwa-offline-status {
  align-items: center;
  background: var(--color-brand-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  color: var(--color-brand);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 10px;
  min-height: 48px;
  padding: 8px 10px;
}

.pwa-offline-status > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.pwa-offline-status strong,
.pwa-offline-status span,
.pwa-offline-status small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-offline-status strong {
  font-size: 13px;
}

.pwa-offline-status span,
.pwa-offline-status small {
  color: var(--color-muted);
  font-size: 12px;
}

.pwa-offline-status .secondary-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
}

.pwa-offline-status.is-offline {
  background: #fff7e9;
  border-color: #e8c57a;
  color: #7a4a0c;
}

.pwa-offline-status.is-error {
  background: #fff1f1;
  border-color: #d8a0a0;
  color: #873232;
}

.pwa-offline-status.is-syncing {
  background: #f2f6fb;
  border-color: #bfd0df;
}

.active-client-strip {
  gap: 8px;
  margin-bottom: 10px;
}

.active-client {
  min-height: 78px;
  padding: 9px 10px;
}

.active-client h3 {
  font-size: 15px;
}

.active-client .meta-line {
  font-size: 12px;
  gap: 6px;
}

.progress-line {
  height: 6px;
  margin-top: 8px;
}

.client-header {
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.client-header h2 {
  font-size: 22px;
}

.medical-note {
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 10px;
}

.exercise-list {
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.exercise-row.is-compact {
  gap: 6px;
  grid-template-columns: 38px 52px minmax(112px, 0.68fr) minmax(270px, 1.45fr) minmax(160px, 0.86fr) 100px;
  min-height: 58px;
  min-width: 800px;
  padding: 6px;
}

.exercise-row.is-compact .exercise-position {
  border: 1px solid var(--color-line);
  border-radius: 6px;
  height: 34px;
}

.exercise-row.is-compact .timeline-cell {
  border-color: var(--color-line);
  border-radius: 6px;
  gap: 2px;
  min-height: 44px;
  padding: 6px 8px;
}

.exercise-row.is-compact .timeline-cell span {
  font-size: 10px;
  letter-spacing: 0.03em;
}

.exercise-row.is-compact .timeline-cell strong,
.exercise-row.is-compact .timeline-cell em {
  font-size: 13px;
  line-height: 1.15;
}

.exercise-row.is-compact .timeline-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exercise-row.is-compact .timeline-cell.is-code {
  align-items: center;
  justify-items: center;
  text-align: center;
}

.exercise-row.is-compact .timeline-cell.is-code strong {
  color: var(--color-brand);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.exercise-row.is-compact .timeline-cell.is-current {
  background: #ffffff;
}

.exercise-row.is-compact .timeline-cell.is-next.is-changed {
  background: #fbf7e7;
}

.exercise-cell-head {
  align-items: baseline;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.exercise-cell-head .current-exercise-title {
  color: var(--color-text);
  flex: 1 1 auto;
  min-width: 0;
}

.exercise-row.is-compact .current-line {
  gap: 6px;
  grid-template-columns: minmax(150px, 1fr) 136px;
}

.exercise-row.is-compact .compact-exercise-select {
  font-size: 13px;
  min-height: 32px;
  min-width: 0;
  padding: 4px 28px 4px 8px;
}

.exercise-row.is-compact .quick-weight {
  gap: 4px;
  grid-template-columns: 28px minmax(64px, 1fr) 28px;
}

.exercise-row.is-compact .quick-weight button,
.exercise-row.is-compact .quick-weight input {
  border-radius: 6px;
  height: 32px;
}

.exercise-row.is-compact .quick-weight input {
  font-size: 15px;
  min-width: 64px;
}

.exercise-comment {
  color: var(--color-muted);
  display: block;
  font-size: 11px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-line {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 72px;
}

.next-line input {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  height: 32px;
  padding: 3px 5px;
  text-align: center;
  width: 72px;
}

.exercise-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: 34px 34px;
}

.exercise-row.is-compact .status-button,
.exercise-row.is-compact .row-disclosure {
  border-radius: 6px;
  min-height: 34px;
}

.exercise-row.is-compact .status-button {
  font-size: 12px;
  gap: 5px;
  padding: 0;
}

.exercise-row.is-compact .status-button span {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.active-panel .active-client-strip {
  display: none;
}

.training-board {
  display: grid;
  gap: 8px;
}

.tablet-toolbar {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 8px;
}

.toolbar-title {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.toolbar-title strong {
  color: var(--color-text);
  font-size: 15px;
}

.session-note {
  color: var(--color-muted);
  font-size: 12px;
}

.toolbar-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.slot-position {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.patient-board {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.patient-board.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.patient-board.is-dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patient-board.is-focused {
  grid-template-columns: minmax(0, 1fr);
}

.patient-sheet {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px;
}

.patient-sheet.is-selected {
  border-color: var(--color-brand-line);
  box-shadow: 0 0 0 2px rgba(var(--color-brand-rgb), 0.1);
}

.patient-sheet.is-empty {
  align-items: center;
  color: var(--color-muted);
  font-size: 13px;
  justify-content: center;
  min-height: 210px;
}

.patient-sheet.single {
  max-width: none;
}

.patient-board.is-focused .patient-sheet {
  min-height: calc(100vh - 250px);
}

.focus-patient-button {
  color: var(--color-brand);
}

.sheet-head {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.sheet-title {
  min-width: 0;
}

.sheet-title span {
  color: var(--color-muted);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.sheet-title strong {
  color: var(--color-text);
  display: block;
  font-size: 14px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-meta {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  margin-top: 2px;
}

.sheet-actions {
  align-items: center;
  display: flex;
  gap: 4px;
}

.sheet-icon-button {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  color: var(--color-muted);
  display: inline-flex;
  font-size: 11px;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.sheet-icon-button:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.sheet-icon-button.is-primary {
  color: var(--color-brand);
}

.patient-note {
  background: var(--color-brand-soft);
  border-left: 3px solid var(--color-brand);
  border-radius: 6px;
  color: var(--color-text);
  display: -webkit-box;
  font-size: 11px;
  line-height: 1.25;
  max-height: 44px;
  overflow: hidden;
  padding: 6px 8px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.table-shell {
  border: 1px solid var(--color-line);
  border-radius: 6px;
  max-height: 392px;
  overflow-x: hidden;
  overflow-y: auto;
}

.patient-sheet.single .table-shell {
  max-height: 456px;
}

.exercise-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.exercise-table th,
.exercise-table td {
  border-bottom: 1px solid var(--color-line);
  font-size: 10px;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  padding: 3px 2px;
  text-align: left;
  vertical-align: middle;
}

.exercise-table th {
  background: var(--color-panel-soft);
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.exercise-table .exercise-row {
  background: var(--color-panel);
  border: 0;
  border-radius: 0;
  display: table-row;
  min-height: 0;
  padding: 0;
}

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

.exercise-table .seq {
  color: var(--color-muted);
  font-family: var(--font-mono);
  width: 20px;
}

.exercise-table .code {
  width: 44px;
}

.exercise-table .prev {
  width: 44px;
}

.exercise-table .weight {
  width: 54px;
}

.exercise-table .actions {
  width: 48px;
}

.patient-sheet.single .exercise-table th,
.patient-sheet.single .exercise-table td {
  font-size: 12px;
  padding: 4px 6px;
}

.patient-sheet.single .exercise-table .seq {
  width: 42px;
}

.patient-sheet.single .exercise-table .code {
  width: 96px;
}

.patient-sheet.single .exercise-table .prev,
.patient-sheet.single .exercise-table .weight {
  width: 118px;
}

.patient-sheet.single .exercise-table .actions {
  width: 86px;
}

.exercise-table tbody td.seq,
.exercise-table tbody td.code {
  background: rgba(var(--color-brand-rgb), 0.045);
}

.exercise-table tbody td.seq {
  border-left: 2px solid rgba(var(--color-brand-rgb), 0.28);
}

.exercise-table tbody td.code {
  border-right: 1px solid rgba(var(--color-brand-rgb), 0.12);
}

.exercise-code-select,
.weight-trigger {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 5px;
  color: var(--color-text);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  height: 24px;
  min-height: 0;
  padding: 1px 3px;
  text-align: center;
  width: 100%;
}

.patient-sheet.single .exercise-code-select,
.patient-sheet.single .weight-trigger,
.patient-sheet.single .weight-prev {
  font-size: 13px;
  height: 30px;
}

.patient-sheet.single .note-button,
.patient-sheet.single .exercise-table .status-button {
  font-size: 12px;
  height: 28px;
  width: 28px;
}

.exercise-code-select {
  appearance: none;
  background-image: none;
  cursor: pointer;
  padding-right: 2px;
}

.exercise-code-select:focus-visible,
.weight-trigger:focus-visible {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 2px rgba(var(--color-brand-rgb), 0.12);
  outline: 0;
}

.weight-trigger:hover {
  border-color: var(--color-brand-line);
  color: var(--color-brand);
}

.weight-prev {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-left: 3px solid var(--color-muted);
  border-radius: 5px;
  color: var(--color-muted);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  line-height: 1;
  width: 100%;
}

.weight-next {
  position: relative;
}

.next-weight-field {
  display: block;
}

.next-code {
  align-items: center;
  color: var(--color-brand);
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  justify-content: center;
}

.table-exercise-row.has-next-change .next-code {
  background: #fbf7e7;
  border-radius: 4px;
  display: inline-flex;
  font-size: 9px;
  height: 14px;
  left: 3px;
  line-height: 1;
  min-width: 14px;
  position: absolute;
  top: 4px;
}

.table-exercise-row.has-next-change .weight-next .weight-trigger {
  padding-left: 16px;
}

.table-exercise-row.has-next-change td.weight-next {
  background: #fbf7e7;
}

.weight-popover {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft), 0 16px 34px rgba(29, 39, 34, 0.14);
  color: var(--color-text);
  display: grid;
  gap: 8px;
  padding: 10px;
  position: fixed;
  width: 260px;
  z-index: 1080;
}

.weight-popover[hidden] {
  display: none;
}

.weight-popover-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding-right: 28px;
}

.weight-popover-head span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
}

.weight-popover-head output {
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.weight-slider {
  accent-color: var(--color-brand);
  width: 100%;
}

.weight-popover-controls {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.weight-popover-step {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.weight-expand-button {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  color: var(--color-muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
}

.weight-expand-button.is-active,
.weight-expand-button:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.weight-popover-close {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  color: var(--color-muted);
  display: inline-flex;
  height: 24px;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
}

.weight-popover-close:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.row-actions {
  align-items: center;
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

.note-button,
.exercise-table .status-button {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 5px;
  color: var(--color-muted);
  display: inline-flex;
  font-size: 10px;
  height: 20px;
  justify-content: center;
  min-width: 0;
  padding: 0;
  width: 20px;
}

.note-button:hover,
.exercise-table .status-button:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.note-button.has-current {
  border-color: var(--color-brand-line);
  color: var(--color-brand);
}

.exercise-table .status-button.is-done {
  background: #e9faef;
  border-color: #9be0b1;
  color: #166333;
}

.exercise-table .status-button.is-skipped {
  background: #fff4e4;
  border-color: var(--color-warning);
  color: #7a4a0c;
}

.exercise-table .status-button.is-replaced {
  background: var(--color-brand-soft);
  border-color: var(--color-brand-line);
  color: var(--color-brand);
}

.exercise-table tr.status-completed td,
.exercise-table tr.status-modified_next td,
.exercise-table tr.status-replaced td {
  background: #f4fbf7;
}

.exercise-table tr.status-skipped td {
  background: #f6f4f1;
}

/* Instructor exercise board readability pass. */
.patient-board {
  gap: 12px;
}

.patient-sheet {
  gap: 10px;
  padding: 10px;
}

.sheet-head {
  gap: 10px;
}

.sheet-title strong {
  font-size: 16px;
}

.patient-meta {
  font-size: 11px;
}

.patient-note {
  font-size: 12px;
  line-height: 1.3;
  padding: 8px 10px;
}

.table-shell {
  background: var(--color-panel);
  max-height: 492px;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.patient-sheet.single .table-shell {
  max-height: calc(100vh - 330px);
}

.exercise-table {
  min-width: 580px;
  width: 100%;
}

.patient-sheet.single .exercise-table {
  min-width: 900px;
}

.exercise-table th,
.exercise-table td {
  font-size: 12px;
  line-height: 1.25;
  overflow: visible;
  padding: 8px 8px;
}

.exercise-table th {
  font-size: 11px;
  letter-spacing: 0;
  z-index: 2;
}

.exercise-table .exercise-row {
  height: 50px;
}

.exercise-table .seq {
  width: 34px;
}

.exercise-table .code {
  width: 72px;
}

.exercise-table .prev {
  width: 86px;
}

.exercise-table .weight {
  width: 112px;
}

.exercise-table .actions {
  width: 78px;
}

.patient-sheet.single .exercise-table th,
.patient-sheet.single .exercise-table td {
  font-size: 14px;
  padding: 9px 10px;
}

.patient-sheet.single .exercise-table .seq {
  width: 56px;
}

.patient-sheet.single .exercise-table .code {
  width: 116px;
}

.patient-sheet.single .exercise-table .prev,
.patient-sheet.single .exercise-table .weight {
  width: 152px;
}

.patient-sheet.single .exercise-table .actions {
  width: 116px;
}

.exercise-table th.prev,
.exercise-table td.prev {
  background: #f7f1e8;
}

.exercise-table th.current,
.exercise-table td.weight-current {
  background: #edf7f1;
}

.exercise-table th.next,
.exercise-table td.weight-next {
  background: #eef4fb;
}

.exercise-table th.prev {
  color: #75634a;
}

.exercise-table th.current {
  color: #2f6846;
}

.exercise-table th.next {
  color: #385d82;
}

.exercise-table tbody td.seq,
.exercise-table tbody td.code {
  background: #f8faf9;
}

.exercise-code-select,
.weight-trigger,
.weight-prev {
  border-radius: 6px;
  font-size: 14px;
  height: 34px;
  padding: 3px 6px;
}

.patient-sheet.single .exercise-code-select,
.patient-sheet.single .weight-trigger,
.patient-sheet.single .weight-prev {
  font-size: 15px;
  height: 38px;
}

.weight-prev {
  background: #fffaf2;
  color: #625542;
}

.weight-current .weight-trigger {
  border-color: #b9dac5;
}

.weight-next .weight-trigger {
  border-color: #bfd2e4;
}

.next-weight-field {
  align-items: center;
  display: flex;
  gap: 6px;
}

.table-exercise-row.has-next-change .next-code {
  background: #fff3ce;
  border: 1px solid #ead380;
  border-radius: 6px;
  color: #6d5811;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  height: 30px;
  left: auto;
  line-height: 1;
  min-width: 34px;
  position: static;
  top: auto;
}

.table-exercise-row.has-next-change .weight-next .weight-trigger {
  flex: 1 1 auto;
  padding-left: 6px;
}

.table-exercise-row.has-next-change td.weight-next {
  background: #fbf5df;
}

.row-actions {
  gap: 6px;
  justify-content: center;
}

.note-button,
.exercise-table .status-button {
  border-radius: 6px;
  font-size: 13px;
  height: 32px;
  width: 32px;
}

.patient-sheet.single .note-button,
.patient-sheet.single .exercise-table .status-button {
  font-size: 14px;
  height: 36px;
  width: 36px;
}

.admin-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.assignment-board {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.assignment-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.assignment-head h3 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.planning-legend,
.preference-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assignment-slots {
  display: grid;
  gap: 8px;
}

.assignment-slot {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 8px 10px;
}

.assignment-slot-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.assignment-time {
  color: var(--color-brand);
  font-size: 17px;
  font-weight: 600;
}

.assignment-slot-summary {
  color: var(--color-muted);
  font-size: 12px;
  text-align: right;
}

.assignment-slot-summary.is-empty {
  color: #9a4d3b;
}

.assignment-list {
  display: grid;
  gap: 4px;
}

.planning-source {
  color: var(--color-muted);
  font-size: 12px;
  margin: 4px 0 0;
}

.planning-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.planning-metric {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 7px 10px;
}

.planning-metric strong {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 600;
}

.planning-metric span {
  color: var(--color-muted);
  font-size: 12px;
}

.staff-schedule-overview {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 9px;
}

.staff-schedule-head {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.staff-schedule-head h4 {
  font-size: 16px;
  line-height: 1.2;
  margin: 1px 0 0;
}

.staff-schedule-head > span {
  color: var(--color-muted);
  font-size: 12px;
  text-align: right;
}

.staff-schedule-list {
  display: grid;
  gap: 6px;
}

.staff-schedule-row {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 7px;
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(190px, 0.75fr) minmax(260px, 1.6fr);
  min-height: 48px;
  padding: 7px 8px;
}

.staff-schedule-row.is-full {
  border-color: #e6b4a7;
}

.staff-schedule-row.is-empty {
  background: #fbf6f4;
  border-color: #ead0c8;
}

.staff-schedule-time {
  color: var(--color-brand);
  font-size: 16px;
  font-weight: 800;
}

.staff-schedule-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.staff-schedule-summary strong,
.staff-schedule-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-schedule-summary strong {
  font-size: 13px;
}

.staff-schedule-summary span {
  color: var(--color-muted);
  font-size: 12px;
}

.staff-schedule-staff {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  min-width: 0;
}

.staff-schedule-chip {
  background: #eaf6ee;
  border: 1px solid #98c8ad;
  border-radius: 6px;
  color: #315f40;
  display: grid;
  gap: 1px;
  min-height: 32px;
  min-width: 126px;
  padding: 4px 7px;
}

.staff-schedule-chip.is-full {
  background: #f8ece8;
  border-color: #d6a394;
  color: #884735;
}

.staff-schedule-chip strong,
.staff-schedule-chip small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-schedule-chip strong {
  font-size: 12px;
  font-weight: 800;
}

.staff-schedule-chip small,
.staff-schedule-empty {
  font-size: 11px;
}

.staff-schedule-empty {
  color: #9a4d3b;
}

.staff-schedule-overview .empty-state {
  min-height: 72px;
}

.assignment-row {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px solid transparent;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(190px, 1.2fr) minmax(190px, 0.85fr) 40px auto;
  min-height: 44px;
  padding: 5px 6px 5px 10px;
  position: relative;
}

.assignment-row:hover {
  border-color: var(--color-brand-line);
}

.assignment-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assignment-main strong {
  font-size: 15px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-meta {
  align-items: center;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px;
}

.assignment-meta span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.assignment-selected {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  color: var(--color-text);
  display: flex;
  gap: 7px;
  min-height: 34px;
  min-width: 0;
  padding: 0 9px;
}

.assignment-selected span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-selected.is-preferred {
  background: #eaf6ee;
  border-color: #98c8ad;
  color: #3d7550;
}

.assignment-selected.is-avoid {
  background: #f8ece8;
  border-color: #d69282;
  color: #7f3d31;
}

.assignment-picker {
  position: relative;
}

.assignment-picker summary {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  box-shadow: var(--shadow-button);
  color: var(--color-brand);
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  list-style: none;
  width: 34px;
}

.assignment-picker summary::-webkit-details-marker {
  display: none;
}

.assignment-picker[open] summary,
.assignment-picker summary:hover {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-button-hover);
}

.assignment-menu {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  box-shadow: 0 12px 24px rgba(42, 51, 48, 0.14);
  display: grid;
  gap: 4px;
  min-width: 240px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 40px;
  z-index: 30;
}

.assignment-menu-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--color-text);
  display: flex;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  text-align: left;
}

.assignment-menu-choice {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.assignment-menu-choice.is-suggested {
  background: var(--color-panel-soft);
  border-color: var(--color-line);
}

.assignment-menu-choice .assignment-menu-button {
  width: 100%;
}

.assignment-preference-actions {
  display: inline-flex;
  gap: 3px;
  padding-right: 4px;
}

.preference-icon-button {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 5px;
  color: var(--color-muted);
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.preference-icon-button:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.preference-icon-button.is-preferred {
  background: #eaf6ee;
  border-color: #98c8ad;
  color: #3d7550;
}

.preference-icon-button.is-avoid {
  background: #f8ece8;
  border-color: #d69282;
  color: #7f3d31;
}

.assignment-menu-button:hover,
.assignment-menu-button.is-suggested {
  background: var(--color-panel-soft);
  border-color: var(--color-line);
}

.assignment-menu-button.is-preferred {
  background: #eaf6ee;
  color: #3d7550;
}

.assignment-menu-button.is-avoid {
  background: #f8ece8;
  color: #7f3d31;
}

.preference-chip {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-muted);
  display: inline-flex;
  gap: 5px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  white-space: nowrap;
}

.assignment-actions {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.assignment-icon-action {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  box-shadow: var(--shadow-button);
  color: var(--color-text);
  display: inline-flex;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
}

.assignment-icon-action:hover {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-button-hover);
  color: var(--color-brand);
}

.assignment-status-pill {
  align-items: center;
  background: var(--color-brand-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 999px;
  color: var(--color-brand);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.admin-service-schedule {
  border-top: 1px solid var(--color-line);
  margin-top: 14px;
  padding-top: 14px;
}

.admin-service-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.admin-service-head h3 {
  font-size: 17px;
  margin: 1px 0 0;
}

.admin-service-count {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 8px;
}

.admin-service-list {
  display: grid;
  gap: 7px;
}

.admin-service-row {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 7px;
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(160px, 1fr) auto auto;
  min-height: 46px;
  padding: 7px 8px;
}

.admin-service-time {
  color: var(--color-brand);
  font-weight: 800;
}

.admin-service-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-service-main strong,
.admin-service-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-service-main small {
  color: var(--color-muted);
  font-size: 12px;
}

.admin-service-action-spacer {
  min-width: 36px;
}

.preference-chip.is-preferred {
  background: #eaf6ee;
  border-color: #98c8ad;
  color: #3d7550;
}

.preference-chip.is-avoid {
  background: #f8ece8;
  border-color: #d69282;
  color: #7f3d31;
}

.admin-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--color-line);
  padding: 12px 10px;
  text-align: left;
}

.admin-table th {
  color: var(--color-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.bookigen-panel,
.catalog-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
  padding: 18px;
}

.system-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(320px, 420px) minmax(0, 1fr);
}

.system-sidebar-control {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  top: 16px;
}

.system-tools-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.bookigen-panel,
.catalog-panel {
  grid-column: 3;
}

.bookigen-panel {
  grid-row: 1;
}

.catalog-panel {
  grid-row: 2;
}

.system-tools-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
  padding: 18px;
}

.system-tools-panel .section-head p {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 6px 0 0;
}

.system-grid.is-tools-collapsed {
  grid-template-columns: auto minmax(0, 1fr);
}

.system-grid.is-tools-collapsed .system-tools-panel {
  display: none;
}

.system-grid.is-tools-collapsed .bookigen-panel,
.system-grid.is-tools-collapsed .catalog-panel {
  grid-column: 2;
}

.bookigen-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.bookigen-toolbar label {
  color: var(--color-muted);
  display: grid;
  font-size: 12px;
  font-weight: 600;
  gap: 4px;
  min-width: 170px;
}

.bookigen-status {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-muted);
  padding: 12px 14px;
}

.bookigen-status.is-loading {
  background: #f8f5e8;
  border-color: #e7dba9;
  color: #6c5d26;
}

.bookigen-status.is-success {
  background: #edf8f1;
  border-color: #b8dfc5;
  color: #315f42;
}

.bookigen-status.is-info {
  background: #eef5f4;
  border-color: #c9dbd7;
  color: #4f6761;
}

.bookigen-status.is-error,
.bookigen-note.is-warning {
  background: #f9efed;
  border-color: #e1b8ae;
  color: #7a3d30;
}

.sync-panel {
  display: grid;
  gap: 10px;
}

.sync-panel-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.sync-panel-head h3 {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 600;
  margin: 2px 0 0;
}

.sync-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sync-metric {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 10px;
}

.sync-metric strong {
  color: var(--color-text);
  font-size: 20px;
  font-weight: 600;
}

.sync-metric span,
.sync-event span {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.35;
}

.sync-events {
  display: grid;
  gap: 6px;
}

.sync-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.compact-action {
  justify-content: flex-start;
  min-height: 42px;
  padding: 8px 10px;
}

.sync-targets,
.sync-inbound,
.sync-mappings {
  display: grid;
  gap: 8px;
}

.sync-inbound h4,
.sync-mappings h4 {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
}

.sync-target-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.operational-day-card {
  margin: 12px 0;
}

.operational-day-metrics {
  margin-top: 2px;
}

.sync-target-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.sync-target-head h4 {
  color: var(--color-text);
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.sync-target-head span {
  color: var(--color-muted);
  display: block;
  font-size: 14px;
  line-height: 1.35;
  margin-top: 2px;
}

.sync-target-actions {
  display: flex;
  gap: 6px;
}

.sync-target-list {
  display: grid;
  gap: 6px;
}

.sync-row {
  align-items: center;
  background: #f7f7f9;
  border: 1px solid transparent;
  border-radius: 7px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 9px 10px;
}

.sync-row strong,
.sync-row span,
.sync-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-row strong {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
}

.sync-row span {
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.35;
}

.sync-row em {
  color: #8b4a3e;
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
  margin-top: 2px;
  max-width: 250px;
}

.sync-row.is-failed {
  background: #fbf1ef;
  border-color: #e6c1b9;
}

.sync-row.is-processing,
.sync-row.is-received,
.sync-row.is-pending {
  background: #f0f5f2;
  border-color: #cbdacf;
}

.sync-row.is-sent,
.sync-row.is-processed {
  background: #f6f7f6;
}

.sync-journal {
  display: grid;
  gap: 6px;
}

.sync-journal h4 {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
}

.sync-event {
  align-items: center;
  background: #f7f7f9;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 10px;
}

.sync-event.is-failed,
.sync-event.is-warning {
  background: #fbf1ef;
  border-color: #e6c1b9;
}

.catalog-panel-body {
  display: grid;
  gap: 12px;
}

.catalog-tabs {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  display: flex;
  gap: 4px;
  padding: 4px;
  width: max-content;
}

.catalog-tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--color-muted);
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
}

.catalog-tab.is-active {
  background: var(--color-panel);
  box-shadow: var(--shadow-soft);
  color: var(--color-brand);
}

.catalog-staff-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.catalog-staff-toolbar .bookigen-note {
  flex: 1 1 auto;
}

.catalog-toolbar-actions,
.catalog-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-row-actions {
  min-width: 190px;
}

.catalog-table-wrap {
  border: 1px solid var(--color-line);
  border-radius: 8px;
  max-height: 560px;
  overflow: auto;
}

.catalog-table {
  background: #fff;
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.catalog-table th,
.catalog-table td {
  border-bottom: 1px solid var(--color-line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

.catalog-table th {
  background: var(--color-panel-soft);
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.catalog-table td strong,
.catalog-table td span {
  display: block;
}

.catalog-table td span {
  color: var(--color-muted);
  font-size: 12px;
  margin-top: 2px;
}

.catalog-input {
  min-width: 150px;
}

.catalog-input.is-code {
  min-width: 90px;
}

.catalog-table textarea.catalog-input {
  min-width: 240px;
  resize: vertical;
}

.catalog-draft-row {
  background: #f8fbf9;
}

.catalog-draft-row td {
  border-bottom-color: var(--color-brand-line);
}

.catalog-link-list {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 220px;
}

.catalog-link-list.is-empty span {
  color: var(--color-muted);
  font-size: 12px;
}

.catalog-kommo-sync-cell {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.catalog-sync-action {
  justify-self: start;
}

.catalog-link-badge {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  display: inline-grid;
  gap: 1px;
  max-width: 210px;
  padding: 5px 7px;
}

.catalog-link-badge strong {
  color: var(--color-brand);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.catalog-link-badge small {
  color: var(--color-muted);
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.catalog-check {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  margin: 0;
  white-space: nowrap;
}

.compact-action.is-danger {
  border-color: #e4b8b2;
  color: #9f2f2f;
}

.compact-action.is-danger:hover {
  background: #fff5f3;
  border-color: #d99d95;
  color: #842626;
}

.demo-scenarios {
  border-top: 1px solid var(--color-line);
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
}

.compact-head {
  margin-bottom: 0;
}

.demo-scenario-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-scenario-grid .secondary-button {
  min-height: 38px;
  padding: 0 10px;
}

.bookigen-diagnostics {
  display: grid;
  gap: 14px;
}

.bookigen-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.bookigen-metric {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.bookigen-metric span,
.bookigen-card-head span {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.35;
}

.bookigen-metric strong {
  color: var(--color-text);
  font-size: 24px;
  font-weight: 500;
}

.bookigen-alerts,
.bookigen-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bookigen-note {
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
}

.bookigen-note.is-success {
  background: #edf8f1;
  border-color: #b8dfc5;
  color: #315f42;
}

.bookigen-note.is-error {
  background: #f9efed;
  border-color: #e1b8ae;
  color: #7a3d30;
}

.bookigen-card {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.bookigen-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.bookigen-card h3 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.bookigen-status-list,
.bookigen-chip-list {
  display: grid;
  gap: 8px;
}

.bookigen-status-row {
  align-items: center;
  border-bottom: 1px solid var(--color-line);
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.bookigen-import-model {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
}

.bookigen-import-model div {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.bookigen-import-model span {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.35;
}

.bookigen-import-model i {
  color: var(--color-brand);
}

.bookigen-chip-list {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
}

.bookigen-chip {
  background: var(--color-brand-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 999px;
  color: var(--color-brand);
  font-size: 14px;
  padding: 6px 9px;
}

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

.bookigen-table-wrap--scroll {
  border: 1px solid var(--color-line);
  border-radius: 8px;
  max-height: min(440px, 56vh);
  overflow: auto;
}

.bookigen-table {
  border-collapse: collapse;
  min-width: 860px;
  width: 100%;
}

.bookigen-table th,
.bookigen-table td {
  border-bottom: 1px solid var(--color-line);
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.bookigen-table th {
  background: var(--color-panel);
  color: var(--color-muted);
  font-size: 13px;
  text-transform: uppercase;
}

.bookigen-table-wrap--scroll .bookigen-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.bookigen-table-wrap--scroll .bookigen-table tr:last-child td {
  border-bottom: 0;
}

.bookigen-table .form-select {
  font-size: 14px;
  min-height: 40px;
}

.staff-map-table {
  min-width: 760px;
}

.bookigen-subline {
  color: var(--color-muted);
  display: block;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 3px;
}

.bookigen-profile-cell {
  color: var(--color-muted);
  display: grid;
  gap: 3px;
}

.bookigen-profile-cell span {
  overflow-wrap: anywhere;
}

.muted-pill {
  background: var(--color-panel-soft);
  border-color: var(--color-line);
  color: var(--color-muted);
}

.muted {
  color: var(--color-muted);
}

.manual-panel form {
  display: grid;
  gap: 12px;
}

.manual-panel label,
.exercise-modal label {
  color: var(--color-text);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.form-control,
.form-select {
  border-color: var(--color-line);
  min-height: 42px;
}

.doctor-workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.doctor-workspace.is-sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.doctor-workspace.is-sidebar-collapsed .doctor-patients {
  display: none;
}

.doctor-patients .section-head {
  align-items: stretch;
  flex-direction: column;
}

.doctor-patients-title {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.doctor-sidebar-toggle {
  flex: 0 0 auto;
}

.doctor-patients .section-actions,
.doctor-patients .planning-date-control {
  width: 100%;
}

.doctor-patients .planning-date-control {
  justify-content: space-between;
}

.doctor-patients .planning-date-control .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

.doctor-view-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.doctor-patient-list {
  display: grid;
  gap: 8px;
}

.doctor-schedule {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
}

.doctor-schedule-head,
.doctor-schedule-row {
  align-items: center;
  display: grid;
  gap: 8px;
}

.doctor-schedule-head {
  color: var(--color-muted);
  font-size: 13px;
  grid-template-columns: 1fr auto;
}

.doctor-schedule-list {
  display: grid;
  gap: 6px;
}

.doctor-schedule-row {
  background: var(--color-panel-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--color-text);
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 8px;
  text-align: left;
}

.doctor-schedule-row.is-selected {
  background: var(--color-brand-soft);
  border-color: var(--color-brand-line);
}

.doctor-schedule-time {
  color: var(--color-brand);
  font-weight: 700;
}

.doctor-schedule-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.doctor-schedule-main strong,
.doctor-schedule-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doctor-schedule-main small {
  color: var(--color-muted);
}

.doctor-schedule-status {
  background: #eef4f1;
  border-radius: 999px;
  color: var(--color-brand);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
}

.doctor-schedule-status.is-arrived,
.doctor-schedule-status.is-completed {
  background: #e7f3eb;
  color: #3d7550;
}

.doctor-patient {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-text);
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 12px;
  text-align: left;
}

.doctor-patient strong {
  font-size: 16px;
}

.doctor-patient span {
  color: var(--color-muted);
  font-size: 13px;
}

.doctor-patient.is-selected {
  background: var(--color-brand-soft);
  border-color: var(--color-brand);
}

.doctor-card-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.doctor-exam-form,
.body-map-panel {
  min-width: 0;
}

.doctor-tabs {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
}

.doctor-tab {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--color-muted);
  font-weight: 600;
  min-height: 40px;
  padding: 0 12px;
}

.doctor-tab.is-active {
  background: var(--color-panel);
  color: var(--color-brand);
  box-shadow: var(--shadow-soft);
}

.doctor-tab-panel {
  display: none;
}

.doctor-tab-panel.is-active {
  display: grid;
  gap: 14px;
}

.form-section {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.form-section h3,
.body-map-panel h3 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.doctor-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.patient-data-grid {
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.4fr) minmax(96px, 0.45fr) minmax(96px, 0.45fr);
}

.two-field-grid,
.vitals-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.followup-grid {
  grid-template-columns: minmax(150px, 220px) minmax(90px, 130px);
}

.followup-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.followup-entry-card {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  flex: 0 0 190px;
  position: relative;
}

.followup-entry {
  background: transparent;
  border: 0;
  color: var(--color-text);
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 8px 34px 8px 10px;
  text-align: left;
  width: 100%;
}

.followup-entry span {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.followup-entry strong {
  font-size: 14px;
  line-height: 1.2;
}

.followup-entry small {
  color: var(--color-muted);
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.followup-entry-card.is-active {
  background: #e8f4ec;
  border-color: var(--color-brand);
}

.followup-delete {
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 6px;
  color: var(--color-muted);
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 6px;
  top: 6px;
  width: 26px;
}

.followup-delete:hover {
  border-color: #d45b5b;
  color: #b13f3f;
}

.followup-empty {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px dashed var(--color-line);
  border-radius: 8px;
  color: var(--color-muted);
  display: inline-flex;
  min-height: 78px;
  padding: 10px 12px;
}

.doctor-exam-form label {
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.doctor-exam-form textarea {
  min-height: 78px;
  overflow: hidden;
  resize: vertical;
}

.doctor-program-preview {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.medical-checklist {
  display: grid;
  gap: 10px;
}

.checklist-pair-row {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.checklist-pair-row .checklist-group {
  min-width: 0;
}

.checklist-group {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px 10px 10px;
}

.checklist-group h4 {
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.checklist-group.is-single {
  align-items: center;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr);
}

.checklist-select {
  background-color: var(--color-panel);
  border-color: var(--color-line);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.checklist-select.selected-1 {
  background-color: #f7f3ff;
  border-color: #d7caef;
}

.checklist-select.selected-2 {
  background-color: #f1f8ff;
  border-color: #c9ddf4;
}

.checklist-select.selected-3 {
  background-color: #eff9f4;
  border-color: #c7e5d5;
}

.checklist-select.selected-4 {
  background-color: #fff7e8;
  border-color: #ead7ad;
}

.checklist-select.selected-5,
.checklist-select.selected-6,
.checklist-select.selected-7 {
  background-color: #fff1f1;
  border-color: #edcccc;
}

.checklist-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
  padding-top: 2px;
}

.check-chip {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-text);
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
}

.check-chip input {
  accent-color: var(--color-brand);
  flex: 0 0 auto;
  margin: 0;
}

.check-chip.is-checked,
.check-chip:has(input:checked) {
  background: var(--color-brand-soft);
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.doctor-program-item {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr) 54px;
  min-height: 42px;
  padding: 7px 9px;
}

.doctor-program-item span {
  align-items: center;
  background: var(--color-panel);
  border-radius: 6px;
  color: var(--color-brand);
  display: flex;
  font-weight: 600;
  height: 26px;
  justify-content: center;
}

.doctor-program-item strong {
  font-size: 13px;
  line-height: 1.15;
}

.doctor-program-item em {
  color: var(--color-brand);
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  text-align: right;
}

.doctor-program-item.is-editable {
  grid-template-columns: 32px minmax(0, 1fr) 110px;
  min-height: 64px;
}

.doctor-program-item.is-editable label {
  gap: 4px;
}

.doctor-program-item small {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.doctor-program-item .form-control,
.doctor-program-item .form-select {
  min-height: 34px;
  padding: 5px 8px;
}

.doctor-program-strip {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(12, minmax(54px, 1fr));
  overflow-x: auto;
  padding-bottom: 2px;
}

.program-tile {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  display: grid;
  gap: 5px;
  min-width: 64px;
  padding: 6px;
}

.program-tile.is-active {
  background: var(--color-brand-soft);
  border-color: var(--color-brand);
}

.program-tile button {
  background: transparent;
  border: 0;
  color: var(--color-text);
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 48px;
  padding: 0;
}

.program-tile span {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-muted);
  display: flex;
  font-size: 11px;
  font-weight: 600;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.program-tile strong {
  color: var(--color-brand);
  font-size: 15px;
  line-height: 1;
}

.program-tile label {
  align-items: center;
  display: grid;
  gap: 2px;
  justify-items: center;
}

.program-tile input {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  height: 28px;
  padding: 2px;
  text-align: center;
  width: 58px;
}

.program-tile small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.program-detail-card {
  align-items: end;
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) 120px;
  padding: 10px;
}

.program-detail-card > div {
  display: grid;
  gap: 4px;
  grid-template-columns: 28px minmax(0, 1fr);
}

.program-detail-card > div span {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  color: var(--color-brand);
  display: flex;
  font-weight: 600;
  height: 28px;
  justify-content: center;
}

.program-detail-card h4 {
  font-size: 15px;
  line-height: 1.2;
  margin: 0;
}

.program-detail-card label {
  display: grid;
  gap: 4px;
}

.program-detail-card small {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.body-map-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 14px;
}

.body-map-flow {
  margin: 0;
}

.body-map {
  --body-control-left: calc(77% + 14px);
  --body-image-width: 77%;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  aspect-ratio: 854 / 650;
  height: auto;
  margin-bottom: 12px;
  max-width: 980px;
  overflow: hidden;
  position: relative;
}

.body-map-base {
  display: block;
  height: 100%;
  left: 0;
  object-fit: contain;
  position: absolute;
  top: 0;
  width: var(--body-image-width);
  z-index: 0;
}

.body-paint-layer {
  bottom: 0;
  height: 100%;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: var(--body-image-width);
  z-index: 1;
}

.muscle-polygon {
  cursor: pointer;
  pointer-events: all;
  stroke: transparent;
  stroke-width: 1.4;
  transition: fill-opacity 0.14s ease, stroke 0.14s ease;
}

.muscle-polygon.is-painted {
  fill-opacity: 0.42;
  stroke: rgba(51, 50, 53, 0.28);
}

.muscle-polygon:hover {
  fill-opacity: 0.5;
  stroke: rgba(var(--color-brand-rgb), 0.68);
}

.body-zone {
  align-items: center;
  appearance: none;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #9ca3af;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(51, 50, 53, 0.14);
  color: #333235;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  line-height: 1.1;
  min-height: 0;
  padding: 0 20px 0 8px;
  position: absolute;
  text-align: center;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  z-index: 3;
}

.body-zone::before {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #333235;
  content: "";
  position: absolute;
  right: 7px;
  top: calc(50% - 2px);
}

.body-zone::after {
  content: none;
}

.body-zone:hover {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 4px rgba(var(--color-brand-rgb), 0.12), var(--shadow-button-hover);
}

.body-zone.mark-tension {
  background: rgba(255, 249, 225, 0.96);
  border-color: var(--color-action);
  color: #6c4e00;
}

.body-zone.mark-tension::before,
.body-zone.mark-yellow::before {
  background: transparent;
}

.body-zone.mark-pain,
.body-zone.mark-red {
  background: rgba(251, 229, 224, 0.94);
  border-color: #d69282;
  color: #7f3d31;
}

.body-zone.mark-pain::before,
.body-zone.mark-red::before {
  background: transparent;
}

.body-zone.mark-restricted,
.body-zone.mark-blue {
  background: rgba(238, 232, 251, 0.94);
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.body-zone.mark-restricted::before,
.body-zone.mark-blue::before {
  background: transparent;
}

.body-zone.mark-grey {
  background: rgba(232, 234, 234, 0.94);
  border-color: #8d9392;
  color: #434746;
}

.body-zone.mark-grey::before {
  background: transparent;
}

.body-zone.mark-yellow {
  background: rgba(255, 249, 225, 0.92);
  border-color: var(--color-action);
  color: #6c4e00;
}

.body-zone.mark-cross {
  background: rgba(255, 255, 255, 0.96);
  border-color: #111;
  color: #111;
}

.body-zone.mark-cross::before {
  background: transparent;
}

.body-zone.projection-1 {
  background: #f6e7ee;
  border-color: #d9a8bd;
  color: #7b485e;
}

.body-zone.projection-2 {
  background: #e7f3ec;
  border-color: #98c8ad;
  color: #3b6a50;
}

.body-zone.projection-3 {
  background: #f7eee2;
  border-color: #d6b78a;
  color: #735638;
}

.body-zone.projection-1:hover {
  box-shadow: 0 0 0 4px rgba(232, 62, 140, 0.14), 0 10px 18px rgba(51, 50, 53, 0.1);
}

.body-zone.projection-2:hover {
  box-shadow: 0 0 0 4px rgba(21, 148, 91, 0.14), 0 10px 18px rgba(51, 50, 53, 0.1);
}

.body-zone.projection-3:hover {
  box-shadow: 0 0 0 4px rgba(240, 107, 32, 0.14), 0 10px 18px rgba(51, 50, 53, 0.1);
}

.zone-neck {
  height: 26px;
  left: var(--body-control-left);
  top: 11.69%;
  width: 128px;
}

.zone-back {
  height: 26px;
  left: var(--body-control-left);
  top: 17.23%;
  width: 128px;
}

.zone-loin {
  height: 26px;
  left: var(--body-control-left);
  top: 36%;
  width: 128px;
}

.zone-pelvis {
  height: 26px;
  left: var(--body-control-left);
  top: 44.3%;
  width: 128px;
}

.zone-hip {
  height: 26px;
  left: var(--body-control-left);
  top: 49.4%;
  width: 128px;
}

.zone-shin {
  height: 26px;
  left: var(--body-control-left);
  top: 70.2%;
  width: 128px;
}

.body-zone.is-selected {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 4px rgba(var(--color-brand-rgb), 0.14), var(--shadow-button-hover);
}

.projection-overlay {
  height: auto;
  left: 67.03%;
  pointer-events: none;
  position: absolute;
  width: 5.51%;
  z-index: 2;
}

.projection-overlay[hidden] {
  display: none;
}

.overlay-neck {
  top: 11.69%;
}

.overlay-back {
  top: 17.23%;
}

.overlay-loin {
  top: 36%;
}

.overlay-pelvis {
  top: 44.31%;
}

.overlay-hip {
  top: 49.38%;
}

.overlay-shin {
  top: 70.15%;
}

.body-zone-controls {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
}

.body-zone-editor {
  background: var(--color-brand-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.body-zone-editor h4 {
  color: var(--color-brand);
  font-size: 18px;
  margin: 0;
}

.paint-cycle-hint {
  align-items: center;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 600;
  gap: 7px;
}

.paint-dot {
  border: 1px solid rgba(51, 50, 53, 0.28);
  border-radius: 999px;
  display: inline-block;
  height: 16px;
  width: 16px;
}

.paint-red {
  background: #d69282;
}

.paint-grey {
  background: #c5c7c6;
}

.paint-blue {
  background: #9fb8d6;
}

.paint-yellow {
  background: #d8ca85;
}

.projection-picker {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.projection-picker button {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 600;
  min-height: 38px;
}

.projection-picker button.is-active {
  background: var(--color-action-soft);
  border-color: var(--color-action);
  color: var(--color-brand);
}

.body-zone-control {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 76px 130px minmax(0, 1fr);
}

.body-zone-control strong {
  font-size: 13px;
}

.autosave-note.compact {
  margin: 0;
  white-space: nowrap;
}

.version-pill {
  background: var(--color-brand-soft);
  border-radius: 999px;
  color: var(--color-brand);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  text-transform: uppercase;
}

.doctor-summary {
  display: grid;
  gap: 10px;
}

.doctor-summary-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 220px minmax(0, 1fr);
  padding: 14px;
}

.history-row {
  padding: 10px;
}

.pin-panel {
  background: rgba(51, 50, 53, 0.34);
  display: none;
  inset: 0;
  padding: 16px;
  position: fixed;
  z-index: 50;
}

.pin-panel.is-visible {
  align-items: center;
  display: flex;
  justify-content: center;
}

.pin-box {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
  max-width: 1120px;
  overflow: hidden;
  padding: 20px;
  width: min(1120px, calc(100vw - 32px));
}

.pin-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.pin-user-card {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 92px;
  padding: 12px;
  text-align: left;
}

.pin-user-main {
  align-items: flex-start;
  background: transparent;
  border: 0;
  color: inherit;
  display: grid;
  flex: 1;
  gap: 6px;
  justify-items: start;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.pin-user-card strong {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.pin-user-card span {
  color: var(--color-muted);
  font-size: 13px;
}

.pin-user-actions {
  align-items: flex-start;
  display: flex;
  gap: 6px;
}

.pin-lock-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-muted);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.pin-lock-button.is-locked {
  background: #f8efed;
  border-color: #e7c4bd;
  color: var(--danger);
}

.pin-lock-button.is-unlocked {
  background: #edf7f1;
  border-color: #bddfc8;
  color: var(--success);
}

.pin-lock-button.is-reset {
  background: var(--color-panel-soft);
}

.pin-user-card.is-selected {
  border-color: var(--color-brand);
  box-shadow: inset 0 0 0 1px var(--color-brand);
}

.pin-dialog {
  background: var(--color-panel-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.pin-dialog[hidden] {
  display: none;
}

.pin-dialog-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px 1fr;
}

.pin-dialog-head h3 {
  font-size: 20px;
  margin: 0;
}

.pin-dialog-head p {
  color: var(--color-muted);
  margin: 2px 0 0;
}

.pin-dots {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 18px);
  justify-content: center;
}

.pin-dots span {
  aspect-ratio: 1;
  border: 2px solid var(--color-brand);
  border-radius: 999px;
}

.pin-dots span.is-filled {
  background: var(--color-brand);
}

.pin-status {
  color: var(--color-muted);
  min-height: 20px;
  text-align: center;
}

.pin-status.is-error {
  color: #a74848;
  font-weight: 700;
}

.pin-keypad {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  margin: 0 auto;
  max-width: 340px;
  width: 100%;
}

.pin-keypad button {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 24px;
  font-weight: 700;
  min-height: 58px;
}

.exercise-modal {
  border: 0;
  border-radius: 8px;
}

.autosave-note {
  align-items: center;
  background: var(--color-panel-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  color: var(--color-brand);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px 10px;
}

.autosave-dot {
  background: var(--color-success);
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

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

.exercise-picker {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.replacement-block {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.replacement-panel[hidden] {
  display: none;
}

.replacement-panel {
  display: grid;
  gap: 10px;
}

.selected-exercise {
  align-items: center;
  background: var(--color-brand-soft);
  border: 1px solid var(--color-brand-line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.selected-exercise span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.selected-exercise strong {
  color: var(--color-brand);
  font-size: 15px;
}

.exercise-results {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 144px;
  overflow: auto;
}

.exercise-result {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-text);
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px 10px;
  text-align: left;
}

.exercise-result span {
  color: var(--color-brand);
  font-size: 12px;
  font-weight: 600;
}

.exercise-result strong {
  font-size: 14px;
}

.exercise-result.is-selected {
  background: var(--color-action-soft);
  border-color: var(--color-action);
}

.exercise-no-results {
  border: 1px dashed var(--color-brand-line);
  border-radius: 8px;
  color: var(--color-muted);
  grid-column: 1 / -1;
  padding: 14px;
  text-align: center;
}

.exercise-modal-dialog {
  max-width: min(1040px, calc(100vw - 28px));
}

.exercise-modal .modal-header {
  align-items: flex-start;
  padding: 20px 24px 14px;
}

.exercise-modal .modal-body {
  overflow-y: auto;
  padding: 18px 24px 8px;
}

.exercise-modal .modal-footer {
  padding: 16px 24px 20px;
}

.exercise-modal-title {
  display: grid;
  gap: 5px;
}

.exercise-modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
}

.exercise-modal-title .modal-title {
  font-size: 26px;
  line-height: 1.1;
}

.exercise-modal-subtitle {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.35;
}

.exercise-modal label > span,
.replacement-search-label > span {
  color: var(--color-text);
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 7px;
}

.exercise-modal textarea.form-control {
  font-size: 15px;
  line-height: 1.45;
  min-height: 112px;
  padding: 12px 14px;
}

.exercise-modal .form-control[type="search"] {
  font-size: 16px;
  height: 46px;
  padding: 9px 12px;
}

.exercise-modal .autosave-note {
  font-size: 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.replacement-block {
  background: #f8faf9;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 14px;
}

.replacement-head {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.replacement-head strong {
  color: var(--color-text);
  display: block;
  font-size: 16px;
  line-height: 1.25;
  margin-top: 4px;
}

.replacement-toggle-button {
  min-height: 42px;
  padding-inline: 14px;
}

.replacement-toggle-button.is-expanded,
.replacement-toggle-button[aria-expanded="true"] {
  background: var(--color-brand);
  color: var(--color-surface);
}

.replacement-panel {
  border-top: 1px solid var(--color-line);
  margin-top: 14px;
  padding-top: 14px;
}

.replacement-summary {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.replacement-summary > i {
  align-self: center;
  color: var(--color-muted);
  font-size: 16px;
}

.replacement-summary-card {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
}

.replacement-summary-card span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.replacement-summary-card strong {
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 22px;
  line-height: 1.1;
}

.replacement-summary.is-changed .replacement-summary-card.is-target {
  background: #edf7f1;
  border-color: #9fcfaf;
}

.replacement-save-hint {
  align-items: center;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-muted);
  display: flex;
  font-size: 14px;
  gap: 8px;
  padding: 10px 12px;
}

.replacement-save-hint.is-active {
  background: #edf7f1;
  border-color: #9fcfaf;
  color: #2f6846;
  font-weight: 700;
}

.exercise-results {
  gap: 10px;
  max-height: 238px;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.exercise-result {
  border-radius: 8px;
  min-height: 72px;
  padding: 12px 14px;
}

.exercise-result span {
  font-size: 12px;
  font-weight: 700;
}

.exercise-result strong {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.15;
}

.exercise-result.is-selected {
  border-color: var(--color-brand);
  box-shadow: inset 0 0 0 1px var(--color-brand);
}

@media (max-width: 760px) {
  .patient-board.is-dual {
    grid-template-columns: minmax(0, 1fr);
  }

  .exercise-modal-dialog {
    margin: 8px auto;
    max-width: calc(100vw - 12px);
  }

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

  .replacement-summary > i {
    justify-self: center;
    transform: rotate(90deg);
  }
}

.empty-state {
  align-items: center;
  background: var(--color-surface);
  border: 1px dashed var(--color-brand-line);
  border-radius: 8px;
  color: var(--color-muted);
  display: flex;
  justify-content: center;
  min-height: 320px;
  padding: 24px;
  text-align: center;
}

/* Material visual pass for the prototype: calm palette, restrained elevation, lighter type. */
body {
  letter-spacing: 0;
}

.brand-mark,
.mode-tabs,
.mode-tab,
.language-switch,
.language-switch button,
.icon-button,
.primary-button,
.secondary-button,
.status-button,
.queue-panel,
.active-panel,
.admin-day,
.manual-panel,
.doctor-patients,
.doctor-view,
.pin-box,
.client-card,
.active-client,
.exercise-row,
.timeline-item,
.schedule-slot,
.manual-panel .form-control,
.form-control,
.form-select,
.form-section,
.doctor-tab,
.doctor-patient,
.body-map-panel,
.body-map,
.body-zone,
.body-zone-editor,
.checklist-group,
.check-chip,
.doctor-program-item,
.paint-dot,
.version-pill,
.exercise-result,
.selected-exercise,
.autosave-note,
.empty-state,
.program-tile,
.program-tile span,
.program-tile input,
.program-detail-card,
.program-detail-card > div span,
.quick-weight input,
.row-disclosure,
.active-client-head button {
  border-radius: 6px;
}

.topbar,
.queue-panel,
.active-panel,
.admin-day,
.manual-panel,
.doctor-patients,
.doctor-view,
.pin-box {
  box-shadow: var(--shadow-soft);
}

.queue-item,
.active-client,
.exercise-row,
.history-row,
.doctor-summary-row,
.form-section,
.body-map,
.doctor-program-item,
.program-detail-card {
  box-shadow: 0 1px 2px rgba(42, 51, 48, 0.045);
}

.check-chip {
  min-height: 30px;
}

.primary-button,
.secondary-button,
.icon-button,
.status-button,
.row-disclosure,
.active-client-head button,
.weight-stepper button,
.quick-weight button,
.mode-tab,
.doctor-tab,
.language-switch button {
  box-shadow: var(--shadow-button);
  font-weight: 500;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.status-button:hover,
.row-disclosure:hover,
.active-client-head button:hover,
.weight-stepper button:hover,
.quick-weight button:hover,
.mode-tab:hover,
.doctor-tab:hover,
.language-switch button:hover {
  box-shadow: var(--shadow-button-hover);
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active,
.icon-button:active,
.status-button:active,
.row-disclosure:active,
.active-client-head button:active,
.weight-stepper button:active,
.quick-weight button:active,
.mode-tab:active,
.doctor-tab:active,
.language-switch button:active {
  box-shadow: var(--shadow-button);
  transform: translateY(0);
}

.brand-mark,
.brand-block h1,
.section-head h2,
.pin-box h2,
.modal-title,
.form-section h3,
.body-map-panel h3,
.queue-title h3,
.queue-item h3,
.active-client h3,
.exercise-title,
.doctor-patient strong,
.timeline-cell strong {
  font-weight: 600;
}

.eyebrow,
.timeline-cell span,
.slot-time,
.load-metric strong,
.slot-client span,
.capacity,
.checklist-group h4,
.check-chip,
.pill {
  font-weight: 600;
}

.primary-button,
.secondary-button,
.icon-button,
.status-button,
.row-disclosure,
.active-client-head button,
.weight-stepper button,
.quick-weight button {
  border-color: transparent;
}

.form-control,
.form-select {
  background-color: #ffffff;
  border-color: var(--color-line);
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(var(--color-brand-rgb), 0.14);
}

.status-button.is-done {
  background: #eaf6ee;
  border-color: transparent;
  color: #3d7550;
}

.status-button.is-skipped {
  background: #fbf3e3;
  border-color: transparent;
  color: #7a6138;
}

.status-button.is-replaced {
  background: var(--color-brand-soft);
  border-color: transparent;
  color: var(--color-brand);
}

.exercise-position,
.timeline-cell em,
.weight-value,
.quick-weight input,
.doctor-program-item span,
.doctor-program-item em,
.doctor-program-item small,
.program-tile span,
.program-tile input,
.program-tile small,
.program-detail-card > div span,
.program-detail-card small,
.paint-cycle-hint,
.projection-picker button,
.pin-grid button,
.autosave-note,
.selected-exercise span,
.exercise-result span,
.version-pill {
  font-weight: 500;
}

.version-pill {
  background: var(--color-brand-soft);
  border: 1px solid var(--color-brand-line);
  color: var(--color-brand);
}

.pin-grid button {
  box-shadow: var(--shadow-button);
}

.paint-red {
  background: #d69282;
}

.paint-blue {
  background: #9fb8d6;
}

.paint-yellow {
  background: #d8ca85;
}

@media (max-width: 980px) {
  .topbar,
  .instructor-grid,
  .desktop-grid,
  .system-grid,
  .doctor-workspace,
  .doctor-card-layout,
  .doctor-form-grid,
  .doctor-program-preview,
  .checklist-pair-row,
  .bookigen-metrics,
  .bookigen-alerts,
  .bookigen-grid,
  .bookigen-import-model {
    grid-template-columns: 1fr;
  }

  .system-sidebar-control,
  .system-tools-panel,
  .bookigen-panel,
  .catalog-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .system-sidebar-control {
    position: static;
  }

  .bookigen-import-model i {
    transform: rotate(90deg);
    justify-self: center;
  }

  .session-box {
    justify-content: flex-start;
  }

  .active-client-strip,
  .patient-board,
  .pin-grid,
  .day-summary {
    grid-template-columns: 1fr;
  }

  .exercise-row,
  .client-header,
  .doctor-summary-row,
  .schedule-slot,
  .assignment-slot,
  .assignment-row,
  .staff-schedule-row,
  .admin-service-row,
  .exercise-results,
  .exercise-timeline,
  .current-line,
  .body-zone-control {
    grid-template-columns: 1fr;
  }

  .doctor-tabs {
    overflow-x: auto;
  }
}

.exercise-modal .exercise-result {
  border-radius: 8px;
  min-height: 72px;
}

.exercise-modal .exercise-result span {
  font-weight: 700;
}

.exercise-modal .exercise-result strong {
  font-size: 18px;
}

.exercise-modal .replacement-toggle-button.is-expanded,
.exercise-modal .replacement-toggle-button[aria-expanded="true"] {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-surface);
}

@media (max-width: 620px) {
  .exercise-modal .exercise-results {
    grid-template-columns: minmax(0, 1fr);
  }
}
