:root {
  --ink: #0b1110;
  --ink-2: #111a18;
  --ink-3: #1a2522;
  --paper: #f3f5ef;
  --paper-2: #e8ebe3;
  --white: #fcfdf9;
  --muted: #6b756f;
  --line: #d7ddd4;
  --lime: #b8ff46;
  --lime-dark: #85c91d;
  --orange: #ff7450;
  --blue: #6ba8ff;
  --danger: #c84334;
  --shadow: 0 18px 50px rgba(6, 16, 13, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(2.1rem, 5vw, 4.5rem); line-height: .96; letter-spacing: -.065em; }
h2 { margin-bottom: 0; font-size: clamp(1.35rem, 2vw, 2rem); letter-spacing: -.035em; }
h3 { margin-bottom: 0; font-size: 1.2rem; letter-spacing: -.02em; }

.boot-shell {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: var(--ink);
  color: var(--paper);
}
.boot-shell p { color: #9fac9f; }
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--ink);
  background: var(--lime);
  font-weight: 950;
  letter-spacing: -.08em;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup > div:last-child { display: grid; gap: 2px; }
.brand-lockup strong { font-size: .82rem; letter-spacing: .12em; }
.brand-lockup span { font-size: .72rem; color: #98a39d; }
.eyebrow { margin-bottom: 8px; color: #68736d; font-size: .7rem; font-weight: 850; letter-spacing: .17em; }
.muted { color: var(--muted); font-size: .83rem; }

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 72px;
  padding: max(12px, env(safe-area-inset-top)) clamp(16px, 3vw, 36px) 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: rgba(11, 17, 16, .96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.identity { display: grid; padding: 0 4px; text-align: right; }
.identity span { font-size: .82rem; font-weight: 750; }
.identity small { color: #91a098; text-transform: capitalize; }
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  color: white;
  background: rgba(255,255,255,.06);
  font-weight: 800;
}
.icon-button:hover { border-color: var(--lime); color: var(--lime); }
.notification-menu { position: relative; }
.notification-button {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 11px;
  color: white;
  background: rgba(255,255,255,.06);
  font-size: 1rem;
}
.notification-button:hover, .notification-button[aria-expanded="true"] { color: var(--lime); border-color: var(--lime); }
.notification-button b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); background: var(--lime); font-size: .58rem; line-height: 1; }
.notification-panel { position: absolute; z-index: 90; top: calc(100% + 11px); right: 0; width: min(380px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 90px)); overflow: auto; color: var(--ink); border: 1px solid #cad2c7; border-radius: 16px; background: var(--white); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.notification-panel > header { position: sticky; top: 0; padding: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.notification-panel > header > div { display: grid; gap: 2px; }
.notification-panel > header strong { font-size: .83rem; }
.notification-panel > header span { color: var(--muted); font-size: .63rem; }
.notification-panel > header button { padding: 6px 8px; border: 0; border-radius: 8px; color: #4f7a15; background: #e5f5cc; font-size: .63rem; font-weight: 800; }
.notification-panel ol { margin: 0; padding: 0; list-style: none; }
.notification-panel li { position: relative; padding: 13px 15px; display: grid; gap: 5px; border-bottom: 1px solid #e5e9e2; }
.notification-panel li:last-child { border-bottom: 0; }
.notification-panel li.unread { padding-left: 23px; background: #f4faea; }
.notification-panel li.unread::before { content: ""; position: absolute; top: 18px; left: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--lime-dark); }
.notification-panel li > button { width: 100%; padding: 0; display: grid; gap: 5px; border: 0; color: inherit; background: transparent; text-align: left; }
.notification-panel li > button:hover span { color: #477718; text-decoration: underline; }
.notification-panel li span { color: #344039; font-size: .74rem; line-height: 1.45; overflow-wrap: anywhere; }
.notification-panel time { color: var(--muted); font-size: .6rem; }
.notification-panel > p { margin: 0; padding: 24px 15px; color: var(--muted); font-size: .74rem; }
.push-menu-control { position: sticky; bottom: 0; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); background: rgba(250,252,247,.98); }
.push-menu-control > div { display: grid; gap: 3px; }
.push-menu-control strong { font-size: .7rem; }
.push-menu-control span { color: var(--muted); font-size: .61rem; line-height: 1.35; }
.push-menu-control button { flex: 0 0 auto; padding: 7px 9px; border: 0; border-radius: 8px; color: var(--ink); background: var(--lime); font-size: .64rem; font-weight: 850; }
.push-menu-control button:disabled { opacity: .55; }
.push-menu-control.enabled strong { color: #4f781d; }
.push-menu-control.enabled button { color: #5e6862; background: #e8ece5; }
.push-menu-control.unavailable { background: #f0f2ee; }
.logout-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  color: white;
  background: rgba(255,255,255,.06);
  font-size: .7rem;
  font-weight: 800;
}
.logout-button:hover { color: var(--lime); border-color: var(--lime); }
.sync-status { padding: 6px 9px; border: 1px solid #65776f; border-radius: 999px; color: #dce9df; background: #24322d; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.sync-status.syncing { color: var(--ink); border-color: var(--lime); background: var(--lime); }
.login-warning { margin: 14px 0 0; padding: 11px 12px; border: 1px solid #d7e5c4; border-radius: 10px; color: #526247; background: #f2f8e9; font-size: .7rem; line-height: 1.45; }
.login-warning strong { color: #395d16; }
.test-switch { display: flex; align-items: center; gap: 7px; color: #98a39d; font-size: .72rem; }
.test-switch select { padding: 8px 26px 8px 10px; border: 1px solid #36433d; border-radius: 9px; color: white; background: #17201e; }

.trainer-layout { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.client-sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  padding: 28px 16px;
  background: #e7eae2;
  border-right: 1px solid var(--line);
}
.sidebar-heading { padding: 0 6px 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-heading .eyebrow { margin: 0; }
.sidebar-heading button { padding: 5px 7px; border: 0; border-radius: 7px; color: #497710; background: #d7f4aa; font-size: .65rem; font-weight: 850; }
.client-list-tabs { margin: 3px 0 12px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border-radius: 10px; background: #daddd5; }
.client-list-tabs button { min-width: 0; padding: 7px 5px; border: 0; border-radius: 8px; color: #69736d; background: transparent; font-size: .65rem; font-weight: 800; }
.client-list-tabs button b { margin-left: 3px; font-size: .62rem; }
.client-list-tabs button.active { color: var(--ink); background: var(--white); box-shadow: 0 2px 8px rgba(10, 20, 16, .06); }
.client-sidebar nav { max-height: calc(100vh - 278px); display: grid; gap: 6px; overflow-y: auto; }
.sidebar-empty { padding: 14px 10px; color: var(--muted); font-size: .72rem; text-align: center; }
.client-row {
  width: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-align: left;
  background: transparent;
}
.client-row:hover { background: rgba(255,255,255,.6); }
.client-row.active { border-color: #ccd4c7; background: var(--white); box-shadow: 0 6px 20px rgba(10, 20, 16, .06); }
.avatar { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; color: white; background: var(--ink-2); font-size: .72rem; font-weight: 850; }
.client-row > span:last-child { display: grid; gap: 2px; }
.client-row strong { font-size: .86rem; }
.client-row small { color: var(--muted); font-size: .69rem; }
.sidebar-note { position: absolute; right: 16px; bottom: 22px; left: 16px; padding: 14px; display: grid; gap: 5px; border-radius: 13px; color: #dfe9df; background: var(--ink-2); }
.sidebar-note strong { color: var(--lime); font-size: .75rem; }
.sidebar-note span { color: #9caaa2; font-size: .72rem; line-height: 1.45; }

.dashboard-main, .client-main { width: 100%; max-width: 1440px; margin: 0 auto; padding: clamp(28px, 5vw, 72px); }
.hero-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: clamp(30px, 5vw, 60px); border-bottom: 1px solid var(--line); }
.hero-row h1 { margin-bottom: 8px; }
.hero-row p:last-child { margin-bottom: 0; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.archive-banner { margin: 22px 0; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #e3c6be; border-radius: var(--radius); background: #fff0ed; }
.archive-banner .eyebrow { margin-bottom: 5px; color: var(--danger); }
.archive-banner h2 { font-size: clamp(1.05rem, 2vw, 1.35rem); }
.archive-banner p:last-child { margin: 6px 0 0; color: #735f5a; font-size: .76rem; line-height: 1.5; }
.empty-client-view { min-height: 55vh; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; }
.empty-client-view p:not(.eyebrow) { max-width: 480px; color: var(--muted); line-height: 1.6; }
.empty-client-view .button { margin-top: 8px; }
.section-block { padding: clamp(32px, 5vw, 64px) 0; border-bottom: 1px solid var(--line); }
.section-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.section-copy { max-width: 760px; color: var(--muted); font-size: .82rem; line-height: 1.6; }

.push-setup-card { margin: 20px 0; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #cae3a6; border-radius: var(--radius); background: #eff8e2; }
.push-setup-card .eyebrow { margin-bottom: 5px; color: #598322; }
.push-setup-card h2 { font-size: clamp(1.05rem, 2vw, 1.35rem); }
.push-setup-card p:last-child { max-width: 720px; margin: 6px 0 0; color: #5d6c60; font-size: .75rem; line-height: 1.5; }
.push-setup-card .button { flex: 0 0 auto; }
.push-setup-card.blocked { border-color: #e3c6be; background: #fff0ed; }
.push-setup-card.blocked .eyebrow { color: var(--danger); }

.week-navigator { margin: 0 0 8px; padding: 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.week-navigator > div { display: grid; justify-items: center; gap: 2px; text-align: center; }
.week-navigator span { color: var(--muted); font-size: .6rem; font-weight: 850; letter-spacing: .14em; }
.week-navigator strong { font-size: .91rem; }
.week-navigator small { color: #668239; font-size: .65rem; }
.reminder-card { margin: 22px 0; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #d6e9b8; border-radius: var(--radius); background: #eff8e2; }
.reminder-card .eyebrow { color: #598322; }
.reminder-card h2 { font-size: clamp(1.15rem, 2vw, 1.55rem); }

.button {
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}
.button.primary { color: var(--ink); background: var(--lime); }
.button.primary:hover { background: #c8ff70; }
.button.secondary { color: var(--ink); border-color: #cbd3c8; background: var(--white); }
.button.secondary:hover { border-color: #99a693; }
.button.quiet { min-height: 38px; padding: 7px 10px; color: #66716b; border-color: #d8ddd6; background: #f2f4ef; font-size: .68rem; }
.button.danger { color: white; background: var(--danger); }
.button.compact { min-height: 38px; padding: 7px 12px; }
.button.wide { width: 100%; }

.empty-state { padding: 24px; display: grid; justify-items: start; gap: 5px; border: 1px dashed #bdc6bb; border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.45); }
.empty-state strong { color: var(--ink); }
.empty-state span { font-size: .78rem; }

.volume-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; }
.volume-card { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.volume-card > div:first-child { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.volume-card span { color: var(--muted); font-size: .74rem; font-weight: 750; }
.volume-card strong { font-size: 1.55rem; letter-spacing: -.055em; }
.volume-card strong small { color: #8d9891; font-size: .74rem; letter-spacing: 0; }
.volume-card > small { color: #8b958f; font-size: .66rem; }
.progress { width: 100%; height: 6px; margin: 14px 0 8px; display: block; overflow: hidden; border: 0; border-radius: 10px; background: #e6eae2; appearance: none; }
.progress::-webkit-progress-bar { border-radius: 10px; background: #e6eae2; }
.progress::-webkit-progress-value { border-radius: 10px; background: var(--lime-dark); }
.progress::-moz-progress-bar { border-radius: 10px; background: var(--lime-dark); }

.progress-select { min-width: min(320px, 48vw); display: grid; gap: 6px; color: var(--muted); font-size: .66rem; font-weight: 800; }
.progress-select select { min-height: 42px; padding: 8px 35px 8px 11px; border: 1px solid #cbd3c8; border-radius: 10px; color: var(--ink); background: white; }
.progress-panel { padding: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: minmax(180px, .42fr) minmax(320px, 1fr); align-items: center; gap: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.progress-summary { display: grid; gap: 7px; }
.progress-summary > span { width: fit-content; padding: 5px 8px; border-radius: 999px; color: #4e761c; background: #e5f3d1; font-size: .6rem; font-weight: 850; text-transform: uppercase; }
.progress-summary strong { font-size: clamp(1.55rem, 3vw, 2.55rem); letter-spacing: -.055em; }
.progress-summary small { color: var(--muted); font-size: .68rem; }
.progress-chart { min-width: 0; }
.progress-chart svg { width: 100%; height: auto; overflow: visible; }
.progress-chart line { stroke: #dce2d8; stroke-width: 2; }
.progress-chart polyline { fill: none; stroke: var(--lime-dark); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.progress-chart circle { fill: var(--white); stroke: var(--lime-dark); stroke-width: 4; }
.progress-chart > div { display: flex; justify-content: space-between; color: var(--muted); font-size: .59rem; }
.progress-chart.empty { min-height: 140px; display: grid; place-items: center; border: 1px dashed #c6cec2; border-radius: 12px; color: var(--muted); font-size: .72rem; }

.workout-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 16px; }
.workout-card { position: relative; padding: clamp(18px, 2.5vw, 28px); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 26px rgba(10, 20, 16, .035); }
.drag-handle { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; touch-action: none; cursor: grab; border: 1px solid #cad2c7; border-radius: 10px; color: #647169; background: #f5f7f2; font-size: 1rem; font-weight: 900; letter-spacing: -5px; padding-right: 7px; user-select: none; -webkit-user-select: none; }
.drag-handle:active { cursor: grabbing; }
.workout-drag-handle { position: absolute; z-index: 2; top: 17px; right: 17px; }
.workout-card:has(.workout-drag-handle) .workout-card-top { padding-right: 44px; }
.exercise-drag-handle { color: var(--lime); background: var(--ink); border-color: var(--ink); }
.is-reordering { touch-action: none; }
.dragging { z-index: 5; opacity: .76; border-color: var(--lime-dark); box-shadow: 0 18px 45px rgba(10,20,16,.18); }
.workout-card::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--blue); }
.workout-card.solo::before { background: var(--lime-dark); }
.workout-card-top { margin-bottom: 24px; display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.workout-completion { margin: -10px 0 20px; padding: 12px 13px; border-radius: 12px; background: #f0f3ed; }
.workout-completion > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.workout-completion span, .workout-completion small { color: var(--muted); font-size: .66rem; }
.workout-completion strong { color: #4d7b16; font-size: 1rem; }
.workout-completion .progress { margin: 8px 0 5px; }
.type-chip, .permission-chip { display: inline-flex; width: fit-content; margin-bottom: 8px; padding: 5px 8px; border-radius: 999px; color: #245ea5; background: #e7f0ff; font-size: .61rem; font-weight: 900; letter-spacing: .09em; }
.type-chip.solo { color: #487d0e; background: #e9f8d1; }
.status-dot { color: var(--muted); font-size: .7rem; font-weight: 750; white-space: nowrap; }
.status-dot::before { content: ""; width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; background: #c1c8c2; }
.status-dot.complete::before { background: var(--lime-dark); }
.exercise-preview { margin: 0 0 25px; padding: 0; list-style: none; counter-reset: preview; border-top: 1px solid #e6e9e3; }
.exercise-preview li { padding: 10px 0; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e6e9e3; color: #34403a; font-size: .78rem; }
.exercise-preview li.skipped { opacity: .45; text-decoration: line-through; }
.exercise-preview b { color: #7a847e; white-space: nowrap; }
.empty-workout { margin: 0 0 24px; padding: 20px 0; border-top: 1px solid #e6e9e3; border-bottom: 1px solid #e6e9e3; color: var(--muted); font-size: .76rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.client-main { max-width: 1160px; }
.client-hero { padding: clamp(40px, 8vw, 90px) 0 clamp(34px, 6vw, 70px); display: flex; align-items: end; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--line); }
.client-hero p:last-child { max-width: 600px; margin: 0; color: var(--muted); line-height: 1.6; }
.week-badge { min-width: 150px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--white); font-size: .7rem; }
.week-badge strong { color: var(--ink); font-size: .9rem; }
.install-card { margin: 45px 0; padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: var(--radius); color: white; background: var(--ink-2); }
.install-card .eyebrow { color: var(--lime); }
.install-card p:last-child { margin: 8px 0 0; color: #a6b1ab; font-size: .8rem; }

.overlay { position: fixed; z-index: 100; inset: 0; display: grid; justify-items: end; background: rgba(4, 9, 8, .66); backdrop-filter: blur(6px); }
.overlay-panel { width: min(100%, 1040px); height: 100%; overflow: auto; overscroll-behavior: contain; background: var(--paper); box-shadow: -20px 0 70px rgba(0,0,0,.28); }
.overlay.coach .overlay-panel { width: 100%; }
.overlay-header { position: sticky; z-index: 10; top: 0; padding: max(23px, env(safe-area-inset-top)) clamp(20px, 4vw, 46px) 22px; display: flex; align-items: start; justify-content: space-between; gap: 24px; color: white; background: rgba(11, 17, 16, .97); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(12px); }
.overlay-header .eyebrow { color: var(--lime); }
.overlay-header h1 { margin-bottom: 7px; font-size: clamp(2rem, 4vw, 3.5rem); }
.overlay-header h1 + p { margin: 0; color: #9aa69f; font-size: .76rem; }
.overlay-completion { width: min(360px, 62vw); margin-top: 12px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 9px; }
.overlay-completion progress { width: 100%; height: 6px; border: 0; border-radius: 999px; overflow: hidden; accent-color: var(--lime); }
.overlay-completion strong { color: var(--lime); font-size: .72rem; }
.overlay-completion span { color: #9aa69f; font-size: .64rem; }
.close-button { width: 46px; height: 46px; flex: 0 0 auto; border: 1px solid #39433f; border-radius: 50%; color: white; background: transparent; font-size: 1.55rem; line-height: 1; }
.close-button:hover { color: var(--lime); border-color: var(--lime); }
.locked-banner { padding: 14px clamp(20px, 4vw, 46px); display: flex; gap: 10px; color: #234e82; background: #e5effb; font-size: .76rem; }
.locked-banner span { color: #52708f; }
.overlay-content { max-width: 1120px; margin: 0 auto; padding: clamp(18px, 4vw, 46px); padding-bottom: max(50px, env(safe-area-inset-bottom)); }
.edit-scope-control { margin-bottom: 14px; padding: 6px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: #ecefe9; }
.edit-scope-control > span { padding: 0 8px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.edit-scope-control button { padding: 7px 9px; border: 0; border-radius: 8px; color: #5c6861; background: transparent; font-size: .65rem; font-weight: 800; }
.edit-scope-control button.active { color: var(--ink); background: var(--white); box-shadow: 0 2px 8px rgba(10,20,16,.08); }
.exercise-list { display: grid; gap: 15px; }
.exercise-block { padding: clamp(17px, 3vw, 27px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 7px 22px rgba(10,20,16,.035); }
.exercise-block.is-skipped { opacity: .55; }
.exercise-title { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.exercise-title > div:first-child { display: flex; align-items: start; gap: 14px; }
.exercise-title h3 { margin: 1px 0 4px; }
.exercise-title p { margin: 0; color: var(--muted); font-size: .74rem; }
.exercise-number { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--lime); background: var(--ink); font-size: .69rem; font-weight: 900; }
.permission-chip { color: #416b15; background: #edf8df; white-space: nowrap; }
.permission-chip.locked { color: #6d7885; background: #edf0f3; }
.instruction { margin: 15px 0 0; padding: 11px 13px; border-left: 3px solid var(--blue); color: #4e657d; background: #eff5fb; font-size: .76rem; line-height: 1.5; }
.previous { margin: 15px 0; padding: 11px 13px; border-radius: 11px; background: #eef1eb; }
.previous span { color: #7a857e; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.previous p { margin: 4px 0 0; color: #4f5a54; font-size: .72rem; }
.previous strong { display: inline-block; margin-top: 4px; color: #3c6e13; font-size: .72rem; }
.previous.empty { background: #f1f2ef; }
.live-metric { margin: -4px 0 14px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #d7e8bc; border-radius: 10px; background: #f0f8e4; }
.live-metric span { color: #5e7251; font-size: .68rem; font-weight: 750; }
.live-metric strong { color: #3f6e14; font-size: .88rem; }

.set-table { margin-top: 15px; border: 1px solid #dce1d9; border-radius: 13px; overflow: hidden; }
.set-swipe { position: relative; overflow: hidden; background: #bc3f3f; }
.set-swipe .set-row { position: relative; z-index: 1; background-color: var(--white); transition: transform .18s ease; }
.set-swipe .set-row.done { background-color: #f4faeb; }
.set-swipe .set-row.preloaded:not(.done) { background-color: #f7f9f3; }
.set-swipe.revealed .set-row, .set-swipe:focus-within .set-row { transform: translateX(-76px); }
.set-swipe .cardio-set-card { position: relative; z-index: 1; background-color: var(--white); transition: transform .18s ease; }
.set-swipe .cardio-set-card.done { background-color: #f4faeb; }
.set-swipe .cardio-set-card.preloaded:not(.done) { background-color: #f7f9f3; }
.set-swipe.revealed .cardio-set-card { transform: translateX(-76px); }
.set-delete { position: absolute; z-index: 0; top: 0; right: 0; width: 76px; height: 100%; border: 0; color: white; background: #bc3f3f; font-size: .68rem; font-weight: 850; }
.set-head + .set-swipe .set-row, .set-swipe + .set-swipe .set-row { border-top: 1px solid #e2e6df; }
.set-swipe + .set-swipe .cardio-set-card { border-top: 1px solid #e2e6df; }
.set-row { min-height: 50px; padding: 7px 10px; display: grid; grid-template-columns: 42px repeat(4, minmax(50px, 1fr)) 52px; align-items: center; gap: 7px; border-top: 1px solid #e2e6df; }
.rep-tracking.tracking-bodyweight_reps .set-row { grid-template-columns: 42px minmax(90px, 1.6fr) repeat(2, minmax(70px, 1fr)) 52px; }
.dynamic-tracking .set-row { grid-template-columns: 42px repeat(var(--field-count), minmax(50px, 1fr)) 52px; }
.cardio-set-card { padding: 12px; }
.cardio-set-top { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cardio-set-top > strong { display: flex; align-items: baseline; gap: 7px; color: var(--ink); font-size: 1rem; }
.cardio-set-top > strong span, .cardio-field > span, .cardio-check > span { color: #78827c; font-size: .58rem; font-weight: 850; letter-spacing: .06em; }
.cardio-set-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.cardio-field { min-width: 0; display: grid; gap: 5px; }
.cardio-field input { width: 100%; min-width: 0; height: 39px; padding: 5px 7px; border: 1px solid #ced5cc; border-radius: 8px; color: var(--ink); background: white; text-align: center; font-size: .8rem; }
.cardio-field input:focus { outline: 2px solid rgba(133,201,29,.26); border-color: var(--lime-dark); }
.cardio-field input:disabled { color: #6e7872; border-color: transparent; background: #eff1ed; }
.cardio-set-card.preloaded:not(.done) .cardio-field input { color: #526148; border-style: dashed; background: #fbfdf8; }
.check.cardio-check { display: flex; align-items: center; gap: 8px; }
.set-row:first-child { border-top: 0; }
.set-head { min-height: 32px; color: #78827c; background: #ecefe9; font-size: .59rem; font-weight: 850; letter-spacing: .06em; }
.set-row > strong { padding-left: 7px; color: #7d8781; font-size: .75rem; }
.set-row input:not([type="checkbox"]) { width: 100%; height: 37px; padding: 5px 7px; border: 1px solid #ced5cc; border-radius: 8px; color: var(--ink); background: white; text-align: center; font-size: .8rem; }
.set-row input:focus { outline: 2px solid rgba(133,201,29,.26); border-color: var(--lime-dark); }
.set-row input:disabled { color: #6e7872; border-color: transparent; background: #eff1ed; }
.set-row.done { background: #f4faeb; }
.set-row.preloaded:not(.done) { background: #f7f9f3; }
.set-row.preloaded input:not([type="checkbox"]) { color: #526148; border-style: dashed; background: #fbfdf8; }
.prefill-note { margin: 9px 2px 0; color: #617052; font-size: .66rem; line-height: 1.45; }
.exercise-block.notification-focus { outline: 3px solid rgba(133,201,29,.48); animation: notification-focus 1.4s ease-out; }
@keyframes notification-focus { from { box-shadow: 0 0 0 14px rgba(133,201,29,.2); } to { box-shadow: none; } }
.check { display: grid; place-items: center; }
.check input { position: absolute; opacity: 0; }
.check i { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #bfc8bd; border-radius: 8px; background: white; }
.check input:checked + i { border-color: var(--lime-dark); background: var(--lime); }
.check input:checked + i::after { content: "✓"; font-size: .8rem; font-weight: 900; }
.check input:disabled + i { opacity: .45; }
.exercise-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 5px; }
.text-button { min-height: 34px; padding: 6px 9px; border: 1px solid #d7ddd3; border-radius: 8px; color: #53605a; background: #f8f9f5; font-size: .66rem; font-weight: 760; }
.text-button:hover { border-color: #aab6a6; color: var(--ink); }
.text-button.private { color: #7b5321; background: #fff7e8; border-color: #f0dfbd; }
.text-button.danger { color: var(--danger); }
.volume-detail { margin-top: 10px; color: #758179; font-size: .64rem; }
.workout-tools { margin: 18px 0 35px; display: flex; justify-content: space-between; gap: 12px; }

.rest-timer { margin-top: 12px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #d9dfd6; border-radius: 11px; background: #f1f3ef; }
.rest-timer > div:first-child { display: grid; gap: 1px; }
.rest-timer span { color: var(--muted); font-size: .58rem; font-weight: 850; letter-spacing: .1em; }
.rest-timer strong { font-variant-numeric: tabular-nums; font-size: 1.15rem; }
.rest-timer > div:last-child { display: flex; gap: 5px; }
.rest-timer.running { border-color: #b9dc82; background: #f1fae4; }
.rest-alert-backdrop { position: fixed; z-index: 250; inset: 0; padding: 18px; display: grid; place-items: center; background: rgba(4,9,8,.72); backdrop-filter: blur(6px); }
.rest-alert { width: min(100%, 360px); padding: 28px; border-radius: 22px; background: var(--white); box-shadow: 0 28px 90px rgba(0,0,0,.38); text-align: center; }
.rest-alert-icon { width: 58px; height: 58px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--lime); font-size: 1.5rem; font-weight: 950; }
.rest-alert h2 { margin: 4px 0 8px; }
.rest-alert p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); font-size: .78rem; }
.confirmation-copy p { margin: 0; color: #4e5b54; line-height: 1.6; }

.feedback-block, .local-coach-block { margin-top: 34px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.feedback-form { display: grid; gap: 15px; }
.feedback-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feedback-form label { display: grid; gap: 6px; color: #515d57; font-size: .69rem; font-weight: 760; }
.feedback-form input, .feedback-form textarea { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #cbd3c8; border-radius: 10px; background: white; }
.feedback-form input:disabled, .feedback-form textarea:disabled { color: #657069; border-color: #dde2da; background: #f0f2ee; opacity: 1; }
.feedback-form textarea { min-height: 86px; resize: vertical; }
.feedback-form .button { justify-self: start; }
.local-coach-block { border-color: #cfe3b1; background: #f3fae9; }
.local-coach-block.pending > p { margin: 0; color: var(--muted); font-size: .79rem; line-height: 1.5; }
.local-coach-block ul { margin: 0 0 18px; padding-left: 20px; color: #3f5143; font-size: .8rem; line-height: 1.55; }
.local-coach-block li + li { margin-top: 7px; }
.local-chip, .pending-count { padding: 6px 9px; border-radius: 999px; color: #4f7919; background: #def3bc; font-size: .63rem; font-weight: 850; }

.coach-review-block { margin-top: 34px; padding: clamp(18px, 3vw, 28px); border: 1px solid #cbd8e6; border-radius: var(--radius); background: #f3f7fb; }
.coach-review-block > p { margin: 0 0 16px; color: #536578; font-size: .79rem; line-height: 1.55; }
.coach-review-block.waiting { border-color: #ead7a8; background: #fff9e9; }
.coach-review-block.reviewed { border-color: #cfe3b1; background: #f3fae9; }
.coach-review-block.trainer-only { border-color: #ead9b7; background: #fff8ea; }
.review-chip, .private-chip { padding: 6px 9px; border-radius: 999px; color: #486887; background: #dceaf6; font-size: .63rem; font-weight: 850; white-space: nowrap; }
.private-chip { color: #79531c; background: #f7e5bf; }
.coach-comment { padding: 15px; border-radius: 11px; color: #37483b; background: rgba(255,255,255,.78); font-size: .83rem; line-height: 1.6; white-space: pre-wrap; }
.coach-review-packet { margin-bottom: 18px; }
.coach-review-packet summary { cursor: pointer; color: #72511e; font-size: .75rem; font-weight: 850; }
.coach-review-packet pre { max-height: 420px; margin: 12px 0 0; padding: 15px; overflow: auto; border: 1px solid #e5d4b0; border-radius: 11px; color: #4d4436; background: rgba(255,255,255,.72); font: .7rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.coach-review-form { display: grid; gap: 12px; }
.coach-review-form label { display: grid; gap: 7px; color: #5e513e; font-size: .7rem; font-weight: 780; }
.coach-review-form textarea { width: 100%; min-height: 110px; padding: 11px 12px; resize: vertical; border: 1px solid #d7c49f; border-radius: 11px; background: white; }
.coach-review-form .button { justify-self: start; }

.ai-program-form { margin: 20px 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.ai-program-form textarea { width: 100%; min-height: 110px; padding: 12px 13px; resize: vertical; border: 1px solid #cbd3c8; border-radius: 12px; background: white; }
.request-list { display: grid; gap: 12px; }
.previous-requests { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.previous-requests > summary { padding: 10px 2px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; color: #4e5a53; font-size: .75rem; font-weight: 850; }
.previous-requests > summary b { min-width: 25px; padding: 4px 7px; border-radius: 999px; color: #59733a; background: #e5eddc; text-align: center; font-size: .62rem; }
.previous-requests[open] > summary { margin-bottom: 8px; }
.request-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.request-card.waiting_approval { border-color: #bddb8f; }
.client-request-status { padding: 16px 18px; display: grid; gap: 8px; border: 1px solid #bddb8f; border-radius: 14px; background: #f6faef; }
.client-request-status > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.client-request-status span { color: var(--muted); font-size: .68rem; font-weight: 780; text-transform: uppercase; letter-spacing: .06em; }
.client-request-status strong { color: #567c21; font-size: .72rem; }
.client-request-status p { margin: 0; color: #5d6962; font-size: .75rem; line-height: 1.5; }
.request-heading { display: flex; justify-content: space-between; gap: 15px; }
.request-heading > div { display: grid; gap: 3px; }
.request-heading span { color: var(--muted); font-size: .65rem; }
.request-heading > b { color: #567c21; font-size: .68rem; white-space: nowrap; }
.request-prompt { margin: 12px 0; color: #5d6962; font-size: .76rem; line-height: 1.5; }
.error-copy { color: var(--danger); font-size: .75rem; }
.review-note { padding: 10px; border-radius: 9px; color: #604616; background: #fff3d5; font-size: .75rem; }
.draft-preview { margin-top: 12px; }
.draft-preview summary { cursor: pointer; color: #3f6e14; font-size: .75rem; font-weight: 850; }
.draft-preview > p, .coaching-notes { color: var(--muted); font-size: .73rem; line-height: 1.5; }
.draft-days { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.draft-days article { padding: 12px; border-radius: 11px; background: #eef1eb; }
.draft-days article > div { display: flex; justify-content: space-between; gap: 8px; }
.draft-days article span { color: var(--muted); font-size: .64rem; text-transform: capitalize; }
.draft-days ol { margin: 10px 0 0; padding: 0; list-style: none; }
.draft-days li { padding: 6px 0; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #d9ded5; font-size: .68rem; }
.draft-days li b { color: var(--muted); white-space: nowrap; }
.approval-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.approval-actions .button { flex: 1 1 145px; }
.revision-history { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.revision-history summary { cursor: pointer; color: #4e5a53; font-size: .72rem; font-weight: 850; }
.revision-history ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.revision-history li { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.revision-history li strong, .revision-history li span, .revision-history li small { display: block; }
.revision-history li strong { color: var(--ink); }
.revision-history li small { margin-top: 2px; color: #819087; }

.comments-block { margin-top: 40px; padding-top: 35px; border-top: 1px solid var(--line); }
.comment-list { display: grid; gap: 9px; }
.comment { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.comment-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-heading .text-button { min-height: 28px; padding: 4px 7px; }
.comment span { color: #768179; font-size: .64rem; font-weight: 800; }
.comment p { margin: 5px 0 0; font-size: .79rem; line-height: 1.45; }
.comment-form { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.comment-form input { min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid #cfd7cd; border-radius: 10px; background: white; }

.management-backdrop { position: fixed; z-index: 180; inset: 0; padding: 20px; display: grid; place-items: center; overflow: auto; background: rgba(4, 9, 8, .7); backdrop-filter: blur(7px); }
.management-dialog { width: min(100%, 760px); max-height: calc(100vh - 40px); overflow: auto; border-radius: 22px; background: var(--paper); box-shadow: 0 35px 100px rgba(0,0,0,.35); }
.management-dialog > header { position: sticky; z-index: 2; top: 0; padding: 22px 24px; display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: rgba(243,245,239,.96); backdrop-filter: blur(12px); }
.management-dialog > header .eyebrow { margin-bottom: 5px; }
.close-button.dark { color: var(--ink); border-color: #cbd3c8; }
.close-button.dark:hover { color: var(--danger); border-color: var(--danger); }
.management-form { padding: 24px; display: grid; gap: 17px; }
.management-form > label, .form-columns label, .muscle-input-grid label, .target-grid label { display: grid; gap: 6px; color: #515d57; font-size: .7rem; font-weight: 760; }
.management-form input:not([type="checkbox"]), .management-form select, .management-form textarea { width: 100%; min-height: 46px; padding: 9px 11px; border: 1px solid #cbd3c8; border-radius: 10px; color: var(--ink); background: white; }
.management-form textarea { min-height: 88px; resize: vertical; }
.ai-draft-days, .ai-draft-exercises { display: grid; gap: 14px; }
.ai-draft-day, .ai-draft-exercise { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 13px; }
.ai-draft-day { background: #f7faf4; }
.ai-draft-exercise { background: var(--white); }
.ai-draft-day > legend, .ai-draft-exercise > legend { padding: 0 6px; color: #4e5a53; font-size: .72rem; font-weight: 850; }
.ai-draft-editor .ai-draft-exercise textarea { min-height: 65px; }
.management-form input:focus, .management-form select:focus, .management-form textarea:focus { outline: 2px solid rgba(133,201,29,.22); border-color: var(--lime-dark); }
.weekday-picker { margin: 0; padding: 0; border: 0; }
.weekday-picker legend { margin-bottom: 8px; color: #515d57; font-size: .7rem; font-weight: 760; }
.weekday-picker > div { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekday-picker label { position: relative; }
.weekday-picker input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-picker span { min-height: 42px; display: grid; place-items: center; border: 1px solid #cbd3c8; border-radius: 9px; color: #68736d; background: white; font-size: .66rem; font-weight: 850; }
.weekday-picker input:checked + span { color: #345f08; border-color: #8bc93a; background: #e5f6ca; }
.weekday-picker input:focus-visible + span { outline: 2px solid rgba(133,201,29,.35); }
.check-line { display: flex !important; align-items: center; gap: 9px !important; }
.check-line input { width: 18px; height: 18px; accent-color: var(--lime-dark); }
.exercise-picker { display: grid; gap: 7px; }
.exercise-picker > label { display: grid; gap: 6px; color: #515d57; font-size: .7rem; font-weight: 760; }
.exercise-search-status { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.exercise-search-status.selected { color: #4f781d; font-weight: 760; }
.exercise-search-status.custom { color: #8a5a17; font-weight: 760; }
.exercise-suggestions { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #bdc8b9; border-radius: 12px; background: white; box-shadow: 0 15px 35px rgba(6,16,13,.12); }
.exercise-suggestions[hidden] { display: none; }
.exercise-suggestion, .exercise-custom-choice { width: 100%; min-height: 58px; padding: 10px 12px; display: grid; gap: 3px; border: 0; border-bottom: 1px solid #e2e7df; color: var(--ink); background: white; text-align: left; }
.exercise-suggestion:last-child, .exercise-custom-choice:last-child { border-bottom: 0; }
.exercise-suggestion:hover, .exercise-suggestion:focus { outline: 0; background: #f0f8e5; }
.exercise-suggestion strong, .exercise-custom-choice strong { font-size: .76rem; }
.exercise-suggestion span, .exercise-custom-choice span { color: var(--muted); font-size: .62rem; line-height: 1.35; text-transform: capitalize; }
.exercise-custom-choice { color: #714a14; background: #fff8e8; }
.exercise-custom-choice:hover, .exercise-custom-choice:focus { outline: 0; background: #fff0cb; }
.form-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.checkbox-field { display: flex !important; align-items: center; gap: 9px !important; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--lime-dark); }
.field-group { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #e9ece5; }
.field-label { display: block; margin-bottom: 11px; color: var(--ink); font-size: .73rem; font-weight: 850; }
.field-group > small, .form-help { margin: 9px 0 0; color: var(--muted); font-size: .65rem; line-height: 1.45; }
.custom-tracking-editor { padding: 14px; display: grid; gap: 10px; border: 1px solid #d7e8bc; border-radius: 12px; background: #f3f9e9; }
.custom-tracking-editor .form-help { margin: 0; color: #53644b; }
.muscle-input-grid, .target-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.muscle-input-grid label, .target-grid label { padding: 9px; border-radius: 9px; background: rgba(255,255,255,.65); }
.muscle-input-grid input, .target-grid input { min-height: 38px !important; }

.auth-page { min-height: 100vh; padding: 24px; display: grid; place-items: center; color: white; background: var(--ink); }
.auth-card { width: min(100%, 480px); padding: clamp(26px, 6vw, 48px); border: 1px solid #27322f; border-radius: 24px; background: #111a18; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.auth-card .brand-lockup { margin-bottom: 55px; }
.auth-card h1 { margin-bottom: 18px; font-size: clamp(2.3rem, 8vw, 4.3rem); }
.auth-copy > p:last-child, .auth-card > p { color: #9ba7a0; line-height: 1.6; }
.auth-card form { margin-top: 32px; display: grid; gap: 10px; }
.auth-card label { color: #c6cfc9; font-size: .72rem; font-weight: 750; }
.auth-card input { min-height: 50px; padding: 10px 13px; border: 1px solid #3a4742; border-radius: 11px; color: white; background: #0b1210; }
.auth-card input:focus { outline: 2px solid rgba(184,255,70,.2); border-color: var(--lime); }
.form-status { min-height: 23px; margin: 13px 0 0; color: var(--lime) !important; font-size: .75rem; }
.fine-print { margin: 32px 0 0 !important; padding-top: 18px; border-top: 1px solid #2c3733; font-size: .69rem; }
.compact-auth { text-align: center; }
.compact-auth .brand-mark { margin: 0 auto 28px; }
.compact-auth h1 { font-size: 2.6rem; }
.compact-auth .button { margin-top: 12px; }

.toast { position: fixed; z-index: 200; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); max-width: min(380px, calc(100vw - 40px)); padding: 12px 16px; transform: translateY(30px); opacity: 0; border-radius: 11px; color: var(--ink); background: var(--lime); box-shadow: var(--shadow); font-size: .76rem; font-weight: 750; pointer-events: none; transition: .22s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { color: white; background: var(--danger); }

@media (max-width: 980px) {
  .volume-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .trainer-layout { grid-template-columns: 1fr; }
  .client-sidebar { position: static; width: 100%; height: auto; padding: 12px 16px; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-note { display: none; }
  .sidebar-heading { padding: 3px 4px 6px 0; }
  .client-list-tabs { width: 260px; margin-bottom: 8px; }
  .client-sidebar nav { max-height: none; padding-bottom: 5px; display: flex; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .client-row { min-width: 170px; }
}

@media (max-width: 720px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; }
  .topbar { min-height: 64px; padding-right: 12px; padding-left: 12px; }
  .topbar .brand-lockup span, .identity, .install-button { display: none; }
  .notification-panel { position: fixed; top: calc(64px + env(safe-area-inset-top)); right: 12px; left: 12px; width: auto; max-height: calc(100vh - 82px - env(safe-area-inset-top)); }
  .brand-lockup strong { font-size: .67rem; }
  .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
  .test-switch { font-size: 0; }
  .test-switch select { max-width: 130px; font-size: .68rem; }
  .dashboard-main, .client-main { padding: 28px 15px; }
  .week-navigator { padding: 11px; grid-template-columns: 1fr 1fr; }
  .week-navigator > div { grid-column: 1 / -1; grid-row: 1; }
  .week-navigator .button { width: 100%; grid-row: 2; }
  .reminder-card { align-items: stretch; flex-direction: column; }
  .weekday-picker > div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .push-setup-card { align-items: stretch; flex-direction: column; }
  .archive-banner { align-items: stretch; flex-direction: column; }
  .archive-banner .button { width: 100%; }
  .push-setup-card .button { width: 100%; }
  .hero-row, .client-hero { align-items: start; flex-direction: column; }
  .hero-row .hero-actions, .hero-row .hero-actions .button { width: 100%; }
  .week-badge { width: 100%; }
  .workout-grid { grid-template-columns: 1fr; }
  .volume-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .volume-card { padding: 13px; }
  .volume-card strong { font-size: 1.25rem; }
  .section-heading { align-items: start; }
  .progress-section .section-heading { flex-direction: column; }
  .progress-select { width: 100%; min-width: 0; }
  .progress-panel { grid-template-columns: 1fr; gap: 8px; }
  .section-heading > .muted { display: none; }
  .card-actions .button { flex: 1; }
  .install-card { align-items: stretch; flex-direction: column; }
  .overlay-panel { width: 100%; }
  .overlay-header { padding-right: 15px; padding-left: 18px; }
  .overlay-header h1 { font-size: 2rem; }
  .locked-banner { align-items: start; flex-direction: column; }
  .overlay-content { padding: 14px; padding-bottom: max(42px, env(safe-area-inset-bottom)); }
  .edit-scope-control { align-items: stretch; flex-direction: column; }
  .edit-scope-control > span { padding: 5px 8px 2px; }
  .exercise-block { padding: 15px 11px; border-radius: 14px; }
  .exercise-title { align-items: start; flex-direction: column; }
  .permission-chip { margin: 0 0 0 48px; }
  .set-row { padding: 6px 5px; grid-template-columns: 28px repeat(4, minmax(39px, 1fr)) 40px; gap: 4px; }
  .rep-tracking.tracking-bodyweight_reps .set-row { grid-template-columns: 28px minmax(64px, 1.6fr) repeat(2, minmax(48px, 1fr)) 40px; }
  .dynamic-tracking .set-row { grid-template-columns: 28px repeat(var(--field-count), minmax(39px, 1fr)) 40px; }
  .cardio-set-card { padding: 11px 9px; }
  .cardio-set-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cardio-field input { height: 38px; font-size: .76rem; }
  .set-row input:not([type="checkbox"]) { height: 36px; padding: 4px 2px; font-size: .72rem; }
  .set-row > strong { padding-left: 4px; }
  .set-head { font-size: .5rem; }
  .check i { width: 27px; height: 27px; }
  .workout-tools, .comment-form { grid-template-columns: 1fr; flex-direction: column; }
  .workout-tools .button, .comment-form .button { width: 100%; }
  .management-backdrop { padding: 0; place-items: end stretch; }
  .management-dialog { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .management-dialog > header, .management-form { padding: 18px 15px; }
  .exercise-suggestions { max-height: 38vh; }
  .exercise-suggestion, .exercise-custom-choice { min-height: 62px; padding: 11px; }
  .form-columns { grid-template-columns: 1fr 1fr; }
  .form-columns label:last-child { grid-column: 1 / -1; }
  .muscle-input-grid, .target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rest-timer { align-items: stretch; flex-direction: column; }
  .rest-timer > div:last-child { display: grid; grid-template-columns: repeat(3, 1fr); }
  .feedback-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-program-form { grid-template-columns: 1fr; }
  .ai-program-form .button { width: 100%; }
  .draft-days { grid-template-columns: 1fr; }
  .request-heading, .approval-actions { align-items: stretch; flex-direction: column; }
  .approval-actions .button { width: 100%; }
  .coach-review-form .button, .coach-review-block > .button { width: 100%; }
}

@media (display-mode: standalone) {
  .install-button, .install-card { display: none; }
  .topbar { padding-top: max(12px, env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
