:root {
  --bg: #050506;
  --surface: #111114;
  --surface-2: #18181d;
  --line: #2a2a31;
  --text: #f2f2f4;
  --muted: #a5a6ad;
  --red: #ff1f1f;
  --red-2: #b80f16;
  --silver: #d7d9df;
  --green: #54d38a;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
  --glow-line: linear-gradient(90deg, transparent, rgba(255, 31, 31, 1), #ff8a5a, transparent);
}

* {
  box-sizing: border-box;
  min-width: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 68% 0%, rgba(255, 31, 31, 0.15), transparent 32%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@supports (height: 100dvh) {
  body,
  .app-intro,
  .auth-gate,
  .client-only main {
    min-height: 100dvh;
  }
}

.native-ios .auth-gate {
  padding-top: max(24px, env(safe-area-inset-top));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  padding-left: max(24px, env(safe-area-inset-left));
}

.native-ios.client-only main {
  padding-top: max(22px, env(safe-area-inset-top));
  padding-right: max(22px, env(safe-area-inset-right));
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  padding-left: max(22px, env(safe-area-inset-left));
}

.native-ios .client-app {
  padding-bottom: calc(94px + env(safe-area-inset-bottom));
}

.native-ios .client-bottom-nav {
  bottom: max(14px, env(safe-area-inset-bottom));
}

.app-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 31, 31, 0.2), transparent 22%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 12%),
    #020203;
  perspective: 900px;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.app-intro.hidden {
  opacity: 0;
  visibility: hidden;
}

.intro-space {
  position: relative;
  width: min(86vw, 460px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  animation: introTilt 2400ms ease-in-out both;
}

.intro-logo-wrap {
  position: relative;
  z-index: 2;
  width: min(46vw, 210px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 31, 31, 0.56);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 31, 31, 0.22), rgba(255, 255, 255, 0.05));
  box-shadow:
    0 0 34px rgba(255, 31, 31, 0.46),
    0 0 90px rgba(255, 31, 31, 0.22),
    inset 0 0 28px rgba(255, 255, 255, 0.08);
  transform: translateZ(120px);
  animation: logoPulse 1800ms ease-in-out both;
}

.intro-logo-wrap img {
  width: 82%;
  height: 82%;
  object-fit: cover;
  border-radius: 14px;
}

.intro-space strong {
  position: absolute;
  z-index: 3;
  bottom: 56px;
  color: var(--text);
  font-size: clamp(18px, 4vw, 28px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 0 22px rgba(255, 31, 31, 0.76);
}

.intro-beam {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 170%;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 31, 31, 0.18), #ff1f1f, #ff8a70, transparent);
  filter: blur(0.3px) drop-shadow(0 0 16px rgba(255, 31, 31, 0.84));
  transform-origin: 0 50%;
  opacity: 0;
  animation: beamRush 1850ms cubic-bezier(0.2, 0.88, 0.2, 1) both;
}

.beam-one { transform: rotateX(58deg) rotateZ(20deg) translateX(-70%); animation-delay: 120ms; }
.beam-two { transform: rotateX(-54deg) rotateZ(-24deg) translateX(-70%); animation-delay: 260ms; }
.beam-three { transform: rotateY(45deg) rotateZ(158deg) translateX(-70%); animation-delay: 390ms; }
.beam-four { transform: rotateY(-42deg) rotateZ(204deg) translateX(-70%); animation-delay: 520ms; }

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(3, 3, 4, 0.9)),
    url("/assets/coaching-background.png") center 24% / cover no-repeat,
    #050506;
}

.auth-card {
  width: min(100%, 520px);
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(17, 17, 22, 0.97), rgba(8, 8, 9, 0.98));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.auth-card::before,
.client-app::before,
.panel::before,
.client-card::before,
.client-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 0 10%, rgba(255, 31, 31, 1) 17%, rgba(255, 138, 90, 0.95) 20%, transparent 29%) top left / 220% 2px no-repeat,
    linear-gradient(180deg, transparent 0 10%, rgba(255, 31, 31, 0.9) 17%, rgba(255, 138, 90, 0.8) 20%, transparent 29%) top right / 2px 220% no-repeat,
    linear-gradient(270deg, transparent 0 10%, rgba(255, 31, 31, 0.78) 17%, rgba(255, 138, 90, 0.7) 20%, transparent 29%) bottom right / 220% 2px no-repeat,
    linear-gradient(0deg, transparent 0 10%, rgba(255, 31, 31, 0.68) 17%, rgba(255, 138, 90, 0.62) 20%, transparent 29%) bottom left / 2px 220% no-repeat;
  opacity: 0.78;
  filter: drop-shadow(0 0 8px rgba(255, 31, 31, 0.42));
  animation: borderTrace 5.8s linear infinite;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 28px rgba(255, 31, 31, 0.35);
}

.auth-brand h1 {
  font-size: 30px;
}

.auth-panel {
  display: grid;
  gap: 14px;
}

.auth-panel p {
  color: var(--muted);
}

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

.auth-error {
  min-height: 20px;
  margin: 0;
  color: #ff7772;
  font-size: 13px;
  font-weight: 700;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #09090b;
}

.auth-tabs button {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.auth-tabs button.active {
  color: var(--text);
  border-color: rgba(255, 31, 31, 0.5);
  background: rgba(255, 31, 31, 0.16);
}

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

.auth-tab-panel.active {
  display: grid;
}

.auth-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
}

body.auth-locked .app-shell {
  display: none !important;
}

body.auth-ready .auth-gate {
  display: none !important;
}

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

button {
  cursor: pointer;
  line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

p,
span,
strong,
h1,
h2,
h3,
label,
input,
textarea,
select {
  overflow-wrap: anywhere;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: rgba(7, 7, 9, 0.94);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand,
.phone-top,
.profile-strip {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img,
.phone-top img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 28px rgba(255, 31, 31, 0.35);
}

.brand strong,
.phone-top strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0;
}

.brand span,
.phone-top span,
.profile-strip span {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
}

.sidebar-label {
  display: block;
  margin: 20px 0 8px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item,
.quick-actions button,
.client-tabs button {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  line-height: 1.15;
  position: relative;
  overflow: hidden;
}

.nav-item strong,
.nav-item span {
  display: block;
  min-width: 0;
}

.nav-item strong {
  color: inherit;
  font-size: 15px;
  line-height: 1.15;
}

.nav-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.nav-item.active,
.quick-actions button:hover,
.client-tabs button.active {
  color: var(--text);
  border-color: rgba(255, 31, 31, 0.55);
  background: linear-gradient(90deg, rgba(255, 31, 31, 0.16), rgba(255, 255, 255, 0.03));
}

.sidebar-docs,
.sidebar-client-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-docs {
  margin-top: 14px;
  overflow: hidden;
}

.sidebar-docs summary {
  position: relative;
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--text);
  font-weight: 850;
  list-style: none;
}

.sidebar-docs summary::-webkit-details-marker {
  display: none;
}

.sidebar-docs summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  color: var(--red);
  font-size: 18px;
}

.sidebar-docs[open] summary::after {
  content: "-";
}

.sidebar-docs summary span,
.sidebar-client-link span {
  display: block;
  padding-right: 24px;
  font-size: 14px;
}

.sidebar-docs summary small,
.sidebar-client-link small {
  display: block;
  padding-right: 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.doc-drawer-nav {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.doc-item {
  min-height: 38px;
  padding: 9px 10px;
  font-size: 12px;
}

.sidebar-client-link {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
}

.sidebar-client-link:hover {
  border-color: rgba(255, 31, 31, 0.42);
  background: rgba(255, 31, 31, 0.09);
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  color: var(--muted);
}

.eyebrow {
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

main {
  padding: 24px;
  overflow: hidden;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
}

.top-actions,
.client-actions,
.split {
  display: flex;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-radius: 8px;
  min-height: 42px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.primary-button::after,
.ghost-button::after,
.nav-item::after,
.coach-tabs button::after,
.auth-tabs button::after,
.client-bottom-nav button::after,
.quick-actions button::after {
  content: "";
  position: absolute;
  left: -70%;
  top: 0;
  width: 52%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 31, 31, 0.58), rgba(255, 160, 110, 0.36), transparent);
  transform: skewX(-22deg);
  opacity: 0;
}

.primary-button {
  padding: 0 18px;
  background: linear-gradient(135deg, var(--red), var(--red-2));
  box-shadow: 0 0 30px rgba(255, 31, 31, 0.46);
  font-weight: 800;
}

.primary-button::after,
.nav-item.active::after,
.coach-tabs button.active::after,
.auth-tabs button.active::after,
.client-bottom-nav button.active::after,
.quick-actions button:hover::after {
  opacity: 1;
  animation: redSweep 3.4s ease-in-out infinite;
}

.primary-button.compact {
  min-height: 36px;
  padding: 0 14px;
}

.ghost-button {
  padding: 0 15px;
  background: var(--surface-2);
}

.ghost-button.compact {
  min-height: 34px;
  padding: 0 12px;
}

.icon-button {
  width: 38px;
  background: var(--surface-2);
}

.danger-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(255, 86, 79, 0.58);
  border-radius: 8px;
  background: rgba(164, 24, 20, 0.2);
  color: #ff928d;
  font-weight: 800;
}

.danger-button.compact,
.ghost-button.danger-button.compact {
  min-height: 34px;
  padding: 0 12px;
}

.danger-button:hover {
  border-color: #ff625b;
  background: rgba(203, 42, 36, 0.28);
  box-shadow: 0 0 22px rgba(239, 56, 50, 0.24);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
  gap: 24px;
  align-items: center;
  min-height: 290px;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 31, 31, 0.16), rgba(255, 255, 255, 0.035));
  overflow: hidden;
}

.hero-copy h2 {
  font-size: clamp(28px, 5vw, 58px);
  line-height: 0.98;
  max-width: 780px;
  margin-bottom: 16px;
}

.hero-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.hero-band img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 31, 31, 0.44);
  box-shadow: var(--shadow);
}

