/* Elorde front desk: layout only. Every colour comes from tokens. */
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: var(--space-4) var(--space-4) calc(88px + env(safe-area-inset-bottom)); }
.view { display: flex; flex-direction: column; gap: var(--space-4); }
.us-appbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.intro h1 { margin: var(--space-2) 0 var(--space-2); font-family: var(--font-display); font-weight: 400; font-size: 48px; line-height: 46px; letter-spacing: .5px; }
.intro p { margin: 0; color: var(--ink-muted); }
.section-h { margin: var(--space-4) 0 var(--space-2); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-muted); }
.suggestions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.suggestions .us-btn { text-align: left; height: auto; padding-top: 6px; padding-bottom: 6px; }

/* Lists of members / coaches / check-ins */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-static { cursor: default; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.row-main { flex: 1; min-width: 0; }
.row-title { margin: 0; font-weight: 500; line-height: 22px; }
.row-sub { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.row-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.row-end { flex: none; text-align: right; }
.big-num { font-family: var(--font-display); font-size: 32px; line-height: 32px; }
.big-label { font-size: 12px; color: var(--ink-muted); }
.empty { padding: var(--space-4) 0; color: var(--ink-muted); margin: 0; }

/* Result card fields */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields .full { grid-column: 1 / -1; }
.fields select.us-input { appearance: auto; }
.gear { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.gear label, .checks label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.gear input, .checks input { width: 20px; height: 20px; accent-color: var(--accent); }
.checks { border: 0; padding: 0; margin: 0; display: flex; gap: var(--space-4); flex-wrap: wrap; }
.checks legend { margin-bottom: 4px; }
.ai-note { margin: 0 0 var(--space-4); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.price { font-size: 14px; color: var(--ink-muted); }
.add-form { display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-2); }

/* Bottom tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; justify-content: center; background: none; border: 0; font: inherit; font-size: 12px; color: var(--ink-muted); cursor: pointer; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 600; }
.tab[aria-current="page"] .us-icon { stroke-width: 2; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* Member sheet */
.sheet { border: 0; padding: 0; width: 100%; max-width: 560px; margin: auto auto 0; border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--surface); color: var(--ink); max-height: 90dvh; }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: var(--radius-md); } }
.sheet::backdrop { background: rgb(17 17 17 / .45); }
.sheet-inner { padding: var(--space-6) var(--space-4) calc(var(--space-6) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--space-4); }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 36px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats .us-card { padding: 12px var(--space-4); }
.sheet-actions { display: flex; flex-direction: column; gap: var(--space-2); }
.appbar-branch { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-muted); }
.collect { margin: 0; font-weight: 600; color: var(--accent-deep); }

/* Card scan */
.scan { display: flex; flex-direction: column; gap: var(--space-2); }
.scan-btn { min-height: 64px; font-size: 17px; font-weight: 600; }
.scan-btn .us-icon { width: 24px; height: 24px; }
.note-entry { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
.note-entry summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 500; color: var(--ink); }
.note-entry summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.note-entry[open] { display: flex; flex-direction: column; gap: var(--space-2); padding-bottom: var(--space-4); }
.card-thumb { display: block; width: 100%; max-height: 180px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--accent-soft); margin-bottom: var(--space-4); }
.scan-busy { opacity: .6; pointer-events: none; }

/* Shared-list status */
.sync { margin: 0; padding: 6px var(--space-4); font-size: 12px; line-height: 16px; color: var(--ink-muted); border-bottom: 1px solid var(--line); text-align: center; }
.sync:empty { display: none; }
.sync-warn { color: var(--danger); font-weight: 500; }

