:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #111318;
  --text: #171a21;
  --muted: #687083;
  --line: #dde3ed;
  --brand: #d5a642;
  --brand-2: #1f7a64;
  --danger: #b5413f;
  --ok: #1c805d;
  --shadow: 0 18px 50px rgba(23, 26, 33, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.site-home {
  min-height: 100vh;
  background: #f5f7fb;
}
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  letter-spacing: 0;
}
.site-brand img { width: 42px; height: 42px; object-fit: contain; }
.site-nav > div {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 800;
}
.nav-login,
.nav-admin {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}
.nav-login { background: #111318; color: #fff; border-color: #111318; }
.nav-admin { background: #fff; color: var(--muted); }
.site-hero {
  position: relative;
  min-height: min(760px, calc(100vh - 76px));
  display: grid;
  grid-template-columns: minmax(0, 820px);
  align-items: end;
  padding: clamp(42px, 7vw, 88px) clamp(18px, 6vw, 76px);
  background:
    linear-gradient(90deg, rgba(5, 6, 9, .94), rgba(5, 6, 9, .72) 54%, rgba(5, 6, 9, .18)),
    linear-gradient(0deg, rgba(5, 6, 9, .38), rgba(5, 6, 9, .08)),
    url("assets/gallery/fynx-hero-cover.webp") center / cover;
  color: #fff;
  overflow: hidden;
}
.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 4px solid #e1262f;
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero-copy span,
.section-intro span,
.site-band span,
.contact-section span {
  color: var(--brand);
  font-weight: 950;
  text-transform: uppercase;
  font-size: 12px;
}
.hero-copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(48px, 8vw, 96px);
  line-height: .95;
  max-width: 820px;
}
.hero-copy p {
  max-width: 650px;
  color: #d8deea;
  font-size: 20px;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin-top: clamp(34px, 5vw, 58px);
}
.hero-points div {
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  padding: 16px;
  background: rgba(9, 11, 16, .58);
  backdrop-filter: blur(10px);
}
.hero-points strong {
  display: block;
  color: #e1262f;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 10px;
}
.hero-points span {
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
  text-transform: none;
  font-weight: 850;
}
.site-section {
  padding: clamp(46px, 7vw, 82px) clamp(18px, 6vw, 76px);
}
.section-intro {
  max-width: 720px;
  margin-bottom: 26px;
}
.section-intro h2,
.site-band h2,
.contact-section h2 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
}
.section-intro p,
.site-band p,
.contact-section p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.service-grid article {
  background: #111318;
  border: 1px solid #252a34;
  border-radius: 8px;
  padding: 18px;
  min-height: 280px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 42px rgba(17, 19, 24, .1);
}
.service-grid img {
  width: 100%;
  max-width: 156px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  background: #050609;
  padding: 8px;
  margin-inline: auto;
}
.service-grid h3 { margin: 0; font-size: 20px; }
.service-grid p { margin: 0; color: #cbd2de; line-height: 1.45; }
.pricing-section {
  background: #111318;
  color: #fff;
}
.pricing-section .section-intro p {
  color: #cbd2de;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.pricing-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 360px;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  padding: 20px;
  background: #171a21;
}
.pricing-card > span {
  width: fit-content;
  border: 1px solid rgba(213,166,66,.42);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.pricing-card h3 {
  margin: 0;
  font-size: 24px;
}
.pricing-card p {
  margin: 0;
  color: #cbd2de;
  line-height: 1.45;
}
.plan-benefits {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}
.plan-benefits span {
  display: block;
  border: 1px solid #303745;
  border-radius: 8px;
  padding: 8px 10px;
  background: #101319;
  color: #f1f4fa;
  font-size: 13px;
  font-weight: 800;
}
.pricing-card strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}
.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.pricing-card li {
  border-top: 1px solid #2a2f3a;
  padding-top: 8px;
  color: #eef2f8;
  font-size: 14px;
  font-weight: 750;
}
.gym-gallery-section {
  background: #fff;
}
.gym-gallery {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, minmax(0, .72fr));
  grid-auto-rows: 230px;
  gap: 14px;
}
.gym-gallery figure {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #111318;
  box-shadow: 0 18px 42px rgba(17, 19, 24, .12);
  cursor: zoom-in;
}
.gym-gallery figure::after {
  content: "Ver";
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 8px;
  padding: 6px 9px;
  background: rgba(17,19,24,.66);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.gym-gallery figure:hover::after {
  opacity: 1;
  transform: translateY(0);
}
.gym-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
  transition: transform .35s ease, filter .35s ease;
}
.gym-gallery figure:hover img {
  transform: scale(1.035);
  filter: saturate(1.1) contrast(1.05);
}
.gallery-feature {
  grid-row: span 2;
}
.gym-gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  padding: 18px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,0));
  font-weight: 900;
}
.gym-gallery figcaption strong {
  display: block;
  font-size: 22px;
}
.gym-gallery figcaption span {
  display: block;
  margin-top: 4px;
  color: #dce2ec;
  font-size: 14px;
  font-weight: 650;
}
.video-showcase {
  display: grid;
  grid-template-columns: minmax(260px, .55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 28px;
  padding: 20px;
  border-radius: 8px;
  background: #111318;
  color: #fff;
}
.video-showcase span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.video-showcase h3 {
  margin: 8px 0 10px;
  font-size: 28px;
  line-height: 1.05;
}
.video-showcase p {
  margin: 0;
  color: #cbd2de;
  line-height: 1.5;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.video-card {
  display: grid;
  gap: 8px;
}
.video-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  background: #050609;
  object-fit: cover;
}
.video-card span {
  color: #eef2f8;
  font-size: 13px;
  font-weight: 900;
  text-transform: none;
}
.site-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr);
  gap: 34px;
  align-items: center;
  background: #111318;
  color: #fff;
  padding: clamp(48px, 7vw, 84px) clamp(18px, 6vw, 76px);
}
.site-band p { color: #cbd2de; }
.feature-list { display: grid; gap: 12px; }
.feature-list div {
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  padding: 16px;
  background: #171a21;
}
.feature-list strong { display: block; margin-bottom: 5px; }
.feature-list span { color: #cbd2de; text-transform: none; font-size: 14px; font-weight: 500; }
.contact-section {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.contact-section > div:first-child { max-width: 760px; }
.contact-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.contact-details a {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  border: 1px solid #252a34;
  border-radius: 8px;
  padding: 18px;
  background: #111318;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(17, 19, 24, .12);
}
.contact-details a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 4px solid var(--brand);
  pointer-events: none;
}
.contact-details a:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
}
.contact-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
}
.contact-icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.instagram-icon {
  color: #e4405f;
}
.map-icon {
  color: #ef4444;
}
.instagram-icon svg {
  filter: drop-shadow(0 7px 14px rgba(228, 64, 95, .25));
}
.map-icon svg {
  filter: drop-shadow(0 7px 14px rgba(239, 68, 68, .25));
}
.contact-details strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}
.contact-details small {
  display: block;
  color: #cbd2de;
  text-transform: none;
  font-size: 14px;
  font-weight: 700;
}
.contact-map-card {
  display: grid;
  gap: 12px;
  width: min(560px, 100%);
}
.contact-map-card iframe {
  width: 100%;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #e8edf5;
}
.contact-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 276px 1fr; }
.sidebar {
  background: #0f1116;
  color: #f7f7f7;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand h1 { margin: 0; font-size: 18px; line-height: 1.05; }
.brand p { margin: 3px 0 0; color: #b5bccb; font-size: 12px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #2a2f3a; border-radius: 8px; overflow: hidden; }
.mode-switch button {
  border: 0;
  background: transparent;
  color: #bfc6d6;
  padding: 10px;
}
.mode-switch button.active { background: var(--brand); color: #111318; font-weight: 800; }
.nav { display: grid; gap: 6px; }
.nav button {
  border: 0;
  color: #d9deea;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 8px;
}
.nav button.active, .nav button:hover { background: #222832; color: #fff; }
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #2a2f3a;
  padding-top: 16px;
  color: #b5bccb;
  font-size: 12px;
  line-height: 1.5;
}

.main { padding: 26px; min-width: 0; }
.global-person-search {
  margin: 0 0 16px;
  display: flex;
  justify-content: flex-end;
}
.person-search {
  width: min(420px, 100%);
}
.person-search .search {
  width: 100%;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.topbar h2 { margin: 0; font-size: 26px; }
.topbar p { margin: 5px 0 0; color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.section-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.section-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}
.section-tabs button.active {
  background: #111318;
  color: #fff;
  border-color: #111318;
}
.download-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.search {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}
.date-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}
.date-toolbar .search { width: 100%; }
.date-input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 13px;
  font-weight: 700;
}
.btn.primary { background: var(--panel-2); color: #fff; border-color: var(--panel-2); }
.btn.gold { background: var(--brand); color: #151515; border-color: var(--brand); }
.grid { display: grid; gap: 14px; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-height: 96px;
}
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 10px; font-size: 28px; }
.metric small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.metric.warn-card { border-color: #f3c35b; background: #fffaf0; }
.metric.danger-card { border-color: #f0b0aa; background: #fff5f4; }
.dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.bulk-renewal {
  margin-bottom: 16px;
  border-top: 4px solid var(--brand);
}
.bulk-renewal .panel-head {
  align-items: flex-start;
}
.bulk-renewal .panel-head p {
  margin: 4px 0 0;
}
.bulk-select {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.renewal-select {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  min-height: 66px;
}
.renewal-select input {
  margin-top: 3px;
  accent-color: var(--brand);
}
.renewal-select span { display: grid; gap: 4px; }
.renewal-select strong { font-size: 13px; line-height: 1.25; }
.renewal-select small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.renewal-select.disabled {
  opacity: .58;
  background: #f7f8fb;
}
.renewal-list { display: grid; gap: 10px; }
.renewal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.renewal-card > div:first-child span {
  display: block;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}
.renewal-card strong { display: block; font-size: 15px; }
.renewal-card small { display: block; color: var(--muted); margin-top: 4px; }
.renewal-card .row-actions { grid-column: 1 / -1; justify-content: flex-end; }
.renewal-status { display: grid; justify-items: end; gap: 4px; }
.renewal-panel.urgent { border-top: 4px solid #f3c35b; }
.renewal-panel.expired { border-top: 4px solid var(--danger); }
.content-grid { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); align-items: start; }
.payment-workspace { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); align-items: start; }
.attendance-workspace { grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); align-items: start; }
.docs-workspace { grid-template-columns: minmax(320px, 430px) minmax(0, 1fr); align-items: start; }
.full-search { width: 100%; margin-bottom: 12px; }
.payment-client-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  max-height: calc(100vh - 255px);
  overflow: auto;
  padding-right: 4px;
}
.payment-client-card {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 11px;
  text-align: left;
  display: grid;
  gap: 4px;
  cursor: pointer;
}
.payment-client-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(213, 166, 66, .18);
}
.payment-client-card span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}
.payment-client-card strong { font-size: 14px; line-height: 1.25; }
.payment-client-card small,
.payment-client-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.payment-split {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.35fr);
  gap: 16px;
  margin-top: 16px;
}
.panel-head.tight { margin-bottom: 8px; }
.void-row { opacity: .68; background: #fff7f7; }
.attendance-quick-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  max-height: calc(100vh - 255px);
  overflow: auto;
  padding-right: 4px;
}
.attendance-quick-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.attendance-quick-card.marked {
  background: #f0faf5;
  border-color: #b8e4ce;
}
.attendance-quick-card > button:first-child {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
  display: grid;
  gap: 3px;
}
.attendance-quick-card span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}
.attendance-quick-card strong { font-size: 14px; line-height: 1.25; }
.attendance-quick-card small { color: var(--muted); font-size: 12px; }
.doc-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.doc-check {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
}
.doc-check input { margin-top: 4px; accent-color: var(--brand); }
.doc-check span { display: grid; gap: 3px; }
.doc-check strong { font-size: 13px; }
.doc-check small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.doc-type-tabs { margin-bottom: 8px; }
.inline-preview {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel h3 { margin: 0 0 12px; font-size: 17px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }
.panel-head span { color: var(--muted); font-size: 13px; font-weight: 700; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; background: #fafbfe; }
.status { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 800; }
.status.ok { color: var(--ok); background: #e9f7f1; }
.status.warn { color: #8a5a00; background: #fff3d1; }
.status.bad { color: var(--danger); background: #fdebea; }
.client-list { display: grid; gap: 10px; }
.client-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}
.client-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(213, 166, 66, .18); }
.client-card strong { display: block; }
.muted { color: var(--muted); }
.split { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.profile-head {
  background: #0f1116;
  color: #fff;
  border-radius: 8px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.profile-head.compact { padding: 14px; }
.profile-head span { color: var(--brand); font-weight: 900; font-size: 12px; text-transform: uppercase; }
.profile-head h3 { margin: 4px 0; font-size: 24px; }
.profile-head p { margin: 0; color: #c8cfdd; }
.mini-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.mini-metrics div { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fafbfe; }
.mini-metrics span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.mini-metrics strong { display: block; margin-top: 6px; font-size: 16px; }
.info-list { display: grid; gap: 9px; margin-bottom: 14px; }
.info-list div { border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.info-list strong { display: block; font-size: 13px; margin-bottom: 3px; }
.info-list span { color: var(--muted); font-size: 13px; }
.profile-actions { margin-bottom: 14px; }
.subpanels { display: grid; gap: 12px; }
.subpanels h4 { margin: 0 0 8px; }
.subpanels table { min-width: 520px; }
.routine-days { display: grid; gap: 12px; }
.day-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
.day-card h4 { margin: 0 0 8px; }
.exercise-list { display: grid; gap: 7px; }
.exercise { display: grid; grid-template-columns: 1fr auto; gap: 10px; border-top: 1px solid #eef2f7; padding-top: 8px; font-size: 13px; }
.routine-sheet {
  border-radius: 8px;
  overflow: hidden;
  background: #f7f7f8;
  border: 1px solid #20242d;
}
.routine-cover {
  background: #07080b;
  color: #fff;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-bottom: 2px solid #e1262f;
}
.routine-brand {
  border-right: 2px solid #e1262f;
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
}
.routine-brand img { width: 76px; height: 76px; object-fit: contain; }
.routine-brand strong { font-size: 30px; letter-spacing: 0; }
.routine-brand span, .routine-title span {
  color: #cfd3da;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.routine-title h3 {
  margin: 6px 0;
  color: #ff2935;
  font-size: 38px;
  line-height: 1;
  text-transform: uppercase;
}
.routine-title p { margin: 0; color: #f4f5f7; }
.routine-stats {
  background: #0d1016;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
}
.routine-stats div {
  background: #11151d;
  padding: 16px;
  min-height: 92px;
}
.routine-stats span {
  color: #ff2935;
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.routine-stats strong { display: block; margin-top: 8px; font-size: 21px; }
.routine-stats small { color: #cfd3da; }
.routine-day-sheet { border-top: 2px solid #e1262f; }
.routine-day-head {
  background: #090b10;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
}
.routine-day-head span {
  color: #ff2935;
  font-weight: 900;
  text-transform: uppercase;
}
.routine-day-head h4 { margin: 2px 0 0; font-size: 24px; }
.routine-day-head p { margin: 0; color: #d8dce4; }
.routine-table { display: grid; }
.routine-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(150px, .78fr) 76px 112px 88px minmax(230px, 1.1fr) 128px;
  min-height: 108px;
  background: #fff;
  border-bottom: 1px solid #d9dde5;
}
.routine-row > div {
  padding: 12px;
  border-right: 1px solid #d9dde5;
  display: grid;
  align-content: center;
  gap: 6px;
}
.routine-row-head {
  min-height: auto;
  background: #111318;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.routine-row-head > div { padding: 10px 12px; }
.muscle-cell {
  background: #090b10;
  color: #fff;
  text-align: center;
  justify-items: center;
}
.muscle-cell.visually-hidden {
  opacity: 0;
}
.muscle-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #151922;
  color: #fff;
  font-weight: 950;
  overflow: hidden;
}
.muscle-icon img { width: 54px; height: 54px; object-fit: cover; }
.routine-row small { color: var(--muted); }
.center { text-align: center; justify-items: center; }
.strong { font-size: 22px; font-weight: 900; }
.exercise-visual {
  min-height: 82px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  background: linear-gradient(90deg, #f4f5f7, #fff);
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  overflow: hidden;
}
.exercise-visual > span {
  height: 100%;
  display: grid;
  place-items: center;
  background: #111318;
  color: #ff2935;
  font-weight: 950;
  overflow: hidden;
}
.exercise-visual > span img { width: 58px; height: 82px; object-fit: cover; }
.exercise-visual div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
}
.exercise-visual b {
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef1f6;
  color: #3b4250;
  font-size: 12px;
}
.exercise-photo {
  width: 100%;
  max-height: 110px;
  object-fit: contain;
  background: #fff;
}
.equipment-photo {
  max-width: 120px;
  max-height: 92px;
  margin-top: 8px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  padding: 6px;
}
.routine-footer {
  background: #090b10;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
}
.routine-footer div {
  background: #11151d;
  padding: 16px;
}
.routine-footer strong {
  color: #ff2935;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.routine-footer span { color: #d8dce4; }
.inbody-report-card {
  background: #10151d;
  color: #fff;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
}
.inbody-report-card span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.inbody-report-card h3 { margin: 5px 0; }
.inbody-report-card p { margin: 0; color: #cbd2de; }
.inbody-score {
  min-width: 96px;
  text-align: center;
  border: 1px solid #343b48;
  border-radius: 8px;
  padding: 10px;
}
.inbody-score strong { display: block; font-size: 28px; }
.inbody-score small { color: #cbd2de; }
.inbody-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .9fr) minmax(280px, .9fr);
  gap: 14px;
  margin-bottom: 14px;
}
.inbody-hero-card,
.inbody-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.inbody-hero-card {
  background: #0f1116;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.inbody-hero-card span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.inbody-hero-card h3 { margin: 6px 0; font-size: 28px; }
.inbody-hero-card p { color: #d9deea; margin: 0; }
.score-ring {
  --score: 0;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at center, #0f1116 0 58%, transparent 59%),
    conic-gradient(var(--brand) calc(var(--score) * 1%), #303744 0);
}
.score-ring strong { font-size: 30px; line-height: 1; }
.score-ring small { color: #cbd2de; margin-top: -32px; }
.inbody-panel h3 { margin: 0 0 12px; }
.body-bar { display: grid; gap: 8px; margin: 12px 0; }
.body-bar span { color: var(--muted); font-weight: 800; }
.bar-track {
  height: 10px;
  background: #edf1f6;
  border-radius: 999px;
  overflow: hidden;
}
.bar-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.change-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  padding: 10px 0;
}
.change-line span { color: var(--muted); font-weight: 800; }
.change-line strong { font-size: 18px; }
.change-line small,
.trend {
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 900;
  font-size: 12px;
}
.good { color: #1c805d; background: #e9f7f1; }
.warn { color: #b5413f; background: #fdebea; }
.flat { color: #687083; background: #eef1f6; }
.inbody-metrics .metric strong { font-size: 24px; }
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.mini-chart {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fafbfe;
}
.mini-chart svg {
  width: 100%;
  height: 120px;
  margin-top: 8px;
}
.mini-chart path {
  stroke: #cdd4df;
  stroke-width: 2;
  fill: none;
}
.mini-chart polyline {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reports-hub {
  margin: 16px 0;
  display: grid;
  gap: 14px;
}
.reports-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}
.reports-head span {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.reports-head h3 { margin: 4px 0 0; font-size: 22px; }
.report-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.report-tabs button {
  min-width: 150px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 11px 12px;
  text-align: left;
}
.report-tabs button.active {
  background: #111318;
  color: #fff;
  border-color: #111318;
}
.report-tabs strong,
.report-tabs span {
  display: block;
}
.report-tabs span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}
.report-tabs button.active span { color: #cbd2de; }
.inbody-detail-report {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-report-cover {
  background: #0b0d12;
  color: #fff;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 3px solid #e1262f;
}
.detail-report-cover span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.detail-report-cover h3 {
  margin: 6px 0;
  font-size: 28px;
}
.detail-report-cover p { margin: 0; color: #d9deea; }
.detail-report-date {
  text-align: right;
  min-width: 170px;
}
.detail-report-date strong { display: block; font-size: 18px; }
.detail-report-date small { color: #cbd2de; }
.detail-client-strip,
.detail-summary,
.detail-two-col {
  display: grid;
  gap: 1px;
  background: var(--line);
}
.detail-client-strip {
  grid-template-columns: 1.2fr 1fr 1fr;
}
.detail-client-strip div,
.detail-metric,
.detail-panel,
.detail-conclusion {
  background: #fff;
  padding: 16px;
}
.detail-client-strip span,
.detail-metric span,
.technical-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.detail-client-strip strong {
  display: block;
  margin-top: 5px;
}
.detail-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.detail-metric strong {
  display: block;
  margin: 8px 0;
  font-size: 28px;
}
.detail-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail-panel h4,
.detail-conclusion h4 {
  margin: 0 0 10px;
  font-size: 17px;
}
.detail-panel p,
.detail-conclusion p {
  margin: 0;
  color: #3b4250;
  line-height: 1.55;
}
.detail-panel ul {
  margin: 0;
  padding-left: 18px;
  color: #3b4250;
  line-height: 1.5;
}
.detail-panel li + li { margin-top: 7px; }
.technical-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.technical-grid div {
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.technical-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}
.detail-conclusion {
  border-top: 1px solid var(--line);
}
.range-row {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
.range-row .split span,
.detail-line span {
  color: #171a21;
  font-weight: 800;
}
.range-row b {
  font-size: 12px;
  color: #171a21;
}
.range-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #eef2f7;
  border: 1px solid #d7dee9;
  overflow: hidden;
}
.range-track .normal-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #d9f0e7;
}
.range-track em {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid;
  background: #fff;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.range-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  text-transform: uppercase;
}
.range-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.facts-list {
  display: grid;
  gap: 8px;
}
.facts-list p {
  margin: 0;
  color: #171a21;
}
.detail-line {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  min-width: 0;
}
.field.full { grid-column: 1 / -1; }
.field.wide { grid-column: span 2; }
.notice { border-left: 4px solid var(--brand-2); background: #eef8f5; padding: 12px; border-radius: 8px; color: #24594d; }
.hero {
  background: #0f1116;
  color: #fff;
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 14px;
}
.hero h2 { margin: 0; font-size: 28px; }
.hero p { color: #cbd2de; margin: 0; }
.mobile-only { display: none; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #0f1116;
}
.login-card {
  width: min(960px, 100%);
  background: #fff;
  border-radius: 8px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
}
.login-brand {
  background: #151922;
  color: #fff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
}
.login-brand img { width: 82px; height: 82px; object-fit: contain; }
.login-brand h1 { font-size: 36px; margin: 18px 0 8px; }
.login-brand p { color: #cbd2de; }
.login-forms { padding: 28px; }
.tabs-inline { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs-inline button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}
.tabs-inline button.active { background: var(--panel-2); color: #fff; }
.hidden { display: none !important; }
.text-link {
  color: var(--brand-2);
  font-weight: 800;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #111318;
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 22, .56);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 9999;
}
.modal-card {
  width: min(1120px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
  padding: 18px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.modal-head h3 { margin: 0; }
.stack { display: grid; gap: 12px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.admin-form { gap: 16px; }
.form-section { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fbfcff; }
.section-title { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.section-title span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #111318;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.section-title h4 { margin: 0; font-size: 16px; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.check-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  font-size: 13px;
  font-weight: 700;
}
.check-field input[type="hidden"] { display: none; }
.check-field input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand); }
.sticky-actions {
  position: sticky;
  bottom: -18px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), #fff 35%);
  padding: 14px 0 0;
}
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.doc-preview {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.danger { color: var(--danger); }
.empty-state { padding: 28px; text-align: center; color: var(--muted); }
.client-hero {
  background: #10151d;
  color: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  box-shadow: var(--shadow);
}
.client-hero span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.client-hero h2 {
  margin: 8px 0 6px;
  font-size: 30px;
}
.client-hero p {
  color: #cbd2de;
  margin: 0;
}
.client-status {
  min-width: 170px;
  display: grid;
  gap: 8px;
  justify-items: end;
}
.client-status small,
.metric small {
  color: var(--muted);
  display: block;
  margin-top: 5px;
  font-size: 12px;
}
.client-status small { color: #cbd2de; }
.client-metrics .metric strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .site-nav { align-items: flex-start; flex-direction: column; }
  .site-hero, .site-band { grid-template-columns: 1fr; }
  .site-hero { min-height: auto; }
  .hero-points { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gym-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 220px;
  }
  .gallery-feature {
    grid-column: span 2;
    grid-row: span 1;
  }
  .video-showcase { grid-template-columns: 1fr; }
  .contact-section { align-items: flex-start; flex-direction: column; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 18px; }
  .metrics, .content-grid, .dashboard-grid, .payment-workspace, .attendance-workspace, .docs-workspace, .payment-split { grid-template-columns: 1fr; }
  .payment-client-list, .attendance-quick-list { max-height: 360px; }
  .date-toolbar { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: 1 / -1; }
  .mini-metrics { grid-template-columns: 1fr; }
  .mobile-only { display: block; }
  .login-card { grid-template-columns: 1fr; }
  .login-brand { min-height: 260px; }
  .mini-grid { grid-template-columns: 1fr; }
  .client-hero { align-items: flex-start; flex-direction: column; }
  .client-status { justify-items: start; }
  .routine-cover { grid-template-columns: 1fr; }
  .routine-brand { border-right: 0; border-bottom: 2px solid #e1262f; min-height: auto; padding-bottom: 16px; }
  .routine-title h3 { font-size: 30px; }
  .routine-stats, .routine-footer, .inbody-report-card { grid-template-columns: 1fr; }
  .inbody-dashboard, .chart-grid { grid-template-columns: 1fr; }
  .detail-report-cover, .reports-head { align-items: flex-start; flex-direction: column; }
  .detail-report-date { text-align: left; }
  .detail-client-strip, .detail-summary, .detail-two-col, .technical-grid { grid-template-columns: 1fr; }
  .inbody-hero-card { align-items: flex-start; flex-direction: column; }
  .routine-table { overflow-x: auto; }
  .routine-row { min-width: 1100px; }
}

@media (max-width: 620px) {
  .site-nav > div { gap: 8px; }
  .site-nav > div a { font-size: 13px; }
  .site-section { padding-inline: 14px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-grid article {
    min-height: auto;
    padding: 20px 18px;
  }
  .service-grid img { max-width: 138px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card { min-height: auto; }
  .gym-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }
  .gallery-feature { grid-column: auto; }
  .video-grid { grid-template-columns: 1fr; }
  .video-grid video { max-height: none; }
  .contact-details { grid-template-columns: 1fr; }
  .contact-actions { justify-content: flex-start; }
  .contact-map-card iframe { height: 260px; }
  .hero-copy p, .section-intro p, .site-band p, .contact-section p { font-size: 16px; }
  .site-hero {
    background:
      linear-gradient(180deg, rgba(5, 6, 9, .88), rgba(5, 6, 9, .66) 56%, rgba(5, 6, 9, .44)),
      url("assets/gallery/fynx-hero-cover-mobile.webp") center / cover;
  }
  .main { padding: 12px; }
  .client-hero,
  .routine-cover,
  .routine-stats div,
  .routine-footer div {
    padding: 16px;
  }
  .routine-sheet {
    border-radius: 8px;
    border-color: #d9dde5;
    overflow: visible;
    background: #eef2f7;
  }
  .routine-cover {
    gap: 16px;
  }
  .routine-brand {
    justify-items: start;
    gap: 4px;
  }
  .routine-brand img {
    width: 54px;
    height: 54px;
  }
  .routine-brand strong { font-size: 24px; }
  .routine-title h3 {
    font-size: 25px;
    line-height: 1.08;
  }
  .routine-day-head {
    display: grid;
    gap: 10px;
    padding: 16px;
  }
  .routine-day-head h4 { font-size: 22px; }
  .routine-group-title {
    align-items: flex-start;
    padding: 13px 14px;
  }
  .routine-table {
    display: grid;
    gap: 10px;
    padding: 10px;
    overflow: visible;
    background: #eef2f7;
  }
  .routine-row-head { display: none; }
  .routine-row,
  .routine-row.clean-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: auto;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(17, 19, 24, .08);
  }
  .routine-row > div {
    border-right: 0;
    border-bottom: 1px solid #edf1f6;
    padding: 12px 14px;
    align-content: start;
  }
  .routine-row > div:last-child { border-bottom: 0; }
  .routine-row.clean-row > div::before {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .routine-row.clean-row > div:nth-child(1)::before { content: "Ejercicio"; }
  .routine-row.clean-row > div:nth-child(2)::before { content: "Equipo"; }
  .routine-row.clean-row > div:nth-child(3)::before { content: "Series"; }
  .routine-row.clean-row > div:nth-child(4)::before { content: "Repeticiones"; }
  .routine-row.clean-row > div:nth-child(5)::before { content: "Descanso"; }
  .routine-row.clean-row > div:nth-child(6)::before { content: "Indicaciones"; }
  .routine-row.clean-row > div:nth-child(7)::before { content: "Ejecución"; }
  .routine-row.clean-row > div:first-child {
    background: #10151d;
    color: #fff;
  }
  .routine-row.clean-row > div:first-child small,
  .routine-row.clean-row > div:first-child::before {
    color: #cbd2de;
  }
  .routine-row.clean-row .center {
    text-align: left;
    justify-items: start;
  }
  .routine-row.clean-row .strong {
    font-size: 21px;
  }
  .exercise-photo,
  .equipment-photo {
    max-width: 100%;
    max-height: 160px;
    margin-top: 10px;
  }
  .exercise-visual {
    grid-template-columns: 48px 1fr;
    min-height: 72px;
    margin-top: 10px;
  }
  .exercise-visual > span img {
    width: 48px;
    height: 72px;
  }
  .exercise-info-btn {
    width: 100%;
    min-height: 44px;
  }
}

@media print {
  @page { size: A4; margin: 12mm; }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body { background: #fff; color: #111318; }
  .sidebar, .topbar, .client-hero, .print-hide, .exercise-info-btn, .toast, #modal { display: none !important; }
  .app-shell { display: block; }
  .main { padding: 0; }
  body.printing-routine .main > *,
  body.printing-inbody .main > * {
    display: none !important;
  }
  body.printing-routine .main > .panel,
  body.printing-routine .routine-sheet,
  body.printing-inbody .reports-hub,
  body.printing-inbody .inbody-detail-report {
    display: block !important;
  }
  body.printing-routine .panel,
  body.printing-inbody .panel {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  body.printing-routine .routine-sheet,
  body.printing-inbody .inbody-detail-report {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }
  body.printing-routine .routine-cover {
    grid-template-columns: 120px 1fr;
    padding: 13px 16px;
    gap: 16px;
    background: #080a0f;
  }
  body.printing-routine .routine-brand {
    min-height: 98px;
  }
  body.printing-routine .routine-brand img {
    width: 48px;
    height: 48px;
  }
  body.printing-routine .routine-brand strong {
    font-size: 22px;
  }
  body.printing-routine .routine-title h3 {
    font-size: 24px;
  }
  body.printing-routine .routine-stats,
  body.printing-routine .routine-footer {
    grid-template-columns: repeat(4, 1fr);
  }
  body.printing-routine .routine-stats div,
  body.printing-routine .routine-footer div {
    padding: 10px;
    min-height: auto;
  }
  body.printing-routine .routine-groups {
    padding: 10px 0;
    gap: 10px;
    background: #fff;
  }
  body.printing-routine .routine-group {
    break-inside: avoid;
    border-radius: 0;
  }
  body.printing-routine .routine-group-title {
    padding: 8px 10px;
  }
  body.printing-routine .routine-row {
    min-width: 0;
    min-height: 48px;
    grid-template-columns: 1.35fr .62fr .28fr .45fr .35fr 1.1fr;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  body.printing-routine .routine-row > div {
    padding: 5px 6px;
    font-size: 8.8px;
  }
  body.printing-routine .routine-row.clean-row strong {
    font-size: 9.4px;
  }
  body.printing-routine .strong {
    font-size: 11px;
  }
  body.printing-routine .routine-day-head {
    padding: 9px 12px;
  }
  body.printing-routine .routine-day-head h4 {
    font-size: 18px;
  }
  body.printing-routine .routine-day-head p {
    font-size: 10px;
  }
  body.printing-routine .routine-group-title span {
    font-size: 13px;
  }
  body.printing-routine .routine-row-head > div {
    font-size: 7.8px;
    padding: 6px;
  }
  body.printing-routine .routine-footer {
    display: none;
  }
  body.printing-routine .equipment-photo,
  body.printing-routine .exercise-photo {
    display: none;
  }
  body.printing-inbody .reports-head,
  body.printing-inbody .report-tabs,
  body.printing-inbody .reports-hub + .panel,
  body.printing-inbody .inbody-report-card,
  body.printing-inbody .inbody-dashboard,
  body.printing-inbody .inbody-metrics {
    display: none !important;
  }
  body.printing-inbody .reports-hub {
    margin: 0;
  }
  body.printing-inbody .detail-report-cover,
  body.printing-inbody .detail-panel,
  body.printing-inbody .detail-conclusion,
  body.printing-inbody .detail-metric,
  body.printing-inbody .detail-client-strip div {
    break-inside: avoid;
  }
  body.printing-inbody .detail-report-cover {
    padding: 14px 16px;
    display: flex;
    align-items: center;
  }
  body.printing-inbody .detail-report-cover h3 {
    font-size: 22px;
  }
  body.printing-inbody .detail-report-cover p,
  body.printing-inbody .detail-report-date small {
    font-size: 11px;
  }
  body.printing-inbody .detail-client-strip div,
  body.printing-inbody .detail-panel,
  body.printing-inbody .detail-conclusion,
  body.printing-inbody .detail-metric {
    padding: 10px;
  }
  body.printing-inbody .detail-summary {
    grid-template-columns: repeat(4, 1fr);
  }
  body.printing-inbody .detail-metric strong {
    font-size: 20px;
    margin: 5px 0;
  }
  body.printing-inbody .detail-two-col {
    grid-template-columns: repeat(2, 1fr);
  }
  body.printing-inbody .detail-panel h4,
  body.printing-inbody .detail-conclusion h4 {
    font-size: 13px;
    margin-bottom: 6px;
  }
  body.printing-inbody .detail-panel,
  body.printing-inbody .detail-conclusion {
    font-size: 9.6px;
    line-height: 1.35;
  }
  body.printing-inbody .detail-panel li + li {
    margin-top: 3px;
  }
  body.printing-inbody .technical-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  body.printing-inbody .technical-grid div {
    padding: 7px;
  }
  body.printing-inbody .body-bar {
    gap: 5px;
    margin: 7px 0;
  }
  body.printing-inbody .range-row {
    margin: 7px 0;
    gap: 4px;
  }
  body.printing-inbody .range-track {
    height: 9px;
  }
  body.printing-inbody .range-track em {
    width: 10px;
    height: 10px;
  }
  body.printing-inbody .range-row p,
  body.printing-inbody .range-labels {
    font-size: 8.5px;
  }
  body.printing-inbody .facts-list {
    gap: 4px;
  }
}

.routine-groups {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: #f1f3f6;
}
.routine-group {
  border: 1px solid #d8dde6;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.routine-group-title {
  background: #0b0d12;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-left: 5px solid #e1262f;
}
.routine-group-title span {
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
}
.routine-group-title small {
  color: #cfd3da;
  font-weight: 800;
}
.routine-row {
  grid-template-columns: minmax(210px, 1.2fr) minmax(150px, .78fr) 76px 112px 88px minmax(230px, 1.1fr) 128px;
  min-height: 84px;
}
.routine-row.clean-row > div {
  background: #fff;
}
.routine-row.clean-row:nth-child(odd) > div {
  background: #fafbfe;
}
.routine-row.clean-row strong {
  font-size: 15px;
}
.routine-row.clean-row small {
  display: block;
  margin-top: 6px;
}
.exercise-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8dde6;
  border-radius: 8px;
  padding: 8px 10px;
  background: #111318;
  color: #111318;
  font-size: 12px;
  font-weight: 850;
  color: #fff;
  cursor: pointer;
}
.exercise-info-btn:hover {
  border-color: #d5a642;
  background: #d5a642;
  color: #111318;
}
.muted-mini {
  color: #7b8494;
  font-size: 11px;
  font-weight: 800;
}
.exercise-info-modal {
  width: min(980px, calc(100vw - 36px));
}
.exercise-info-modal img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  background: #f5f7fb;
  border: 1px solid #dde3ed;
  border-radius: 8px;
}
.gallery-modal {
  width: min(1040px, calc(100vw - 36px));
}
.gallery-modal img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 8px;
  background: #050609;
}
.routine-row-head {
  min-height: auto;
  background: #171a21;
}
.routine-row-head > div {
  background: #171a21;
}

@media (max-width: 980px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .sidebar {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding: 16px;
  }
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav button {
    text-align: center;
  }
  .sidebar-foot {
    margin-top: 8px;
    padding-top: 12px;
  }
  .main {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 14px !important;
    overflow-x: hidden;
  }
  .topbar {
    gap: 8px;
    margin-bottom: 12px;
  }
  .topbar h2 {
    font-size: 23px;
  }
  .panel {
    padding: 12px;
    overflow: hidden;
  }
  .routine-sheet {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
  }
  .routine-cover {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  .routine-brand {
    min-height: auto !important;
    border-right: 0 !important;
    border-bottom: 2px solid #e1262f;
    padding-bottom: 12px;
  }
  .routine-brand img {
    width: 54px;
    height: 54px;
  }
  .routine-brand strong {
    font-size: 24px;
  }
  .routine-title h3 {
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }
  .download-actions {
    justify-content: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .download-actions .btn {
    width: 100%;
    min-height: 44px;
  }
  .routine-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .routine-stats div {
    padding: 13px !important;
    min-height: 84px;
  }
  .routine-day-head {
    display: grid !important;
    gap: 8px;
    padding: 14px !important;
  }
  .routine-day-head h4 {
    font-size: 22px;
  }
  .routine-groups {
    gap: 12px;
    padding: 10px;
  }
  .routine-group-title {
    align-items: flex-start;
    padding: 12px;
  }
  .routine-group-title span {
    font-size: 17px;
  }
  .routine-table {
    display: grid !important;
    gap: 10px;
    padding: 10px;
    overflow: visible !important;
    background: #eef2f7;
  }
  .routine-row-head {
    display: none !important;
  }
  .routine-row,
  .routine-row.clean-row {
    min-width: 0 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 19, 24, .08);
  }
  .routine-row > div,
  .routine-row.clean-row > div {
    padding: 11px 13px !important;
    border-right: 0 !important;
    border-bottom: 1px solid #edf1f6 !important;
    background: #fff !important;
  }
  .routine-row > div:last-child {
    border-bottom: 0 !important;
  }
  .routine-row.clean-row > div:first-child {
    background: #10151d !important;
    color: #fff;
  }
  .routine-row.clean-row > div::before {
    display: block;
    margin-bottom: 5px;
    color: #727b8d;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .routine-row.clean-row > div:first-child::before {
    color: #cbd2de;
  }
  .routine-row.clean-row > div:nth-child(1)::before { content: "Ejercicio"; }
  .routine-row.clean-row > div:nth-child(2)::before { content: "Equipo"; }
  .routine-row.clean-row > div:nth-child(3)::before { content: "Series"; }
  .routine-row.clean-row > div:nth-child(4)::before { content: "Repeticiones"; }
  .routine-row.clean-row > div:nth-child(5)::before { content: "Descanso"; }
  .routine-row.clean-row > div:nth-child(6)::before { content: "Indicaciones"; }
  .routine-row.clean-row > div:nth-child(7)::before { content: "Ejecución"; }
  .routine-row.clean-row strong {
    font-size: 17px !important;
  }
  .routine-row.clean-row .strong {
    font-size: 22px !important;
  }
  .routine-row.clean-row .center {
    text-align: left;
    justify-items: start;
  }
  .exercise-info-btn {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }
}

@media (max-width: 620px) {
  .nav {
    grid-template-columns: 1fr;
  }
  .section-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .section-tabs button {
    padding: 10px 8px;
    font-size: 13px;
  }
  .client-hero h2 {
    font-size: 26px;
  }
  .client-metrics {
    gap: 10px;
  }
  .routine-stats {
    grid-template-columns: 1fr !important;
  }
  .routine-title h3 {
    font-size: 25px;
  }
  .routine-title p,
  .routine-day-head p {
    font-size: 14px;
  }
  .routine-groups {
    padding: 8px;
  }
  .routine-table {
    padding: 8px;
  }
}
.exercise-visual {
  display: none;
}