.coach-hero {
  min-height: 190px;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.coach-hero .hero-copy h2 {
  font-size: clamp(26px, 3.4vw, 44px);
  max-width: 820px;
}

.coach-hero .hero-copy p {
  margin-bottom: 0;
}

.coach-hero img {
  aspect-ratio: 1.22 / 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metrics-grid article,
.panel,
.doc-grid article,
.schema-card,
.api-card,
.wire-card,
.timeline-item,
.post,
.tracker-item,
.file-item,
.program-item {
  background: rgba(17, 17, 20, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel,
.post,
.tracker-item,
.file-item,
.program-item,
.client-hero-card,
.client-card,
.auth-card {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.metrics-grid article {
  padding: 16px;
}

.metrics-grid span,
.metrics-grid small {
  display: block;
  color: var(--muted);
}

.metrics-grid strong {
  display: block;
  font-size: 34px;
  margin: 6px 0;
}

.workspace-grid,
.coach-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) 390px;
  gap: 16px;
  align-items: start;
}

.coach-layout {
  grid-template-columns: 280px minmax(0, 1fr) 330px;
}

.panel {
  padding: 16px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.coach-main-panel {
  min-height: 680px;
}

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

.panel-head h2 {
  margin: 0;
}

.client-list,
.feed,
.tracker-list,
.program-list {
  display: grid;
  gap: 12px;
}

.client-row {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.client-row.active {
  border-color: rgba(255, 31, 31, 0.55);
  background: linear-gradient(135deg, rgba(255, 31, 31, 0.14), rgba(255, 255, 255, 0.05));
}

.client-row:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
}

.client-row strong,
.client-row span {
  display: block;
}

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

.avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), #2b2b31);
  font-weight: 900;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.coach-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #09090b;
}

.coach-tabs button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.coach-tabs button.active {
  color: var(--text);
  border-color: rgba(255, 31, 31, 0.5);
  background: linear-gradient(135deg, rgba(255, 31, 31, 0.18), rgba(255, 255, 255, 0.05));
}

.coach-tab {
  display: none;
}

.coach-tab.active {
  display: block;
}

.section-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.section-intro h3 {
  margin-bottom: 4px;
  font-size: 18px;
}

.section-intro p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.profile-summary article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
}

.profile-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.field {
  display: grid;
  gap: 7px;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: #0b0b0d;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.3;
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(255, 31, 31, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 31, 31, 0.12);
}

.status-pill {
  color: var(--green);
  background: rgba(84, 211, 138, 0.12);
  border: 1px solid rgba(84, 211, 138, 0.32);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.status-pill.red {
  color: var(--red);
  border-color: rgba(255, 31, 31, 0.4);
  background: rgba(255, 31, 31, 0.1);
}

.post {
  padding: 14px;
}

.post-meta,
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.post h3 {
  margin: 10px 0 8px;
}

.post p {
  color: var(--silver);
}

.post img,
.tracker-photo {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.comment {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.comment-form input {
  flex: 1;
  min-width: 0;
}

.comment-form button {
  width: 42px;
}

.tracker-item,
.program-item,
.file-item {
  padding: 12px;
}

.tracker-item strong,
.program-item strong,
.file-item strong {
  display: block;
}

.tracker-item span,
.program-item span,
.file-item span {
  color: var(--muted);
  font-size: 13px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.file-item img {
  width: 100%;
  aspect-ratio: 1 / 0.72;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.mobile-frame {
  max-width: 430px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #09090b;
  box-shadow: var(--shadow), inset 0 0 0 7px #15151a;
}

.client-app {
  position: relative;
  width: min(100%, 480px);
  min-height: min(920px, calc(100vh - 44px));
  margin: 0 auto;
  padding: 18px 18px 94px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background: linear-gradient(180deg, #101014, #070708);
  box-shadow: var(--shadow), inset 0 0 0 7px #15151a;
  overflow: hidden;
}

.client-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.client-screen {
  display: none;
}

.client-screen.active {
  display: grid;
  gap: 14px;
  max-height: calc(min(920px, 100vh - 44px) - 132px);
  overflow-y: auto;
  padding-right: 4px;
}

.client-hero-card,
.client-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.client-hero-card {
  background:
    linear-gradient(135deg, rgba(255, 31, 31, 0.18), rgba(255, 255, 255, 0.04)),
    url("/assets/logo.jpeg") right -34px top -36px / 180px 180px no-repeat;
}

.client-hero-card h2 {
  max-width: 300px;
  margin: 8px 0;
  font-size: 28px;
  line-height: 1.02;
}

.client-hero-card p {
  max-width: 330px;
  color: var(--muted);
}

.client-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.client-stats article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
}

.client-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.client-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.client-section-head h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.client-bottom-nav {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(9, 9, 11, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.client-bottom-nav button {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: clamp(10px, 2.6vw, 12px);
  padding: 6px 3px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.client-bottom-nav button.active {
  color: var(--text);
  border-color: rgba(255, 31, 31, 0.42);
  background: rgba(255, 31, 31, 0.16);
}

.compact-feed .post {
  max-height: 360px;
  overflow: hidden;
}

.full-width {
  width: 100%;
  justify-content: center;
}

.profile-edit-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.profile-photo-wrap {
  display: grid;
  place-items: center;
  gap: 12px;
}

.profile-photo-wrap img {
  width: 118px;
  height: 118px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 31, 31, 0.58);
  box-shadow: 0 0 26px rgba(255, 31, 31, 0.24);
}

.photo-upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.photo-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

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

.habit-row,
.goal-item,
.program-mini-list article,
.mini-chart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
}

.habit-row,
.program-mini-list article,
.mini-chart-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.habit-row span,
.program-mini-list span,
.mini-chart-row span,
.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.goal-list,
.program-mini-list,
.mini-chart-list {
  display: grid;
  gap: 8px;
}

.goals-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}

.goals-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #54d38a);
}

.readiness-card {
  overflow: hidden;
}

.readiness-card .panel-head strong {
  font-size: 28px;
  color: var(--text);
  text-shadow: 0 0 18px rgba(255, 31, 31, 0.34);
}

.readiness-card .panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.readiness-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.readiness-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff1f1f, #ff6a3d, #54d38a);
  box-shadow: 0 0 18px rgba(255, 31, 31, 0.38);
  transition: width 220ms ease;
}

.readiness-card p {
  margin: 0;
  color: var(--silver);
  font-size: 13px;
  line-height: 1.45;
}

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

.achievement-list article {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.achievement-list article.active {
  border-color: rgba(255, 31, 31, 0.44);
  background: linear-gradient(145deg, rgba(255, 31, 31, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 20px rgba(255, 31, 31, 0.12);
}

.achievement-list strong {
  font-size: 12px;
}

.achievement-list span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.weekly-report-grid,
.personal-archive,
.profile-health-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.weekly-report-grid article,
.personal-archive article,
.profile-health-summary article {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.weekly-report-grid span,
.personal-archive span,
.profile-health-summary span {
  color: var(--muted);
  font-size: 11px;
}

.weekly-report-grid strong,
.personal-archive strong,
.profile-health-summary strong {
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.motivation-text {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
}

.smart-notifications {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-notifications span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 31, 31, 0.34);
  border-radius: 999px;
  background: rgba(255, 31, 31, 0.11);
  color: var(--silver);
  font-size: 11px;
  font-weight: 800;
}

.sos-form,
.chat-form,
.meal-form {
  display: grid;
  gap: 8px;
}

.sos-form select,
.sos-form input,
.chat-form input,
.meal-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
  color: var(--text);
  padding: 9px 10px;
  outline: none;
}

.coach-chat-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}

.coach-chat-list article {
  width: 88%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.coach-chat-list article.client {
  justify-self: end;
  border-color: rgba(255, 31, 31, 0.35);
  background: rgba(255, 31, 31, 0.1);
}

.coach-chat-list strong {
  font-size: 12px;
  color: var(--red);
}

.coach-chat-list p {
  margin: 4px 0 0;
  color: var(--silver);
  font-size: 13px;
  line-height: 1.35;
}

.interactive-workout,
.meal-diary-list {
  display: grid;
  gap: 8px;
}

.workout-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.workout-row input {
  accent-color: var(--red);
}

.workout-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workout-row strong,
.workout-row em,
.workout-row small {
  overflow-wrap: anywhere;
}

.workout-row strong {
  font-size: 13px;
}

.workout-row em,
.workout-row small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.meal-form {
  grid-template-columns: 1fr 74px;
}

.meal-form input[name="note"],
.meal-form button {
  grid-column: 1 / -1;
}

.meal-diary-list article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.meal-diary-list strong,
.meal-diary-list span {
  display: block;
}

.meal-diary-list span {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.meal-diary-list p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.goal-item {
  justify-content: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13px;
}

.goal-item:has(input:checked) {
  border-color: rgba(84, 211, 138, 0.42);
  background: rgba(84, 211, 138, 0.12);
}

.goal-item span {
  flex: 1;
}

.goal-item em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.goal-item input {
  accent-color: var(--red);
  flex: 0 0 auto;
}

.checkin-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.checkin-calendar span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checkin-calendar span.done {
  color: var(--text);
  border-color: rgba(84, 211, 138, 0.42);
  background: rgba(84, 211, 138, 0.16);
}

.checkin-calendar span.missed {
  border-color: rgba(255, 31, 31, 0.32);
  background: rgba(255, 31, 31, 0.08);
}

.mini-chart-row {
  display: grid;
  grid-template-columns: 78px 1fr 42px;
}

.mini-chart-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.mini-chart-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff6a3d);
}

.mini-chart-row strong {
  text-align: right;
  font-size: 12px;
}

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

.progress-photo-grid article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
}

.progress-photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1.1;
  object-fit: cover;
  display: block;
}

.progress-photo-grid span {
  display: block;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.reminder-form {
  display: grid;
  gap: 10px;
}

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

.reminder-actions button {
  min-width: 0;
  min-height: 46px;
  white-space: normal;
  line-height: 1.2;
}

.toggle-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--silver);
  font-size: 13px;
  font-weight: 700;
}

.toggle-row input {
  accent-color: var(--red);
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .reminder-actions {
    grid-template-columns: 1fr;
  }
}

.compact-upload {
  min-height: 34px;
  font-size: 12px;
}

.coach-goals-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.coach-signal-box {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.coach-signals {
  display: grid;
  gap: 8px;
}

.coach-signals article {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

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

.coach-signals strong {
  font-size: 13px;
  text-align: right;
}

.coach-signals article.ok {
  border-color: rgba(84, 211, 138, 0.28);
}

.coach-signals article.warning {
  border-color: rgba(255, 178, 71, 0.34);
  background: rgba(255, 178, 71, 0.08);
}

.coach-signals article.danger {
  border-color: rgba(255, 31, 31, 0.42);
  background: rgba(255, 31, 31, 0.1);
}

.coach-goals-list {
  display: grid;
  gap: 8px;
}

.coach-goal-item {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 8px;
}

.coach-goal-item input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0d;
  color: var(--text);
  padding: 9px 10px;
  outline: none;
}

.coach-goal-item input:focus {
  border-color: rgba(255, 31, 31, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 31, 31, 0.12);
}

.client-actions {
  margin: 18px 0;
}

.client-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.client-tabs button {
  text-align: center;
  padding: 10px 6px;
}

.client-tab {
  display: none;
}

.client-tab.active {
  display: grid;
}

.docs {
  max-width: 1180px;
}

.doc-grid,
.schema,
.api-list,
.wireframes,
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.doc-grid article,
.schema-card,
.api-card,
.wire-card,
.timeline-item {
  padding: 16px;
}

.doc-grid p,
.schema-card p,
.api-card p,
.wire-card p,
.timeline-item p {
  color: var(--muted);
}

.diagram {
  margin-top: 16px;
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #08080a;
  color: var(--silver);
}

dialog {
  width: min(560px, calc(100vw - 28px));
  max-width: none;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.modal-card {
  width: 100%;
  min-width: 0;
  max-height: calc(100vh - 28px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 31, 31, 0.32);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

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

.auth-invite-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #ff7771;
  font-size: 13px;
  font-weight: 700;
}

.invite-code-modal {
  gap: 18px;
}

.invite-code-modal .modal-note strong {
  color: var(--text);
}

.invite-code-field {
  gap: 8px;
}

.invite-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.invite-code-row input {
  min-width: 0;
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.invite-copy-status {
  min-height: 18px;
  margin: -8px 0 0;
  color: #76d99b;
  font-size: 12px;
  font-weight: 700;
}

.danger-eyebrow {
  color: #ff7771;
}

.delete-client-summary {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.delete-client-summary strong {
  font-size: 18px;
}

.delete-client-summary span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .invite-code-row {
    grid-template-columns: 1fr;
  }

  .invite-code-row .primary-button,
  .delete-client-modal .modal-actions > button {
    width: 100%;
  }

  .delete-client-modal .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.onboarding-review-button {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(239, 56, 50, 0.34);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(239, 56, 50, 0.1), rgba(255, 255, 255, 0.025));
  color: #fff;
  text-align: left;
}

.onboarding-review-button strong {
  color: #ff8c86;
  font-size: 12px;
}

.onboarding-review-button:not(:disabled):hover {
  border-color: rgba(239, 56, 50, 0.7);
  background: rgba(239, 56, 50, 0.14);
}

.onboarding-review-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.onboarding-dialog {
  width: min(980px, calc(100vw - 32px));
}

.onboarding-dialog::backdrop {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.onboarding-form {
  width: 100%;
  max-height: calc(100vh - 32px);
  display: grid;
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(239, 56, 50, 0.5);
  border-radius: 8px;
  background: #101114;
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72), 0 0 42px rgba(239, 56, 50, 0.13);
}

.onboarding-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  gap: 14px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 13, 15, 0.97);
  backdrop-filter: blur(16px);
}

.onboarding-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.onboarding-brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid rgba(239, 56, 50, 0.4);
  border-radius: 7px;
}

.onboarding-brand h2 {
  margin: 3px 0 0;
  font-size: 28px;
}

.onboarding-header > p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.onboarding-progress {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.onboarding-progress > div {
  height: 5px;
  overflow: hidden;
  background: #27282d;
}

.onboarding-progress i {
  display: block;
  width: 33.333%;
  height: 100%;
  background: linear-gradient(90deg, #ef3832, #ff7770);
  box-shadow: 0 0 16px rgba(239, 56, 50, 0.58);
  transition: width 180ms ease;
}

.onboarding-step {
  display: none;
  gap: 18px;
  padding: 28px;
}

.onboarding-step.active {
  display: grid;
}

.onboarding-section-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.onboarding-section-title > span {
  color: #ef3832;
  font-size: 14px;
  font-weight: 900;
}

.onboarding-section-title h3,
.onboarding-section-title p {
  margin: 0;
}

.onboarding-section-title h3 {
  font-size: 22px;
}

.onboarding-section-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.onboarding-grid {
  display: grid;
  gap: 14px;
}

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

.choice-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.choice-group legend {
  padding: 0 6px;
  color: #fff;
  font-weight: 800;
}

.choice-group > small {
  color: var(--muted);
}

.choice-group label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #dddfe4;
  background: rgba(255, 255, 255, 0.025);
}

.choice-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ef3832;
}

.choice-group > input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0b0b0d;
  color: #fff;
}

.onboarding-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.onboarding-photo-upload {
  min-width: 0;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px dashed rgba(239, 56, 50, 0.62);
  border-radius: 8px;
  background: #0a0b0d;
  color: #fff;
  cursor: pointer;
  position: relative;
}

.onboarding-photo-upload:hover {
  border-style: solid;
  background: rgba(239, 56, 50, 0.08);
}

.onboarding-photo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.onboarding-photo-upload img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.onboarding-photo-upload.has-photo::after {
  content: "Foto pronta";
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.onboarding-photo-upload > strong,
.onboarding-photo-upload > span {
  position: relative;
  z-index: 1;
  text-align: center;
}

.onboarding-photo-upload > span {
  color: var(--muted);
  font-size: 12px;
}

.onboarding-photo-upload.has-photo > strong,
.onboarding-photo-upload.has-photo > span {
  display: none;
}

.onboarding-privacy-note {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-left: 3px solid #ef3832;
  background: rgba(239, 56, 50, 0.07);
}

.onboarding-privacy-note span {
  color: var(--muted);
  font-size: 13px;
}

.onboarding-error {
  min-height: 20px;
  margin: 0;
  padding: 0 28px;
  color: #ff7973;
  font-size: 13px;
  font-weight: 750;
}

.onboarding-actions {
  position: sticky;
  z-index: 3;
  bottom: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--line);
  background: rgba(12, 13, 15, 0.97);
  backdrop-filter: blur(16px);
}

.onboarding-actions > span {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.onboarding-actions button[hidden] {
  display: none !important;
}

.onboarding-review-dialog {
  width: min(900px, calc(100vw - 32px));
}

.onboarding-review-card {
  max-height: calc(100vh - 32px);
}

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

.onboarding-answer {
  min-width: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.onboarding-answer.wide {
  grid-column: 1 / -1;
}

.onboarding-answer span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.onboarding-answer p {
  margin: 0;
  white-space: pre-wrap;
}

.onboarding-review-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-review-photos figure {
  min-width: 0;
  margin: 0;
}

.onboarding-review-photos img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090a0c;
}

.onboarding-review-photos figcaption {
  margin-top: 6px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 620px) {
  .onboarding-dialog,
  .onboarding-review-dialog {
    width: 100vw;
    height: 100vh;
  }

  .onboarding-form,
  .onboarding-review-card {
    max-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .onboarding-header,
  .onboarding-step,
  .onboarding-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .onboarding-brand img {
    width: 44px;
    height: 44px;
  }

  .onboarding-brand h2 {
    font-size: 23px;
  }

  .onboarding-grid.two-columns,
  .onboarding-review-summary {
    grid-template-columns: 1fr;
  }

  .onboarding-photo-grid,
  .onboarding-review-photos {
    grid-template-columns: 1fr;
  }

  .onboarding-photo-upload {
    aspect-ratio: 4 / 3;
  }

  .onboarding-actions {
    grid-template-columns: auto 1fr;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .native-ios .onboarding-header {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .onboarding-actions > span {
    display: none;
  }
}

.reaction-button.reacted {
  border-color: rgba(239, 56, 50, 0.72);
  color: #fff;
  background: rgba(239, 56, 50, 0.16);
  box-shadow: 0 0 14px rgba(239, 56, 50, 0.18);
}

.reaction-button[disabled] {
  cursor: wait;
  opacity: 0.6;
}

.app-update-banner {
  position: fixed;
  z-index: 1200;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: min(560px, calc(100vw - 36px));
  padding: 14px 14px 14px 16px;
  border: 1px solid rgba(239, 56, 50, 0.58);
  border-left: 4px solid #ef3832;
  border-radius: 8px;
  color: #fff;
  background: #141518;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 24px rgba(239, 56, 50, 0.15);
}

.app-update-banner[hidden] {
  display: none;
}

.app-update-banner > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.app-update-banner span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .app-update-banner {
    right: 10px;
    bottom: 76px;
    grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100vw - 20px);
  }

  .app-update-banner .icon-button {
    position: absolute;
    top: 6px;
    right: 6px;
  }

  .app-update-banner > div {
    padding-right: 26px;
  }
}

#trackerModal {
  width: min(760px, calc(100vw - 28px));
}

#trackerModal .modal-card {
  width: 100%;
  max-height: min(88vh, 820px);
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-note {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 14px;
}

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

.tracker-progress {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tracker-progress div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.tracker-progress i {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff6a3d);
}

.tracker-step {
  display: none;
}

.tracker-step.active {
  display: grid;
  gap: 14px;
}

.tracker-step h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.tracker-step-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.tracker-step-actions #trackerSubmit {
  grid-column: 2;
}

.tracker-step-actions button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.tracker-step-actions button:disabled {
  cursor: default;
  opacity: 0.4;
}

.rating-field {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.rating-field span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.18;
}

.rating-field small {
  color: var(--muted);
  font-size: 12px;
}

.rating-value {
  justify-self: start;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(255, 31, 31, 0.38);
  border-radius: 999px;
  background: rgba(255, 31, 31, 0.14);
  color: var(--text);
  font-size: 12px;
}

.rating-field input[type="range"] {
  accent-color: var(--red);
  width: 100%;
  cursor: pointer;
}

.tracker-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.tracker-detail-grid span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--silver);
  font-size: 12px;
}

