/* Layout: top bar with a side switch; member side = a phone on a tinted stage, studio side = right-hand sidebar + work area. */
/* RAISING THE BAR: black, white and a hard blue, square corners and offset black shadows. */
:root {
  --bg: #f1f3f7; --surface: #ffffff; --surface-2: #eef1f6; --line: #d5dae3; --line-strong: #0b0b0d;
  --ink: #0b0b0d; --muted: #4b5563; --primary: #1d4ed8; --primary-ink: #1d4ed8; --on-primary: #ffffff; --primary-soft: #dbe6fd;
  --navy: #14365f; --black: #0b0b0d; --sky: #8fb4ff;
  --pink: #8fb4ff; --gold: #1d4ed8;
  --coral: #1d4ed8; --coral-soft: #dbe6fd;
  --ok: #166534; --ok-soft: #dcfce7; --warn: #8a4b00; --warn-soft: #fdf0d5; --bad: #b42318; --bad-soft: #fde4e1;
  --c1: #1d4ed8; --c2: #0b0b0d; --c3: #14365f; --c4: #5b8def; --c5: #6b7280; --c6: #2a7ab0;
  --frame: #0b0b0d; --hard: #0b0b0d; --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 10px 30px rgb(0 0 0 / .12);
  --display: 'Karantina', 'Heebo', 'Arial Hebrew', sans-serif;
  --font: 'Heebo', 'Assistant', 'Arial Hebrew', system-ui, sans-serif;
  --r-sm: 0px; --r-md: 0px; --r-lg: 0px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0b0b0d; --surface: #16181d; --surface-2: #1f2229; --line: #2e323b; --line-strong: #8a93a3;
  --ink: #f3f4f6; --muted: #a1a7b3; --primary: #3b6cf0; --primary-ink: #8fb4ff; --on-primary: #ffffff; --primary-soft: #1a2a4f;
  --navy: #14365f; --black: #000000; --sky: #8fb4ff;
  --pink: #8fb4ff; --gold: #8fb4ff;
  --coral: #6c9bff; --coral-soft: #1a2a4f;
  --ok: #6ee7a0; --ok-soft: #12321f; --warn: #f5c060; --warn-soft: #3a2e12; --bad: #ff8f84; --bad-soft: #3d1c19;
  --c1: #3b6cf0; --c2: #e5e7eb; --c3: #8fb4ff; --c4: #5b8def; --c5: #9ca3af; --c6: #5fb3e6;
  --frame: #000; --hard: #3b6cf0; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0b0b0d; --surface: #16181d; --surface-2: #1f2229; --line: #2e323b; --line-strong: #8a93a3;
  --ink: #f3f4f6; --muted: #a1a7b3; --primary: #3b6cf0; --primary-ink: #8fb4ff; --on-primary: #ffffff; --primary-soft: #1a2a4f;
  --navy: #14365f; --black: #000000; --sky: #8fb4ff;
  --pink: #8fb4ff; --gold: #8fb4ff;
  --coral: #6c9bff; --coral-soft: #1a2a4f;
  --ok: #6ee7a0; --ok-soft: #12321f; --warn: #f5c060; --warn-soft: #3a2e12; --bad: #ff8f84; --bad-soft: #3d1c19;
  --c1: #3b6cf0; --c2: #e5e7eb; --c3: #8fb4ff; --c4: #5b8def; --c5: #9ca3af; --c6: #5fb3e6;
  --frame: #000; --hard: #3b6cf0; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); direction: rtl; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 700; font-family: var(--display); text-wrap: balance; line-height: 1.2; }
.num, td, .kpi b { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 22px; color: var(--primary-ink); }
.brand .logo-img { width: 38px; height: 38px; }
.logo-img { display: block; border-radius: 50%; flex: none; }
.brand span { font-weight: 700; }
@media (max-width: 560px) { .brand small { display: none; } }
.brand small { font-family: var(--font); font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.top .who { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: var(--r-sm); padding: 9px 16px; font-weight: 500; font-size: 14px; background: var(--primary); color: var(--on-primary); min-height: 40px; }
.btn:hover { filter: brightness(1.08); }
a.btn { text-decoration: none; }
.btn.ghost { background: transparent; color: var(--primary-ink); border-color: var(--line); }
.btn.soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; min-height: 48px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.icon-btn { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--ink); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg, .btn svg { width: 20px; height: 20px; }
.dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); border: 2px solid var(--surface); }
label.f { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.in, select.in, textarea.in { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); padding: 9px 11px; font-size: 15px; color: var(--ink); min-height: 42px; }
textarea.in { min-height: 70px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.pri { background: var(--primary-soft); color: var(--primary-ink); }
.pill.coral { background: var(--coral-soft); color: var(--coral); }
.hue { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.h1 { background: var(--c1); } .h2 { background: var(--c2); } .h3 { background: var(--c3); } .h4 { background: var(--c4); } .h5 { background: var(--c5); } .h6 { background: var(--c6); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.bar.full > i { background: var(--coral); }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 44px; height: 44px; opacity: .6; }

/* ===== member side ===== */
.stage { min-height: calc(100% - 62px); display: grid; place-items: center; padding: 24px 16px; gap: 16px; }
.stage-wrap { display: flex; gap: 32px; align-items: center; justify-content: center; flex-wrap: wrap; }
.stage-note { max-width: 300px; display: grid; gap: 10px; }
.stage-note h2 { font-size: 26px; color: var(--primary-ink); }
.stage-note p { margin: 0; color: var(--muted); }
.stage-note ol { margin: 0; padding-inline-start: 18px; color: var(--muted); display: grid; gap: 4px; font-size: 14px; }
.phone { width: 390px; max-width: 100%; height: min(800px, calc(100dvh - 110px)); min-height: 560px; background: var(--bg); border: 10px solid var(--frame); border-radius: 44px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.ph-head { padding: 16px 18px 10px; display: flex; align-items: center; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ph-head .studio { font-family: var(--display); font-size: 18px; line-height: 1.1; }
.ph-body { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; grid-auto-rows: max-content; }
.ph-nav { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px 10px; }
.ph-nav button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
.ph-nav button svg { width: 22px; height: 22px; }
.ph-nav button[aria-current="page"] { color: var(--primary-ink); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.hello h1 { font-size: 24px; }
.next-class { background: var(--primary); color: var(--on-primary); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 6px; border: 0; text-align: start; width: 100%; }
.next-class .eyebrow { font-size: 12px; opacity: .85; letter-spacing: .02em; }
.next-class h2 { font-size: 22px; }
.ticket { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.punches { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.punches i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--primary); }
.punches i.on { background: var(--primary); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); padding: 12px 6px; display: grid; justify-items: center; gap: 4px; font-size: 13px; }
.quick svg { width: 22px; height: 22px; color: var(--primary-ink); }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.days button { flex: none; width: 46px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 6px 0; display: grid; justify-items: center; font-size: 12px; color: var(--muted); }
.days button b { font-size: 17px; color: var(--ink); font-weight: 600; }
.days button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.days button[aria-pressed="true"] b { color: var(--bg); }
.days button.today:not([aria-pressed="true"]) { border-color: var(--primary); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.chips button[aria-pressed="true"] { border-color: var(--primary); color: var(--primary-ink); background: var(--primary-soft); }
.cls { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; text-align: start; width: 100%; }
.cls .t { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.cls .t small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.cls .name { font-weight: 500; display: flex; align-items: center; gap: 6px; }
.cls.past { opacity: .55; }
.cls.mine { border-color: var(--primary); box-shadow: inset -4px 0 0 var(--primary); }
.sheet-back { position: absolute; inset: 0; background: rgb(0 0 0 / .35); z-index: 5; animation: fade .15s; }
.sheet { position: absolute; inset-inline: 0; bottom: 0; z-index: 6; background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px 18px 20px; max-height: 88%; overflow-y: auto; display: grid; gap: 12px; animation: up .2s ease-out; }
.sheet .grab { width: 40px; height: 4px; background: var(--line); border-radius: 4px; justify-self: center; }
.sheet h2 { font-size: 24px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.notice { border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; background: var(--surface-2); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--primary-ink); border-color: var(--primary); font-weight: 600; }
.plan-card { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; text-align: start; width: 100%; }
.plan-card .price { font-family: var(--display); font-size: 26px; color: var(--primary-ink); }
.plan-card[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.list { display: grid; }
.list > * { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; flex: none; background: var(--primary-soft); color: var(--primary-ink); font-size: 15px; }
.sig { width: 100%; height: 120px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); touch-action: none; display: block; }
.login { display: grid; gap: 14px; align-content: center; min-height: 100%; padding: 8px; }
.login .logo .logo-img { width: 120px; height: 120px; margin-inline: auto; }
.login .logo { display: flex; justify-content: center; }
.login h1 { text-align: center; }
.login .tagline { margin: -8px 0 0; text-align: center; color: var(--coral); font-family: var(--display); font-size: 17px; }

/* ===== studio side ===== */
.admin { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100% - 62px); }
.side { background: var(--surface); border-inline-end: 1px solid var(--line); padding: 16px 10px; display: grid; gap: 2px; align-content: start; }
.side .sname { padding: 4px 10px 12px; font-size: 13px; color: var(--muted); }
.side button { border: 0; background: none; display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r-sm); color: var(--muted); font-size: 15px; text-align: start; }
.side button svg { width: 19px; height: 19px; }
.side button:hover { background: var(--surface-2); color: var(--ink); }
.side button[aria-current="page"] { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.side .badge { margin-inline-start: auto; font-size: 11px; background: var(--coral); color: var(--on-primary); border-radius: 99px; padding: 0 7px; }
.main { padding: 24px 28px 48px; display: grid; gap: 20px; align-content: start; min-width: 0; }
.main > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.main > header h1 { font-size: 30px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: grid; gap: 12px; min-width: 0; align-content: start; }
.panel h3 { font-family: var(--font); font-weight: 600; font-size: 15px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 2px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.15; }
.kpi em { font-style: normal; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: start; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
.today-row { display: grid; grid-template-columns: 56px 1fr 120px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.today-row:last-child { border-bottom: 0; }
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; }
.week .col { display: grid; gap: 6px; align-content: start; min-width: 0; }
.week .col > header { padding: 6px 8px; border-radius: var(--r-sm); font-size: 13px; color: var(--muted); }
.week .col > header b { display: block; color: var(--ink); font-size: 15px; }
.week .col.is-today > header { background: var(--primary-soft); color: var(--primary-ink); }
.slot { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 8px; text-align: start; display: grid; gap: 3px; font-size: 13px; border-inline-start: 4px solid var(--c1); }
.slot.k1 { border-inline-start-color: var(--c1); } .slot.k2 { border-inline-start-color: var(--c2); } .slot.k3 { border-inline-start-color: var(--c3); } .slot.k4 { border-inline-start-color: var(--c4); } .slot.k5 { border-inline-start-color: var(--c5); } .slot.k6 { border-inline-start-color: var(--c6); }
.slot b { font-size: 13px; }
.slot.cancelled { opacity: .5; text-decoration: line-through; }
.slot.past { opacity: .7; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; }
.kanban .lane { background: var(--surface-2); border-radius: var(--r-md); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 160px; }
.kanban .lane > header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; padding: 2px 4px; }
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; display: grid; gap: 6px; font-size: 13px; }
.lead b { font-size: 14px; }
.toggle { position: relative; width: 44px; height: 26px; flex: none; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background .15s; }
.toggle i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + i { background: var(--primary); }
.toggle input:checked + i::after { transform: translateX(-18px); }
.toggle input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }
.rule { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .val { fill: var(--ink); font-weight: 600; }
.chart .grid { stroke: var(--line); }
.chart .b { fill: var(--primary); } .chart .b.now { fill: var(--coral); }

/* overlays */
.overlay { position: fixed; inset: 0; background: rgb(8 20 18 / .45); z-index: 50; animation: fade .15s; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(560px, 100%); background: var(--surface); z-index: 51; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer > header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer > header h2 { font-size: 24px; }
.drawer .body { padding: 18px 20px 28px; overflow-y: auto; display: grid; gap: 16px; align-content: start; }
.modal { position: fixed; z-index: 52; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); background: var(--surface); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.modal h2 { font-size: 22px; }
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); animation: up .2s; max-width: calc(100% - 32px); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(var(--tx, 0), 16px); opacity: 0; } }
.toast { --tx: -50%; }
@keyframes slide { from { transform: translateX(-30px); opacity: 0; } }
.receipt { border: 1px dashed var(--line-strong); border-radius: var(--r-sm); padding: 16px; display: grid; gap: 8px; font-size: 14px; }
.receipt .spread { border-bottom: 1px dotted var(--line); padding-bottom: 6px; }

@media (max-width: 980px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .admin { grid-template-columns: 1fr; }
  .side { display: flex; overflow-x: auto; padding: 8px 12px; gap: 4px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .side .sname { display: none; }
  .side button { flex: none; padding: 7px 10px; font-size: 14px; }
  .main { padding: 18px 16px 40px; }
}
@media (max-width: 520px) {
  .stage { padding: 0; display: block; }
  .stage-note { display: none; }
  .phone { width: 100%; border: 0; border-radius: 0; height: calc(100dvh - 104px); min-height: 0; box-shadow: none; }
  .top { padding: 8px 12px; gap: 8px; }
  .top .who { margin-inline-start: 0; width: 100%; }
  .brand small { display: none; }
  .main > header h1 { font-size: 24px; }
}
body.busy, body.busy * { cursor: progress !important; }

/* live mode: a thin line under the top bar while changes are being saved */
body.syncing .top::after { content: ''; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; background: linear-gradient(90deg, transparent, var(--coral), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: sync 1.1s linear infinite; }
.notice.wait { display: flex; align-items: center; justify-content: center; gap: 10px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .8s linear infinite; }
body.busy .login .btn.block { opacity: .7; pointer-events: none; }
body.busy .login .btn.block::before { content: ''; display: inline-block; vertical-align: -3px; margin-inline-end: 8px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sync { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { body.syncing .top::after { animation: none; background: var(--coral); opacity: .5; } }
.gbtn { display: flex; justify-content: center; min-height: 44px; }

/* tasks, payment links, staff */
.task { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .check { padding-top: 2px; }
.task .check input { width: 18px; height: 18px; accent-color: var(--primary); }
.task.done > .grow > div:first-child { text-decoration: line-through; color: var(--muted); }
.task .late { color: var(--bad); font-weight: 500; }
.linkbox { display: grid; gap: 8px; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px; }
.linkbox .in { font-size: 13px; }

/* optional studio photos: a backdrop on the sign-in screen, a band on the home screen, a header on a class card */
.phone.has-photo .ph-body { position: relative; z-index: 1; }
.login-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.login-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(11 11 13 / .35), rgb(11 11 13 / .8) 50%, rgb(11 11 13 / .93)); }
.phone.has-photo .login { color: #fff; }
.phone.has-photo .login h1, .phone.has-photo .login .muted, .phone.has-photo .login .tagline { color: #fff; }
.phone.has-photo .login .tagline { color: var(--pink); }
.phone.has-photo .login .logo .logo-img { box-shadow: 0 6px 24px rgb(0 0 0 / .35); }
.phone.has-photo .login .in { background: rgb(255 255 255 / .94); color: #0b0b0d; border-color: transparent; }
.phone.has-photo .login label.f { color: rgb(255 255 255 / .85); }
.phone.has-photo .login .btn.block { background: var(--primary); color: #fff; }
.phone.has-photo .login .btn.ghost { color: #fff; border-color: rgb(255 255 255 / .4); }
.phone.has-photo .login .notice { background: rgb(255 255 255 / .14); color: #fff; }
.phone.has-photo .login .notice.bad { background: rgb(168 38 29 / .6); }
.phone.has-photo .login a.muted { color: rgb(255 255 255 / .7); }
.hero { margin: -16px -16px 0; padding: 26px 18px 16px; min-height: 150px; display: grid; align-content: end; background-size: cover; background-position: center; color: #fff; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(11 11 13 / .05), rgb(11 11 13 / .75)); }
.hero .hello { position: relative; }
.hero .hello .small { opacity: .9; }
.hero h1 { color: #fff; }
.sheet-photo { margin: -4px -18px 4px; height: 130px; background-size: cover; background-position: center; border-radius: 0; }
.sheet .sheet-photo + .row { margin-top: 2px; }
.login.pay .plan-card { pointer-events: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone.has-photo .login .btn.block { background: var(--primary); color: #fff; } }

/* phones, live member app: no site top bar (the app has its own header with the logo), full height, safe areas */
@media (max-width: 520px) {
  body.app-member .top { display: none; }
  body.app-member .phone { height: 100dvh; }
  body.app-member .ph-head { padding-top: calc(12px + env(safe-area-inset-top)); }
  body.app-member .ph-nav { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  body.app-member.syncing .ph-head { position: relative; }
  body.app-member.syncing .ph-head::after { content: ''; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--coral), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: sync 1.1s linear infinite; }
}

/* branch switch (pilates / strength) */
.branch-seg { display: flex; width: 100%; }
.branch-seg button { flex: 1 1 auto; padding: 9px 8px; font-weight: 600; white-space: nowrap; }

/* automations: one card each */
.auto-h { font-size: 17px; margin: 8px 0 -4px; }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.auto-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.auto-card.off { background: var(--surface-2); }
.auto-card.off b { color: var(--muted); }
.auto-form { border-top: 1px solid var(--line); padding-top: 10px; }
.auto-form code { background: var(--surface-2); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.task-acts { gap: 6px; margin-top: 6px; }
.in.sm-in { padding: 2px 6px; min-height: 0; height: auto; font-size: 12px; width: auto; flex: none; max-width: 150px; }
.summary .sum-list { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: 14px; }

/* ===================== RAISING THE BAR skin ===================== */
h1, h2, h3 { font-weight: 700; letter-spacing: .01em; line-height: 1; }
.ph-body h1 { font-size: 44px !important; }
.ph-body h2 { font-size: 30px; }
.sheet h2 { font-size: 36px; }
.modal h2, .drawer > header h2 { font-size: 34px; }
.main > header h1 { font-size: 52px; }
.kpi b { font-size: 44px; font-weight: 700; }
.panel h3 { font-weight: 800; }
.brand { font-family: var(--font); font-weight: 900; font-size: 18px; letter-spacing: .02em; color: var(--ink); }
.brand small { font-weight: 500; letter-spacing: 0; }
.top { border-bottom: 3px solid var(--ink); }

/* hard edges everywhere */
.btn { border-radius: 0; font-weight: 800; border: 2px solid var(--ink); box-shadow: -3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translate(-2px, 2px); box-shadow: -1px 1px 0 var(--ink); }
.btn.ghost { color: var(--ink); border-color: var(--ink); }
.btn.soft { border-color: var(--primary); box-shadow: none; }
.btn.danger { border-color: var(--bad); box-shadow: none; }
.btn.sm { box-shadow: -2px 2px 0 var(--ink); }
.in, select.in, textarea.in { border: 2px solid var(--ink); border-radius: 0; }
.seg { border-radius: 0; border: 2px solid var(--ink); padding: 0; background: var(--surface); }
.seg button { border-radius: 0; font-weight: 700; color: var(--ink); padding: 7px 14px; }
.seg button + button { border-inline-start: 2px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.pill { border-radius: 0; font-weight: 700; }
.pill.pri, .pill.ok { background: var(--primary-soft); color: var(--primary-ink); }
.card, .plan-card, .panel, .kpi, .auto-card, .lead, .receipt { border-radius: 0; border: 2px solid var(--ink); box-shadow: -5px 5px 0 var(--hard); }
.panel, .kpi, .auto-card { box-shadow: -4px 4px 0 var(--hard); }
.notice { border-radius: 0; border-inline-start: 4px solid currentColor; }
.avatar { border-radius: 0; background: var(--ink); color: var(--surface); font-weight: 800; }
.punches i { border-radius: 0; border-color: var(--ink); }
.punches i.on { background: var(--primary); border-color: var(--primary); }
.toast { border-radius: 0; background: var(--ink); border: 2px solid var(--primary); font-weight: 700; }
.modal { border-radius: 0; border: 3px solid var(--ink); box-shadow: -8px 8px 0 var(--primary); }
.sheet { border-radius: 0; border-top: 4px solid var(--ink); }
.tabs { border-bottom: 3px solid var(--ink); }
.tabs button { font-weight: 700; color: var(--muted); border-bottom-width: 4px; margin-bottom: -3px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--primary); }
.side button { border-radius: 0; font-weight: 600; }
.side button[aria-current="page"] { background: var(--ink); color: var(--surface); }
.side { border-inline-end: 3px solid var(--ink); }
.slot { border-radius: 0; }
.week .col.is-today > header { background: var(--primary); color: #fff; }
.week .col.is-today > header b { color: #fff; }
.toggle i { border-radius: 0; } .toggle i::after { border-radius: 0; }

/* phone frame + header */
.phone { background: var(--surface); border-color: var(--black); border-radius: 36px; }
.ph-head { background: var(--surface); border-bottom: 0; padding: 14px 16px 10px; }
.ph-head .studio { font-family: var(--font); font-weight: 900; font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.ph-head .logo-img { box-shadow: 0 0 0 2px var(--surface); }
.ph-head.dark { background: var(--black); color: #fff; }
.ph-head.dark .icon-btn { color: #fff; }
.ph-head.dark .icon-btn:hover { background: rgb(255 255 255 / .1); }
.ph-head .dot { background: var(--primary); border-color: var(--surface); }
.ph-head.dark .dot { border-color: var(--black); }
.ph-body { background: var(--surface); gap: 16px; }
.page-h { font-size: 52px !important; margin-top: 4px; }

/* bottom bar: black, the booking button raised in the middle */
.ph-nav { background: var(--black); border-top: 0; padding: 8px 4px 10px; overflow: visible; position: relative; z-index: 4; }
.ph-nav button { color: #9aa3b2; font-weight: 700; font-size: 12px; position: relative; }
.ph-nav button[aria-current="page"] { color: var(--sky); }
.ph-nav button[aria-current="page"]:not(.fab)::after { content: ''; position: absolute; bottom: -6px; width: 26px; height: 3px; background: var(--primary); }
.ph-nav .fab { color: #fff; font-family: var(--display); font-size: 24px; line-height: .9; margin-top: -30px; gap: 4px; }
.ph-nav .fab-sq { width: 58px; height: 52px; display: grid; place-items: center; background: var(--primary); border: 3px solid var(--black); box-shadow: 0 0 0 2px #fff; transform: rotate(-4deg); }
.ph-nav .fab svg { width: 24px; height: 24px; color: #fff; }
.ph-nav .fab[aria-current="page"] { color: #fff; }
.ph-nav .fab[aria-current="page"] .fab-sq { background: #fff; } .ph-nav .fab[aria-current="page"] .fab-sq svg { color: var(--primary); }

/* home hero */
.rtb-hero { margin: -16px -16px 0; background: var(--black); color: #fff; padding: 14px 18px 0; position: relative; overflow: hidden; min-height: 268px; display: grid; align-content: start; background-size: cover; background-position: center; }
.rtb-hero.has-photo::before { content: ''; position: absolute; inset: 0; background: rgb(11 11 13 / .72); }
.rtb-hero > * { position: relative; }
.rtb-hero .greet { color: var(--sky); font-weight: 800; font-size: 19px; }
.rtb-hero .big { font-family: var(--display); font-weight: 700; font-size: 96px; line-height: .82; margin-top: 10px; }
.rtb-hero .band { margin: 6px -40px 0 -40px; background: var(--primary); transform: rotate(-7deg); padding: 6px 54px 4px; box-shadow: 0 14px 0 #fff, 0 26px 0 var(--black); z-index: 1; }
.rtb-hero .band span { display: block; font-family: var(--display); font-weight: 700; font-size: 84px; line-height: .86; color: #fff; }
.rtb-hero .hero-logo { position: absolute; left: 14px; top: 104px; width: 118px; height: 118px; z-index: 2; box-shadow: 0 0 0 3px var(--black); }
.ph-body > .rtb-hero + * { margin-top: 18px; }

/* open for booking */
.soon { display: grid; gap: 10px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 3px solid var(--ink); padding-bottom: 4px; }
.sec-h h2 { font-size: 38px !important; }
.link { border: 0; background: none; color: var(--primary-ink); font-weight: 800; font-size: 14px; padding: 4px 0; }
.soon-row { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 4px 6px 12px 2px; margin-inline: -16px; padding-inline: 16px 22px; scroll-snap-type: x mandatory; }
.soon-row::-webkit-scrollbar { display: none; }
.soon-card { flex: none; width: 150px; scroll-snap-align: start; border: 2px solid var(--ink); background: var(--surface); padding: 0; text-align: start; display: grid; box-shadow: -6px 6px 0 var(--hard); }
.soon-card .st { background: var(--black); color: #fff; font-family: var(--display); font-weight: 700; font-size: 46px; line-height: 1; padding: 8px 10px 4px; text-align: center; border-bottom: 5px solid var(--primary); }
.soon-card .sb { display: grid; gap: 2px; padding: 8px 10px 10px; }
.soon-card b { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* spots ring */
.ring { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .trk { stroke: var(--line); }
.ring .on { stroke: var(--primary); }
.ring b { font-size: 12px; font-weight: 900; color: var(--ink); position: relative; }
.ring.full b { color: var(--bad); }

/* class rows: black time block, blue stripe */
.cls { grid-template-columns: 82px 1fr auto; gap: 0; padding: 0; border: 2px solid var(--ink); border-radius: 0; box-shadow: -5px 5px 0 var(--hard); align-items: stretch; }
.cls .t { background: var(--black); color: #fff; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; display: grid; align-content: center; justify-items: center; padding: 10px 4px; border-inline-end: 5px solid var(--primary); }
.cls .t small { color: #c9cfda; font-family: var(--font); font-size: 12px; font-weight: 500; margin-top: 2px; }
.cls .grow { padding: 10px 12px; display: grid; gap: 3px; align-content: center; }
.cls .name { font-weight: 900; font-size: 17px; }
.cls .cls-pill { margin-top: 2px; }
.cls > .ring { align-self: center; margin-inline-end: 12px; }
.cls.mine { border-color: var(--primary); box-shadow: -5px 5px 0 var(--primary); }
.cls.mine .t { background: var(--primary); border-inline-end-color: var(--black); }
.part-h { font-family: var(--display); font-size: 34px; border-bottom: 4px solid var(--ink); padding-bottom: 2px; margin-top: 4px; }
.day-h { font-weight: 900; font-size: 19px; }

/* day picker */
.days { gap: 10px; padding: 4px 4px 10px; }
.days button { width: 52px; border-radius: 0; border: 2px solid var(--ink); color: var(--ink); font-weight: 800; padding: 6px 0 6px; gap: 2px; }
.days button b { font-family: var(--display); font-size: 36px; line-height: .9; font-weight: 700; }
.days button.today:not([aria-pressed="true"]) { background: var(--black); color: #fff; border-color: var(--black); }
.days button.today:not([aria-pressed="true"]) b { color: #fff; }
.days button[aria-pressed="true"] { background: var(--primary); border-color: var(--black); color: #fff; box-shadow: -4px 4px 0 var(--black); }
.days .dots { display: flex; gap: 2px; height: 5px; } .days .dots s { width: 5px; height: 5px; background: var(--primary); }
.days button[aria-pressed="true"] .dots s, .days button.today .dots s { background: #fff; }

/* type chips, branch tabs */
.chips { gap: 8px; padding-bottom: 2px; }
.chips button { border-radius: 0; border: 2px solid var(--ink); color: var(--ink); font-weight: 700; padding: 6px 12px; display: inline-flex; align-items: center; gap: 7px; }
.chips button[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: #fff; }
.chips .hue { border-radius: 0; }
.branch-seg { border-width: 3px; box-shadow: -5px 5px 0 var(--hard); }
.branch-seg button { padding: 11px 8px; font-size: 16px; }

/* next class + membership */
.next-class { background: var(--black); color: #fff; border-radius: 0; border: 2px solid var(--black); box-shadow: -6px 6px 0 var(--primary); }
.next-class .eyebrow { color: var(--sky); font-weight: 800; font-size: 13px; }
.next-class h2 { font-size: 40px; }
.quick button { border-radius: 0; border: 2px solid var(--ink); font-weight: 800; box-shadow: -4px 4px 0 var(--hard); }
.quick svg { color: var(--primary-ink); }
.plan-card .price { font-family: var(--display); font-size: 44px; color: var(--ink); line-height: 1; }
.plan-card[aria-pressed="true"] { border-color: var(--primary); box-shadow: -5px 5px 0 var(--primary); }
.login .tagline { color: var(--primary-ink); font-family: var(--display); font-size: 30px; margin-top: -4px; }
.login .logo .logo-img { width: 140px; height: 140px; }
.empty b { font-weight: 900; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn, :root:not([data-theme="light"]) .quick button { box-shadow: -3px 3px 0 var(--hard); }
  :root:not([data-theme="light"]) .btn { border-color: var(--hard); }
}
:root[data-theme="dark"] .btn, :root[data-theme="dark"] .quick button { box-shadow: -3px 3px 0 var(--hard); }

/* ===================== chats (Chatwoot) ===================== */
.cw { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 16px; min-height: 0; height: calc(100dvh - 230px); min-height: 460px; }
.cw-list, .cw-thread { background: var(--surface); border: 2px solid var(--ink); box-shadow: -4px 4px 0 var(--hard); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cw-filter { display: grid; gap: 8px; padding: 12px; border-bottom: 2px solid var(--ink); }
.cw-filter .seg { justify-self: start; max-width: 100%; overflow-x: auto; }
.cw-filter .seg button { padding: 5px 10px; font-size: 13px; }
.cw-items { overflow-y: auto; flex: 1; }
.cw-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: start; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px; color: var(--ink); font: inherit; }
.cw-item:hover { background: var(--surface-2); }
.cw-item.on { background: var(--primary-soft); box-shadow: inset -4px 0 0 var(--primary); }
.cw-item .avatar { width: 36px; height: 36px; font-size: 13px; }
.cw-item-main { display: grid; gap: 3px; min-width: 0; }
.cw-item b { font-weight: 700; }
.cw-item.unread b { font-weight: 900; }
.cw-last { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-item.unread .cw-last { color: var(--ink); }
.cw-unread { flex: none; align-self: center; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 800; }
.cw-thread > .empty { margin: auto; }
.cw-head { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.cw-head .avatar { width: 38px; height: 38px; font-size: 13px; }
.cw-head b { font-size: 16px; }
.cw-tools { gap: 6px; }
.cw-back { display: none; }
.cw-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.cw-msg { max-width: min(78%, 560px); padding: 8px 12px; border: 2px solid var(--ink); background: var(--surface); display: grid; gap: 4px; }
.cw-msg.in { align-self: flex-start; }
.cw-msg.out { align-self: flex-end; background: var(--primary-soft); border-color: var(--primary); }
.cw-msg.note { align-self: flex-end; background: var(--warn-soft); border-style: dashed; border-color: var(--warn); }
.cw-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; }
.cw-text a { color: var(--primary-ink); }
.cw-meta { font-size: 11px; color: var(--muted); }
.bad-t { color: var(--bad); }
.cw-files { display: flex; gap: 6px; flex-wrap: wrap; }
.cw-files img { max-width: 220px; max-height: 220px; display: block; border: 1px solid var(--line); }
.cw-file { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; color: var(--primary-ink); }
.cw-file svg { width: 16px; height: 16px; }
.cw-act { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 2px 10px; }
.cw-compose { display: grid; gap: 8px; padding: 12px; border-top: 2px solid var(--ink); }
.cw-compose textarea { resize: vertical; min-height: 64px; max-height: 220px; }
.cw-compose.is-note textarea { background: var(--warn-soft); border-style: dashed; }
.cw-mini { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; padding: 10px; background: var(--surface-2); border: 2px solid var(--ink); }
.cw-mini .cw-msg { max-width: 88%; padding: 6px 10px; }
.cw-mini .cw-text { font-size: 14px; }
@media (max-width: 980px) {
  .cw { grid-template-columns: 1fr; height: calc(100dvh - 210px); }
  .cw.has-sel .cw-list { display: none; }
  .cw:not(.has-sel) .cw-thread { display: none; }
  .cw-back { display: inline-grid; }
  .cw-tools { width: 100%; }
}
