:root {
  --bg: #f3f4f5; --surface: #fff; --surface-2: #f7f7f8; --line: #e1e3e6; --line-2: #c8cbd0;
  --ink: #151618; --ink-2: #3b3e43; --muted: #656970;
  --accent: #e5b745; --accent-ink: #111214; --accent-soft: #fff5d9; --accent-text: #805b0b;
  --side: #0d0e10; --side-ink: #c8cbd0; --side-on: #f3cb67;
  --ok: #2f8a55; --ok-soft: #e2f3e8; --warn: #b7791f; --warn-soft: #fbf0d9; --bad: #c0392b; --bad-soft: #fbe4e1; --info: #3b6fc4; --info-soft: #e3ecfa;
  --r: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.035);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 15px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
h3 { font-size: 15px; margin: 16px 0 8px; }
h3.sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
p { margin: 0 0 10px; }
code { font: 12px ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .block { display: block; } .r { text-align: right; }
.danger { color: var(--bad) !important; } .dim { opacity: .55; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 18px 18px; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand img { width: 144px; height: 144px; object-fit: contain; }
.brand-caption { color: var(--side-on); font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.topbar-logo { width: 36px; height: 36px; object-fit: contain; flex: none; }
.brand strong { display: block; font-size: 15px; letter-spacing: .12em; }
.brand small { display: block; font-size: 10.5px; letter-spacing: .2em; color: var(--side-on); }
.side nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.side nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: rgba(229,183,69,.13); color: var(--side-on); }
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; }
.me { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.me strong { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.me small { display: block; font-size: 11.5px; }
.side-foot .link { color: var(--side-ink); font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; background: var(--c, var(--accent)); color: #fff; }
.main { flex: 1; min-width: 0; }
.topbar { display: none; }
.scrim { display: none; }

.page { max-width: 880px; margin: 0 auto; padding: 28px 28px 60px; }
.page.wide { max-width: 1280px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.crumb { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 6px; }
.crumb:hover { color: var(--accent-text); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 460px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-side > .card, .grid-side > .stack > .card { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-side > .stack { gap: 18px; }
.empty { color: var(--muted); font-style: italic; padding: 6px 0; margin: 0; }
.alert { background: var(--warn-soft); border: 1px solid #f0d9a6; border-radius: 8px; padding: 10px 12px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--accent); }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat strong { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat small { font-size: 12px; color: var(--muted); }
.stat.warn { border-top-color: var(--bad); }
a.stat:hover { border-color: var(--line-2); }
.mini-stats { display: flex; gap: 24px; }
.mini-stats strong { font-size: 24px; display: block; }
.mini-stats span { font-size: 12px; color: var(--muted); }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 500 14px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; min-height: 38px; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #f0c75e; border-color: #f0c75e; }
.btn:focus-visible, a:focus-visible { outline: 3px solid #956b10; outline-offset: 3px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger:not(.ghost) { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 13px; min-height: 32px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; cursor: pointer; text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input, select, textarea { font: 15px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; min-height: 38px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #956b10; outline-offset: -1px; border-color: #956b10; }
input[type=color] { padding: 2px; width: 44px; min-width: 44px; height: 38px; }
select[size] { padding: 4px; }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); flex: none; }
.pad-top { padding-top: 22px; }
.row-2, .row-3 { display: grid; gap: 12px; }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.card > form[action="/admin/users"] { margin-bottom: 12px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.inline select, .inline input { width: auto; }
.inline .grow, .filters .grow { flex: 1; min-width: 180px; }
.narrow-field { max-width: 260px; }
fieldset.radio-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: flex; gap: 18px; flex-wrap: wrap; }
fieldset legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters select, .filters input { width: auto; }
.flash { margin: 16px 28px 0; padding: 11px 14px; border-radius: 8px; border: 1px solid; font-weight: 500; }
.page .flash, .login-card .flash { margin: 0 0 14px; }
.flash.ok { background: var(--ok-soft); border-color: #b8e0c6; color: #1e5c39; }
.flash.error { background: var(--bad-soft); border-color: #f1c2bb; color: #8c2a1f; }
.pass { font-size: 14px; background: #fff; padding: 2px 8px; user-select: all; }
details.disclose { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
details.disclose summary { cursor: pointer; color: var(--accent-text); font-weight: 600; list-style: none; margin-bottom: 10px; }
details.disclose summary::-webkit-details-marker { display: none; }
details.pop { position: relative; display: inline-block; }
details.pop summary { list-style: none; }
details.pop[open] form { position: absolute; right: 0; top: 24px; z-index: 5; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; width: 320px; box-shadow: 0 10px 30px rgba(0,0,0,.15); text-align: left; }

/* badges */
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); letter-spacing: .01em; vertical-align: middle; white-space: nowrap; }
.b-active, .b-booked, .b-scheduled { background: var(--ok-soft); color: #1e6a40; border-color: #c4e6d0; }
.b-lead { background: var(--info-soft); color: #2b5aa6; border-color: #c9d9f3; }
.b-trial { background: var(--accent-soft); color: #8a5a14; border-color: #efd5ad; }
.b-frozen, .b-paused, .b-waitlist { background: var(--warn-soft); color: #8a5a14; border-color: #f0dcae; }
.b-cancelled, .b-expired { background: var(--bad-soft); color: #9b2d21; border-color: #f2c9c3; }
.b-private { background: #efe8fb; color: #5b3a9e; border-color: #dccff4; }
.b-event { background: #e0f4f4; color: #1f6d6d; border-color: #bfe5e5; }
.ok-dot, .warn-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.ok-dot { background: var(--ok-soft); color: var(--ok); }
.warn-dot { background: var(--warn-soft); color: var(--warn); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.lg { width: 14px; height: 14px; }

/* tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td { padding: 8px 4px; }
.table.compact td:first-child { padding-left: 0; }
.table.compact td:last-child { padding-right: 0; }
.table.rows tbody tr[data-href] { cursor: pointer; }
.table.rows tbody tr:hover { background: var(--surface-2); }
.table a { text-decoration: none; }
.table a:hover { color: var(--accent-text); }
.card:not(.flush) .table.rows { margin: 0 -20px; width: calc(100% + 40px); }
.card:not(.flush) .table.rows th:first-child, .card:not(.flush) .table.rows td:first-child { padding-left: 20px; }
.card:not(.flush) .table.rows th:last-child, .card:not(.flush) .table.rows td:last-child { padding-right: 20px; }
.scroll-box { max-height: 320px; overflow: auto; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a span { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-left: 2px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }

/* session lists */
.session-list { list-style: none; margin: 0; padding: 0; }
.session-list li a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.session-list li:last-child a { border-bottom: 0; }
.session-list li a:hover strong { color: var(--accent-text); }
.session-list .time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink-2); width: 62px; flex: none; }
.session-list .grow { flex: 1; min-width: 0; }
.session-list strong { display: block; }
.session-list small { display: block; color: var(--muted); font-size: 12.5px; }
.session-list .cap { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.is-cancelled { opacity: .55; } .is-cancelled strong { text-decoration: line-through; }

/* dashboard bars */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 18px; margin-bottom: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bar .fill { width: 100%; max-width: 26px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar .val { font-size: 11px; color: var(--muted); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.bar .lbl { font-size: 11px; color: var(--muted); margin-top: 5px; }
.bar:last-child .fill { background: var(--side); }

/* calendar */
.week { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.week-head { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.week-head > div { padding: 10px 8px; text-align: center; }
.week-head span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.week-head strong { font-size: 20px; }
.week-head .today strong { background: var(--accent); color: var(--accent-ink); border-radius: 50%; width: 34px; height: 34px; display: inline-grid; place-items: center; }
.week-body { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); max-height: 72vh; overflow-y: auto; position: relative; }
.hours > div { height: var(--hpx); font-size: 11px; color: var(--muted); text-align: right; padding: 0 8px 0 0; transform: translateY(-7px); }
.hours > div:first-child { visibility: hidden; }
.day-col { position: relative; border-left: 1px solid var(--line); height: calc(var(--hours) * var(--hpx));
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hpx); }
.day-col.today { background-color: #fffaf1; }
.add-slot { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; text-decoration: none; color: var(--muted); opacity: 0; transition: opacity .15s; z-index: 2; background: var(--surface); border: 1px solid var(--line); }
.day-col:hover .add-slot { opacity: 1; }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 4px 6px; text-decoration: none; overflow: hidden; font-size: 12px; line-height: 1.25;
  background: color-mix(in srgb, var(--c) 16%, white); border-left: 3px solid var(--c); color: var(--ink); }
.ev:hover { background: color-mix(in srgb, var(--c) 26%, white); z-index: 3; }
.ev strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.ev span { display: block; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .cap { position: absolute; right: 5px; bottom: 3px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.ev.k-private { border-left-style: dashed; }
.ev.cancelled { opacity: .5; background: repeating-linear-gradient(135deg, #f4f1ec 0 6px, #ebe6de 6px 12px); }
.ev.cancelled strong { text-decoration: line-through; }
.agenda { display: none; }
.agenda-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin-bottom: 10px; }
.agenda-day h3 { margin: 4px 0; font-size: 14px; display: flex; justify-content: space-between; }
.agenda-day.today { border-color: var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* roster */
.roster { list-style: none; margin: 0; padding: 0; }
.roster li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.roster li:last-child { border-bottom: 0; }
.roster li form { margin: 0; }
.roster li a { text-decoration: none; }
.roster .grow { flex: 1; min-width: 0; }
.roster .checkbox { width: 34px; height: 34px; border-radius: 8px; border: 2px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 18px; font-weight: 700; color: #fff; display: grid; place-items: center; }
.roster .checkbox:hover { border-color: var(--ok); }
.roster li.in .checkbox { background: var(--ok); border-color: var(--ok); }
.roster li.wl { opacity: .75; }

/* member page */
.dl { display: grid; grid-template-columns: 96px 1fr; gap: 8px 10px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; word-break: break-word; }
.dl a { color: var(--accent-text); text-decoration: none; }
.note-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 14px 0 0; white-space: pre-wrap; }
.ms-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ms-row.over { border-color: #f1c2bb; background: var(--bad-soft); }
.ms-row form { margin: 0; }
.notes { list-style: none; padding: 0; margin: 12px 0 0; }
.notes li { border-left: 3px solid var(--accent-soft); padding: 4px 0 4px 12px; margin-bottom: 10px; }
.notes p { margin: 0 0 2px; white-space: pre-wrap; }
.waiver-text { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; max-height: 320px; overflow: auto; white-space: pre-wrap; }
.danger-zone { border-color: #f1c2bb; }

/* coaches */
.coach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.coach-card { display: flex; gap: 14px; align-items: center; text-decoration: none; margin: 0; border-left: 4px solid var(--c); }
.coach-card:hover { border-color: var(--line-2); border-left-color: var(--c); }
.coach-card.inactive { opacity: .55; }
.avail { list-style: none; padding: 0; margin: 0; }
.avail li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.avail li strong { width: 40px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 4px 1px 10px; font-size: 13px; margin: 0 4px 4px 0; }
.inline-x { display: inline; margin: 0; }
.inline-x button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; padding: 0 4px; }
.day-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.day-picks label { flex-direction: row; }
.day-picks input { position: absolute; opacity: 0; width: 0; height: 0; min-height: 0; }
.day-picks span { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; font-weight: 500; }
.day-picks input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day-picks input:focus-visible + span { outline: 2px solid var(--accent); }

/* member form & profile extras */
.age-note { margin: -4px 0 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.age-note.minor { color: #8a5a14; background: var(--warn-soft); border: 1px solid #f0dcae; border-radius: 6px; padding: 6px 10px; }
.guardian-box { border-left: 4px solid var(--info); }
.health-box { border-left: 4px solid var(--bad); }
.health-alert { background: var(--bad-soft); border: 1px solid #f2c9c3; border-radius: 8px; padding: 10px 12px; }
.health-alert dt { color: #9b2d21; font-weight: 600; }
.health-alert dl { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; }
.health-alert dd { margin: 0; white-space: pre-wrap; }
.med-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 700; background: var(--bad-soft); color: var(--bad); }
.badge.b-minor { background: var(--info-soft); color: #2b5aa6; border-color: #c9d9f3; }

/* signature pad */
.sigpad { position: relative; display: flex; flex-direction: column; gap: 6px; }
.sigpad-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sigpad canvas { width: 100%; height: 180px; background: #fff; border: 2px dashed var(--line-2); border-radius: 10px; touch-action: none; cursor: crosshair; }
.sigpad.need canvas { border-color: var(--bad); }
.sigpad-hint { position: absolute; left: 0; right: 0; top: 50%; text-align: center; color: var(--muted); pointer-events: none; font-size: 14px; }
.sig-img { max-width: 360px; width: 100%; border-bottom: 1px solid var(--ink); background: #fff; }
.copy-row { display: flex; gap: 8px; } .copy-row input { font: 13px ui-monospace, Menlo, monospace; }

/* public waiver page */
.public-wrap { min-height: 100vh; background: var(--bg); padding: 24px max(16px, env(safe-area-inset-right, 0px)) 60px max(16px, env(safe-area-inset-left, 0px)); }
.public-card { max-width: 680px; margin: 0 auto; }
.public-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; justify-content: center; margin-bottom: 18px; text-align: center; }
.public-brand img { width: 120px; height: 120px; object-fit: contain; }
.public-brand strong { letter-spacing: .14em; font-size: 18px; }

/* class types */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.class-card { margin: 0; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--c); }
.class-card.inactive { opacity: .6; }
.class-card-head { display: flex; gap: 12px; align-items: flex-start; }
.class-card-head h3 { margin: 0 0 2px; font-size: 17px; }
.class-card-head .grow { flex: 1; min-width: 0; }
.swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--c); margin-top: 5px; flex: none; }
.class-desc { margin: 0; white-space: pre-wrap; flex: 1; }
.class-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; flex-wrap: wrap; }
.class-card-foot .actions { gap: 14px; }

/* admin */
.user-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.user-row input[name=name] { width: 180px; }
.user-row select { width: auto; }
.user-row > .muted { min-width: 180px; }
.type-list { display: flex; flex-direction: column; gap: 8px; }
.type-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.type-row .grow { flex: 1; min-width: 160px; }
.type-row label.mini { flex-direction: row; align-items: center; gap: 4px; font-weight: 500; }
.type-row label.mini input { width: 70px; }
.type-row.add { border-top: 1px dashed var(--line-2); padding-top: 10px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 20px; background: radial-gradient(ellipse at 50% 0%, rgba(229,183,69,.12), transparent 65%), #090a0b; }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 16px; padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 72px rgba(0,0,0,.4); }
.login-card img { align-self: center; width: 176px; height: 176px; object-fit: contain; }
.login-card h1 { justify-content: center; font-size: 24px; letter-spacing: -.02em; }
.login-card > p { text-align: center; margin: -8px 0 4px; }

/* responsive */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10; background: var(--side); color: #fff; padding: 8px 12px; }
  .menu-btn { background: none; border: 0; color: #fff; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
  .menu-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
  .topbar-title { font-weight: 600; }
  .page, .page.wide { padding: 18px 16px 50px; }
  .flash { margin: 12px 16px 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week { display: none; }
  .agenda { display: block; }
  .page-head h1 { font-size: 21px; }
}
@media (max-width: 560px) {
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat strong { font-size: 22px; }
  .hide-sm { display: none; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .filters select, .filters input { flex: 1; min-width: 0; }
  details.pop[open] form { width: 280px; }
  .user-row input[name=name], .user-row > .muted { width: 100%; }
}
.health-line { display: block; color: var(--bad); font-size: 12px; font-weight: 600; }

/* member card preview */
.card-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.card-preview img { height: 48px; max-width: 100%; }
.card-preview span { font: 600 13px ui-monospace, Menlo, monospace; letter-spacing: 2px; }

/* check-in kiosk */
.kiosk { background: var(--side); color: #fff; border-radius: 14px; padding: 24px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 18px; }
.kiosk:fullscreen { border-radius: 0; padding: 40px max(40px, env(safe-area-inset-left, 0px)); justify-content: center; }
.kiosk-clock { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.kiosk-clock strong { font-size: 34px; font-variant-numeric: tabular-nums; }
.kiosk-clock strong small { font-size: 16px; margin-left: 2px; color: var(--side-on); }
.kiosk-clock span { color: var(--side-ink); }
.kiosk:fullscreen .kiosk-clock strong { font-size: 64px; }
.kiosk-form { display: flex; gap: 10px; }
.kiosk-input { font-size: 22px; min-height: 56px; background: #2a241d; color: #fff; border-color: #3a3229; letter-spacing: 1px; }
.kiosk-input::placeholder { color: var(--muted); }
.kiosk-form .btn { min-height: 56px; padding: 0 24px; }
.kiosk-result { border-radius: 12px; padding: 24px; min-height: 160px; display: flex; flex-direction: column; justify-content: center; gap: 6px; background: #221d17; transition: background .15s; }
.kiosk:fullscreen .kiosk-result { min-height: 40vh; }
.kr-idle { color: var(--muted); font-size: 20px; text-align: center; }
.kr-title { font-size: 34px; font-weight: 800; line-height: 1.15; }
.kiosk:fullscreen .kr-title { font-size: 64px; }
.kr-detail { font-size: 18px; opacity: .9; }
.kr-alerts { margin: 6px 0 0; padding-left: 22px; font-size: 20px; font-weight: 700; }
.kr-tag { display: inline-block; align-self: flex-start; background: rgba(255,255,255,.2); border-radius: 6px; padding: 2px 10px; font-weight: 700; }
.kr-health { font-weight: 700; background: rgba(0,0,0,.25); border-radius: 6px; padding: 6px 10px; align-self: flex-start; }
.kr-link { color: inherit; opacity: .8; font-size: 14px; margin-top: 6px; }
.kiosk-result.ok { background: #1f7a45; }
.kiosk-result.warn { background: #b26b12; }
.kiosk-result.bad { background: #a32a1e; }
.kiosk-result.info { background: #2b5aa6; }
.kiosk-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.kiosk-choices .btn { font-size: 18px; min-height: 52px; }