.glow-on {
  --red: #ff3a25;
}

.client-only {
  background: radial-gradient(circle at 50% 0%, rgba(255, 31, 31, 0.22), transparent 34%), #050506;
}

.client-only .app-shell {
  display: block;
  min-height: 100vh;
}

.client-only .sidebar,
.client-only .topbar,
.client-only .hero-band,
.client-only #coachView,
.client-only #architectureView,
.client-only #databaseView,
.client-only #apiView,
.client-only #uxView,
.client-only #roadmapView {
  display: none !important;
}

.client-only main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.client-only #clientView {
  display: block !important;
  width: 100%;
}

.client-only .mobile-frame {
  display: none;
}

@keyframes redSweep {
  0% {
    left: -70%;
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  52% {
    left: 118%;
    opacity: 0.88;
  }
  100% {
    left: 118%;
    opacity: 0;
  }
}

@keyframes beamRush {
  0% {
    opacity: 0;
    scale: 0.35 1;
    translate: -45% 0;
  }
  38% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    scale: 1.28 1;
    translate: 42% 0;
  }
}

@keyframes logoPulse {
  0% {
    opacity: 0;
    scale: 0.72;
    transform: translateZ(20px) rotateX(18deg);
  }
  55% {
    opacity: 1;
    scale: 1.05;
  }
  100% {
    opacity: 1;
    scale: 1;
    transform: translateZ(120px) rotateX(0deg);
  }
}

