:root {
  color-scheme: light;
  --purple: #4b0082;
  --purple-dark: #31005a;
  --cyan: #00ced1;
  --blue: #077bd3;
  --green: #0d8f65;
  --amber: #c98216;
  --red: #b73535;
  --ink: #172033;
  --muted: #5e687a;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-soft: #eefafd;
  --line: rgba(23, 32, 51, 0.12);
  --shadow: 0 18px 48px rgba(35, 17, 65, 0.12);
  --radius: 16px;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

body.rtl {
  direction: rtl;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-container {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.upmind-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.top-links a:hover {
  color: var(--purple);
}

.contact-link {
  border: 2px solid var(--purple);
  border-radius: 999px;
  color: var(--purple);
  padding: 8px 18px;
}

.login-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-height: calc(100vh - 170px);
  gap: 26px;
  align-items: stretch;
}

.login-visual {
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 24%, rgba(0, 206, 209, 0.34), transparent 32%),
    radial-gradient(circle at 88% 16%, rgba(7, 123, 211, 0.24), transparent 30%),
    linear-gradient(135deg, #31005a, #077bd3 62%, #0d8f65);
  color: #fff;
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-card {
  max-width: 780px;
}

.brand-card img {
  width: 126px;
  height: 126px;
  object-fit: contain;
  background: #fff;
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.brand-card span,
.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-card h1 {
  max-width: 760px;
  margin: 26px 0 0;
  font-size: clamp(2.25rem, 5.8vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.feature-strip span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  font-weight: 700;
}

.login-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-panel {
  padding: clamp(24px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel h2,
.workspace-top h2,
.panel h3 {
  margin: 0;
  color: var(--ink);
}

.login-panel h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.muted {
  color: var(--muted);
}

.login-form,
.panel {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(23, 32, 51, 0.16);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 206, 209, 0.14);
}

.exercise-search-input {
  min-height: 40px;
  border-radius: 12px;
  background: #fff;
}

.exercise-search-count {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.exercise-filter-toggle {
  min-height: 38px;
  border: 1px solid rgba(0, 111, 185, 0.16);
  border-radius: 12px;
  background: #eef8fb;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
}

.exercise-filter-toggle.active {
  background: var(--blue);
  color: #fff;
}

.exercise-filter-panel {
  display: grid;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  padding: 12px;
}

.exercise-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.exercise-filter-header strong {
  color: var(--blue);
  font-size: 0.8rem;
}

.exercise-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.exercise-filter-grid label {
  font-size: 0.74rem;
}

.exercise-filter-grid select {
  min-height: 36px;
  border-radius: 10px;
  padding: 8px 9px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  box-shadow: 0 10px 24px rgba(75, 0, 130, 0.22);
}

.secondary-button {
  background: #eef6fb;
  color: var(--purple);
}

.ghost-button {
  background: #f6f7f9;
  color: var(--ink);
}

.danger {
  color: var(--red);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.wide {
  width: 100%;
}

.status-line {
  min-height: 24px;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 700;
}

.contact-box {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border: 1px solid rgba(0, 206, 209, 0.28);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px;
  color: var(--muted);
}

.contact-box strong {
  color: var(--ink);
}

.contact-box a {
  color: var(--purple);
  font-weight: 800;
}

.app-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  overflow-x: clip;
}

.sidebar {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.removia-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(0, 206, 209, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #effcff);
  padding: 12px;
}

.removia-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.removia-brand h1,
.removia-brand p {
  margin: 0;
}

.removia-brand h1 {
  color: var(--purple);
  line-height: 1;
}

.removia-brand p {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 800;
}

.clinic-card {
  display: grid;
  gap: 5px;
  border-radius: 16px;
  background: #101a2b;
  color: #fff;
  padding: 16px;
}

.clinic-card span,
.clinic-card small {
  color: rgba(255, 255, 255, 0.7);
}

.clinic-card strong {
  font-size: 1.05rem;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav button {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
}

.side-nav button.active {
  background: #eff9fb;
  color: var(--purple);
}

.workspace {
  min-width: 0;
  padding: 18px clamp(14px, 2vw, 24px) 24px;
  overflow-x: clip;
}

.admin-workspace {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.workspace-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.top-actions,
.button-row,
.camera-actions,
.panel-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill {
  border-radius: 999px;
  background: #eaf9f1;
  color: var(--green);
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 800;
}

.tablet-mode-button.active {
  background: #101a2b;
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 26, 43, 0.18);
}

.voice-toggle-button.active {
  background: #101a2b;
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 26, 43, 0.14);
}

body.tablet-mode .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.tablet-mode .sidebar {
  display: none;
}

body.tablet-mode .workspace {
  padding: 10px;
}

body.tablet-mode .workspace-top {
  position: sticky;
  top: 76px;
  z-index: 7;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 10px;
  backdrop-filter: blur(10px);
}

body.tablet-mode .coach-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

body.tablet-mode .camera-panel {
  order: 1;
  border-radius: 14px;
}

body.tablet-mode .session-controls {
  order: 2;
  position: static;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: none;
  padding: 12px;
}

body.tablet-mode .session-controls > h3,
body.tablet-mode .session-controls .inline-divider,
body.tablet-mode #exerciseLibraryCard,
body.tablet-mode #manualTargetDetails,
body.tablet-mode #activePlanList {
  display: none;
}

body.tablet-mode .camera-header {
  align-items: center;
  padding: 10px 12px;
}

body.tablet-mode .camera-stage {
  height: min(calc(100vh - 210px), 820px);
  min-height: 520px;
}

body.tablet-mode .metric-cluster span {
  min-width: 102px;
  text-align: center;
  font-size: 0.95rem;
}

body.tablet-mode .metric-cluster b {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

body.tablet-mode .coach-caption {
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 16px 18px;
}

body.tablet-mode .coach-caption strong {
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  line-height: 1.2;
}

body.tablet-mode .camera-actions {
  gap: 12px;
  padding: 12px;
}

body.tablet-mode .camera-actions button {
  min-height: 52px;
  font-size: 1rem;
}

body.tablet-mode .settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (orientation: portrait) and (max-width: 900px) {
  body.tablet-mode .camera-stage {
    height: min(68vh, 720px);
    min-height: 460px;
  }

  body.tablet-mode .session-controls,
  body.tablet-mode .settings-grid {
    grid-template-columns: 1fr;
  }
}

.coach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

.client-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(320px, 1.05fr);
  gap: 18px;
}

.panel {
  padding: 18px;
}

.session-controls {
  order: 2;
  align-content: start;
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inline-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}

.target-details {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.target-details-title,
.target-card-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.target-details-title strong,
.target-card-title strong {
  color: var(--ink);
}

.target-details-title span,
.target-card-title span {
  border-radius: 999px;
  background: #eefafd;
  color: var(--blue);
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.target-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 12px;
  background: #f8fbfd;
  padding: 12px;
}

.target-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.target-card-grid.one {
  grid-template-columns: 1fr;
}

.target-card small {
  color: var(--muted);
  line-height: 1.45;
}

.camera-panel {
  order: 1;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.camera-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.camera-header span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.camera-header strong {
  display: block;
  margin-top: 2px;
}

.metric-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.metric-cluster span {
  border-radius: 12px;
  background: #f3f6fa;
  padding: 8px 10px;
  color: var(--muted);
}

.metric-cluster b {
  color: var(--ink);
}

.camera-stage {
  position: relative;
  width: 100%;
  height: clamp(440px, calc(100vh - 250px), 760px);
  min-height: 0;
  background: #08111b;
  overflow: hidden;
}

.camera-stage video,
.camera-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-stage video {
  transform: scaleX(-1);
}

.camera-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.session-focus-overlay {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 4;
  width: min(520px, calc(100% - 34px));
  transform: translate(-50%, -50%);
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(8, 17, 27, 0.82);
  color: #fff;
  padding: clamp(18px, 3.4vw, 34px);
  text-align: center;
  pointer-events: none;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.session-focus-overlay span,
.session-focus-overlay small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  text-transform: uppercase;
}

.session-focus-overlay strong {
  font-size: clamp(2.1rem, 7vw, 5.4rem);
  line-height: 0.98;
}

.coach-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(8, 17, 27, 0.78);
  color: #fff;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
}

.coach-caption span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.coach-caption strong {
  font-size: clamp(1rem, 2vw, 1.55rem);
  line-height: 1.25;
}

body.rtl .side-nav button,
body.rtl label,
body.rtl .coach-caption,
body.rtl .camera-header,
body.rtl .patient-item,
body.rtl .plan-item,
body.rtl .account-grid {
  text-align: right;
}

body.rtl .metric-cluster {
  justify-content: flex-start;
}

.camera-actions {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.camera-actions label {
  min-width: 170px;
  margin-left: auto;
}

.mini-list,
.patient-list {
  display: grid;
  gap: 10px;
}

.mini-list.empty,
.patient-list.empty {
  border: 1px dashed rgba(23, 32, 51, 0.18);
  border-radius: 12px;
  color: var(--muted);
  padding: 14px;
}

.plan-item,
.patient-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  padding: 12px;
}

.plan-item {
  display: grid;
  gap: 4px;
}

.plan-item.active {
  border-color: rgba(0, 166, 217, 0.68);
  box-shadow: 0 0 0 3px rgba(0, 166, 217, 0.14);
}

.plan-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.plan-step-actions .ghost-button {
  min-height: 34px;
  border-radius: 10px;
  padding: 7px 11px;
}

.plan-item strong,
.patient-item strong {
  color: var(--ink);
}

.plan-item span,
.patient-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.patient-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.patient-actions {
  display: flex;
  gap: 8px;
}

.patient-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 800;
}

.exercise-library-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  padding: 12px;
}

.library-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.library-card-header span,
.library-card-header small,
.library-instructions small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.library-card-header strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  line-height: 1.25;
}

.library-animation-wrap,
.library-instructions {
  display: grid;
  gap: 10px;
}

.library-animation-svg {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.library-demo-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(7, 123, 211, 0.16);
  border-radius: 8px;
  background: #0d1620;
}

.library-animation-svg rect {
  fill: #f5f9ff;
  stroke: rgba(7, 123, 211, 0.16);
}

.guide-line {
  stroke: #8b96a8;
  stroke-width: 3.1;
  stroke-linecap: round;
}

.guide-highlight {
  stroke: var(--blue);
  stroke-width: 4;
}

.guide-head {
  fill: #8b96a8;
}

.guide-highlight-fill {
  fill: var(--blue);
}

.library-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.library-tags span {
  border: 1px solid rgba(7, 123, 211, 0.14);
  border-radius: 999px;
  background: #f2f8ff;
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 800;
}

.library-instructions strong {
  color: var(--blue);
  font-size: 0.82rem;
}

.library-instructions ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-inline-start: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.42;
}

.remove-button {
  background: #fff0f0 !important;
  color: var(--red) !important;
}

.admin-users-panel {
  margin-top: 18px;
}

.admin-search-field {
  margin: 8px 0 14px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table-wrap.empty {
  border: 1px dashed rgba(23, 32, 51, 0.18);
  border-radius: 12px;
  color: var(--muted);
  padding: 14px;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-table td {
  font-size: 0.92rem;
}

.admin-table small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.admin-filter-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 7px 13px;
  font-size: 0.84rem;
  font-weight: 850;
}

.admin-filter-tabs button.active {
  border-color: #101a2b;
  background: #101a2b;
  color: #ffffff;
}

.admin-status-item,
.admin-table tr {
  border-left: 5px solid transparent;
}

.admin-status-item.status-active,
.admin-table tr.status-active {
  border-left-color: var(--green);
  background: #f2fbf6;
}

.admin-table tr.status-active td:first-child {
  border-left: 5px solid var(--green);
}

.admin-status-item.status-due,
.admin-table tr.status-due {
  border-left-color: #8b94a3;
  background: #f1f3f6;
  color: #5e687a;
}

.admin-table tr.status-due td:first-child {
  border-left: 5px solid #8b94a3;
}

.admin-status-item.status-expired,
.admin-table tr.status-expired {
  border-left-color: var(--red);
  background: #fff4f4;
}

.admin-table tr.status-expired td:first-child {
  border-left: 5px solid var(--red);
}

.admin-status-item.status-suspended,
.admin-table tr.status-suspended {
  border-left-color: #8b94a3;
  background: #f1f3f6;
  color: #5e687a;
}

.admin-table tr.status-suspended td:first-child {
  border-left: 5px solid #8b94a3;
}

.admin-table button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 800;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-grid div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
  padding: 14px;
}

.account-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(420px, calc(100% - 44px));
  border-radius: 14px;
  background: #101a2b;
  color: #fff;
  padding: 14px 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transform: translateY(130%);
  transition: transform 0.25s ease;
}

.toast.show {
  transform: translateY(0);
}

@media (max-width: 1160px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .side-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-nav button {
    text-align: center;
  }

  .coach-grid,
  .client-grid {
    grid-template-columns: 1fr;
  }

  .session-controls {
    position: static;
    max-height: none;
  }
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .top-links {
    gap: 10px;
    font-size: 0.82rem;
  }

  .workspace {
    padding: 16px;
  }

  .workspace-top,
  .camera-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-grid,
  .account-grid,
  .sidebar {
    grid-template-columns: 1fr;
  }

  .camera-stage {
    height: min(62vh, 520px);
    min-height: 340px;
  }

  .camera-actions label {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .nav-container {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .top-links {
    flex-wrap: wrap;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .button-row,
  .camera-actions,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .camera-stage {
    height: min(58vh, 460px);
    min-height: 300px;
  }
}
