:root {
  color-scheme: dark;
  --bg: #0d0e10;
  --surface: #15171a;
  --surface-2: #1b1d21;
  --surface-3: #22252a;
  --text: #f6f2e8;
  --muted: #9b9b96;
  --line: rgba(255, 255, 255, 0.09);
  --gold: #e1b75e;
  --gold-strong: #f2ca74;
  --gold-soft: rgba(225, 183, 94, 0.14);
  --green: #71c79d;
  --red: #ef7b72;
  --radius: 22px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; background: radial-gradient(circle at 88% -8%, rgba(225, 183, 94, .14), transparent 34%), var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.app-loading { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; }
.boot-mark { color: var(--gold); font: 900 58px/1 Arial Black, sans-serif; letter-spacing: -6px; text-shadow: 0 0 30px rgba(225, 183, 94, .25); }
.boot-line { width: 132px; height: 2px; overflow: hidden; background: #363229; }
.boot-line span { display: block; width: 50%; height: 100%; background: var(--gold); animation: boot 1s ease-in-out infinite alternate; }
.app-loading p { margin: 0; color: var(--muted); font-size: 12px; }
@keyframes boot { from { transform: translateX(-80%); } to { transform: translateX(180%); } }

.shell { width: min(100%, 840px); min-height: 100dvh; margin: 0 auto; padding-bottom: 98px; }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid var(--line); background: rgba(13, 14, 16, .88); backdrop-filter: blur(20px); }
.brand-lockup, .top-actions, .row { display: flex; align-items: center; }
.brand-lockup { gap: 10px; }
.top-actions { gap: 8px; }
.web-logout { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 750; cursor: pointer; }
.marketing-os-link { border-color: rgba(225, 183, 94, .35); background: var(--gold-soft); color: var(--gold-strong); }
.brand-symbol { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(225, 183, 94, .3); border-radius: 14px; background: linear-gradient(145deg, #23231f, #111); color: var(--gold); font: 900 13px/1 Arial Black, sans-serif; letter-spacing: -1.5px; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.brand-copy strong, .brand-copy span { display: block; }
.brand-copy strong { font-size: 14px; }
.brand-copy span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold-strong); font-size: 12px; font-weight: 850; }
.content { padding: 14px 13px 34px; }

.web-login-shell { min-height: 100dvh; display: grid; align-content: center; gap: 24px; width: min(100%, 980px); margin: 0 auto; padding: 34px 18px; }
.web-login-brand { max-width: 560px; }
.web-login-mark { color: var(--gold); font: 900 clamp(56px, 14vw, 96px)/.88 Arial Black, sans-serif; letter-spacing: -8px; text-shadow: 0 0 36px rgba(225, 183, 94, .2); }
.web-login-brand > span { display: block; margin-top: 18px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.web-login-brand h1 { max-width: 620px; margin: 13px 0 12px; font-size: clamp(34px, 8vw, 62px); line-height: .98; letter-spacing: -2.4px; }
.web-login-brand p { max-width: 550px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.web-login-card { padding: 22px; border: 1px solid rgba(225, 183, 94, .2); border-radius: 27px; background: linear-gradient(145deg, rgba(29, 31, 35, .98), rgba(18, 20, 23, .98)); box-shadow: var(--shadow); }
.web-login-card .field { margin-top: 0; }
.web-login-card .button { margin-top: 15px; }
.username-input { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.username-input:focus-within { border-color: rgba(225, 183, 94, .65); box-shadow: 0 0 0 3px rgba(225, 183, 94, .1); }
.username-input b { padding-left: 14px; color: var(--gold); }
.username-input input { border: 0 !important; box-shadow: none !important; background: transparent !important; }
.web-login-card input[name="code"] { height: 62px; text-align: center; color: var(--gold-strong); font-size: 30px; font-weight: 850; letter-spacing: 9px; }
.web-login-message { margin: 15px 0 0; padding: 12px; border-radius: 14px; background: rgba(113, 199, 157, .08); color: var(--green); font-size: 11px; line-height: 1.5; }
.web-login-bot { display: block; margin-top: 17px; color: var(--gold); text-align: center; font-size: 11px; font-weight: 750; text-decoration: none; }
.web-login-shell footer { color: #6f706d; font-size: 9px; line-height: 1.5; }

.hero { position: relative; overflow: hidden; display: grid; gap: 22px; min-height: 250px; padding: 25px 21px; border: 1px solid rgba(225, 183, 94, .17); border-radius: 30px; background: linear-gradient(135deg, #20211f 0%, #111315 68%); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; inset: 0 0 0 43%; background: linear-gradient(90deg, #151719 0%, rgba(21, 23, 25, .25) 48%, transparent), url("/zfit-brand.png") center/cover no-repeat; opacity: .46; mix-blend-mode: screen; }
.hero > * { position: relative; z-index: 1; }
.hero-kicker, .eyebrow { display: block; color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.hero h1 { max-width: 78%; margin: 12px 0 10px; font-size: clamp(30px, 9vw, 44px); line-height: .98; letter-spacing: -1.8px; }
.hero p { max-width: 72%; margin: 0; color: #b8b6ae; font-size: 12px; line-height: 1.5; }
.hero-stats { align-self: end; display: grid; grid-template-columns: repeat(2, 1fr); max-width: 330px; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: rgba(0, 0, 0, .25); backdrop-filter: blur(12px); }
.hero-stats div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.hero-stats span, .hero-stats strong { display: block; }
.hero-stats span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.hero-stats strong { margin-top: 4px; font-size: 22px; }
.hero-stats small { color: var(--muted); font-size: 9px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 27px 2px 11px; }
.section-head > div > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; letter-spacing: .7px; text-transform: uppercase; }
.section-head h2 { margin: 0; font-size: 19px; letter-spacing: -.45px; }
.text-button, .back-link { border: 0; background: none; color: var(--gold); cursor: pointer; font-size: 11px; font-weight: 750; }
.back-link { margin: 2px 0 14px; padding: 6px 0; }
.lead { margin: -3px 2px 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(29, 31, 35, .96), rgba(21, 23, 26, .96)); box-shadow: 0 9px 28px rgba(0, 0, 0, .13); }
.stack { display: grid; gap: 10px; }
.grow { min-width: 0; flex: 1; }
.between { justify-content: space-between; }
.row { gap: 10px; }
.card h3, .review-card h3 { margin: 5px 0 0; font-size: 16px; }
.subtle { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.pill { display: inline-flex; align-items: center; white-space: nowrap; padding: 6px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 9px; font-weight: 750; }
.pill.gold, .pill.warning { background: var(--gold-soft); color: var(--gold-strong); }
.pill.success { background: rgba(113, 199, 157, .12); color: var(--green); }
.empty { padding: 31px 18px; text-align: center; }
.empty strong, .empty span { display: block; }
.empty span, .empty-inline { margin-top: 5px; color: var(--muted); font-size: 11px; }

.checklist { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.task-row, .contact-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 15px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.task-row:first-child { border-top: 0; }
.task-row > svg, .client-card > svg, .contact-card > svg { width: 18px; color: var(--muted); }
.task-row strong, .task-row small, .contact-card strong, .contact-card small { display: block; }
.task-row small, .contact-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.task-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: var(--gold-soft); color: var(--gold); }
.task-icon svg { width: 20px; }
.task-row.done .task-icon { background: rgba(113, 199, 157, .1); color: var(--green); }
.contact-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }

.macro-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 7px; }
.macro { min-width: 0; padding: 13px 9px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.macro.featured { border-color: rgba(225, 183, 94, .25); background: linear-gradient(145deg, #6f4a10, #37270f); }
.macro span, .macro strong { display: block; }
.macro span { overflow: hidden; color: var(--muted); font-size: 8px; letter-spacing: .4px; text-transform: uppercase; }
.macro.featured span { color: #e9d39f; }
.macro strong { margin-top: 8px; font-size: 16px; letter-spacing: -.5px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span, .metric-card small { color: var(--muted); font-size: 9px; }
.metric-card strong { margin: 9px 0 5px; font-size: 21px; }

.appointment-card { display: flex; align-items: center; gap: 12px; }
.appointment-card > svg { width: 18px; color: var(--muted); }
.appointment-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.meeting-button { display: inline-flex; margin-top: 7px; }
.date-badge { width: 54px; flex: 0 0 auto; padding: 9px 5px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-strong); text-align: center; }
.date-badge strong, .date-badge span { display: block; }
.date-badge strong { font-size: 15px; }
.date-badge span { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.inline-actions + .appointment-card { margin-top: 10px; }

.workout-card { padding-bottom: 13px; }
.exercise-list { margin: 15px -4px 5px; }
.exercise { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-top: 1px solid var(--line); }
.exercise-index { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--surface-3); color: var(--gold); font-size: 10px; font-weight: 800; }
.exercise strong, .exercise small { display: block; }
.exercise strong { font-size: 12px; }
.exercise small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.report-saved { margin-top: 12px; padding: 12px; border-radius: 15px; background: rgba(113, 199, 157, .08); color: var(--green); }
.report-saved strong, .report-saved span { display: block; }
.report-saved span { margin-top: 4px; font-size: 10px; line-height: 1.45; }
.workout-report-card p { margin: 13px 0 0; color: #d5d1c8; font-size: 10px; line-height: 1.55; white-space: pre-line; }
.workout-report-card > small { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; }
.meal-list { margin-top: 9px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.meal-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 13px; border-top: 1px solid var(--line); }
.meal-row:first-child { border-top: 0; }
.nutrition-day > .row > div strong { display: block; margin-top: 5px; font-size: 14px; }
.nutrition-day > .row > small { color: var(--muted); font-size: 9px; }
.nutrition-day .meal-list { margin-top: 12px; background: var(--surface-2); }
.meal-row strong, .meal-row span { display: block; }
.meal-row strong { font-size: 11px; }
.meal-row span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.meal-row b { white-space: nowrap; color: var(--gold); font-size: 10px; }

.calendar-strip { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.calendar-strip::-webkit-scrollbar { display: none; }
.calendar-day { flex: 0 0 52px; display: grid; place-items: center; gap: 4px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--muted); scroll-snap-align: center; }
.calendar-day span { font-size: 8px; text-transform: uppercase; }
.calendar-day strong { color: var(--text); font-size: 16px; }
.calendar-day.today { border-color: rgba(225, 183, 94, .45); }
.calendar-day.active { border-color: var(--gold); background: var(--gold); color: #3c2a0c; }
.calendar-day.active strong { color: #211909; }

.level-card { display: grid; grid-template-columns: 70px 1fr; gap: 18px; align-items: center; }
.level-code { color: var(--gold); font-size: 46px; font-weight: 900; text-align: center; }
.score-list { display: grid; gap: 8px; }
.score-list > div { display: grid; grid-template-columns: 80px 1fr 20px; align-items: center; gap: 7px; }
.score-list span, .score-list b { font-size: 9px; }
.score-list span { color: var(--muted); }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9f6d18, var(--gold)); }
.package-card { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--line); }
.package-card > div { min-height: 104px; padding: 15px; background: var(--surface); }
.package-card > div:last-child { grid-column: 1 / -1; min-height: auto; }
.package-card span, .package-card strong, .package-card small { display: block; }
.package-card span, .package-card small { color: var(--muted); font-size: 9px; }
.package-card strong { margin: 8px 0 3px; font-size: 26px; }
.package-card .date-value { font-size: 18px; }
.compact-stack { margin-top: 9px; }
.slot-card, .payment-card, .media-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slot-card > div, .payment-card > div, .media-card > div { min-width: 0; }
.slot-card strong, .slot-card small, .payment-card strong, .payment-card small, .media-card strong { display: block; }
.slot-card strong, .payment-card strong { margin-top: 5px; font-size: 13px; }
.slot-card small, .payment-card small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.slot-card .button, .media-card .button { flex: 0 0 auto; }
.request-card p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.request-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.summary-grid button { min-width: 0; padding: 14px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: left; }
.summary-grid span, .summary-grid strong { display: block; }
.summary-grid span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; }
.summary-grid strong { margin-top: 7px; font-size: 22px; }
.client-card { width: 100%; display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer; }
.client-card > svg { width: 17px; color: var(--muted); }
.client-avatar, .profile-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; background: var(--gold-soft); color: var(--gold); font-weight: 850; }
.client-avatar { width: 42px; height: 42px; font-size: 11px; }
.client-card strong, .client-card small { display: block; }
.client-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.status-dot.alert { background: var(--red); box-shadow: 0 0 0 5px rgba(239, 123, 114, .1); }
.search { position: relative; display: block; margin-bottom: 12px; }
.search span { position: absolute; z-index: 1; left: 15px; top: 50%; display: grid; color: var(--muted); transform: translateY(-50%); }
.search svg { width: 18px; }
.search input { width: 100%; height: 49px; padding: 0 14px 0 43px; border: 1px solid var(--line); border-radius: 17px; outline: 0; background: var(--surface); color: var(--text); }
.search input:focus { border-color: rgba(225, 183, 94, .6); box-shadow: 0 0 0 3px rgba(225, 183, 94, .08); }

.review-card blockquote { margin: 14px 0; padding: 12px; border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; background: var(--gold-soft); color: #d8d3c7; font-size: 11px; line-height: 1.5; }
.timeline { display: grid; gap: 14px; }
.timeline-item { display: grid; grid-template-columns: 43px 1fr; gap: 9px; align-items: start; }
.timeline-item > time { padding-top: 12px; color: var(--muted); font-size: 8px; text-transform: uppercase; text-align: center; }
.timeline-item > time strong { display: block; margin-top: 4px; color: var(--text); font-size: 13px; }
.profile-hero { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid rgba(225, 183, 94, .18); border-radius: 25px; background: linear-gradient(145deg, #24231f, #141619); }
.profile-avatar { width: 58px; height: 58px; font-size: 15px; }
.profile-hero span, .profile-hero h1, .profile-hero p { margin: 0; }
.profile-hero > .grow > span { color: var(--gold); font-size: 9px; text-transform: uppercase; }
.profile-hero h1 { margin-top: 5px; font-size: 22px; }
.profile-hero p { margin-top: 4px; color: var(--muted); font-size: 10px; }
.dossier { padding-block: 2px; }
.readiness-card { margin-top: 10px; }
.readiness-list { display: grid; gap: 7px; margin-top: 13px; }
.readiness-item { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; color: var(--muted); }
.readiness-item > span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); font-weight: 900; }
.readiness-item strong, .readiness-item small { display: block; }
.readiness-item strong { font-size: 10px; }
.readiness-item small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.readiness-item.done > span { border-color: rgba(99, 201, 142, .35); background: rgba(99, 201, 142, .12); color: var(--green); }
.disclosure { padding: 0; overflow: hidden; }
.disclosure + .disclosure { margin-top: 8px; }
.disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; cursor: pointer; list-style: none; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary strong, .disclosure summary small { display: block; }
.disclosure summary small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.disclosure summary > svg { width: 18px; transition: transform .2s ease; }
.disclosure[open] summary > svg { transform: rotate(90deg); }
.disclosure .dossier { padding: 0 16px 8px; border-top: 1px solid var(--line); }
.fact-item { padding: 14px 0; border-top: 1px solid var(--line); }
.fact-item:first-child { border-top: 0; }
.fact-item > span { color: var(--gold); font-size: 8px; text-transform: uppercase; }
.fact-item strong { display: block; margin-top: 4px; font-size: 11px; }
.fact-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: pre-line; }
.fact-item p.unclear { color: #d8b76e; font-style: italic; }
.history-list { padding-block: 2px; }
.history-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.history-row:first-child { border-top: 0; }
.history-row strong, .history-row span { display: block; }
.history-row strong { font-size: 11px; }
.history-row span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.history-row time { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.media-card strong { margin-top: 5px; overflow: hidden; color: #d5d1c8; font-size: 10px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.message-list { display: grid; gap: 7px; }
.message { max-width: 88%; padding: 10px 12px; border-radius: 15px 15px 15px 5px; background: var(--surface-3); font-size: 11px; line-height: 1.45; }
.message.outbound { margin-left: auto; border-radius: 15px 15px 5px 15px; background: var(--gold-soft); }
.message time { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }

.button { min-height: 43px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 11px; font-weight: 760; }
.button.primary { border-color: var(--gold); background: var(--gold); color: #281d08; }
.button.secondary { border-color: rgba(225, 183, 94, .28); background: var(--gold-soft); color: var(--gold-strong); }
.button.ghost { background: transparent; }
.button.full { width: 100%; margin-top: 10px; }
.button:disabled { opacity: .45; cursor: wait; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-button svg { width: 18px; }
.composer { margin: 10px 0; border-color: rgba(225, 183, 94, .32); }
.field { display: grid; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 10px; font-weight: 700; }
.field input, .field textarea, .field select, .macro-inputs input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: #101114; color: var(--text); line-height: 1.4; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .macro-inputs input:focus { border-color: rgba(225, 183, 94, .65); box-shadow: 0 0 0 3px rgba(225, 183, 94, .08); }
.form-help { margin: 9px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.macro-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.macro-inputs label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; }
.macro-inputs input { padding-inline: 7px; }

.bottom-nav { position: fixed; z-index: 40; left: 50%; bottom: 0; width: min(100%, 840px); transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 7px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(14, 15, 17, .94); backdrop-filter: blur(20px); }
.nav-btn { display: grid; justify-items: center; gap: 3px; padding: 0; border: 0; background: none; color: #777975; font-size: 8px; font-weight: 700; cursor: pointer; }
.nav-icon { width: 37px; height: 31px; display: grid; place-items: center; border-radius: 12px; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-btn.active { color: var(--gold); }
.nav-btn.active .nav-icon { background: var(--gold-soft); }
.nav-add .nav-icon { width: 43px; height: 43px; margin-top: -13px; border: 4px solid var(--bg); border-radius: 50%; background: var(--gold); color: #231a0a; box-shadow: 0 7px 18px rgba(0, 0, 0, .35); }
.nav-add .nav-icon svg { width: 22px; }

.sheet-backdrop { position: fixed; z-index: 70; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.bottom-sheet { position: fixed; z-index: 80; left: 50%; bottom: 0; width: min(100%, 620px); max-height: 88dvh; overflow-y: auto; transform: translateX(-50%); padding: 19px 16px calc(20px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; background: #17191c; box-shadow: 0 -20px 60px rgba(0, 0, 0, .42); animation: sheet .2s ease-out; }
.media-preview { width: 100%; max-height: 68dvh; display: block; margin-top: 16px; border-radius: 18px; object-fit: contain; background: #0a0b0d; }
.media-player { width: 100%; margin-top: 18px; }
@keyframes sheet { from { transform: translate(-50%, 30px); opacity: .5; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head span { color: var(--gold); font-size: 9px; letter-spacing: .8px; text-transform: uppercase; }
.sheet-head h2 { margin: 5px 0 0; font-size: 21px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.quick-grid.trainer-add-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-grid button { min-width: 0; min-height: 135px; display: grid; align-content: start; justify-items: start; gap: 7px; padding: 14px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface-2); text-align: left; }
.quick-grid button > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; background: var(--gold-soft); color: var(--gold); }
.quick-grid svg { width: 18px; }
.quick-grid strong { margin-top: 5px; font-size: 11px; }
.quick-grid small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(85px + env(safe-area-inset-bottom)); max-width: calc(100% - 30px); padding: 11px 15px; border: 1px solid var(--line); border-radius: 14px; background: #292c31; color: white; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: .2s ease; font-size: 11px; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.error-box { max-width: 420px; margin: 80px auto; padding: 24px; text-align: center; }
.error-box .brand-symbol { margin: 0 auto 20px; }
.error-box h1 { margin: 0; font-size: 22px; }
.error-box p { color: var(--muted); font-size: 12px; }

@media (min-width: 620px) {
  .content { padding-inline: 22px; }
  .hero { min-height: 270px; padding: 32px; }
  .hero h1 { max-width: 58%; }
  .hero p { max-width: 50%; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  .web-login-shell { grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); align-items: center; gap: 70px; padding-inline: 42px; }
  .web-login-shell footer { grid-column: 1 / -1; }
  .web-login-card { padding: 28px; }
}

@media (max-width: 370px) {
  .hero h1 { max-width: 88%; font-size: 29px; }
  .hero p { max-width: 78%; }
  .macro strong { font-size: 14px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-grid.trainer-add-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid button { min-height: auto; grid-template-columns: 38px 1fr; align-items: center; }
  .quick-grid button small { grid-column: 2; }
  .quick-grid.trainer-add-grid button { min-height: 132px; display: grid; grid-template-columns: 1fr; align-content: start; }
  .quick-grid.trainer-add-grid button small { grid-column: 1; }
}

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