@keyframes introTilt {
  0% {
    transform: rotateX(18deg) rotateY(-18deg);
  }
  100% {
    transform: rotateX(0deg) rotateY(0deg);
  }
}

@keyframes borderTrace {
  0% {
    background-position: -120% 0, 100% -120%, 220% 100%, 0 220%;
  }
  100% {
    background-position: 220% 0, 100% 220%, -120% 100%, 0 -120%;
  }
}

.primary-button:hover,
.ghost-button:hover,
.nav-item:hover,
.coach-tabs button:hover,
.auth-tabs button:hover,
.client-bottom-nav button:hover,
.quick-actions button:hover {
  border-color: rgba(255, 31, 31, 0.62);
  box-shadow: 0 0 28px rgba(255, 31, 31, 0.3);
}

.auth-card:hover::before,
.client-app:hover::before,
.panel:hover::before,
.client-card:hover::before,
.client-hero-card:hover::before {
  opacity: 0.82;
  filter: drop-shadow(0 0 12px rgba(255, 31, 31, 0.55));
}

@media (prefers-reduced-motion: reduce) {
  .auth-card::before,
  .client-app::before,
  .panel::before,
  .client-card::before,
  .client-hero-card::before,
  .primary-button::after,
  .ghost-button::after,
  .nav-item::after,
  .coach-tabs button::after,
  .auth-tabs button::after,
  .client-bottom-nav button::after,
  .quick-actions button::after {
    animation: none !important;
  }
}

@media (max-width: 1180px) {
  .workspace-grid,
  .coach-layout {
    grid-template-columns: 1fr 1fr;
  }

  .coach-main-panel {
    grid-column: 1 / -1;
    order: 3;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .topbar,
  .hero-band {
    grid-template-columns: 1fr;
    display: grid;
  }

  .top-actions,
  .client-actions,
  .split {
    flex-direction: column;
  }

  .metrics-grid,
  .workspace-grid,
  .coach-layout {
    grid-template-columns: 1fr;
  }

  .coach-tabs,
  .profile-summary,
  .tracker-form-grid,
  .tracker-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-intro {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  main,
  .sidebar {
    padding: 16px;
  }

  .hero-band {
    padding: 18px;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .tracker-form-grid,
  .tracker-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Desktop admin: operational layout for Electron and wide web screens. */
.admin-desktop {
  background:
    linear-gradient(135deg, rgba(255, 31, 31, 0.055), transparent 26%),
    #070708;
}

.admin-desktop .auth-gate {
  padding: 36px;
  background:
    linear-gradient(90deg, rgba(2, 2, 3, 0.9), rgba(7, 7, 9, 0.76)),
    url("/assets/coaching-background.png") center / cover no-repeat,
    #050506;
}

.admin-desktop .auth-card {
  width: min(100%, 980px);
  min-height: 560px;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  gap: 0;
  padding: 0;
  border-radius: 8px;
}

.admin-desktop .auth-brand {
  min-height: 560px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 42px;
  background:
    linear-gradient(180deg, rgba(3, 3, 4, 0.02), rgba(3, 3, 4, 0.42)),
    url("/assets/coaching-background.png") center / cover no-repeat;
}

.admin-desktop .auth-brand img {
  display: none;
}

.admin-desktop .auth-brand > div {
  display: none;
}

.admin-desktop #accountAuthPanel {
  align-content: center;
  padding: 52px;
  background: linear-gradient(145deg, rgba(24, 24, 29, 0.94), rgba(8, 8, 10, 0.98));
}

.admin-desktop #accountAuthPanel h2 {
  margin-bottom: 2px;
  font-size: 28px;
}

.admin-desktop .app-shell {
  grid-template-columns: 220px minmax(0, 1fr);
}

.admin-desktop .sidebar {
  padding: 18px 16px;
  gap: 14px;
  background: #08080a;
}

.admin-desktop .brand img {
  width: 48px;
  height: 48px;
}

.admin-desktop .sidebar-label {
  margin-top: 16px;
}

.admin-desktop .nav-item {
  padding: 11px 12px;
}

.admin-desktop main {
  width: 100%;
  padding: 18px 20px 28px;
  overflow: visible;
}

.admin-desktop .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  margin: -18px -20px 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 8, 0.94);
  backdrop-filter: blur(18px);
}

.admin-desktop .topbar h1 {
  font-size: 34px;
  line-height: 1.05;
}

.admin-desktop .top-actions {
  flex-direction: row;
  align-items: center;
}

.admin-desktop .top-actions button {
  min-height: 38px;
  white-space: nowrap;
  overflow-wrap: normal;
}

.admin-desktop .coach-hero {
  display: none;
}

.admin-desktop .metrics-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.admin-desktop .metrics-grid article {
  min-height: 94px;
  padding: 13px 15px;
}

.admin-desktop .metrics-grid strong {
  margin: 2px 0;
  font-size: 28px;
}

.admin-desktop .metrics-grid small {
  font-size: 11px;
}

.admin-desktop .coach-layout {
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-areas:
    "clients workspace"
    "profile workspace";
  gap: 12px;
}

.admin-desktop .client-list-panel {
  grid-area: clients;
}

.admin-desktop .coach-main-panel {
  grid-area: workspace;
  min-height: calc(100vh - 196px);
}

.admin-desktop .profile-panel {
  grid-area: profile;
}

.admin-desktop .profile-panel .panel-head {
  align-items: flex-start;
}

.admin-desktop .profile-panel #notifyClient {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 0 9px;
  white-space: nowrap;
  text-wrap: nowrap;
  overflow-wrap: normal;
  font-size: 12px;
}

.admin-desktop .panel {
  padding: 14px;
}

.admin-desktop .panel-head {
  margin-bottom: 11px;
}

.admin-desktop .panel-head h2 {
  font-size: 19px;
}

.admin-desktop .client-list,
.admin-desktop .feed,
.admin-desktop .tracker-list,
.admin-desktop .program-list {
  gap: 9px;
}

.admin-desktop .client-row {
  padding: 11px 12px;
}

.admin-desktop .coach-tabs {
  gap: 6px;
  padding: 5px;
  margin-bottom: 12px;
}

.admin-desktop .coach-tabs button {
  min-height: 38px;
  padding: 0 10px;
  white-space: nowrap;
  text-wrap: nowrap;
  overflow-wrap: normal;
  font-size: 13px;
}

.admin-desktop .section-intro {
  flex-direction: row;
  align-items: center;
  padding: 11px 12px;
  margin-bottom: 11px;
}

.admin-desktop .section-intro h3 {
  font-size: 16px;
}

.admin-desktop .section-intro p {
  font-size: 12px;
}

.admin-desktop .post {
  padding: 12px;
}

.admin-desktop .post img,
.admin-desktop .tracker-photo {
  max-height: 340px;
}

.desktop-runtime .sidebar-client-link {
  display: none;
}

@media (min-width: 1500px) {
  .admin-desktop .app-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .admin-desktop .coach-layout {
    grid-template-columns: 250px minmax(520px, 1fr) 310px;
    grid-template-areas: "clients workspace profile";
  }

  .admin-desktop .client-list-panel,
  .admin-desktop .profile-panel {
    position: sticky;
    top: 84px;
  }
}

/* Electron workspace: restrained desktop information architecture. */
.desktop-section-nav {
  display: none;
}

.desktop-runtime.admin-desktop {
  background: #0d0e10;
}

.desktop-runtime.admin-desktop .app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.desktop-runtime.admin-desktop .sidebar {
  padding: 22px 16px;
  gap: 18px;
  border-right-color: #292b30;
  background: #090a0c;
}

.desktop-runtime.admin-desktop .brand {
  padding: 0 8px 18px;
  border-bottom: 1px solid #24262a;
}

.desktop-runtime.admin-desktop .brand img {
  width: 46px;
  height: 46px;
  box-shadow: 0 0 20px rgba(239, 56, 50, 0.2);
}

.desktop-runtime.admin-desktop .brand strong {
  font-size: 16px;
}

.desktop-runtime.admin-desktop .brand span {
  font-size: 12px;
}

.desktop-runtime.admin-desktop .sidebar-label,
.desktop-runtime.admin-desktop .web-primary-nav,
.desktop-runtime.admin-desktop .sidebar-docs,
.desktop-runtime.admin-desktop .sidebar-client-link {
  display: none;
}

.desktop-runtime.admin-desktop .desktop-section-nav {
  display: grid;
  gap: 5px;
}

.desktop-runtime.admin-desktop .desktop-section-nav button {
  position: relative;
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 56px;
  padding: 10px 13px 10px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #c7c9ce;
  text-align: left;
  overflow: hidden;
}

.desktop-runtime.admin-desktop .desktop-section-nav button::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 3px;
  background: transparent;
}

.desktop-runtime.admin-desktop .desktop-section-nav button:hover {
  border-color: #2c2e33;
  background: #121317;
  color: #fff;
}

.desktop-runtime.admin-desktop .desktop-section-nav button.active {
  border-color: rgba(239, 56, 50, 0.3);
  background: linear-gradient(90deg, rgba(239, 56, 50, 0.13), rgba(255, 255, 255, 0.025));
  color: #fff;
}

.desktop-runtime.admin-desktop .desktop-section-nav button.active::before {
  background: #ef3832;
  box-shadow: 0 0 12px rgba(239, 56, 50, 0.42);
}

.desktop-runtime.admin-desktop .desktop-section-nav button:focus {
  outline: none;
}

.desktop-runtime.admin-desktop .desktop-section-nav button:focus-visible {
  outline: 2px solid rgba(239, 56, 50, 0.78);
  outline-offset: 2px;
}

.desktop-runtime.admin-desktop .desktop-section-nav strong {
  font-size: 14px;
  line-height: 1.15;
}

.desktop-runtime.admin-desktop .desktop-section-nav span {
  color: #898c93;
  font-size: 11px;
  line-height: 1.2;
}

.desktop-runtime.admin-desktop main {
  padding: 0 24px 28px;
  background:
    linear-gradient(180deg, rgba(239, 56, 50, 0.035), transparent 180px),
    #0d0e10;
}

.desktop-runtime.admin-desktop .topbar {
  min-height: 78px;
  margin: 0 -24px 18px;
  padding: 14px 24px;
  border-bottom-color: #292b30;
  background: rgba(13, 14, 16, 0.96);
}