/* Front-desk lock */
.lock { padding: var(--space-6) var(--space-4) var(--space-10); display: flex; justify-content: center; }
.lock-inner { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: var(--space-4); }
.lock h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 44px; }
.lock p { margin: 0; color: var(--ink-muted); }
.staff-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-2); }
.staff-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--space-4) 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; min-height: 44px; }
.staff-btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.staff-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Photos */
.avatar-img { object-fit: cover; padding: 0; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin: var(--space-2) 0 0; }
.compare figure { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.compare img, .compare .no-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--accent-soft); }
.compare .no-photo { display: grid; place-items: center; padding: 8px; text-align: center; font-size: 13px; color: var(--ink-muted); }
.compare figcaption { font-size: 12px; color: var(--ink-muted); text-align: center; }
.stance-step { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.stance-step > p { margin: 0; }
#stance-out { display: flex; flex-direction: column; gap: var(--space-2); }
#stance-out .ai-note { margin: 0; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 14px; }
.checklist .ok { color: var(--success); }
.checklist .bad { color: var(--danger); font-weight: 500; }
.checklist .unk { color: var(--ink-muted); }
.confirm-face { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.confirm-face input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.checkin-body p { margin: 0 0 6px; }

/* Consent */
.consent-card { display: flex; flex-direction: column; gap: var(--space-2); }
.consent-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.consent-head .us-card-title { margin: 0; font-size: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--ink-muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.selectable { user-select: all; }
.hist { padding: 8px 0; }
#consent-out:empty, #sheet-check:empty { display: none; }

/* App bar: keep it on one line on phones */
.us-appbar-brand { min-width: 0; }
#who { white-space: nowrap; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 34px; }
@media (max-width: 400px) { .appbar-branch { display: none; } }

/* Owner tab */
.owner-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.owner-stats .stat { padding: 12px var(--space-4); }
.owner-stats .big-num { font-variant-numeric: tabular-nums; }

/* Consent checklist */
.consent-list { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px var(--space-4) var(--space-4); margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.consent-list legend { padding: 0 4px; }
.consent-list > label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.consent-list input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.consent-list .us-btn { margin-top: var(--space-2); }
.consent-list .us-help { margin: 0 0 4px; }
.consent-list .fields { margin-top: var(--space-2); }
.cf-out { display: flex; flex-direction: column; gap: 6px; }
.cf-out:empty { display: none; }
.cf-out .card-thumb { margin-bottom: 0; }
.cf-out .ai-note { margin: 0; }
.emerg { margin: 0; font-size: 15px; }
#cf-form { display: flex; flex-direction: column; gap: var(--space-2); }

/* Plan dates */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 12px; border-radius: var(--radius-full); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-card { display: flex; flex-direction: column; gap: var(--space-2); }
.period { display: flex; align-items: center; gap: var(--space-4); }
.period-arrow { color: var(--ink-muted); font-size: 20px; }
.meter { height: 8px; border-radius: var(--radius-full); background: var(--accent-soft); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-full); }
.plan-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.plan-card .row-sub { margin: 0; }
.periods summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-size: 14px; color: var(--ink-muted); }
#pd-form[hidden] { display: none; }

/* My stats (member view) */
.member-entry { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.member-entry p { margin: 0; }
.member-view { width: 100%; max-width: 720px; margin: 0 auto; padding: var(--space-4) var(--space-4) var(--space-10); display: flex; flex-direction: column; gap: var(--space-4); }
.me-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.me-head h1 { margin: 2px 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 44px; }
.me-head p { margin: 0; }
#me-body { display: flex; flex-direction: column; gap: var(--space-4); }
.me-card { display: flex; flex-direction: column; gap: var(--space-2); }
.me-card .section-h { margin: var(--space-2) 0 0; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-strong); stroke-width: 1; }
.chart .bar { fill: var(--accent); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .axis { fill: var(--ink-muted); font-size: 10px; font-family: var(--font-sans); }
.chart .val { fill: var(--ink); font-size: 11px; font-weight: 600; font-family: var(--font-sans); }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:focus-visible { stroke: var(--accent); stroke-width: 1; }
.chart-tip { position: fixed; z-index: 30; pointer-events: none; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); font-size: 13px; line-height: 18px; white-space: nowrap; }
.numbers summary { cursor: pointer; font-size: 13px; color: var(--ink-muted); min-height: 32px; display: flex; align-items: center; }
.table-wrap { overflow-x: auto; }
.numbers table { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; width: 100%; }
.numbers th, .numbers td { text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); }
.numbers th { color: var(--ink-muted); font-weight: 500; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hbars li { display: grid; grid-template-columns: 104px 1fr 32px; align-items: center; gap: 8px; font-size: 14px; }
.hb-track { height: 12px; }
.hb-bar { display: block; height: 12px; background: var(--accent); border-radius: 0 4px 4px 0; }
.hb-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.log-form textarea { font-size: 16px; }
.stats-pin { display: flex; flex-direction: column; gap: var(--space-2); }
.stats-pin .us-help { margin: 0; }
.pin-row { display: flex; gap: var(--space-2); }
.pin-row .us-input { flex: 1; min-width: 0; }

/* Members' home (the gym QR code): the staff link stays out of the way. */
.lock .staff-link { margin-top: var(--space-6); font-size: 14px; color: var(--ink-muted); }
.owner-gate { max-width: 420px; }
