:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --border: #e2e4e9;
  --text: #16181d;
  --muted: #646a76;
  --primary: #e8540c;
  --primary-ink: #ffffff;
  --primary-soft: #fdeee6;
  --green: #138a4b;
  --green-soft: #e3f5ea;
  --amber: #a86400;
  --amber-soft: #fff3db;
  --red: #c62828;
  --red-soft: #fde8e8;
  --blue: #1f63c6;
  --blue-soft: #e5eefc;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 12px;
  --nav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b21;
    --surface-2: #20242c;
    --border: #2b303a;
    --text: #eceef2;
    --muted: #9aa1ad;
    --primary: #ff7a3d;
    --primary-ink: #1a0d05;
    --primary-soft: #3a2116;
    --green: #4cc785;
    --green-soft: #15301f;
    --amber: #f0b44c;
    --amber-soft: #352a12;
    --red: #ff7070;
    --red-soft: #3a1a1a;
    --blue: #7aa8ff;
    --blue-soft: #18243a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidenav {
  width: 220px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: .25rem;
}
.brand { font-weight: 800; font-size: 1.1rem; padding: .25rem .5rem 1rem; display: flex; align-items: center; gap: .5rem; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-size: .95rem; }
.navlink {
  display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: 10px; color: var(--text); font-weight: 500;
}
.navlink svg { width: 20px; height: 20px; flex-shrink: 0; }
.navlink:hover { background: var(--surface-2); }
.navlink.active { background: var(--primary-soft); color: var(--primary); }
main { flex: 1; min-width: 0; padding: 1.25rem 1.5rem 2rem; max-width: 1100px; }

.bottomnav { display: none; }

@media (max-width: 760px) {
  .sidenav { display: none; }
  main { padding: 1rem 1rem calc(var(--nav-h) + 1.5rem); }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h); z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .7rem; color: var(--muted); }
  .bottomnav a svg { width: 22px; height: 22px; }
  .bottomnav a.active { color: var(--primary); }
  .bottomnav a.scan-btn svg { width: 28px; height: 28px; background: var(--primary); color: var(--primary-ink); border-radius: 50%; padding: 8px; box-sizing: content-box; margin-top: -18px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.card-head h2 { margin: 0; }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem; box-shadow: var(--shadow); display: block; color: var(--text); }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat .value { font-size: 1.6rem; font-weight: 750; margin-top: .15rem; font-variant-numeric: tabular-nums; }