.desktop-runtime.admin-desktop .topbar .eyebrow {
  color: #858890;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.desktop-runtime.admin-desktop .topbar h1 {
  margin-top: 4px;
  font-size: 27px;
  font-weight: 760;
}

.desktop-runtime.admin-desktop #toggleTheme {
  display: none;
}

.desktop-runtime.admin-desktop .top-actions {
  gap: 8px;
}

.desktop-runtime.admin-desktop .top-actions button {
  min-height: 38px;
  border-radius: 6px;
  font-size: 13px;
}

.desktop-runtime.admin-desktop .top-actions .primary-button {
  background: #df3732;
  box-shadow: none;
}

.desktop-runtime.admin-desktop .coach-hero,
.desktop-runtime.admin-desktop .coach-tabs {
  display: none;
}

.desktop-runtime.admin-desktop .metrics-grid {
  gap: 12px;
  margin-bottom: 14px;
}

.desktop-runtime.admin-desktop .metrics-grid article {
  position: relative;
  min-height: 100px;
  padding: 16px 18px;
  border-color: #2a2c31;
  border-radius: 6px;
  background: #151619;
  box-shadow: none;
  overflow: hidden;
}

.desktop-runtime.admin-desktop .metrics-grid article::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #df3732;
  opacity: 0.75;
}

.desktop-runtime.admin-desktop .metrics-grid span {
  color: #a3a5ab;
  font-size: 12px;
}

.desktop-runtime.admin-desktop .metrics-grid strong {
  margin: 4px 0 2px;
  font-size: 30px;
  font-weight: 760;
}

.desktop-runtime.admin-desktop .metrics-grid small {
  color: #767980;
}

.desktop-runtime.admin-desktop .panel {
  padding: 18px;
  border-color: #2a2c31;
  border-radius: 6px;
  background: #151619;
  box-shadow: none;
}

.desktop-runtime.admin-desktop .panel::before {
  display: none;
}

.desktop-runtime.admin-desktop .panel-head {
  min-height: 44px;
  margin-bottom: 14px;
}

.desktop-runtime.admin-desktop .panel-head h2 {
  font-size: 18px;
  font-weight: 720;
}

.desktop-runtime.admin-desktop .panel-head .eyebrow,
.desktop-runtime.admin-desktop .section-intro + .eyebrow {
  color: #9a9da4;
}

.desktop-runtime.admin-desktop .coach-layout {
  grid-template-columns: 290px minmax(0, 1fr);
  grid-template-areas: "clients workspace";
  gap: 14px;
  align-items: start;
}

.desktop-runtime.admin-desktop .client-list-panel,
.desktop-runtime.admin-desktop .coach-main-panel,
.desktop-runtime.admin-desktop .profile-panel {
  position: static;
}

.desktop-runtime.admin-desktop .client-list-panel {
  grid-area: clients;
}

.desktop-runtime.admin-desktop .coach-main-panel {
  grid-area: workspace;
  min-height: calc(100vh - 226px);
}

.desktop-runtime.admin-desktop .profile-panel {
  grid-area: profile;
  display: none;
}

.desktop-runtime.admin-desktop .client-row {
  padding: 13px 14px;
  border-color: #25272c;
  border-radius: 6px;
  background: #101114;
}

.desktop-runtime.admin-desktop .client-row.active {
  border-color: rgba(239, 56, 50, 0.45);
  background: rgba(239, 56, 50, 0.09);
}

.desktop-runtime.admin-desktop .section-intro {
  padding: 12px 14px;
  border-color: #292b30;
  border-radius: 6px;
  background: #101114;
}

.desktop-runtime.admin-desktop .section-intro h3 {
  font-size: 16px;
}

.desktop-runtime.admin-desktop .post,
.desktop-runtime.admin-desktop .tracker-item,
.desktop-runtime.admin-desktop .file-item,
.desktop-runtime.admin-desktop .program-item {
  border-color: #292b30;
  border-radius: 6px;
  background: #101114;
  box-shadow: none;
}

.desktop-runtime.admin-desktop .post {
  padding: 16px;
}

.desktop-runtime.admin-desktop .post img {
  max-height: 360px;
  object-position: center top;
}

.desktop-runtime.admin-desktop .primary-button::after,
.desktop-runtime.admin-desktop .ghost-button::after,
.desktop-runtime.admin-desktop .nav-item::after,
.desktop-runtime.admin-desktop .quick-actions button::after {
  display: none;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .metrics-grid,
.desktop-runtime.admin-desktop[data-desktop-section="tracker"] .metrics-grid,
.desktop-runtime.admin-desktop[data-desktop-section="feed"] .metrics-grid,
.desktop-runtime.admin-desktop[data-desktop-section="media"] .metrics-grid,
.desktop-runtime.admin-desktop[data-desktop-section="programs"] .metrics-grid,
.desktop-runtime.admin-desktop[data-desktop-section="anamnesis"] .metrics-grid,
.desktop-runtime.admin-desktop[data-desktop-section="videos"] .metrics-grid {
  display: none;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .coach-layout {
  grid-template-columns: 310px minmax(0, 1fr);
  grid-template-areas: "clients profile";
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .coach-main-panel {
  display: none;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(340px, 1.2fr);
  grid-template-rows: auto auto auto auto;
  gap: 16px 20px;
  min-height: calc(100vh - 120px);
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-panel > .panel-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #292b30;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-strip {
  grid-column: 1;
  align-self: start;
  padding: 16px;
  border: 1px solid #292b30;
  border-radius: 6px;
  background: #101114;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-summary {
  grid-column: 1;
  margin-top: 0;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .coach-signal-box {
  grid-column: 1;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .quick-actions {
  grid-column: 1;
  margin: 0;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-panel > .private-notes-field {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: stretch;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-panel > .package-select-field {
  grid-column: 1;
  grid-row: auto;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] #privateNotes {
  min-height: 190px;
  resize: none;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .coach-goals-box {
  grid-column: 2;
  grid-row: 4 / span 2;
}

.desktop-runtime.admin-desktop[data-desktop-section="tracker"] .coach-layout,
.desktop-runtime.admin-desktop[data-desktop-section="feed"] .coach-layout,
.desktop-runtime.admin-desktop[data-desktop-section="programs"] .coach-layout,
.desktop-runtime.admin-desktop[data-desktop-section="anamnesis"] .coach-layout,
.desktop-runtime.admin-desktop[data-desktop-section="videos"] .coach-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-areas: "clients workspace";
}

.desktop-runtime.admin-desktop[data-desktop-section="tracker"] .profile-panel,
.desktop-runtime.admin-desktop[data-desktop-section="feed"] .profile-panel,
.desktop-runtime.admin-desktop[data-desktop-section="programs"] .profile-panel,
.desktop-runtime.admin-desktop[data-desktop-section="anamnesis"] .profile-panel,
.desktop-runtime.admin-desktop[data-desktop-section="videos"] .profile-panel {
  display: none;
}

.desktop-runtime.admin-desktop[data-desktop-section="media"] .coach-layout {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "workspace";
}

.desktop-runtime.admin-desktop[data-desktop-section="media"] .client-list-panel,
.desktop-runtime.admin-desktop[data-desktop-section="media"] .profile-panel {
  display: none;
}

.desktop-runtime.admin-desktop[data-desktop-section="tracker"] .coach-main-panel > .panel-head [data-composer],
.desktop-runtime.admin-desktop[data-desktop-section="media"] .coach-main-panel > .panel-head [data-composer],
.desktop-runtime.admin-desktop[data-desktop-section="programs"] .coach-main-panel > .panel-head [data-composer],
.desktop-runtime.admin-desktop[data-desktop-section="anamnesis"] .coach-main-panel > .panel-head [data-composer],
.desktop-runtime.admin-desktop[data-desktop-section="videos"] .coach-main-panel > .panel-head [data-composer],
.desktop-runtime.admin-desktop[data-desktop-section="clients"] #openComposer,
.desktop-runtime.admin-desktop[data-desktop-section="tracker"] #openComposer,
.desktop-runtime.admin-desktop[data-desktop-section="media"] #openComposer,
.desktop-runtime.admin-desktop[data-desktop-section="programs"] #openComposer,
.desktop-runtime.admin-desktop[data-desktop-section="anamnesis"] #openComposer,
.desktop-runtime.admin-desktop[data-desktop-section="videos"] #openComposer {
  display: none;
}

.desktop-runtime.admin-desktop .file-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

@media (max-width: 1220px) {
  .desktop-runtime.admin-desktop .app-shell {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .desktop-runtime.admin-desktop .coach-layout,
  .desktop-runtime.admin-desktop[data-desktop-section="tracker"] .coach-layout,
  .desktop-runtime.admin-desktop[data-desktop-section="feed"] .coach-layout,
  .desktop-runtime.admin-desktop[data-desktop-section="programs"] .coach-layout {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .desktop-runtime.admin-desktop[data-desktop-section="clients"] .coach-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-panel {
    grid-template-columns: 1fr;
  }

  .desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-panel > * {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Coaching packages and tier-aware tracker experience. */
.package-select-field {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.section-intro-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.client-filter-pill {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-panel-head {
  align-items: flex-start;
}

.radar-panel-head p {
  max-width: 650px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.radar-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
}

.radar-summary article {
  display: grid;
  gap: 3px;
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #686b72;
  border-radius: 6px;
  background: #101114;
}

.radar-summary article.danger { border-left-color: #ef3832; }
.radar-summary article.warning { border-left-color: #e4aa45; }
.radar-summary article.ok { border-left-color: #39a96b; }

.radar-summary span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.radar-summary strong {
  font-size: 23px;
}

.radar-filter-bar {
  display: flex;
  gap: 6px;
  margin: 16px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.radar-filter-bar button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #303238;
  border-radius: 6px;
  color: var(--muted);
  background: #101114;
}

.radar-filter-bar button.active {
  border-color: rgba(239, 56, 50, 0.55);
  color: #fff;
  background: rgba(239, 56, 50, 0.12);
}

.radar-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 14px;
  align-items: start;
}

.coach-radar-list,
.automation-rules {
  display: grid;
  gap: 9px;
}

.radar-client-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 12px 18px;
  padding: 15px;
  border: 1px solid #2c2e33;
  border-left: 3px solid #686b72;
  border-radius: 6px;
  background: #101114;
}

.radar-client-card.red { border-left-color: #ef3832; }
.radar-client-card.yellow { border-left-color: #e4aa45; }
.radar-client-card.green { border-left-color: #39a96b; }

.radar-client-main {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.radar-light,
.radar-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #747780;
}

.radar-light {
  width: 11px;
  height: 11px;
  margin-top: 5px;
}

.radar-light.red,
.radar-dot.red { background: #ef3832; box-shadow: 0 0 10px rgba(239, 56, 50, 0.5); }
.radar-light.yellow,
.radar-dot.yellow { background: #e4aa45; box-shadow: 0 0 10px rgba(228, 170, 69, 0.36); }
.radar-light.green,
.radar-dot.green { background: #39a96b; box-shadow: 0 0 10px rgba(57, 169, 107, 0.34); }

.client-row-title > strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.radar-client-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.radar-client-main p,
.radar-action span {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.radar-score {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 2px;
}

.radar-score span {
  color: var(--muted);
  font-size: 10px;
}

.radar-score strong {
  font-size: 21px;
}

.radar-action {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #282a2f;
}

.automation-panel {
  padding: 15px;
  border: 1px solid #2c2e33;
  border-radius: 6px;
  background: #101114;
}

.automation-rule {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #292b30;
  border-radius: 6px;
  background: #151619;
}

.automation-rule input {
  accent-color: #ef3832;
}

.automation-rule span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.automation-rule small {
  color: var(--muted);
  line-height: 1.35;
}

.automation-rule em {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: rgba(239, 56, 50, 0.16);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.coach-timeline-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101114;
}

.progress-timeline {
  display: grid;
  gap: 0;
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 18px;
}

.timeline-event::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 0;
  width: 1px;
  background: #34363c;
}

.timeline-event:last-child::before {
  display: none;
}

.timeline-event > i {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border: 2px solid #ef3832;
  border-radius: 50%;
  background: #101114;
}

.timeline-event.morning > i { border-color: #e4aa45; }
.timeline-event.program > i { border-color: #5c8fe8; }
.timeline-event.alert > i { border-color: #ef3832; box-shadow: 0 0 8px rgba(239, 56, 50, 0.4); }

.timeline-event div {
  display: grid;
  gap: 3px;
}

.timeline-event span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.timeline-event strong {
  font-size: 13px;
}

.timeline-event p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.client-timeline-card.locked {
  border-style: dashed;
}

.feature-lock {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px dashed #3b3d43;
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
}

.feature-lock strong {
  color: #fff;
}

.package-select-field small {
  color: var(--muted);
  line-height: 1.4;
}

.client-row-title,
.tracker-item-head,
.package-card-head,
.client-plan-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-row-title {
  width: 100%;
}

.package-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid #464950;
  border-radius: 999px;
  color: #d8d9dd;
  background: #202126;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.package-badge.elite {
  border-color: rgba(239, 56, 50, 0.62);
  color: #ffaaa6;
  background: rgba(239, 56, 50, 0.12);
}

.package-badge.exclusive {
  border-color: rgba(238, 191, 93, 0.65);
  color: #f3d89d;
  background: rgba(238, 191, 93, 0.1);
}

.package-manager-panel {
  margin-top: 16px;
}

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

.package-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 3px solid #676a72;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.package-card.elite {
  border-top-color: #ef3832;
}

.package-card.exclusive {
  border-top-color: #d9aa48;
}

.package-price {
  display: grid;
  justify-items: end;
  gap: 2px;
  white-space: nowrap;
}

.package-price strong {
  font-size: 25px;
}

.package-price span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.package-card p,
.package-card li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.package-offers {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.package-offers > span {
  display: grid;
  grid-template-columns: minmax(58px, 1fr) auto minmax(38px, auto);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.package-offers b {
  color: var(--muted);
  font-weight: 700;
}

.package-offers strong {
  color: #fff;
}

.package-offers em {
  color: #83d8a3;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.package-card ul,
.client-plan-card ul {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding-left: 18px;
}

.package-cadence {
  margin-top: 12px;
  padding: 9px 10px;
  border-left: 3px solid #676a72;
  color: #f3f3f4;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  line-height: 1.35;
}

.package-card.elite .package-cadence {
  border-left-color: #ef3832;
}

.package-card.exclusive .package-cadence {
  border-left-color: #d9aa48;
}

.package-assignment-panel {
  margin-top: 20px;
}

.package-assignments {
  display: grid;
  gap: 8px;
}

.package-assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
}

.package-assignment-row div {
  display: grid;
  gap: 3px;
}

.package-assignment-row .package-assignment-controls {
  grid-template-columns: minmax(100px, 0.75fr) minmax(150px, 1.25fr);
  gap: 8px;
}

.package-assignment-row span {
  color: var(--muted);
  font-size: 12px;
}

.package-assignment-row select,
.package-select-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #34363c;
  border-radius: 6px;
  color: #f4f4f5;
  background: #111216;
  font: inherit;
}

.package-assignment-row select:focus,
.package-select-field select:focus {
  border-color: #ef3832;
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 56, 50, 0.12);
}

.client-plan-card {
  position: relative;
  overflow: hidden;
  border-top: 3px solid #ef3832;
}

.client-plan-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.client-plan-heading > strong {
  color: #fff;
  font-size: 24px;
  white-space: nowrap;
}

.client-plan-card > p,
.morning-tracker-card > p {
  color: var(--muted);
  line-height: 1.5;
}

.client-plan-card li {
  color: #d5d6da;
  font-size: 13px;
  line-height: 1.45;
}

.morning-tracker-card.locked {
  border-style: dashed;
  opacity: 0.78;
}

.morning-tracker-card button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.6;
}

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

.compact-history .tracker-item {
  padding: 14px;
}

.morning-coach-heading {
  margin-top: 22px;
}

#morningTrackerModal .modal-card {
  width: min(900px, calc(100vw - 32px));
  max-height: min(90vh, 940px);
  overflow-y: auto;
}

.morning-tracker-form .morning-grid {
  margin: 16px 0;
}

.morning-tracker-item .tracker-item-head {
  margin-bottom: 6px;
}

.desktop-runtime.admin-desktop .package-manager-panel {
  display: none;
  max-width: 1180px;
}

.desktop-runtime.admin-desktop .coach-radar-panel {
  display: none;
  max-width: 1280px;
}

.desktop-runtime.admin-desktop[data-desktop-section="radar"] .metrics-grid,
.desktop-runtime.admin-desktop[data-desktop-section="radar"] .coach-layout,
.desktop-runtime.admin-desktop[data-desktop-section="radar"] .package-manager-panel,
.desktop-runtime.admin-desktop[data-desktop-section="radar"] #openComposer {
  display: none;
}

.desktop-runtime.admin-desktop[data-desktop-section="radar"] .coach-radar-panel {
  display: block;
}

.desktop-runtime.admin-desktop[data-desktop-section="packages"] .metrics-grid,
.desktop-runtime.admin-desktop[data-desktop-section="packages"] .coach-layout,
.desktop-runtime.admin-desktop[data-desktop-section="packages"] #openComposer {
  display: none;
}

.desktop-runtime.admin-desktop[data-desktop-section="packages"] .package-manager-panel {
  display: block;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-panel {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .profile-panel > * {
  min-width: 0;
}

.desktop-runtime.admin-desktop[data-desktop-section="clients"] .coach-timeline-box {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .package-grid {
    grid-template-columns: 1fr;
  }

  .package-assignment-row,
  .exclusive-action-grid,
  .radar-workspace,
  .radar-client-card {
    grid-template-columns: 1fr;
  }

  .package-assignment-row .package-assignment-controls {
    grid-template-columns: 1fr;
  }

  .client-row-title,
  .client-plan-heading,
  .tracker-item-head {
    align-items: flex-start;
  }

  .section-intro-actions {
    width: 100%;
    justify-content: space-between;
  }

  .radar-summary {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .radar-action,
  .radar-score {
    justify-items: start;
  }

  .radar-action {
    grid-column: 1;
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .client-app {
    padding: 14px 12px 84px;
  }

  .client-header {
    gap: 6px;
  }

  .client-header .phone-top {
    min-width: 0;
    gap: 8px;
  }

  .client-header .phone-top img {
    width: 44px;
    height: 44px;
  }

  .client-header .phone-top strong {
    font-size: 14px;
    white-space: nowrap;
  }

  .client-header .phone-top span {
    font-size: 10px;
    line-height: 1.3;
  }

  .client-header .icon-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .client-header .ghost-button.compact {
    min-width: 44px;
    min-height: 38px;
    padding: 0 7px;
    font-size: 10px;
    white-space: nowrap;
  }

  .client-plan-heading {
    align-items: flex-start;
  }

  .client-plan-heading h2 {
    font-size: 20px;
  }

  .client-plan-heading > strong {
    font-size: 20px;
  }

  .client-bottom-nav button {
    padding-inline: 3px;
    font-size: 9px;
  }
}

/* Electron client workspace: full desktop information architecture. */
.desktop-runtime.client-desktop {
  min-width: 1000px;
  background:
    linear-gradient(135deg, rgba(255, 31, 31, 0.045), transparent 28%),
    #070708;
}

.desktop-runtime.client-desktop .auth-gate {
  padding: 36px;
  background:
    linear-gradient(90deg, rgba(2, 2, 3, 0.9), rgba(7, 7, 9, 0.76)),
    url("/assets/coaching-background.png") center / cover no-repeat,
    #050506;
}

.desktop-runtime.client-desktop .auth-card {
  width: min(100%, 980px);
  min-height: 560px;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  gap: 0;
  padding: 0;
  border-radius: 8px;
}

.desktop-runtime.client-desktop .auth-brand {
  min-height: 560px;
  align-items: flex-end;
  padding: 42px;
  background:
    linear-gradient(180deg, rgba(3, 3, 4, 0.02), rgba(3, 3, 4, 0.54)),
    url("/assets/coaching-background.png") center / cover no-repeat;
}

.desktop-runtime.client-desktop .auth-brand img,
.desktop-runtime.client-desktop .auth-brand > div {
  display: none;
}

.desktop-runtime.client-desktop #accountAuthPanel {
  align-content: center;
  padding: 52px;
  background: linear-gradient(145deg, rgba(24, 24, 29, 0.96), rgba(8, 8, 10, 0.99));
}

.desktop-runtime.client-desktop main {
  min-height: 100vh;
  display: block;
  padding: 0;
}

.desktop-runtime.client-desktop #clientView {
  width: 100%;
}

.desktop-runtime.client-desktop .client-app {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: 88px minmax(calc(100vh - 88px), auto);
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #09090b;
  box-shadow: none;
}

.desktop-runtime.client-desktop .client-app::before {
  display: none;
}

.desktop-runtime.client-desktop .client-header {
  position: sticky;
  z-index: 20;
  top: 0;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  padding: 15px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.94);
  backdrop-filter: blur(18px);
}

.desktop-runtime.client-desktop .client-header .phone-top img {
  width: 54px;
  height: 54px;
}

.desktop-runtime.client-desktop .client-header .phone-top strong {
  font-size: 17px;
}

.desktop-runtime.client-desktop .client-header .phone-top span {
  font-size: 12px;
}

.desktop-runtime.client-desktop .client-bottom-nav {
  position: sticky;
  z-index: 21;
  top: 0;
  left: auto;
  right: auto;
  bottom: auto;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  width: 232px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 116px 16px 24px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 31, 31, 0.06), transparent 25%),
    #08080a;
  box-shadow: none;
}

.desktop-runtime.client-desktop .client-bottom-nav::before {
  content: "FS COACHING";
  position: absolute;
  top: 29px;
  left: 22px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.desktop-runtime.client-desktop .client-bottom-nav::after {
  content: "AREA CLIENTE";
  position: absolute;
  top: 55px;
  left: 22px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.desktop-runtime.client-desktop .client-bottom-nav button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 13px;
  text-align: left;
}

.desktop-runtime.client-desktop .client-bottom-nav button.active {
  border-color: rgba(255, 31, 31, 0.52);
  background: linear-gradient(90deg, rgba(255, 31, 31, 0.2), rgba(255, 255, 255, 0.025));
  box-shadow: inset 3px 0 0 var(--red);
}

.desktop-runtime.client-desktop .client-screen.active {
  grid-column: 2;
  grid-row: 2;
  width: min(100%, 1540px);
  max-height: none;
  min-width: 0;
  margin: 0 auto;
  padding: 28px 32px 44px;
  overflow: visible;
}

.desktop-runtime.client-desktop #clientScreenHome.active {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: start;
  gap: 18px;
}

.desktop-runtime.client-desktop #clientScreenHome > * {
  min-width: 0;
  grid-column: span 4;
}

.desktop-runtime.client-desktop #clientScreenHome > :nth-child(1) { grid-column: span 8; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(2) { grid-column: span 4; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(3) { grid-column: span 8; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(4) { grid-column: span 4; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(5) { grid-column: span 5; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(6) { grid-column: span 7; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(10) { grid-column: span 6; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(14) { grid-column: span 8; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(15),
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(16) { grid-column: span 6; }
.desktop-runtime.client-desktop #clientScreenHome > :nth-child(17) { grid-column: 1 / -1; }

.desktop-runtime.client-desktop .client-card,
.desktop-runtime.client-desktop .client-hero-card,
.desktop-runtime.client-desktop .profile-edit-card {
  padding: 20px;
}

.desktop-runtime.client-desktop .client-plan-card ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 30px;
}

.desktop-runtime.client-desktop .client-hero-card {
  min-height: 220px;
  align-content: center;
  background:
    linear-gradient(90deg, rgba(139, 15, 15, 0.58), rgba(8, 8, 10, 0.32)),
    url("/assets/coaching-background.png") right 28% / cover no-repeat;
}

.desktop-runtime.client-desktop .client-hero-card h2 {
  max-width: 620px;
  font-size: 34px;
}

.desktop-runtime.client-desktop .client-hero-card p {
  max-width: 650px;
}

.desktop-runtime.client-desktop .client-stats {
  align-self: stretch;
  grid-template-columns: 1fr;
}

.desktop-runtime.client-desktop .client-stats article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 14px 16px;
}

.desktop-runtime.client-desktop .client-stats strong {
  margin: 0;
}

.desktop-runtime.client-desktop #clientScreenFeed.active,
.desktop-runtime.client-desktop #clientScreenTracker.active,
.desktop-runtime.client-desktop #clientScreenFiles.active,
.desktop-runtime.client-desktop #clientScreenProfile.active {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-content: start;
  gap: 18px;
}

.desktop-runtime.client-desktop .client-section-head,
.desktop-runtime.client-desktop #openTrackerSecondary,
.desktop-runtime.client-desktop #openClientUpload {
  grid-column: 1 / -1;
}

.desktop-runtime.client-desktop #clientScreenFeed > .client-card {
  grid-column: span 4;
}

.desktop-runtime.client-desktop #clientScreenFeed > #clientFeed {
  grid-column: span 8;
}

.desktop-runtime.client-desktop #clientScreenTracker > .client-card {
  grid-column: span 6;
}

.desktop-runtime.client-desktop #clientScreenTracker > #clientHistory {
  grid-column: 1 / -1;
}

.desktop-runtime.client-desktop #clientScreenFiles > .client-card {
  grid-column: span 6;
}

.desktop-runtime.client-desktop #clientScreenFiles > #clientFiles {
  grid-column: 1 / -1;
}

.desktop-runtime.client-desktop #clientScreenProfile > .profile-edit-card {
  grid-column: span 8;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.desktop-runtime.client-desktop #clientScreenProfile > .client-card {
  grid-column: span 4;
}

.desktop-runtime.client-desktop .profile-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.desktop-runtime.client-desktop .profile-form .measure-grid,
.desktop-runtime.client-desktop .profile-form .full-width,
.desktop-runtime.client-desktop .profile-form .field:has(textarea) {
  grid-column: 1 / -1;
}

.desktop-runtime.client-desktop .feed,
.desktop-runtime.client-desktop .tracker-history,
.desktop-runtime.client-desktop .file-grid {
  min-width: 0;
}

@media (min-width: 1000px) and (max-width: 1280px) {
  .desktop-runtime.client-desktop .client-app {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .desktop-runtime.client-desktop .client-bottom-nav {
    width: 210px;
  }

  .desktop-runtime.client-desktop .client-screen.active {
    padding: 24px;
  }

  .desktop-runtime.client-desktop #clientScreenHome > * {
    grid-column: span 6;
  }

  .desktop-runtime.client-desktop #clientScreenHome > :nth-child(1),
  .desktop-runtime.client-desktop #clientScreenHome > :nth-child(3),
  .desktop-runtime.client-desktop #clientScreenHome > :nth-child(6),
  .desktop-runtime.client-desktop #clientScreenHome > :nth-child(14),
  .desktop-runtime.client-desktop #clientScreenHome > :nth-child(17) {
    grid-column: 1 / -1;
  }

  .desktop-runtime.client-desktop #clientScreenProfile > .profile-edit-card,
  .desktop-runtime.client-desktop #clientScreenProfile > .client-card {
    grid-column: 1 / -1;
  }
}