.stat.accent .value { color: var(--primary); }
.stat.warn .value { color: var(--amber); }
.stat.bad .value { color: var(--red); }
.stat.good .value { color: var(--green); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); padding: .55rem .9rem; border-radius: 10px; font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; min-height: 40px;
}
.btn:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--red); }
.btn.small { padding: .3rem .6rem; min-height: 32px; font-size: .85rem; }
.btn.wa { color: #128c4b; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

.badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.badge.active { background: var(--green-soft); color: var(--green); }
.badge.expiring, .badge.upcoming { background: var(--amber-soft); color: var(--amber); }
.badge.expired { background: var(--red-soft); color: var(--red); }
.badge.none, .badge.archived { background: var(--surface-2); color: var(--muted); }
.badge.goal { background: var(--blue-soft); color: var(--blue); }

.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: .75rem; scrollbar-width: none; }
.chip { border: 1px solid var(--border); background: var(--surface); padding: .35rem .8rem; border-radius: 999px; font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap; color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: .75rem; padding: .7rem .25rem; border-bottom: 1px solid var(--border); color: var(--text); }
.list-item:last-child { border-bottom: none; }
a.list-item:hover { background: var(--surface-2); }
.list-item .main { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .sub { color: var(--muted); font-size: .85rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; background: var(--primary-soft); color: var(--primary); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.empty { color: var(--muted); text-align: center; padding: 1.25rem .5rem; }

/* forms */
form .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem 1rem; }
label.field { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
label.field.full { grid-column: 1 / -1; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: .55rem .7rem; width: 100%; min-height: 42px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.search { position: relative; margin-bottom: .75rem; }
.search input { padding-left: 2.3rem; }
.search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
fieldset { border: none; padding: 0; margin: 0 0 1.25rem; }
legend { font-weight: 700; margin-bottom: .6rem; font-size: 1rem; }
.goal-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; }
.goal-picker label { border: 1.5px solid var(--border); border-radius: 10px; padding: .6rem; cursor: pointer; text-align: center; font-weight: 600; font-size: .9rem; }
.goal-picker label .emoji { display: block; font-size: 1.4rem; }
.goal-picker input { display: none; }
.goal-picker input:checked + span { color: var(--primary); }
.goal-picker label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.switch { display: flex; align-items: center; gap: .6rem; font-weight: 500; cursor: pointer; }
.switch input { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.tab { border: none; background: none; padding: .6rem .85rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* profile */
.profile-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.profile-head .info { flex: 1; min-width: 200px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.progress-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: .5rem 0; }
.progress-bar > div { height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s; }
.goal-numbers { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }
.goal-numbers b { color: var(--text); font-size: 1.05rem; display: block; }
.pre { white-space: pre-wrap; font-size: .92rem; }

.heatmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(22px, 1fr)); gap: 4px; }
.heatmap div { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); }
.heatmap div.on { background: var(--green); }
.heatmap div.today { outline: 2px solid var(--primary); }

.qr-card {
  max-width: 320px; margin: 0 auto; text-align: center; border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.25rem; background: #fff; color: #111;
}
.qr-card img { width: 100%; max-width: 240px; display: block; margin: .5rem auto; }
.qr-card .gym { font-weight: 800; color: #e8540c; letter-spacing: .02em; }

/* scanner */
.scanner-wrap { max-width: 520px; margin: 0 auto; }
#reader { border-radius: var(--radius); overflow: hidden; background: #000; min-height: 260px; }
#reader:empty { display: grid; place-items: center; }
#reader:empty::after { content: "Camera is off"; color: #aaa; }
#reader video { border-radius: var(--radius); }
.scan-result { border-radius: var(--radius); padding: 1.25rem; margin-top: 1rem; text-align: center; border: 2px solid transparent; }
.scan-result .big { font-size: 1.5rem; font-weight: 800; }
.scan-result.ok { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.scan-result.out { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.scan-result.warn { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.scan-result.bad { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.scan-result .who { color: var(--text); font-size: 1.15rem; font-weight: 700; margin-top: .25rem; }

/* toast + modal */
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 1rem); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 10px; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.2); animation: pop .2s ease-out; max-width: 90vw; }
.toast.error { background: var(--red); color: #fff; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: grid; place-items: center; padding: 1rem; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-bottom: 1rem; }
.modal .actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth .card { width: 100%; max-width: 380px; }
.auth .brand { justify-content: center; font-size: 1.4rem; }
.auth form > * + * { margin-top: .75rem; }

.chart-box { position: relative; height: 220px; }

@media print {
  body * { visibility: hidden; }
  .printable, .printable * { visibility: visible; }
  .printable { position: absolute; left: 0; top: 0; right: 0; }
  .qr-card { border: 2px solid #111; }
}

.demo-bar { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: .5rem .75rem; margin-bottom: 1rem; font-size: .85rem; font-weight: 600; }
.demo-bar a { color: inherit; text-decoration: underline; margin-left: .25rem; }
.consent-box { background: var(--surface-2); border-radius: 10px; padding: .75rem; }
.switch a { color: var(--primary); }
.switch span { line-height: 1.4; }

/* category chips (register + profile) */
.cat-pick { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .35rem; }
.cat-pick label { cursor: pointer; }
.cat-pick input { position: absolute; opacity: 0; pointer-events: none; }
.cat-pick span { display: inline-block; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .4rem .75rem; border-radius: 999px; font-size: .88rem; font-weight: 600; }
.cat-pick input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.cat-pick input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.goal-group { font-size: .78rem; font-weight: 700; margin: .6rem 0 .35rem; }

/* demo place picker */
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; max-height: 60vh; overflow-y: auto; }
.demo-grid button { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; padding: .55rem .7rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.demo-grid button .e { font-size: 1.4rem; }
.demo-grid button small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.demo-grid button.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }

/* member photos */
.avatar { background-size: cover; background-position: center; }
.avatar.has-photo { color: transparent; }
.avatar.xl { width: 96px; height: 96px; font-size: 2rem; }
.photo-pick { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.avatar-edit { position: relative; cursor: pointer; display: inline-block; }
.avatar-edit .cam { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-size: .8rem; box-shadow: var(--shadow); }
.scan-result .avatar.lg { border: 2px solid rgba(255,255,255,.8); }

/* offline sync bar */
.sync-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--blue-soft); color: var(--blue); border-radius: 10px; padding: .55rem .75rem; margin-bottom: 1rem; font-size: .86rem; font-weight: 600; }
.sync-bar[hidden] { display: none; }
.sync-bar span { flex: 1; }
a.tab { display: inline-block; }
.att-row { align-items: flex-start; }
.att-row .main .title a { color: var(--text); }
.att-times { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .88rem; color: var(--muted); margin-top: .15rem; }
.att-times b { color: var(--text); }

/* payments */
.dues-hero { display: block; border-radius: 18px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; color: #fff; background: linear-gradient(135deg, #dc2626, #ea580c); box-shadow: 0 8px 24px rgba(220,38,38,.25); }
.dues-hero.ok { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 8px 24px rgba(5,150,105,.22); }
.dues-hero .big { font-size: 2.1rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dues-hero small { opacity: .9; }
.dh-foot { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; font-size: .85rem; opacity: .95; }
.dh-foot span:first-child { flex: 1; }
.dh-btn { background: rgba(255,255,255,.22); border-radius: 999px; padding: .3rem .8rem; font-weight: 700; }
.due-amt { color: var(--red); }
.due-row { align-items: flex-start; }
.due-row .title { color: var(--text); font-weight: 700; }
.dues-strip { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; border-color: var(--red); margin-top: 1rem; }
.dues-strip b { color: var(--red); font-size: 1.15rem; }
.due-line { font-size: 1rem; }
.due-line b { color: var(--red); }
.mode-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .4rem; margin-top: .3rem; }
.mode-pick input { position: absolute; opacity: 0; pointer-events: none; }
.mode-pick span { display: block; text-align: center; padding: .55rem .3rem; border-radius: 10px; border: 1px solid var(--border); font-weight: 650; cursor: pointer; background: var(--surface); }
.mode-pick input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.mode-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.mode-tiles div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem; display: flex; flex-direction: column; }
.mode-tiles span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.mode-tiles b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.receipt { border: 1px dashed var(--border); border-radius: 12px; padding: 1rem; background: var(--surface); font-size: .9rem; }
.receipt .r-gym { font-size: 1.15rem; font-weight: 800; text-align: center; }
.receipt .r-sub { text-align: center; color: var(--muted); font-size: .8rem; }
.receipt .r-title { text-align: center; letter-spacing: .2em; font-size: .75rem; font-weight: 800; color: var(--muted); margin: .6rem 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); padding: .35rem 0; }
.receipt .r-row { display: flex; justify-content: space-between; gap: .75rem; padding: .18rem 0; }
.receipt .r-row span { color: var(--muted); }
.receipt .r-row.due b { color: var(--red); }
.receipt .r-row.ok b { color: var(--green); }
.receipt .r-amount { text-align: center; font-size: 2rem; font-weight: 800; margin: .5rem 0; color: var(--green); font-variant-numeric: tabular-nums; }
.receipt .r-foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: .6rem; border-top: 1px dashed var(--border); padding-top: .5rem; }
@media print {
  body.print-receipt * { visibility: hidden; }
  body.print-receipt #receipt, body.print-receipt #receipt * { visibility: visible; }
  body.print-receipt #receipt { position: absolute; left: 0; top: 0; width: 100%; border: none; }
}
.dues-hero, .dues-hero small, .dues-hero b { color: #fff; }
.modal .actions { flex-wrap: wrap; }

/* reports */
.rep-h { margin: 1.25rem 0 .6rem; font-size: 1rem; }
.split-bar { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.split-bar > div { height: 100%; background: var(--green); border-radius: 999px 0 0 999px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); vertical-align: middle; }
.dot.good { background: var(--green); border-color: var(--green); }

/* members at risk */
.risk-card { border-color: var(--amber); }
.risk-intro { border-left: 4px solid var(--amber); margin-bottom: 1rem; }
.risk-row { align-items: flex-start; }
.risk-row .title a { color: var(--text); font-weight: 700; }
.risk-row .title .badge { margin-left: .35rem; }
.risk-row.done { opacity: .7; }
.risk-why { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .84rem; color: var(--text); }
.risk-why li { margin: .1rem 0; }

.complete-card .chips .chip { color: var(--primary); border-color: var(--primary); }
/* hidden checkboxes behind chips must not widen the page */
.cat-pick label, .mode-pick label { position: relative; }
.cat-pick input, .mode-pick input { left: 0; top: 0; width: 1px; height: 1px; margin: 0; }

/* trainer exercise picker */
.ex-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.ex-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .4rem .5rem .5rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ex-tile .fig { width: 100%; height: 86px; color: var(--primary); }
.ex-tile b { font-size: .8rem; line-height: 1.2; }
.ex-tile small { font-size: .68rem; color: var(--muted); }
.ex-tile.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); background: var(--primary-soft); }
.ex-tile .num { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }

/* ---------- staff, activity log, live QR ---------- */
.role-tag { margin: -.25rem 0 .5rem; padding: .3rem .6rem; border-radius: 8px; background: var(--surface-2); font-size: .82rem; font-weight: 700; color: var(--muted); }
.staff-row { flex-wrap: wrap; }
.staff-row.off .main { opacity: .55; }
.staff-actions { gap: .35rem; flex-wrap: wrap; }
.staff-actions select { width: auto; min-height: 32px; padding: .2rem .5rem; }
@media (max-width: 640px) { .staff-actions { width: 100%; padding-left: 3rem; } }
.audit-row .nums { text-align: right; color: var(--muted); white-space: nowrap; }
.audit-row.alert .title { color: var(--red); }
.sec-alert-card { border-color: var(--red); }
.live-qr { min-height: calc(100vh - 2rem); display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; padding: .5rem 0 2rem; }
.live-qr .lq-top { display: flex; width: 100%; }
.live-qr .lq-gym { font-size: 1.3rem; font-weight: 800; letter-spacing: .05em; margin-top: .5rem; }
.live-qr .lq-title { font-size: 1.8rem; font-weight: 800; }
.live-qr .lq-img { background: #fff; padding: .75rem; border-radius: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.live-qr .lq-img img { display: block; width: min(78vw, 62vh, 460px); height: auto; aspect-ratio: 1; }
.live-qr .lq-bar { width: min(78vw, 460px); height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.live-qr .lq-bar > div { height: 100%; background: var(--primary); transition: width 1s linear; }
.live-qr .lq-sub { color: var(--muted); max-width: 30rem; }
.live-qr .lq-warn { background: var(--surface-2); border-radius: 10px; padding: .5rem .75rem; font-size: .9rem; max-width: 30rem; }
body.live-qr-mode .bottomnav, body.live-qr-mode .sidenav { display: none; }
body.live-qr-mode .layout { display: block; }
.staff-row .title { white-space: normal; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }

/* text-style button (e.g. "Password se login karo") */
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* register: Gym / Academy or Personal Trainer */
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.kind-pick label { cursor: pointer; }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick span { display: block; padding: .7rem .5rem; border: 2px solid var(--border); border-radius: 12px; text-align: center; font-weight: 700; }
.kind-pick input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.kind-pick input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