/* Anamnesi coach, composer cliente e videoteca esercizi. */
.coach-anamnesis-workspace {
  min-width: 0;
}

.coach-anamnesis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.coach-anamnesis-header h3,
.coach-anamnesis-header p {
  margin: 0;
}

.coach-anamnesis-header p {
  margin-top: 4px;
  color: var(--muted);
}

.coach-anamnesis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  align-items: start;
  gap: 22px;
}

.coach-anamnesis-answers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coach-anamnesis-answers .onboarding-answer {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.coach-anamnesis-photo-panel {
  position: sticky;
  top: 104px;
}

.coach-anamnesis-photos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.coach-anamnesis-photos img,
.coach-anamnesis-photos .media-loading {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #090a0c;
}

.client-post-composer {
  border-top: 3px solid var(--red);
}

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

.client-post-form > :nth-child(2),
.client-post-form .form-error {
  grid-column: 1 / -1;
}

.client-post-form button {
  justify-self: end;
}

.exercise-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.exercise-video-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 31, 31, 0.055), rgba(255, 255, 255, 0.025));
}

.exercise-video-head,
.exercise-video-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.exercise-video-head h3,
.exercise-video-card p {
  margin: 0;
}

.exercise-video-card > p {
  color: var(--silver);
  line-height: 1.5;
}

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

.exercise-video-meta span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.exercise-video-meta strong,
.exercise-guidance > strong {
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
}

.exercise-guidance {
  padding: 12px;
  border-left: 3px solid #4fa76d;
  background: rgba(79, 167, 109, 0.07);
}

.exercise-guidance.errors {
  border-left-color: var(--red);
  background: rgba(255, 31, 31, 0.07);
}

.exercise-guidance ul {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--silver);
  font-size: 12px;
  line-height: 1.4;
}

.desktop-runtime.admin-desktop .desktop-section-nav {
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.desktop-runtime.client-desktop #clientScreenFeed > .client-post-composer {
  grid-column: span 5;
}

.desktop-runtime.client-desktop #clientScreenFeed > .client-card:not(.client-post-composer) {
  grid-column: span 7;
}

.desktop-runtime.client-desktop #clientScreenFeed > #clientFeed {
  grid-column: 1 / -1;
}

.desktop-runtime.client-desktop .client-video-library-card {
  grid-column: 1 / -1 !important;
}

.desktop-runtime.client-desktop .client-exercise-video-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

@media (max-width: 1180px) {
  .coach-anamnesis-layout {
    grid-template-columns: 1fr;
  }

  .coach-anamnesis-photo-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .coach-anamnesis-header,
  .exercise-video-head,
  .exercise-video-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .coach-anamnesis-answers,
  .client-post-form,
  .exercise-video-meta {
    grid-template-columns: 1fr;
  }

  .client-post-form > *,
  .coach-anamnesis-answers .onboarding-answer.wide {
    grid-column: 1;
  }

  .exercise-video-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile client application: full-screen, touch-first workspace. */
@media (max-width: 700px) {
  body.client-only:not(.desktop-runtime) {
    min-height: 100dvh;
    background: #08080a;
  }

  body.client-only:not(.desktop-runtime) main {
    min-height: 100dvh;
    display: block;
    padding: 0;
    overflow: visible;
  }

  body.client-only:not(.desktop-runtime) #clientView {
    min-height: 100dvh;
  }

  body.client-only:not(.desktop-runtime) .client-app {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    padding: 74px 14px calc(92px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(255, 31, 31, 0.055), transparent 170px),
      #08080a;
    box-shadow: none;
    overflow: visible;
  }

  body.client-only:not(.desktop-runtime) .client-app::before {
    display: none;
  }

  body.client-only:not(.desktop-runtime) .client-header {
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    right: 0;
    min-height: 64px;
    gap: 8px;
    margin: 0;
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(8, 8, 10, 0.95);
    backdrop-filter: blur(18px);
  }

  body.client-only:not(.desktop-runtime) .client-header .phone-top {
    flex: 1;
    gap: 10px;
  }

  body.client-only:not(.desktop-runtime) .client-header .phone-top img {
    width: 42px;
    height: 42px;
    border-radius: 7px;
    box-shadow: 0 0 18px rgba(255, 31, 31, 0.22);
  }

  body.client-only:not(.desktop-runtime) .client-header .phone-top strong {
    font-size: 15px;
  }

  body.client-only:not(.desktop-runtime) .client-header .phone-top span {
    display: block;
    max-width: 150px;
    margin-top: 1px;
    font-size: 10px;
    line-height: 1.25;
  }

  body.client-only:not(.desktop-runtime) .client-header .icon-button,
  body.client-only:not(.desktop-runtime) .client-header .ghost-button.compact {
    min-width: 42px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 11px;
  }

  body.client-only:not(.desktop-runtime) .client-notification-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.client-only:not(.desktop-runtime) .client-screen.active {
    display: grid;
    gap: 12px;
    max-height: none;
    padding: 0;
    overflow: visible;
  }

  body.client-only:not(.desktop-runtime) .client-screen > *,
  body.client-only:not(.desktop-runtime) .client-card,
  body.client-only:not(.desktop-runtime) .client-hero-card,
  body.client-only:not(.desktop-runtime) .profile-edit-card {
    min-width: 0;
  }

  body.client-only:not(.desktop-runtime) .client-card,
  body.client-only:not(.desktop-runtime) .client-hero-card,
  body.client-only:not(.desktop-runtime) .profile-edit-card,
  body.client-only:not(.desktop-runtime) .post,
  body.client-only:not(.desktop-runtime) .tracker-item,
  body.client-only:not(.desktop-runtime) .file-item,
  body.client-only:not(.desktop-runtime) .program-item {
    padding: 15px;
    border-color: rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    background: linear-gradient(145deg, #141418, #0e0e11);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
  }

  body.client-only:not(.desktop-runtime) .client-card::before,
  body.client-only:not(.desktop-runtime) .client-hero-card::before {
    opacity: 0.34;
    filter: none;
  }

  body.client-only:not(.desktop-runtime) .client-section-head {
    padding: 8px 2px 3px;
  }

  body.client-only:not(.desktop-runtime) .client-section-head h2 {
    margin: 3px 0 0;
    font-size: 25px;
    line-height: 1.1;
  }

  body.client-only:not(.desktop-runtime) .panel-head {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
  }

  body.client-only:not(.desktop-runtime) .panel-head > div {
    flex: 1;
  }

  body.client-only:not(.desktop-runtime) .panel-head h2,
  body.client-only:not(.desktop-runtime) .panel-head h3 {
    margin: 0;
    line-height: 1.25;
  }

  body.client-only:not(.desktop-runtime) .panel-head > div > span:not(.eyebrow) {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
  }

  body.client-only:not(.desktop-runtime) .status-pill {
    max-width: 46%;
    flex: 0 1 auto;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  body.client-only:not(.desktop-runtime) .client-plan-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }

  body.client-only:not(.desktop-runtime) .client-plan-heading h2 {
    font-size: 21px;
    line-height: 1.15;
  }

  body.client-only:not(.desktop-runtime) .client-plan-heading > strong {
    max-width: 142px;
    font-size: 20px;
    line-height: 1.2;
    text-align: right;
    white-space: normal;
  }

  body.client-only:not(.desktop-runtime) .client-plan-card ul {
    margin-top: 12px;
    padding-left: 16px;
  }

  body.client-only:not(.desktop-runtime) .client-plan-card li {
    margin-bottom: 6px;
    font-size: 12px;
  }

  body.client-only:not(.desktop-runtime) .client-hero-card {
    min-height: 188px;
    display: grid;
    align-content: end;
    padding: 20px;
    background:
      linear-gradient(90deg, rgba(10, 10, 12, 0.94), rgba(10, 10, 12, 0.48)),
      url("/assets/coaching-background.png") center 35% / cover no-repeat;
  }

  body.client-only:not(.desktop-runtime) .client-hero-card h2 {
    max-width: 290px;
    margin: 5px 0 8px;
    font-size: 25px;
    line-height: 1.06;
  }

  body.client-only:not(.desktop-runtime) .client-hero-card p {
    max-width: 290px;
    margin-bottom: 14px;
    font-size: 12px;
    line-height: 1.45;
  }

  body.client-only:not(.desktop-runtime) .primary-button,
  body.client-only:not(.desktop-runtime) .ghost-button,
  body.client-only:not(.desktop-runtime) .danger-button,
  body.client-only:not(.desktop-runtime) .photo-upload-button {
    min-height: 46px;
    border-radius: 7px;
    padding: 0 15px;
    font-size: 13px;
    line-height: 1.2;
  }

  body.client-only:not(.desktop-runtime) .primary-button.compact,
  body.client-only:not(.desktop-runtime) .ghost-button.compact {
    min-height: 40px;
  }

  body.client-only:not(.desktop-runtime) .client-stats {
    gap: 8px;
  }

  body.client-only:not(.desktop-runtime) .client-stats article {
    min-height: 76px;
    display: grid;
    align-content: center;
    padding: 10px;
    border-radius: 7px;
  }

  body.client-only:not(.desktop-runtime) .client-stats span {
    font-size: 10px;
  }

  body.client-only:not(.desktop-runtime) .client-stats strong {
    font-size: 18px;
  }

  body.client-only:not(.desktop-runtime) .achievement-list {
    grid-template-columns: 1fr;
  }

  body.client-only:not(.desktop-runtime) .achievement-list article {
    min-height: 58px;
  }

  body.client-only:not(.desktop-runtime) .weekly-report-grid,
  body.client-only:not(.desktop-runtime) .personal-archive,
  body.client-only:not(.desktop-runtime) .profile-health-summary {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  body.client-only:not(.desktop-runtime) .habit-row,
  body.client-only:not(.desktop-runtime) .program-mini-list article,
  body.client-only:not(.desktop-runtime) .mini-chart-row,
  body.client-only:not(.desktop-runtime) .goal-item,
  body.client-only:not(.desktop-runtime) .workout-row,
  body.client-only:not(.desktop-runtime) .toggle-row {
    min-height: 50px;
    padding: 11px;
    border-radius: 7px;
  }

  body.client-only:not(.desktop-runtime) .goal-item em {
    white-space: normal;
    text-align: right;
  }

  body.client-only:not(.desktop-runtime) .field {
    gap: 6px;
    font-size: 12px;
  }

  body.client-only:not(.desktop-runtime) .field input,
  body.client-only:not(.desktop-runtime) .field textarea,
  body.client-only:not(.desktop-runtime) .field select,
  body.client-only:not(.desktop-runtime) .sos-form select,
  body.client-only:not(.desktop-runtime) .sos-form input,
  body.client-only:not(.desktop-runtime) .chat-form input,
  body.client-only:not(.desktop-runtime) .meal-form input {
    min-height: 48px;
    padding: 12px;
    border-radius: 7px;
    font-size: 16px;
  }

  body.client-only:not(.desktop-runtime) .client-post-form,
  body.client-only:not(.desktop-runtime) .meal-form,
  body.client-only:not(.desktop-runtime) .profile-form,
  body.client-only:not(.desktop-runtime) .reminder-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.client-only:not(.desktop-runtime) .client-post-form > *,
  body.client-only:not(.desktop-runtime) .meal-form > * {
    grid-column: 1;
  }

  body.client-only:not(.desktop-runtime) .chat-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }

  body.client-only:not(.desktop-runtime) .chat-form .primary-button {
    min-width: 72px;
  }

  body.client-only:not(.desktop-runtime) .coach-chat-list {
    max-height: none;
    padding: 0;
    overflow: visible;
  }

  body.client-only:not(.desktop-runtime) .coach-chat-list article {
    width: 90%;
    padding: 11px 12px;
  }

  body.client-only:not(.desktop-runtime) .file-grid,
  body.client-only:not(.desktop-runtime) .progress-photo-grid,
  body.client-only:not(.desktop-runtime) .exercise-video-grid {
    grid-template-columns: 1fr;
  }

  body.client-only:not(.desktop-runtime) .checkin-calendar {
    gap: 4px;
  }

  body.client-only:not(.desktop-runtime) .checkin-calendar span {
    min-height: 38px;
    border-radius: 6px;
    font-size: 11px;
  }

  body.client-only:not(.desktop-runtime) .profile-edit-card {
    gap: 20px;
  }

  body.client-only:not(.desktop-runtime) .profile-photo-wrap img {
    width: 104px;
    height: 104px;
  }

  body.client-only:not(.desktop-runtime) .measure-grid,
  body.client-only:not(.desktop-runtime) .exclusive-action-grid,
  body.client-only:not(.desktop-runtime) .reminder-actions {
    grid-template-columns: 1fr;
  }

  body.client-only:not(.desktop-runtime) .client-bottom-nav {
    position: fixed;
    z-index: 45;
    left: 0;
    right: 0;
    bottom: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
    margin: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    background: rgba(8, 8, 10, 0.97);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
  }

  body.client-only:not(.desktop-runtime) .client-bottom-nav button {
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 2px;
    border: 0;
    border-radius: 7px;
    font-size: 10px;
    line-height: 1;
  }

  body.client-only:not(.desktop-runtime) .client-bottom-nav button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.client-only:not(.desktop-runtime) .client-bottom-nav button.active {
    color: #fff;
    background: rgba(255, 31, 31, 0.13);
    box-shadow: inset 0 2px 0 var(--red);
  }

  body.client-only:not(.desktop-runtime) .app-update-banner {
    left: 12px;
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: auto;
  }

  body.client-only:not(.desktop-runtime) dialog {
    width: 100%;
    max-height: 100dvh;
    margin: auto 0 0;
  }

  body.client-only:not(.desktop-runtime) .modal-card,
  body.client-only:not(.desktop-runtime) .onboarding-form {
    max-height: 94dvh;
    border-radius: 10px 10px 0 0;
  }

  body.client-only:not(.desktop-runtime) .onboarding-dialog {
    width: 100%;
  }

  body.client-only:not(.desktop-runtime) .onboarding-header,
  body.client-only:not(.desktop-runtime) .onboarding-step {
    padding: 18px 16px;
  }

  body.client-only:not(.desktop-runtime) .onboarding-grid.two-columns,
  body.client-only:not(.desktop-runtime) .onboarding-photo-grid {
    grid-template-columns: 1fr;
  }

  body.client-only:not(.desktop-runtime) .onboarding-photo-upload {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 370px) {
  body.client-only:not(.desktop-runtime) .client-app {
    padding-inline: 10px;
  }

  body.client-only:not(.desktop-runtime) .client-header {
    padding-inline: 10px;
  }

  body.client-only:not(.desktop-runtime) .client-header .phone-top span {
    display: none;
  }

  body.client-only:not(.desktop-runtime) .client-card,
  body.client-only:not(.desktop-runtime) .client-hero-card,
  body.client-only:not(.desktop-runtime) .profile-edit-card {
    padding: 13px;
  }
}
