/* Realtime Gym - brand system.
   Navy (#0f1a2e) frame, Realtime orange (#f26836) for brand accents and primary actions.
   Status colours: green = active, amber = renewal due, red = expired/overdue.
   Gender: blue = male, magenta = female, violet = mixed. */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --ink: #0f1a2e;
  --muted: #5d6779;
  --line: #e3e7ee;
  --rack: #0f1a2e;          /* sidebar navy */
  --rack-2: #1a2742;        /* active nav */
  --rack-ink: #c3cad8;
  --rack-hi: #ffffff;
  --brand: #f26836;         /* logo orange */
  --primary: #d9560f;       /* buttons: logo orange, deepened for white text */
  --primary-hover: #c24a0a;
  --primary-ink: #ffffff;
  --link: #c2410c;
  --ring: rgba(242, 104, 54, .22);
  --green: #15803d;
  --green-bg: #e3f6ea;
  --yellow: #a16207;
  --yellow-plate: #f5a524;
  --yellow-bg: #fdf3dc;
  --red: #c42b2b;
  --red-bg: #fde7e7;
  --blue-bg: #e7eefc;
  --male: #2563eb;
  --female: #be2d7f;
  --female-bg: #fbe5f1;
  --mixed: #6d4fd1;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15, 26, 46, .05), 0 1px 3px rgba(15, 26, 46, .04);
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-cond: var(--font);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1322; --surface: #131e33; --surface-2: #1a2742; --ink: #e8edf6; --muted: #9aa6bb;
    --line: #26344f; --rack: #08101d; --rack-2: #18243d; --primary: #ef6a2c; --primary-hover: #f47b42; --primary-ink: #ffffff;
    --link: #ff9466; --ring: rgba(242, 104, 54, .3); --green: #4ade80; --green-bg: #12301f; --yellow: #fbbf24; --yellow-bg: #3a2c0e;
    --red: #f87171; --red-bg: #3b1a1d; --blue-bg: #18284a; --male: #7aa2ff; --female: #f47ac0; --female-bg: #3a1a2e; --mixed: #a996ff;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1322; --surface: #131e33; --surface-2: #1a2742; --ink: #e8edf6; --muted: #9aa6bb;
  --line: #26344f; --rack: #08101d; --rack-2: #18243d; --primary: #ef6a2c; --primary-hover: #f47b42; --primary-ink: #ffffff;
  --link: #ff9466; --ring: rgba(242, 104, 54, .3); --green: #4ade80; --green-bg: #12301f; --yellow: #fbbf24; --yellow-bg: #3a2c0e;
  --red: #f87171; --red-bg: #3b1a1d; --blue-bg: #18284a; --male: #7aa2ff; --female: #f47ac0; --female-bg: #3a1a2e; --mixed: #a996ff;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font); font-weight: 800; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.02em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.2rem; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: var(--rack); color: var(--rack-ink); padding: 1.4rem 1rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.logo-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: .45rem .7rem; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.logo-chip img { display: block; height: 40px; width: auto; }
.brand { color: var(--rack-hi); padding: 0 .4rem 1.1rem; margin-bottom: .8rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand .logo-chip { margin-bottom: 1rem; }
.brand b { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; display: block; }
.brand small { color: var(--rack-ink); font-size: .85rem; }
.nav { flex: 1; }
.nav a { position: relative; display: flex; align-items: center; gap: .8rem; color: var(--rack-ink); padding: .62rem .8rem; border-radius: var(--radius); font-weight: 600; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.05); color: var(--rack-hi); text-decoration: none; }
.nav a.on { background: var(--rack-2); color: var(--rack-hi); }
.nav a.on::before { content: ""; position: absolute; left: -1rem; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .sep { height: 1px; background: rgba(255,255,255,.08); margin: .7rem .4rem; }
.nav .badge { margin-left: auto; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 800; padding: .05rem .5rem; border-radius: 10px; }
.side-foot { color: #8893a8; font-size: .8rem; line-height: 1.45; padding: 1rem .4rem 0; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .8rem 2rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .ctx small { display: block; color: var(--muted); font-size: .8rem; }
.topbar .ctx b { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; }
.topbar .who-me { text-align: right; line-height: 1.25; }
.topbar .who-me b { display: block; font-size: .95rem; }
.topbar .who-me small { color: var(--muted); font-size: .8rem; }
.avatar:hover { text-decoration: none; filter: brightness(1.2); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--rack); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; flex: none; }
.topbar .grow { flex: 1; }
.topbar form { margin: 0; }
.topbar .menu-btn { display: none; padding: .35rem .55rem; }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.content { padding: 1.8rem 2rem 3rem; max-width: 1360px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin-bottom: 1.2rem; }
.page-head .grow { flex: 1; min-width: 200px; }
.page-head p { margin: 0; color: var(--muted); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card h2 { margin-bottom: .8rem; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }

/* stat cards: big numerals, orange link label, status-coloured top edge */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.stat { display: block; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: var(--radius-lg); padding: 1.1rem 1.3rem 1rem; color: inherit; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 26, 46, .08); }
.stat .v { font: 800 2.3rem/1.1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; display: block; margin-bottom: .45rem; }
.stat .l { color: var(--link); font-size: .9rem; font-weight: 600; }
.stat .l::after { content: " \203A"; }
.stat.green { border-top-color: var(--green); } .stat.yellow { border-top-color: var(--yellow-plate); } .stat.red { border-top-color: var(--red); } .stat.blue { border-top-color: var(--brand); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.who b { display: block; }
td.who { min-width: 190px; }
.who small { white-space: nowrap; }
.who small { color: var(--muted); }

/* ---------- pills, bars ---------- */
.pill { display: inline-block; font-size: .76rem; font-weight: 700; padding: .15rem .6rem; border-radius: 20px; white-space: nowrap; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-yellow { background: var(--yellow-bg); color: var(--yellow); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-grey { background: var(--surface-2); color: var(--muted); }
.pill-blue { background: var(--blue-bg); color: var(--male); }
.pill-M { background: var(--blue-bg); color: var(--male); }
.pill-F { background: var(--female-bg); color: var(--female); }
.pill-X { background: var(--surface-2); color: var(--mixed); }
.days-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; width: 90px; margin-top: 4px; }
.days-bar i { display: block; height: 100%; }

/* ---------- forms ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=month], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; min-height: 44px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--ring); }
.field-validation-error, .validation-summary-errors { color: var(--red); font-size: .85rem; }
.validation-summary-errors ul { margin: 0 0 .8rem; padding-left: 1.1rem; }
.input-validation-error { border-color: var(--red) !important; }
.check { display: flex; align-items: center; gap: .45rem; font-weight: 500; }
.check input { width: 18px; height: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .4rem .75rem; cursor: pointer; font-weight: 600; font-size: .85rem; border-right: 1px solid var(--line); background: var(--surface); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--primary); color: var(--primary-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: -3px; }
.seg.att input[value=P]:checked + span { background: var(--green); color: #fff; }
.seg.att input[value=A]:checked + span { background: var(--red); color: #fff; }
.seg.att input[value=H]:checked + span { background: var(--yellow-plate); color: #1a1a1a; }
.seg.att input[value=L]:checked + span { background: var(--mixed); color: #fff; }
.bill-total { font: 800 1.7rem/1.1 var(--font); letter-spacing: -.02em; }

/* ---------- member photo ---------- */
.photo-pick { display: flex; align-items: center; gap: 1rem; }
.photo-pick input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
.photo-pick .hint { display: block; margin-top: .25rem; font-size: .8rem; color: var(--muted); }
.photo-circle { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.6rem; font-weight: 800; flex: none; }
.photo-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-circle [hidden] { display: none !important; }
.photo-circle svg { width: 30px; height: 30px; }
.photo-circle.lg { width: 84px; height: 84px; font-size: 1.8rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 700 .9rem var(--font); padding: .55rem 1.1rem; min-height: 40px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: var(--green); filter: brightness(1.08); }
.btn-danger { color: var(--red); }
.btn-sm { padding: .3rem .75rem; min-height: 32px; font-size: .82rem; border-radius: 8px; }
.btn-link { border: 0; background: none; color: var(--link); padding: 0; min-height: 0; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.inline { display: inline; margin: 0; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.filters input[type=search] { max-width: 280px; }
.filters select, .filters input[type=month], .filters input[type=date] { width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { padding: .3rem .75rem; border-radius: 20px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); font-size: .85rem; font-weight: 600; }
.chip:hover { text-decoration: none; background: var(--surface-2); }
.chip.on { background: var(--rack); color: #fff; border-color: var(--rack); }

/* ---------- flash ---------- */
.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-weight: 500; border-left: 4px solid var(--green); background: var(--green-bg); color: var(--ink); }
.flash.warn { border-left-color: var(--yellow-plate); background: var(--yellow-bg); }
.flash.err { border-left-color: var(--red); background: var(--red-bg); }

/* ---------- dashboard bits ---------- */
.now { display: flex; align-items: center; gap: .6rem; padding: .8rem 1.1rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--surface); border: 1px solid var(--line); margin-bottom: 1rem; }
.now .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.now .dot.M { background: var(--male); } .now .dot.F { background: var(--female); } .now .dot.X { background: var(--mixed); }
.bars { display: flex; align-items: flex-end; gap: .6rem; height: 140px; padding-top: .5rem; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bars i { display: block; width: 100%; max-width: 46px; background: linear-gradient(var(--brand), var(--primary)); border-radius: 6px 6px 0 0; min-height: 2px; }
.bars span { font-size: .75rem; color: var(--muted); }
.bars em { font-style: normal; font-size: .72rem; color: var(--muted); }
.gender-split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); margin: .4rem 0; }
.gender-split .m { background: var(--male); } .gender-split .f { background: var(--female); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: .3rem; }

/* ---------- schedule timeline ---------- */
.timeline { min-width: 720px; }
.tl-row { display: grid; grid-template-columns: 60px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.tl-row .d { font-weight: 800; font-size: 1rem; padding: .5rem 0; }
.tl-row.today .d { color: var(--link); }
.tl-track { position: relative; height: 44px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); }
.tl-slot { position: absolute; top: 6px; bottom: 6px; border-radius: 4px; padding: 2px 6px; font-size: .74rem; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; }
.tl-slot.M { background: var(--male); } .tl-slot.F { background: var(--female); } .tl-slot.X { background: var(--mixed); }
.tl-hours { position: relative; height: 20px; margin-left: 60px; font-size: .72rem; color: var(--muted); }
.tl-hours span { position: absolute; transform: translateX(-50%); }
.legend { display: flex; gap: 1rem; font-size: .85rem; margin-top: .7rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }

/* ---------- lockers ---------- */
.lockers { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; }
.locker { display: block; border: 1px solid var(--line); border-top: 5px solid var(--green); border-radius: var(--radius); background: var(--surface); padding: .55rem .65rem; color: var(--ink); min-height: 92px; }
.locker:hover { text-decoration: none; border-color: var(--brand); }
.locker .no { font: 800 1.45rem/1.1 var(--font); }
.locker .st { font-size: .75rem; font-weight: 600; color: var(--green); }
.locker .nm { font-size: .82rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.locker.used { border-top-color: var(--male); } .locker.used .st { color: var(--male); }
.locker.overdue { border-top-color: var(--red); } .locker.overdue .st { color: var(--red); }

/* ---------- attendance report ---------- */
.att-grid td.c { width: 22px; height: 22px; padding: 0; text-align: center; font-size: .7rem; font-weight: 700; border: 1px solid var(--line); }
.att-grid .P { background: var(--green-bg); color: var(--green); } .att-grid .A { background: var(--red-bg); color: var(--red); }
.att-grid .H { background: var(--yellow-bg); color: var(--yellow); } .att-grid .L { background: var(--surface-2); color: var(--mixed); }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: #0b1426; color: #fff; padding: 3rem 3.2rem; position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; }
.auth-art .scene { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.auth-art .head { display: flex; align-items: center; gap: 1rem; margin-bottom: 3.5rem; }
.auth-art .head b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.auth-art h1 { font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1.08; letter-spacing: -.035em; max-width: 14ch; margin-bottom: 1.6rem; }
.auth-art ul { list-style: none; margin: 0; padding: 0; max-width: 34rem; }
.auth-art li { position: relative; padding-left: 2rem; margin-bottom: 1rem; font-size: 1.08rem; color: #e6ebf4; text-shadow: 0 1px 8px rgba(11,20,38,.9); }
.auth-art li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid #f5a524; border-bottom: 2.5px solid #f5a524; transform: rotate(-45deg); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; background: var(--surface); }
.auth-form .box { width: 100%; max-width: 440px; }
.auth-form h1 { font-size: 2.3rem; letter-spacing: -.03em; margin-bottom: .6rem; }
.auth-form .lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.8rem; }
.auth-form .field { margin-bottom: 1.1rem; }
.auth-form .btn { width: 100%; min-height: 52px; font-size: 1.05rem; border-radius: 12px; }
.auth-form input[type=text], .auth-form input[type=tel], .auth-form input[type=email], .auth-form input[type=password] { min-height: 52px; background: var(--surface-2); border-radius: 12px; font-size: 1.05rem; }
.auth-form input:focus { background: var(--surface); }
/* sign-up: two columns so every field fits on one screen */
.auth-form .box.wide { max-width: 640px; }
.auth-form .box.wide h1 { font-size: 2rem; margin-bottom: .35rem; }
.auth-form .box.wide .lead { margin-bottom: 1.1rem; font-size: 1rem; }
.auth-grid { gap: .7rem 1rem; margin-bottom: 1.1rem; }
.auth-form .auth-grid .field { margin-bottom: 0; }
.auth-form .auth-grid .field label { margin-bottom: .25rem; }
.auth-form .auth-grid input[type=text], .auth-form .auth-grid input[type=tel], .auth-form .auth-grid input[type=email], .auth-form .auth-grid input[type=password] { min-height: 46px; }
.auth-form .box.wide .auth-note { margin-top: 1rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 1.6rem; }
.auth-tabs a { border-top: 3px solid var(--line); padding-top: .8rem; color: var(--muted); font-weight: 700; font-size: .95rem; }
.auth-tabs a:hover { text-decoration: none; color: var(--ink); }
.auth-tabs a.on { border-top-color: var(--brand); color: var(--ink); }
.phone-input { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.phone-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); background: var(--surface); }
.phone-input span { display: flex; align-items: center; padding: 0 1rem; font-weight: 800; border-right: 1px solid var(--line); }
.phone-input input { border: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0 !important; }
.auth-note { color: var(--muted); font-size: .92rem; margin-top: 2rem; }
.auth-foot { margin-top: auto; padding-top: 2rem; color: #8893a8; font-size: .82rem; }
.or { display: flex; align-items: center; gap: .7rem; color: var(--muted); margin: 1rem 0; font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dev-otp { background: var(--yellow-bg); border: 1px dashed var(--yellow); padding: .6rem .8rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.otp-input { font: 800 1.6rem var(--font) !important; letter-spacing: .5em; text-align: center; }

/* ---------- invoice ---------- */
.invoice { background: #fff; color: #171c2c; max-width: 800px; margin: 0 auto; padding: 2rem; border: 1px solid var(--line); }
.invoice .head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 3px solid #f26836; padding-bottom: 1rem; margin-bottom: 1rem; }
.invoice table th { background: #f3f4f7; color: #5b6375; }
.invoice .totals { margin-left: auto; width: 280px; margin-top: 1rem; }
.invoice .totals div { display: flex; justify-content: space-between; padding: .25rem 0; }
.invoice .totals .grand { border-top: 2px solid #171c2c; font-weight: 700; font-size: 1.15rem; margin-top: .3rem; padding-top: .5rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .split, .g2, .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20; transform: translateX(-100%); transition: transform .2s; padding-top: calc(1.1rem + env(safe-area-inset-top, 0px)); }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 1rem; }
  .form { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 1.5rem 1.25rem 2rem; min-height: 0; }
  .auth-art .head { margin-bottom: 1.5rem; }
  .auth-art h1 { font-size: 2rem; margin-bottom: 0; }
  .auth-art ul, .auth-foot { display: none; }
  .auth-form { padding: 2rem 1.25rem; align-items: flex-start; }
  .topbar { padding: .7rem 1rem; }
  .topbar .who-me { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .stat .v { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  .side, .topbar, .no-print, .flash { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .invoice { border: 0; padding: 0; }
}
.card > .field + .field { margin-top: .9rem; }

/* ---------- key / value lists (renewal requests) ---------- */
.kv { margin: 0; }
.kv > div { display: flex; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { width: 190px; flex: none; color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.field input[type=file] { display: block; max-width: 100%; font: inherit; font-size: .9rem; margin-top: .2rem; }
.receipt-img { display: block; max-width: 100%; max-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }

/* ---------- payment options / QR ---------- */
.pay-qr { display: block; width: 220px; max-width: 100%; aspect-ratio: 1 / 1; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; object-fit: contain; }
.pay-qr svg { display: block; width: 100%; height: 100%; }
.pay-box { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.pay-box .pay-lines > * + * { margin-top: .7rem; }
.pay-upi { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-weight: 700; }
@media (max-width: 640px) { .pay-box { grid-template-columns: 1fr; } .kv dt { width: 120px; } }

/* ---------- member portal ---------- */
.portal .content { max-width: 1040px; margin: 0 auto; width: 100%; }
.portal-top { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.5rem; background: var(--rack); color: #fff; }
.portal-top .logo-chip img { height: 36px; width: auto; }
.portal-top .grow { flex: 1; min-width: 0; }
.portal-top .grow b { display: block; font-size: 1.05rem; }
.portal-top .grow small { color: #aab4c6; }
.portal-top .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.renew-due { border-left: 4px solid var(--red); }
.renew-soon { border-left: 4px solid var(--yellow-plate); }
.pkg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.pkg { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; color: var(--ink); background: var(--surface); }
.pkg:hover { text-decoration: none; border-color: var(--brand); }
.pkg.on { border: 2px solid var(--brand); padding: calc(.8rem - 1px) calc(1rem - 1px); }
.pkg b { display: block; }
.pkg .price { font-size: 1.25rem; font-weight: 800; }
.split > * { min-width: 0; }
@media (max-width: 800px) {
  .portal-top { padding: .7rem 1rem; gap: .7rem; }
  .portal-top .logo-chip img { height: 28px; }
  .portal-top .grow small { display: none; }
}

/* ---------- subscription ---------- */
.licence-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.licence-bar span { flex: 1; min-width: 220px; }
.licence { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; }
.licence .days { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.licence .days small { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: .3rem; }
.meter { height: 8px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-top: .3rem; }
.meter > i { display: block; height: 100%; background: var(--green); }
.meter.warn > i { background: var(--yellow-plate); }
.meter.full > i { background: var(--red); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--surface); display: flex; flex-direction: column; gap: .4rem; }
.plan-card .price { font-size: 1.4rem; font-weight: 800; }
.plan-card form { margin-top: auto; }
.plan-card.off { opacity: .6; }
.crm-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 1rem; align-items: start; }
.crm-lists .card + .card { margin-top: 0; }
@media (max-width: 640px) { .licence { grid-template-columns: 1fr; } .crm-lists { grid-template-columns: 1fr; } }

/* ---------- Super Admin revenue report ---------- */
.stat .v.money { font-size: 1.55rem; overflow-wrap: anywhere; }
.revenue-stats { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.stat .sub { display: block; font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.rev-bars { height: 170px; gap: .35rem; }
.rev-bars em { white-space: nowrap; }
.rev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; align-items: start; }
.rev-grid > .card { margin: 0; }
.chg { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.chg.up { color: var(--green); } .chg.down { color: var(--red); }
tr.zero td { color: var(--muted); }
tfoot td { font-weight: 800; border-top: 2px solid var(--line); }
.year-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .rev-grid { grid-template-columns: 1fr; } .rev-bars em { display: none; } }
.rev-table th, .rev-table td { padding: .55rem .5rem; }
.rev-table td { font-size: .9rem; }
.rev-table td:first-child { white-space: nowrap; }
.rev-table td.who { min-width: 150px; white-space: normal; }

/* ---------- licence chip in the header ---------- */
.lic-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: .8rem; white-space: nowrap; line-height: 1.2; }
a.lic-chip:hover { text-decoration: none; border-color: var(--muted); }
.lic-chip b { font-weight: 700; }
.lic-chip .lic-sep { color: var(--muted); }
.lic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.lic-chip.yellow .lic-dot { background: var(--yellow-plate); } .lic-chip.red .lic-dot { background: var(--red); } .lic-chip.blue .lic-dot { background: var(--male); }
.lic-chip.red { border-color: var(--red); background: var(--red-bg); }
.lic-chip.yellow { border-color: var(--yellow-plate); background: var(--yellow-bg); }
@media (max-width: 1100px) { .lic-chip .lic-sep, .lic-chip b { display: none; } }
@media (max-width: 640px) { .lic-chip { display: none; } }
/* header: address the biometric machines connect to (Web.config Device:ConnectUrl) */
.dev-url { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .3rem .25rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: .8rem; white-space: nowrap; max-width: 380px; min-width: 0; }
.dev-url svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }
.dev-url .k { color: var(--muted); font-weight: 700; }
.dev-url code { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; background: none; padding: 0; color: var(--ink); font-weight: 700; }
.dev-url-copy { border: 0; border-radius: 999px; background: var(--rack); color: #fff; font: 700 .72rem var(--font); padding: .25rem .6rem; cursor: pointer; }
@media (max-width: 1600px) { .dev-url .k { display: none; } .dev-url { max-width: 300px; } }
@media (max-width: 1100px) { .dev-url { display: none; } }
/* device pages: the same address, with what to type on the machine */
.dev-connect { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; padding: .6rem .9rem; margin: 0 0 .8rem; border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.dev-connect > span:first-child { font-weight: 800; font-size: .88rem; }
.dev-connect code { font-weight: 700; font-size: .92rem; word-break: break-all; }
.dev-connect .small { flex-basis: 100%; }
.pay-note { margin-top: .3rem; }

/* ---------- support contact strip (header) and site footer ---------- */
.support-bar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .35rem 1.4rem; padding: .4rem 2rem; background: var(--rack); color: var(--rack-ink); font-size: .84rem; }
.support-bar .sb-label { margin-right: auto; font-weight: 700; letter-spacing: .02em; color: #f5a524; }
.support-bar a { display: inline-flex; align-items: center; gap: .4rem; color: #fff; font-weight: 600; }
.support-bar svg, .site-foot svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding: 1.3rem 2rem 1.1rem; color: var(--muted); font-size: .86rem; }
.site-foot b { display: block; color: var(--ink); margin-bottom: .35rem; font-size: .9rem; }
.site-foot .sf-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1rem 2rem; }
.site-foot .sf-line { display: flex; align-items: flex-start; gap: .45rem; margin-bottom: .3rem; color: var(--muted); }
.site-foot .sf-line svg { margin-top: .2em; color: var(--brand); }
.site-foot a.sf-line { color: var(--ink); font-weight: 600; }
.site-foot .sf-links { display: flex; flex-direction: column; gap: .3rem; }
.site-foot .sf-links a { color: var(--link); font-weight: 600; }
.site-foot .sf-copy { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .8rem; }
/* sign-in pages: strip and footer sit above and below the form */
.auth-form { flex-direction: column; }
.auth-form .box { margin: auto 0; }
.auth-form .support-bar, .auth-form .site-foot { width: 100%; max-width: 640px; }
.auth-form .support-bar { border-radius: 12px; padding: .5rem 1rem; margin-bottom: 1.6rem; }
.auth-form .site-foot { background: transparent; padding: 1rem 0 0; margin-top: 2rem; }
.auth-form .site-foot .sf-grid { grid-template-columns: 1fr 1fr; }
.auth-form .site-foot .sf-links { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: .3rem 1.1rem; }
.portal .site-foot .sf-grid, .info-page .site-foot .sf-grid { max-width: 1040px; margin: 0 auto; }
.portal .site-foot .sf-copy { max-width: 1040px; margin-left: auto; margin-right: auto; }
.portal > .support-bar { padding-left: 1.5rem; padding-right: 1.5rem; background: var(--rack-2); }

/* ---------- public pages: about us, privacy policy, delete account ---------- */
.info-doc { max-width: 860px; margin: 0 auto; }
.info-doc h1 { font-size: 2.1rem; letter-spacing: -.02em; margin-bottom: .4rem; }
.info-doc .lead { font-size: 1.08rem; color: var(--muted); margin: .4rem 0 1.2rem; }
.info-doc h2 { font-size: 1.15rem; margin: 1.5rem 0 .45rem; }
.info-doc .card h2 { margin-top: 0; }
.info-doc li { margin-bottom: .35rem; }
.info-doc .card { margin-bottom: 1rem; }
.info-doc .signed-in { background: var(--blue-bg); border-radius: 10px; padding: .6rem .8rem; font-weight: 600; }
.info-doc textarea { width: 100%; }
.info-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* ---------- Super Admin: account delete requests ---------- */
.tabs-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.del-req .del-head b { margin-right: .4rem; }
.del-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem 1rem; margin-top: .8rem; }
.del-grid small { display: block; color: var(--muted); font-size: .78rem; }
.del-grid b { overflow-wrap: anywhere; }
.del-effect { background: var(--yellow-bg); border-radius: 8px; padding: .5rem .7rem; margin: .7rem 0 0; }
.del-actions { display: flex; gap: .8rem 1.2rem; flex-wrap: wrap; margin-top: .7rem; }
.del-actions form { display: flex; gap: .5rem; flex: 1; min-width: 280px; margin: 0; }
.del-actions input { flex: 1; min-width: 0; }

@media (max-width: 800px) {
  .support-bar { padding: .4rem 1rem; gap: .3rem 1rem; justify-content: flex-start; }
  .support-bar .sb-label { display: none; }
  .site-foot { padding: 1.1rem 1rem; }
  .site-foot .sf-grid, .auth-form .site-foot .sf-grid { grid-template-columns: 1fr; }
  .auth-form .support-bar { margin-bottom: 1.1rem; }
  .del-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print { .support-bar, .site-foot { display: none; } }

/* ---------- staff attendance: monthly report with In / last punch, day punches, shifts, week off ---------- */
.att-times td.c { width: 46px; min-width: 46px; height: auto; padding: 0; vertical-align: top; }
.att-times td.c a, .att-times td.c > .cd { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 1px; min-height: 40px; color: inherit; text-decoration: none; }
.att-times td.c a:hover { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 3px; }
.att-times .cd { font-weight: 800; font-size: .72rem; min-height: .9rem; }
.att-times .tm { font-size: .62rem; font-weight: 600; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.att-times .tm.out { color: var(--muted); }
.att-times .tm.miss { color: var(--yellow); }
.att-times td.c.W { background: var(--blue-bg); color: var(--male); }
.att-times td.c.late { box-shadow: inset 0 -3px 0 var(--red); }
.att-times td.c.fut { opacity: .55; }
.att-times th.dh { padding: .3rem 0; text-align: center; min-width: 46px; font-size: .72rem; }
.att-times th.dh small { display: block; font-weight: 500; color: var(--muted); font-size: .62rem; text-transform: none; }
.att-times th.dh.sun { color: var(--red); }
.att-times .nm { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 160px; }
.day-box { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 20px 60px rgba(0,0,0,.35); background: var(--surface); color: var(--ink); }
.day-box::backdrop { background: rgba(15,26,46,.55); }
.day-box [data-day-body], .day-box [data-user-body] { padding: 1.2rem 1.3rem; }
.day-punches .dp-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: .7rem; }
.day-punches .dp-head .grow { flex: 1; }
.day-punches .dp-facts { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.day-punches .dp-add { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-top: 1rem; padding: .8rem; background: var(--surface-2); border-radius: var(--radius); }
.day-punches .dp-add label { display: flex; align-items: center; gap: .35rem; font-weight: 600; }
.day-punches .dp-add input[type=time] { width: 120px; }
.day-punches .dp-add input[type=text] { flex: 1; min-width: 180px; }
.card > .day-punches [data-close] { display: none; }
.weekoff { display: flex; flex-wrap: wrap; gap: .4rem; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { display: inline-block; padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .85rem; cursor: pointer; background: var(--surface); }
.day-chip input:checked + span { background: var(--blue-bg); border-color: var(--male); color: var(--male); }
.day-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.legend { flex-wrap: wrap; }

/* ---------- Device users / Download attendance (biometric machines) ---------- */
.dev-problem { border-left: 4px solid var(--yellow-plate); }
.dev-problem h2 { display: flex; align-items: center; gap: .5rem; }
.dev-problem svg, .dev-note svg { width: 18px; height: 18px; flex: none; }
.dev-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; padding: 1rem 1.3rem; border-top: 3px solid var(--rack); }
.dev-pick { display: flex; align-items: center; gap: .6rem; min-width: min(300px, 100%); flex: 0 1 380px; }
.dev-load { flex: none; white-space: nowrap; }
.dev-load svg { width: 17px; height: 17px; }
.dev-pick label { font-weight: 700; font-size: .85rem; color: var(--muted); }
.dev-pick select { flex: 1; font-weight: 700; }
.dev-facts { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.dev-facts > div { display: flex; flex-direction: column; gap: .1rem; }
.dev-facts .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.dev-note { flex-basis: 100%; margin: 0; display: flex; gap: .5rem; align-items: center; color: var(--yellow); font-size: .88rem; font-weight: 600; }
/* all device commands in one row (ribbon): icon over label, grouped. Buttons never shrink below their label, so on a
   narrower screen the groups wrap onto the next line instead of overlapping; on a phone each group is its own row. */
.ic { width: 18px; height: 18px; flex: none; }
.dev-ribbon { display: flex; flex-wrap: nowrap; align-items: stretch; row-gap: .4rem; padding: .5rem .4rem .35rem; margin: .8rem 0; }
.rib-group { display: flex; flex-direction: column; flex: 1 1 auto; padding: 0 .3rem; border-left: 1px solid var(--line); }
.rib-group:first-child { border-left: 0; }
.rib-btns { display: flex; flex-wrap: wrap; gap: .2rem; flex: 1; }
.rib-btn { flex: 1 1 0; min-width: min-content; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .3rem; padding: .5rem .25rem .45rem;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font: 700 .74rem/1.15 var(--font); text-align: center; cursor: pointer; }
.rib-btn svg { width: 22px; height: 22px; flex: none; color: var(--link); }
.rib-btn span { max-width: 86px; padding: 0 .1rem; }
.rib-btn:hover { background: color-mix(in srgb, var(--link) 7%, var(--surface)); border-color: var(--line); }
.rib-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rib-btn:disabled { opacity: .45; cursor: default; }
.rib-group.danger .rib-btn, .rib-group.danger .rib-btn svg { color: var(--red); }
.rib-group.danger .rib-btn:hover { background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }
.rib-cap { display: block; text-align: center; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: .25rem; white-space: nowrap; }
.rib-group.danger .rib-cap { color: var(--red); }
/* not enough room for one row (sidebar + 17 buttons need about 1390px): one line per group, its name on the left */
@media (max-width: 1389px) {
  .dev-ribbon { flex-direction: column; flex-wrap: nowrap; padding: .25rem .9rem; }
  .rib-group { flex: none !important; flex-direction: row; align-items: center; gap: .6rem; border-left: 0; border-top: 1px solid var(--line); padding: .35rem 0; }
  .rib-group:first-child { border-top: 0; }
  .rib-cap { order: -1; flex: none; width: 128px; text-align: left; white-space: normal; line-height: 1.3; padding: 0; }
  .rib-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); flex: 1; }
  .rib-btn span { max-width: none; }
}
@media (max-width: 560px) {
  .rib-group { flex-direction: column; align-items: stretch; gap: .2rem; }
  .rib-cap { width: auto; }
  .rib-btns { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}

.dev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.dev-layout > * { min-width: 0; }
.dev-users { padding: 0; overflow: visible; }
.dev-users > form > .table-wrap { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.dev-users-head { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; padding: 1rem 1.3rem .8rem; border-bottom: 1px solid var(--line); }
.dev-users-head h2 { margin: 0; display: flex; align-items: center; gap: .45rem; }
.dev-users-head h2 svg, .dev-card h2 svg, .dev-h svg { width: 19px; height: 19px; color: var(--muted); }
.dev-users-head .grow { flex: 1 1 220px; min-width: 200px; }
.dev-users-head p { margin: .15rem 0 0; }
.dev-filter { display: flex; gap: .5rem; flex-wrap: wrap; flex: 0 1 auto; }
.dev-filter select { width: auto; max-width: 220px; }
.dev-filter input[type=search] { width: 170px; }
.dev-selbar { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; padding: .55rem 1.3rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dev-selbar [data-sel-count] { font-weight: 800; }
.dev-table { max-height: 640px; overflow: auto; }
.dev-table thead th { position: sticky; top: 0; z-index: 1; background: var(--rack); color: #fff; }
.dev-table th.ck, .dev-table td.ck { width: 42px; text-align: center; }
.dev-table input[type=checkbox] { width: 17px; height: 17px; }
.dev-id { color: var(--link); font-variant-numeric: tabular-nums; }
.dev-enrol { white-space: nowrap; font-weight: 600; font-size: .86rem; }
.dev-add { display: block; color: var(--muted); margin-top: .15rem; }
.dev-info { display: block; margin-top: .1rem; }
.dev-person { min-width: 150px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dev-side { display: grid; gap: 1rem; }
.dev-side .card + .card { margin-top: 0; }
.dev-card { padding: 1rem 1.1rem; border-top: 3px solid var(--line); }
.dev-card h2 { font-size: 1rem; display: flex; gap: .45rem; align-items: center; margin-bottom: .7rem; }
.dev-card.accent-green { border-top-color: var(--green); }
.dev-card.accent-violet { border-top-color: var(--mixed); }
.dev-targets { display: grid; gap: .35rem; margin-bottom: .7rem; }
.dev-targets .check { padding: .45rem .55rem; border: 1px solid var(--line); border-radius: var(--radius); gap: .55rem; }
.dev-targets .check > span:nth-child(2) { flex: 1; }
.dev-targets .msel-all { border-style: dashed; }
.dev-self { background: var(--surface-2); }
.dev-this { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border-radius: 6px; background: var(--blue-bg); color: var(--male); font-weight: 700; font-size: .72rem; }
.dev-photo-box { width: min(620px, calc(100vw - 32px)); overflow: hidden; }
.dev-photo-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; background: linear-gradient(90deg, var(--rack), color-mix(in srgb, var(--rack) 70%, var(--brand))); color: #fff; }
.dev-photo-head h2 { margin: 0; color: #fff; font-size: 1.15rem; display: flex; gap: .5rem; align-items: center; }
.dev-photo-head svg { width: 20px; height: 20px; }
.dev-x { background: rgba(255,255,255,.15); border: 0; color: #fff; font-size: 1.5rem; line-height: 1; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; }
.dev-photo-form { padding: 1.2rem 1.3rem 1.3rem; }
.dev-drop { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.1rem; border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); cursor: pointer; }
.dev-drop-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.dev-drop-ic svg { width: 26px; height: 26px; }
.dev-photo-note { margin: .8rem 0; padding: .55rem .8rem; border-radius: var(--radius); background: var(--yellow-bg); border: 1px solid color-mix(in srgb, var(--yellow) 30%, transparent); color: var(--yellow); font-size: .85rem; line-height: 1.45; }
.dev-photo-form input[type=file] { width: 100%; padding: .55rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dev-photo-form input[type=text] { width: 100%; }
.dev-photo-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .8rem; }
/* "Upload Users in Multiple Devices": one line under the users header */
.dev-multi { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; padding: .45rem .8rem; border-left: 3px solid var(--green);
  background: color-mix(in srgb, var(--green-bg, #e8f6ee) 45%, var(--surface)); border-radius: 0 10px 10px 0; }
.dev-multi .msel { flex: 0 1 300px; min-width: 220px; }
.dev-off td { background: color-mix(in srgb, var(--yellow-bg) 45%, transparent); }
.dev-on .pill { margin: 1px 2px 1px 0; }
.dev-saved-count { color: var(--yellow); font-weight: 600; }
.dev-agl input[type=file], .dev-agl select { width: 100%; }
.dev-agl input[type=file] { padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dev-agl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 1rem; align-items: end; }
@media (max-width: 800px) { .dev-agl { grid-template-columns: 1fr; } }
.dev-multi-h { display: flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .92rem; }
.dev-multi-h svg { width: 17px; height: 17px; color: var(--green); }
.dev-multi .msel summary { font-style: normal; }
.dev-multi .msel-list { min-width: 340px; z-index: 30; }
.dev-multi .msel-list .check { padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.dev-multi-help { margin: 0; flex: 1 1 260px; }
.dev-photo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1rem; }
.dev-help { margin: .6rem 0 0; line-height: 1.45; }
.dev-remote { grid-template-columns: 1fr; gap: .55rem; }
.dev-remote .field { margin-bottom: 0; }
.dev-remote input, .dev-remote select { width: 100%; }
.dev-remote input[type=checkbox] { width: 18px; }
.dev-view svg { width: 15px; height: 15px; }
.dev-table td, .dev-table th { padding-left: .6rem; padding-right: .6rem; }
.dev-activity { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: auto; }
.dev-activity li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.dev-activity li:last-child { border-bottom: 0; }
.dev-activity .row1 { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.dev-activity .t { font-weight: 600; font-size: .88rem; margin-top: .2rem; }
.dev-loading { display: flex; gap: .8rem; align-items: center; padding: .85rem 1.3rem; background: var(--blue-bg); border-bottom: 1px solid var(--line); }
.dev-loading.inline-load { background: none; border: 0; padding: 0; gap: .5rem; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: devspin .8s linear infinite; flex: none; }
@keyframes devspin { to { transform: rotate(360deg); } }
.warn-text { color: var(--yellow); font-weight: 600; }
.ok-text { color: var(--green); font-weight: 800; }
.dev-detail { display: grid; gap: 1rem; }
.dev-detail-head { display: flex; gap: 1rem; align-items: flex-start; }
.dev-detail-head .grow { flex: 1; }
.dev-photo { width: 84px; height: 84px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; font: 800 2rem var(--font); color: var(--muted); }
.dev-photo img { width: 100%; height: 100%; object-fit: cover; }
.dev-kv { display: grid; grid-template-columns: 180px 1fr; gap: 0; }
.dev-kv dt, .dev-kv dd { margin: 0; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.dev-kv dt { color: var(--muted); font-size: .88rem; width: auto; }
.dev-kv dd { font-weight: 600; }
.dev-h { display: flex; align-items: center; gap: .45rem; }
.dev-dl { grid-template-columns: 1fr; gap: 0; }
.dev-dl-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.dev-dl-grid input[type=date] { width: 100%; }
.dev-dl-foot { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; margin-top: .9rem; }
.chips button.chip { cursor: pointer; font-family: inherit; }
.msel { position: relative; }
.msel summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius); padding: .55rem 2.2rem .55rem .8rem; background: var(--surface); min-height: 42px; font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.msel summary::-webkit-details-marker { display: none; }
.msel[open] summary { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.msel-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(15,26,46,.16); max-height: 320px; overflow: auto; }
.msel-list .check { padding: .6rem .8rem; border-bottom: 1px solid var(--line); gap: .6rem; margin: 0; }
.msel-list .check .grow { flex: 1; }
.msel-list .check:last-child { border-bottom: 0; }
.msel-all { background: var(--surface-2); }
.dev-progress-sum { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; margin-bottom: .8rem; }
.dev-progress-sum .v { display: block; font: 800 1.8rem/1.1 var(--font); }
.dev-progress-sum .l { color: var(--muted); font-size: .85rem; }
@media (max-width: 1500px) { .dev-layout { grid-template-columns: minmax(0, 1fr); } .dev-side { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; } }
@media (max-width: 700px) { .dev-photo-fields { grid-template-columns: 1fr; } .dev-multi .msel-list { min-width: 0; } .dev-dl-grid { grid-template-columns: 1fr; } .dev-kv { grid-template-columns: 1fr; } .dev-kv dt { border-bottom: 0; padding-bottom: 0; } .dev-filter input[type=search] { width: 100%; } }

/* ---------- Command log ---------- */
.dev-log-filter { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: .8rem; align-items: end; }
.dev-log-filter select, .dev-log-filter input { width: 100%; }
.dev-log-states { margin: 1rem 0 0; }
.dev-log-states .chip b { margin-left: .3rem; }
.dev-log-states .chip-warn:not(.on) b { color: var(--red); }
.dev-log td { vertical-align: top; }
.dev-log-bad td { background: color-mix(in srgb, var(--red-bg) 40%, transparent); }
.dev-log-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .dev-log-filter { grid-template-columns: 1fr 1fr; } }

/* Punch log: unknown IDs (long IDs such as a serial number wrap instead of running over the text) */
.unk-list { list-style: none; margin: 0; padding: 0; }
.unk-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.unk-row:first-child { border-top: 0; padding-top: .2rem; }
.unk-id { flex: 1 1 170px; min-width: 0; }
.unk-id b { display: block; font-size: 1rem; overflow-wrap: anywhere; }
.unk-id span { display: block; margin-top: .1rem; }
.unk-act { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ===================================================================== public pages: home page, buy a package, payment result */
body.pub { background: var(--surface); }
.pub-wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.btn-lg { min-height: 52px; padding: .8rem 1.5rem; font-size: 1rem; border-radius: 12px; }
.pub-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1.2rem; padding: .7rem max(1.5rem, calc((100vw - 1180px) / 2 + 1.5rem));
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: background .2s, border-color .2s; }
.pub-top.on-dark { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; color: #fff; }
.pub-top.on-dark.scrolled, .pub-top.on-dark.open { background: rgba(11, 20, 38, .94); border-color: rgba(255, 255, 255, .08); }
.pub-brand { display: flex; align-items: center; gap: .7rem; color: inherit; font-size: 1.15rem; letter-spacing: -.02em; }
.pub-brand .logo-chip { padding: .3rem .5rem; }
.pub-brand b { color: inherit; }
.pub-top:not(.on-dark) .pub-brand b { color: var(--ink); }
.pub-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.pub-nav a { color: inherit; font-weight: 600; font-size: .95rem; opacity: .85; }
.pub-top:not(.on-dark) .pub-nav a { color: var(--ink); }
.pub-nav a:hover { opacity: 1; color: var(--brand); text-decoration: none; }
.pub-actions { display: flex; align-items: center; gap: .6rem; }
.pub-top.on-dark .pub-signin { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.pub-menu { display: none; background: none; border: 0; color: inherit; padding: .3rem; cursor: pointer; }
.pub-menu svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pub-top:not(.on-dark) .pub-menu { color: var(--ink); }

/* hero */
.pub-hero { position: relative; isolation: isolate; overflow: hidden; background: #0b1426; color: #fff; padding: 8.5rem 0 5rem; min-height: 640px; }
.pub-hero .scene { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.pub-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 20, 38, .92) 0%, rgba(11, 20, 38, .7) 45%, rgba(11, 20, 38, .15) 100%); }
.pub-hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 3rem; align-items: center; }
.pub-eyebrow { display: inline-block; margin: 0 0 1.2rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(245, 165, 36, .14); color: #f5a524; font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.pub-hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.3rem); line-height: 1.04; letter-spacing: -.04em; margin: 0 0 1.3rem; max-width: 13ch; }
.pub-hero h1 span { color: var(--brand); }
.pub-lead { font-size: 1.18rem; line-height: 1.6; color: #d7deea; max-width: 36rem; margin: 0 0 2rem; }
.pub-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.pub-ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .35); }
.pub-ghost:hover { background: rgba(255, 255, 255, .12); }
.pub-ticks { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 0; margin: 2rem 0 0; color: #c3cad8; font-size: .92rem; }
.pub-ticks li { position: relative; padding-left: 1.4rem; }
.pub-ticks li::before { content: ""; position: absolute; left: 2px; top: .38em; width: 10px; height: 6px; border-left: 2.5px solid #f5a524; border-bottom: 2.5px solid #f5a524; transform: rotate(-45deg); }
.pub-hero-card { background: rgba(255, 255, 255, .97); color: var(--ink); border-radius: 20px; padding: 1.2rem 1.3rem; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); transform: rotate(1.5deg); max-width: 380px; justify-self: end; }
.phc-top { display: flex; align-items: center; gap: .5rem; font-size: .85rem; margin-bottom: .9rem; }
.phc-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.phc-time { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.phc-person { display: flex; align-items: center; gap: .8rem; padding: .8rem; border-radius: 14px; background: #f4f6f9; margin-bottom: .7rem; }
.phc-av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #f26836, #f5a524); color: #fff; font-weight: 800; display: grid; place-items: center; }
.phc-person b { display: block; }
.phc-person small { color: var(--muted); }
.phc-ok { margin-left: auto; background: #e3f6ea; color: #15803d; font-weight: 800; font-size: .78rem; padding: .25rem .6rem; border-radius: 999px; }
.phc-row { display: flex; justify-content: space-between; font-size: .88rem; padding: .35rem .2rem; border-bottom: 1px dashed #e3e7ee; }
.phc-row span { color: var(--muted); }
.phc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .9rem; }
.phc-stats div { background: #0f1a2e; color: #fff; border-radius: 12px; padding: .6rem .7rem; }
.phc-stats b { display: block; font-size: 1.25rem; }
.phc-stats small { color: #9aa6bb; font-size: .72rem; }

/* trust strip */
.pub-strip { background: #0f1a2e; color: #c3cad8; border-top: 1px solid rgba(255, 255, 255, .06); }
.pub-strip-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; font-weight: 600; font-size: .92rem; }
.pub-strip span { display: inline-flex; align-items: center; gap: .5rem; }
.pub-strip svg { width: 20px; height: 20px; color: #f5a524; }

/* sections */
.pub-sec { padding: 5.5rem 0; }
.pub-soft { background: var(--bg); }
.pub-dark { background: #0b1426; color: #e6ebf4; }
.pub-kicker { margin: 0 0 .6rem; color: var(--brand); font-weight: 800; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.pub-h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.03em; margin: 0 0 1rem; max-width: 22ch; }
.pub-sub { color: var(--muted); font-size: 1.05rem; max-width: 46rem; margin: 0 0 2rem; }
.pub-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-top: 2.2rem; }
.pub-features article { border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; background: var(--surface); transition: transform .15s, box-shadow .15s; }
.pub-features article:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 26, 46, .08); }
.pub-features h3 { margin: 1rem 0 .4rem; font-size: 1.12rem; }
.pub-features p { margin: 0; color: var(--muted); line-height: 1.55; }
.pf-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.pf-ic svg { width: 24px; height: 24px; }

/* devices */
.pub-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 3.5rem; align-items: center; }
.pub-dark .pub-h2 { color: #fff; }
.pub-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.pub-list li { position: relative; padding-left: 1.8rem; color: #c3cad8; line-height: 1.5; }
.pub-list li b { color: #fff; }
.pub-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 3px; background: var(--brand); transform: rotate(45deg); }
.pub-device { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.pd-body { width: 220px; height: 330px; border-radius: 26px; background: linear-gradient(160deg, #1d2b48, #0d1629); border: 2px solid #2a3b5e; padding: 18px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 0 80px rgba(242, 104, 54, .25); }
.pd-screen { width: 100%; flex: 1; border-radius: 16px; background: radial-gradient(circle at 50% 35%, #233458, #101a30); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; }
.pd-screen b { color: #fff; }
.pd-screen small { color: #4ade80; font-weight: 700; }
.pd-face { width: 92px; height: 92px; border-radius: 50%; border: 3px solid #f26836; display: grid; place-items: center; margin-bottom: .6rem; position: relative; }
.pd-face span { width: 44px; height: 44px; border-radius: 50%; background: #f5a524; box-shadow: 0 40px 0 -6px #f5a524; }
.pd-led { width: 14px; height: 14px; border-radius: 50%; background: #22c55e; margin-top: 14px; box-shadow: 0 0 14px #22c55e; }
.pd-tags { display: grid; gap: .5rem; }
.pd-tags span { display: flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; padding: .35rem .9rem; font-size: .88rem; }
.pd-tags i { width: 8px; height: 8px; border-radius: 50%; background: #f87171; }
.pd-tags i.on { background: #4ade80; }

/* pricing */
.pub-period { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 1.6rem; }
.pub-period button { border: 0; background: transparent; padding: .5rem 1.2rem; border-radius: 999px; font: 700 .92rem var(--font); color: var(--muted); cursor: pointer; }
.pub-period button.on { background: var(--rack); color: #fff; }
.pub-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.pub-price { border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem 1.5rem; display: flex; flex-direction: column; background: var(--surface); position: relative; }
.pub-price:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 18px 40px rgba(15, 26, 46, .08); }
.pub-price h3 { margin: 0; font-size: 1.25rem; }
.pp-members { color: var(--muted); margin: .3rem 0 1.1rem; }
.pp-members b { color: var(--ink); }
.pp-amount { display: flex; align-items: baseline; gap: .25rem; }
.pub-price [hidden], .buy-months [hidden] { display: none !important; }
.pp-amount b { font-size: 2.4rem; letter-spacing: -.03em; line-height: 1; }
.pp-cur { font-size: 1.3rem; font-weight: 800; }
.pp-amount small { color: var(--muted); font-weight: 600; }
.pp-note { color: var(--muted); font-size: .88rem; margin: .45rem 0 1rem; }
.pub-price ul { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .45rem; font-size: .92rem; flex: 1; }
.pub-price li { padding-left: 1.5rem; position: relative; }
.pub-price li::before { content: ""; position: absolute; left: 2px; top: .38em; width: 10px; height: 6px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.pub-price .btn { width: 100%; min-height: 46px; }
.pub-trial { margin: 1.6rem 0 0; color: var(--muted); }
.pub-empty { text-align: center; }

/* how it works */
.pub-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; padding: 0; margin: 2.2rem 0 0; }
.pub-steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; }
.pub-steps li::before { content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--rack); color: #fff; font-weight: 800; margin-bottom: .9rem; }
.pub-steps b { display: block; font-size: 1.05rem; margin-bottom: .35rem; }
.pub-steps span { color: var(--muted); line-height: 1.5; font-size: .95rem; }

/* closing call */
.pub-final { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 2.4rem 2.6rem !important; border-radius: 24px;
  background: linear-gradient(120deg, #0f1a2e, #1a2742); color: #fff; max-width: calc(1180px - 3rem); }
.pub-final h2 { margin: 0 0 .4rem; font-size: 1.8rem; letter-spacing: -.02em; }
.pub-final p { margin: 0; color: #c3cad8; }
.pub-final a:not(.btn) { color: #f5a524; }
.pub-final .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }

/* buy page */
.pub-buy { padding: 2.5rem 0 4rem; background: var(--bg); min-height: 70vh; }
.pub-buy h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.03em; margin: .3rem 0 .5rem; }
.pub-back { font-weight: 700; font-size: .92rem; }
.pub-buy-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.2rem; align-items: start; }
.pub-buy-form h2, .pub-summary h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
.pub-buy-form h2 + .form, .buy-months + h2 { margin-top: 1.4rem; }
.buy-packages { display: grid; gap: .5rem; }
.buy-pkg { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.buy-pkg:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.buy-pkg input { width: 18px; height: 18px; accent-color: var(--primary); }
.buy-pkg span:nth-of-type(1) { flex: 1; }
.buy-pkg b { display: block; }
.buy-pkg small { color: var(--muted); }
.buy-pkg .num { font-weight: 800; }
.buy-pkg .num small { font-weight: 500; margin-left: .2rem; }
.buy-months { display: inline-flex; gap: .4rem; margin-top: .8rem; }
.buy-months label { display: flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 700; }
.buy-months label:has(input:checked) { border-color: var(--rack); background: var(--rack); color: #fff; }
.buy-months input { accent-color: var(--primary); }
.pub-summary { position: sticky; top: 90px; }
.pub-summary dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0 0 .8rem; font-size: .95rem; }
.pub-summary dt { color: var(--muted); }
.pub-summary dd { margin: 0; text-align: right; font-weight: 700; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: .9rem 0; border-top: 1px solid var(--line); margin-bottom: .9rem; }
.sum-total b { font-size: 1.6rem; letter-spacing: -.02em; }
.pub-summary .btn { width: 100%; }
.sum-points { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .35rem; font-size: .88rem; }
.sum-points li { padding-left: 1.4rem; position: relative; }
.sum-points li::before { content: ""; position: absolute; left: 2px; top: .38em; width: 9px; height: 5px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }

/* payment result */
.pub-result { max-width: 640px; margin: 1rem auto; text-align: center; padding: 2.4rem 2rem; }
.pr-icon { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--yellow-bg); color: var(--yellow); }
.pr-icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pub-result.ok .pr-icon { background: var(--green-bg); color: var(--green); }
.pub-result.bad .pr-icon { background: var(--red-bg); color: var(--red); }
.pub-result h1 { margin: 0 0 .6rem; }
.pr-msg { color: var(--muted); font-size: 1.02rem; line-height: 1.55; }
.pr-facts { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.2rem; text-align: left; margin: 1.4rem 0; padding: 1rem 1.2rem; border-radius: 14px; background: var(--surface-2); }
.pr-facts dt { color: var(--muted); }
.pr-facts dd { margin: 0; font-weight: 700; }
.pub-result .pub-cta { justify-content: center; margin-bottom: .8rem; }

@media (max-width: 1000px) {
  .pub-nav { display: none; }
  .pub-menu { display: inline-flex; }
  .pub-top.open .pub-nav { display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0; padding: .5rem 1.5rem 1rem; background: inherit; }
  .pub-top.open .pub-nav a { padding: .7rem 0; border-bottom: 1px solid rgba(127, 127, 127, .2); }
  .pub-top:not(.on-dark).open .pub-nav { background: var(--surface); }
  .pub-top.on-dark.open .pub-nav { background: rgba(11, 20, 38, .97); }
  .pub-hero-in, .pub-split, .pub-buy-grid { grid-template-columns: 1fr; }
  .pub-hero-card { justify-self: start; transform: none; }
  .pub-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-summary { position: static; }
}
@media (max-width: 640px) {
  .pub-wrap { padding: 0 1rem; }
  .pub-top { padding: .6rem 1rem; gap: .6rem; }
  .pub-brand b { display: none; }
  .pub-actions .btn { padding: .45rem .8rem; min-height: 38px; font-size: .88rem; }
  .pub-hero { padding: 6.5rem 0 3rem; min-height: 0; }
  .pub-hero-card { display: none; }
  .pub-sec { padding: 3.5rem 0; }
  .pub-features, .pub-steps { grid-template-columns: 1fr; }
  .pub-final { padding: 1.6rem 1.3rem !important; border-radius: 18px; margin: 0 1rem; }
  .pub-strip-in { justify-content: flex-start; }
}

/* sign-in / sign-up pages: the same site header as the home page (solid navy bar) */
.pub-top.solid { position: sticky; top: 0; left: auto; right: auto; background: #0b1426; border-color: rgba(255, 255, 255, .08); }
.with-pub .auth { min-height: calc(100vh - 66px); }
.with-pub .auth-art .head { display: none; }
.with-pub .auth-art { padding-top: 2.4rem; }

/* staff day view: attendance marked by hand on the attendance sheet */
.dp-hand { border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); background: color-mix(in srgb, var(--brand) 5%, var(--surface)); border-radius: 12px; padding: .7rem .9rem; margin: .4rem 0 .8rem; }
.dp-hand-h { font-weight: 800; margin-bottom: .4rem; }
.dp-hand dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; }
.dp-hand dt { color: var(--muted); }
.dp-hand dd { margin: 0; font-weight: 700; }

/* ---------- export buttons (reports and masters) ---------- */
.export-btns { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.export-btns .ex-ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }

/* ---------- select rows to delete (Members, Staff) ---------- */
.bulk-table th.ck, .bulk-table td.ck { width: 38px; padding-right: 0; }
.bulk-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
.bulk-table tr.picked td { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.bulk-bar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .65rem 1rem; border-bottom: 1px solid var(--line);
            background: color-mix(in srgb, var(--red) 6%, var(--surface)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; position: sticky; top: 0; z-index: 3; }
.bulk-bar[hidden] { display: none; }
.bulk-bar .grow { flex: 1; }
.btn-del { background: var(--red); border-color: var(--red); color: #fff; }
.btn-del:hover { background: var(--red); filter: brightness(1.08); }

/* ---------- SMS credits ---------- */
.sms-hero { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: linear-gradient(120deg, var(--rack) 0%, var(--rack-2) 100%); color: #fff; border: 0; }
.sms-hero .sms-bal { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 220px; }
.sms-hero .l { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; font-weight: 700; }
.sms-hero .v { font-size: 2.8rem; font-weight: 800; line-height: 1.05; }
.sms-hero .s { font-size: .9rem; opacity: .85; }
.sms-hero.low .v { color: #ffb38a; }
.sms-mini { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.sms-mini div { display: flex; flex-direction: column; background: rgba(255, 255, 255, .08); border-radius: 10px; padding: .6rem .9rem; min-width: 110px; }
.sms-mini b { font-size: 1.25rem; }
.sms-mini span { font-size: .78rem; opacity: .8; }
.sms-custom { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.sms-custom input { width: 140px; }
.sms-custom label { font-weight: 700; }
td.sms-plus { color: var(--green); font-weight: 700; }

/* ---------- Member / Staff form: biometric devices ---------- */
.dev-up-head { display: flex; gap: .8rem; align-items: flex-start; }
.dev-up-head h2 { margin: 0 0 .15rem; }
.dev-up-head p { margin: 0; }
.dev-up-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--primary); }
.dev-up-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dev-up-row { display: flex; gap: .7rem; align-items: flex-start; flex-wrap: wrap; margin-top: 1rem; }
.dev-pick { position: relative; flex: 1; min-width: 260px; }
.dev-pick summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 2.4rem .5rem .8rem; background: var(--surface); min-height: 40px; position: relative; }
.dev-pick summary::-webkit-details-marker { display: none; }
.dev-pick summary::after { content: ""; position: absolute; right: .9rem; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.dev-pick[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.dev-pick[open] summary { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.dev-pick-sub { font-size: .78rem; color: var(--muted); }
.dev-pick-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15, 26, 46, .16); max-height: 320px; overflow: auto; padding: .3rem; }
.dev-opt { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 8px; cursor: pointer; }
.dev-opt:hover { background: var(--surface-2); }
.dev-opt input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.dev-opt .grow { flex: 1; min-width: 0; }
.dev-opt small { display: block; color: var(--muted); font-size: .76rem; }
.dev-opt.dev-all { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: .2rem; }
.dev-st { display: inline-flex; align-items: center; gap: .35rem; }
.dev-st .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.dev-up-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dev-up-note { margin: .6rem 0 0; }
/* list toolbar: always visible for owner / manager; device picker + upload in it */
.bulk-bar { background: var(--surface-2); }
.bulk-bar .dev-pick { flex: 0 1 270px; min-width: 210px; }
.bulk-bar .dev-pick summary { padding-top: .3rem; padding-bottom: .3rem; min-height: 34px; }
.bulk-bar .dev-pick-list { min-width: 320px; }
.bulk-bar .btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.bulk-bar .bulk-count { color: var(--muted); }
.bulk-bar .bulk-count b { color: var(--ink); }
@media (max-width: 760px) { .bulk-bar .dev-pick { flex: 1 1 100%; } .bulk-bar .dev-up-btn { flex: 1 1 auto; } }
/* Device users: "Load data from database" */
.dev-db-bar .btn { margin-bottom: .2rem; }
.dev-db-bar p { margin: .45rem 0 0; }

/* Device users: commands in process (all machines of the gym) */
.dev-progress{margin:.9rem 0 0;padding:.75rem .9rem;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.dev-progress.is-empty{display:none}
.dev-progress.is-running{border-color:var(--primary);background:var(--ring)}
.dev-progress.is-done{border-color:var(--green);background:var(--green-bg)}
.dev-progress.is-warn{border-color:var(--yellow);background:var(--yellow-bg)}
.dev-progress-h{display:flex;align-items:baseline;gap:.75rem;justify-content:space-between;flex-wrap:wrap}
.dev-progress-n{font-variant-numeric:tabular-nums;font-weight:700;color:var(--muted)}
.dev-progress-bar{height:8px;border-radius:6px;background:var(--line);overflow:hidden;margin:.5rem 0 .35rem}
.dev-progress-bar i{display:block;height:100%;background:var(--primary);border-radius:6px;transition:width .4s ease}
.dev-progress.is-done .dev-progress-bar i{background:var(--green)}
.dev-progress.is-warn .dev-progress-bar i{background:var(--yellow)}
.dev-progress-devs{display:flex;flex-wrap:wrap;gap:.25rem 1.2rem;font-size:.85rem;color:var(--muted)}

/* Add / Edit device: Sync devices list opens in the form (pushes Save down instead of covering it) */
.msel-inline .msel-list { position: static; margin-top: 4px; box-shadow: none; }

/* Member attendance log */
.ma-bar { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin-bottom: 1rem; }
.ma-nav { display: flex; align-items: center; gap: .6rem; }
.ma-nav b { min-width: 13rem; text-align: center; }
.ma-filters { margin: 0; flex: 1 1 100%; }
.ma-filters input[type=search] { flex: 1 1 260px; max-width: none; }
.ma-stats .stat .l::after { content: none; }
.ma-views { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
tr.ma-absent td { color: var(--muted); }
@media (max-width: 700px) { .ma-nav b { min-width: 0; } }

/* compact summary cards (dashboard: 2 rows of 6 + 5; Member Check-in: one row of 6) */
.stats-compact { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.stats-compact .stat { padding: .6rem .85rem .55rem; border-radius: var(--radius); }
.stats-compact .stat .v { font-size: 1.6rem; margin-bottom: .1rem; }
.stats-compact .stat .v small { font-size: .85rem; }
.stats-compact .stat .v.money { font-size: 1.3rem; line-height: 1.35; }
.stats-compact .stat .v.sm { font-size: 1.15rem; line-height: 1.4; white-space: nowrap; }
.stats-compact .stat .l, .stats-compact .stat .sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-compact .stat .l { font-size: .82rem; }
.stats-compact .stat .sub { font-size: .72rem; margin-top: .05rem; }
@media (max-width: 1100px) { .stats-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; } .stats-compact .stat .v { font-size: 1.45rem; } }

/* Member Check-in: one screen - filters in one line, tighter table */
.ma-bar { padding: .8rem 1rem; gap: .6rem 1rem; }
.ma-filters { flex-wrap: wrap; gap: .5rem; }
.ma-filters input[type=search] { flex: 1 1 200px; min-width: 160px; }
.ma-filters select { width: auto; max-width: 170px; }
.ma-filters input[type=date] { width: 150px; }
.ma-filters .check { white-space: nowrap; }
.ma-table th, .ma-table td { padding: .42rem .6rem; }
.ma-table td small { line-height: 1.25; }
.ma-head { margin-bottom: .7rem; }
.ma-head h1 { margin-bottom: .1rem; }
.ma-head p { margin: 0; }
.ma-table td { white-space: nowrap; font-size: .9rem; }
.ma-table td small { font-size: .78rem; }
.ma-ell { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.ma-table .pill.ma-ell { max-width: 170px; }
.ma-plan { max-width: 130px; }
/* labels may use two short lines instead of being cut (dashboard at laptop width) */
.stats-compact .stat .l { white-space: normal; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ma-table th { white-space: normal; line-height: 1.2; }
.ma-table .ma-ell { max-width: 125px; }
.ma-table .pill.ma-ell { max-width: 150px; }
.ma-table .ma-plan { max-width: 110px; }
.ma-table th, .ma-table td { padding: .4rem .45rem; }
.ma-table td { font-size: .87rem; }
.ma-table .ma-ell { max-width: 115px; }
.ma-table .pill.ma-ell { max-width: 135px; }
.ma-table .ma-plan { max-width: 100px; }
.ma-table a b { display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }

/* ---- Home page: mobile app links + QR codes (release 2026.11.03) ---- */
.pub-app { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: center; }
.pub-app-text p:not(.pub-kicker) { color: #c3cad8; max-width: 46ch; font-size: 1.05rem; line-height: 1.55; margin: 0; }
.pub-app-stores { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.pub-store { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.pub-qr { width: 180px; height: 180px; padding: 4px; background: #fff; border-radius: 14px; box-sizing: border-box; }
.pub-qr svg { display: block; width: 100%; height: 100%; }
.pub-store-btn { display: inline-flex; align-items: center; gap: .6rem; background: #000; color: #fff; border: 1px solid #3a4459; border-radius: 12px; padding: .5rem .95rem; text-decoration: none; min-width: 170px; box-sizing: border-box; }
.pub-store-btn:hover { border-color: #f26836; color: #fff; }
.pub-store-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.pub-store-btn span { display: flex; flex-direction: column; font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.pub-store-btn small { font-size: .62rem; letter-spacing: .08em; font-weight: 600; color: #c3cad8; }
.pub-store-note { font-size: .8rem; color: #9aa6bb; }
@media (max-width: 860px) { .pub-app { grid-template-columns: 1fr; gap: 2rem; } .pub-app-stores { justify-content: center; } }
@media (max-width: 420px) { .pub-qr { width: 140px; height: 140px; } .pub-store-btn { min-width: 140px; } }

/* ---- Dashboard header: lockers in use chip, left of Member Check-in (release 2026.11.03) ---- */
.locker-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .88rem; white-space: nowrap; }
.locker-chip:hover { border-color: var(--brand); }
.locker-chip svg { width: 18px; height: 18px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.locker-chip span { color: var(--muted); }
.locker-chip b { font-size: 1rem; }
.locker-chip b small { color: var(--muted); font-weight: 600; }

/* ---- Deleted bills (release 2026.11.03) ---- */
.bill-deleted { border-left: 4px solid var(--red); margin-bottom: 1rem; }
.bill-deleted h2 { color: var(--red); margin: 0 0 .4rem; }
.bill-deleted p { margin: .2rem 0; }
.bill-delete { margin-top: 1rem; }
.bill-delete summary { cursor: pointer; font-weight: 700; color: var(--red); }
.bill-deleted-row td { color: var(--muted); }
.bill-deleted-row td.num { text-decoration: line-through; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red); filter: brightness(1.08); color: #fff; }

/* ---- Member Check-in: staff today strip (one slim line so the table still starts on the first screen) ---- */
.ma-staffbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 auto 0 1rem; }
.ma-staffbar-h { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: .2rem; }
.stat-chip { display: inline-flex; align-items: baseline; gap: .3rem; padding: .2rem .6rem; border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; white-space: nowrap; }
.stat-chip:hover { border-color: var(--brand); }
.stat-chip .v { font-size: 1rem; font-weight: 800; }
.stat-chip .v small { font-size: .78rem; }
.stat-chip .l { font-size: .8rem; color: var(--muted); }
.stat-chip .sub { font-size: .72rem; color: var(--muted); }
.stat-chip.green { border-left-color: var(--green); }
.stat-chip.red { border-left-color: var(--red); }
.stat-chip.yellow { border-left-color: var(--yellow-plate); }

/* ================= Home page: light design (release 2026.11.03b) ================= */
.pub-top.pub-light-old { background: rgba(255, 255, 255, .97); border-bottom: 1px solid #eef1f6; padding-top: .95rem; padding-bottom: .95rem; }
.pub-top.pub-light-old .pub-brand .logo-chip { box-shadow: none; padding: 0; background: transparent; }
.pub-top.pub-light-old .pub-brand img { height: 46px; width: auto; }
.pub-top.pub-light-old .pub-nav { gap: 2rem; padding: 0 1.6rem; border-left: 1px solid #d5dbe5; border-right: 1px solid #d5dbe5; margin-left: 1.2rem; margin-right: auto; }
.pub-top.pub-light-old .pub-nav a { font-size: 1rem; opacity: 1; position: relative; padding: .35rem 0; white-space: nowrap; }
.pub-nav a.on { color: var(--brand) !important; }
.pub-nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 2px; background: var(--brand); }
.pub-bi { width: 18px; height: 18px; fill: currentColor; flex: none; }
.pub-bi-line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pub-actions .btn { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.pub-top.pub-light-old .pub-signin { border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); padding: .5rem 1.15rem; font-weight: 700; }
.pub-top.pub-light-old .pub-buybtn { border: 0; border-radius: 999px; background: linear-gradient(90deg, #f7752d, #f2581c); color: #fff; padding: .6rem 1.3rem; font-weight: 700; box-shadow: 0 6px 16px rgba(242, 104, 54, .3); }
.hx { background: radial-gradient(900px 420px at 85% 15%, #e3edfb 0, rgba(227, 237, 251, 0) 60%), linear-gradient(180deg, #f2f6fc, #fbfcfe); color: var(--ink); padding: 3.2rem 0 2.6rem; }
.hx-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.hx-pill { display: inline-flex; align-items: center; gap: .7rem; background: #fde6da; border-radius: 999px; padding: .3rem 1.4rem .3rem .3rem; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.hx-pill i { display: grid; place-items: center; width: 44px; height: 32px; border-radius: 999px; background: linear-gradient(90deg, #f7752d, #f2581c); color: #fff; }
.hx-pill svg { width: 22px; height: 22px; }
.hx h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.03; letter-spacing: -.045em; margin: 1.6rem 0 1.2rem; color: var(--ink); }
.hx h1 .o { color: var(--brand); }
.hx-lead { font-size: 1.28rem; line-height: 1.5; color: #1d2840; max-width: 38rem; margin: 0 0 1.8rem; font-weight: 500; }
.hx-cta { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.hx-btn { display: inline-flex; align-items: center; gap: .8rem; border-radius: 20px; padding: 1rem 2rem; font-weight: 700; font-size: 1.28rem; text-decoration: none !important; }
.hx-btn svg { width: 24px; height: 24px; flex: none; }
.hx-solid { background: linear-gradient(90deg, #f7752d, #f2581c); color: #fff !important; box-shadow: 0 10px 22px rgba(242, 104, 54, .3); }
.hx-solid:hover { filter: brightness(1.05); }
.hx-line { border: 2px solid var(--ink); color: var(--ink) !important; background: #fff; padding: .9rem 1.9rem; }
.hx-line:hover { border-color: var(--brand); }
.hx-get { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; margin-top: 1.7rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: .75rem 1rem; box-shadow: 0 6px 18px rgba(15, 26, 46, .06); }
.hx-get-t { font-weight: 800; font-size: .95rem; line-height: 1.25; color: var(--ink); }
.hx-get-t small { display: block; font-weight: 600; color: var(--muted); font-size: .78rem; }
.hx-store { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.hx-qr { width: 118px; height: 118px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-sizing: border-box; flex: none; }
.hx-qr svg { display: block; width: 100%; height: 100%; }
.hx-store .pub-store-btn { min-width: 160px; padding: .4rem .8rem; white-space: nowrap; }
.hx-store .pub-store-btn span { white-space: nowrap; }
.hx-card { background: rgba(255, 255, 255, .94); border: 1px solid #e1e8f3; border-radius: 28px; padding: 1.7rem 1.5rem 1.5rem; box-shadow: 0 20px 50px rgba(30, 60, 120, .12); }
.hx-card-h { display: flex; align-items: center; gap: .8rem; font-weight: 800; font-size: 1.5rem; margin-bottom: 1.2rem; }
.hx-live { width: 13px; height: 13px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 6px #dcfce7; flex: none; }
.hx-time { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 1.15rem; }
.hx-person { display: flex; align-items: center; gap: 1.1rem; background: #f7f9fc; border: 1px solid #e6ebf3; border-radius: 20px; padding: 1rem 1.1rem; }
.hx-av { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: none; }
.hx-av svg { display: block; width: 100%; height: 100%; }
.hx-who b { display: block; font-size: 1.45rem; white-space: nowrap; }
.hx-who small { color: var(--muted); font-size: 1rem; white-space: nowrap; }
.hx-ok { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; background: #dcfce7; color: #15803d; border-radius: 999px; padding: .5rem 1rem; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.hx-ok svg { width: 18px; height: 18px; }
.hx-hr { height: 1px; background: #e4e9f1; margin: 1.2rem 0; }
.hx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.hx-tiles div { background: linear-gradient(160deg, #1d3a6b, #16305a); color: #fff; border-radius: 16px; padding: 1rem 1.15rem; min-height: 140px; }
.hx-tiles svg { width: 30px; height: 30px; color: #dfe8ff; }
.hx-tiles b { display: block; font-size: 2.3rem; font-weight: 800; margin-top: .3rem; line-height: 1.1; }
.hx-tiles span { font-size: 1.05rem; color: #e3e9f6; }
.hx-strip { margin-top: 2.2rem; background: rgba(255, 255, 255, .8); border: 1px solid #e6ecf5; border-radius: 26px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 1.2rem 0; }
.hx-strip a { display: flex; align-items: center; justify-content: center; gap: 1rem; font-weight: 700; font-size: 1.4rem; color: var(--ink); text-decoration: none; border-left: 2px solid #e1e6ef; }
.hx-strip a:first-child { border-left: 0; }
.hx-strip a:hover { color: var(--brand); }
.hx-strip svg { width: 42px; height: 42px; flex: none; }
@media (max-width: 1150px) { .pub-top.pub-light-old .pub-nav { gap: 1.2rem; padding: 0 1rem; } }
@media (max-width: 1000px) {
  .pub-top.pub-light-old .pub-nav { border: 0; margin: 0; padding: .5rem 1.5rem 1rem; }
  .pub-top.pub-light-old .pub-actions { margin-left: auto; }
  .hx-in { grid-template-columns: 1fr; }
  .hx-card { max-width: 560px; }
  .hx-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
  .hx-strip a:nth-child(3) { border-left: 0; }
}
@media (max-width: 640px) {
  .pub-top.pub-light-old .pub-brand img { height: 36px; }
  .pub-bi { display: none; }
  .hx { padding: 2rem 0 1.6rem; }
  .hx-btn { font-size: 1.05rem; padding: .8rem 1.3rem; border-radius: 16px; }
  .hx-card { display: none; }
  .hx-strip a { font-size: 1.05rem; gap: .6rem; }
  .hx-strip svg { width: 30px; height: 30px; }
  .hx-get { display: flex; }
}

/* ---- Super Admin dashboard: 10 compact cards, 5 in a row, 2 rows (release 2026.11.03b) ---- */
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stats-5 .stat { padding: .6rem .95rem .6rem; min-height: 0; }
.stats-5 .stat .v { font-size: 1.65rem; margin-bottom: .1rem; }
.stats-5 .stat .v.money { font-size: 1.4rem; line-height: 1.3; }
.stats-5 .stat .l { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; } }

/* ================= Release 2026.11.03c: white floating header on every page before sign-in + new home hero ================= */
.pub-top.pub-float { position: sticky; top: 12px; z-index: 50; display: flex; align-items: center; gap: 1rem; width: min(1380px, calc(100% - 32px)); margin: 12px auto 0;
  padding: .55rem .7rem .55rem 1.6rem; background: #fff; border: 1px solid rgba(15, 26, 46, .06); border-radius: 999px; box-shadow: 0 10px 30px rgba(15, 26, 46, .12); color: var(--ink); backdrop-filter: none; }
.pub-float .pub-brand img { height: 50px; width: auto; display: block; }
.pub-float .pub-nav { display: flex; align-items: center; gap: .35rem; margin: 0 0 0 auto; padding: 0; border: 0; }
.pub-float .pub-nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .62rem 1rem; border-radius: 999px; color: var(--ink) !important; font-weight: 600; font-size: .98rem; opacity: 1; white-space: nowrap; text-decoration: none; }
.pub-float .pub-nav a:hover { background: #fff1e9; color: var(--brand) !important; }
.pub-float .pub-nav a.on { background: linear-gradient(90deg, #f7752d, #f2581c); color: #fff !important; box-shadow: 0 6px 14px rgba(242, 104, 54, .35); }
.pub-float .pub-nav a.on::after { content: none; }
.pub-ni { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pub-float .pub-nav a.on .pub-ni { fill: currentColor; stroke: none; }
.pub-sep { width: 2px; height: 34px; background: #0f1a2e; opacity: .85; border-radius: 2px; margin: 0 .4rem; }
.pub-float .pub-actions { display: flex; gap: .6rem; }
.pub-float .pub-signin { border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); padding: .55rem 1.15rem; font-weight: 700; min-height: 0; }
.pub-float .pub-buybtn { border: 0; border-radius: 999px; background: linear-gradient(90deg, #f7752d, #f2581c); color: #fff; padding: .7rem 1.3rem; font-weight: 700; min-height: 0; box-shadow: 0 6px 16px rgba(242, 104, 54, .35); }
.pub-float .pub-menu { color: var(--ink); }
.with-pub .pub-float { margin-bottom: 12px; }
body.info-page.with-pub .pub-float { margin-bottom: 1.2rem; }
/* hero */
.hx { position: relative; isolation: isolate; overflow: hidden; margin-top: -86px; padding: calc(86px + 3rem) 0 3.2rem;
  background: radial-gradient(900px 500px at 75% 30%, #e6eefc 0, rgba(230, 238, 252, 0) 65%), linear-gradient(180deg, #f3f7fd, #fbfcff); }
.hx-waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hx::before, .hx::after { content: ""; position: absolute; z-index: -1; width: 120px; height: 150px; background-image: radial-gradient(#c3d0e6 2px, transparent 2.5px); background-size: 22px 22px; }
.hx::before { right: 2%; top: 120px; }
.hx::after { left: 1%; bottom: 40px; }
.hx-in { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; }
.hx-pill { gap: .8rem; background: linear-gradient(90deg, #fde3d3, #fff3ec); padding: .3rem 1.4rem .3rem .3rem; font-size: 1.02rem; box-shadow: 0 4px 12px rgba(242, 104, 54, .12); }
.hx-pill i { width: 46px; height: 46px; border-radius: 50%; }
.hx h1 { margin: 1.1rem 0 1rem; font-size: clamp(2.6rem, 5.3vw, 4.7rem); }
.hx-lead { font-size: 1.22rem; max-width: 42rem; margin-bottom: 1.6rem; }
.hx-lead b { font-weight: 700; color: var(--ink); }
.hx-btn { border-radius: 999px; padding: .75rem 1.9rem .75rem .8rem; font-size: 1.2rem; gap: .9rem; }
.hx-btn-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #f2581c; }
.hx-btn-i svg, .hx-btn-c svg { width: 20px; height: 20px; }
.hx-btn-c { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #f5a524; color: #0f1a2e; }
.hx-line { padding: .7rem 1.9rem .7rem .8rem; background: rgba(255, 255, 255, .85); }
.hx-feats { display: flex; flex-wrap: wrap; align-items: flex-start; margin-top: 1.8rem; }
.hx-feats a { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: 0 1.6rem; text-align: center; font-weight: 600; font-size: 1.02rem; line-height: 1.2; color: var(--ink); text-decoration: none; border-left: 2px solid #2f4f8f; }
.hx-feats a:first-child { border-left: 0; padding-left: .2rem; }
.hx-feats a:hover { color: var(--brand); }
.hx-feats i { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #e4ecfa; color: #1d3a6b; }
.hx-feats svg { width: 30px; height: 30px; }
.hx-get { margin-top: 1.6rem; }
.hx-card { border-radius: 26px; padding: 1.5rem 1.4rem 1.4rem; box-shadow: 0 24px 60px rgba(20, 48, 107, .18); border: 1px solid #dfe7f4; }
.hx-card-h { font-size: 1.3rem; margin-bottom: 1rem; }
.hx-time { color: #1d3a6b; font-size: 1.15rem; }
.hx-person { background: #f7f9fc; padding: .9rem 1rem; gap: 1rem; border-radius: 18px; }
.hx-av { width: 70px; height: 70px; border-radius: 50%; background: linear-gradient(135deg, #f7752d, #f2581c); color: #fff; font-weight: 800; font-size: 1.5rem; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(242, 104, 54, .35); }
.hx-who b { font-size: 1.3rem; color: #14306b; }
.hx-who small { font-size: .98rem; color: #4b5d84; }
.hx-ok { font-size: 1rem; padding: .4rem .9rem; }
.hx-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .3rem; font-size: 1.08rem; border-bottom: 1px solid #edf1f7; }
.hx-row span { color: #4b5d84; }
.hx-row b { color: var(--ink); }
.hx-tiles { margin-top: 1rem; }
.hx-tiles div { background: linear-gradient(160deg, #14306b, #0f2452); min-height: 0; padding: .9rem 1rem; border-radius: 14px; }
.hx-tiles b { font-size: 1.9rem; margin: 0 0 .2rem; }
.hx-tiles span { font-size: .95rem; }
@media (max-width: 1250px) { .pub-float .pub-nav a { padding: .55rem .7rem; font-size: .92rem; } .pub-float .pub-ni { display: none; } .pub-float .pub-nav a.on .pub-ni { display: block; } }
@media (max-width: 1000px) {
  .pub-top.pub-float { border-radius: 22px; }
  .pub-float .pub-nav { display: none; }
  .pub-float .pub-actions { margin-left: auto; }
  .pub-sep { display: none; }
  .pub-top.pub-float.open .pub-nav { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: .6rem; background: #fff; border-radius: 18px; box-shadow: 0 12px 30px rgba(15, 26, 46, .16); }
  .pub-top.pub-float.open .pub-nav a { border-bottom: 0; }
  .pub-float .pub-ni { display: block; }
  .hx-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pub-top.pub-float { width: calc(100% - 20px); margin-top: 10px; padding: .45rem .5rem .45rem .9rem; gap: .5rem; }
  .pub-float .pub-brand img { height: 34px; }
  .pub-float .pub-signin, .pub-float .pub-buybtn { padding: .45rem .75rem; font-size: .85rem; }
  .hx { margin-top: -66px; padding-top: calc(66px + 1.6rem); }
  .hx-waves { display: none; }
  .hx::before, .hx::after { display: none; }
  .hx { background: radial-gradient(600px 300px at 80% 0, #e6eefc 0, rgba(230, 238, 252, 0) 70%), linear-gradient(180deg, #eef3fb, #fbfcff); }
  .hx-feats a { padding: 0 .7rem; font-size: .85rem; }
  .hx-feats i { width: 46px; height: 46px; }
  .hx-feats svg { width: 24px; height: 24px; }
  .hx-btn { font-size: 1rem; padding-right: 1.2rem; }
}

/* ---- Release 2026.11.03c: the home page is the sign-in page; every sign-in page has the same hero ---- */
.hx-signin { background: #fff; border: 1px solid #dfe7f4; border-radius: 26px; padding: 2rem 2.1rem 1.6rem; box-shadow: 0 24px 60px rgba(20, 48, 107, .18); align-self: start; }
.hx-signin h2 { font-size: 2.1rem; letter-spacing: -.03em; margin: 0 0 .3rem; }
.hx-signin .lead { color: var(--muted); font-size: 1rem; margin: 0 0 1.2rem; }
.hx-signin .field { margin-bottom: 1rem; }
.hx-signin input[type=text], .hx-signin input[type=tel], .hx-signin input[type=email], .hx-signin input[type=password] { min-height: 50px; background: var(--surface-2); border-radius: 12px; font-size: 1.02rem; width: 100%; }
.hx-signin input:focus { background: var(--surface); }
.hx-signin .btn-primary, .hx-signin-btn { width: 100%; min-height: 52px; font-size: 1.05rem; border: 0; border-radius: 999px; background: linear-gradient(90deg, #f7752d, #f2581c); color: #fff; box-shadow: 0 8px 18px rgba(242, 104, 54, .3); }
.hx-signin .auth-note { font-size: .92rem; margin: .7rem 0 0; color: var(--muted); }
.hx-tabs { display: flex; border-bottom: 2px solid var(--line); margin: 0 0 1.2rem; }
.hx-tabs a { flex: 1; text-align: center; padding: .7rem 0; font-weight: 700; color: var(--muted); text-decoration: none; }
.hx-tabs a.on { color: var(--ink); box-shadow: inset 0 -3px 0 var(--brand); }
.hx-auth .hx-in { align-items: start; }
.hx-auth .hx-copy { padding-top: .6rem; }
.hx-auth h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); }
.hx-auth .hx-signin.auth-form { display: block; padding: 2rem 2.1rem 1.6rem; background: #fff; }
.hx-auth .hx-signin .box { max-width: none; }
.hx-auth .hx-wide { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.hx-nohead { margin-top: 0; padding-top: 3rem; }
body.auth-page { background: #f3f7fd; }
@media (max-width: 1000px) {
  .hx-auth .hx-wide { grid-template-columns: 1fr; }
  .hx-auth .hx-copy, .hx-in > .hx-copy { order: 2; }
  .hx-signin { order: 1; }
}
@media (max-width: 640px) {
  .hx-signin, .hx-auth .hx-signin.auth-form { padding: 1.4rem 1.2rem 1.2rem; border-radius: 20px; }
  .hx-signin h2 { font-size: 1.7rem; }
  .hx-auth .hx-copy .hx-feats, .hx-auth .hx-copy .hx-lead { display: none; }
}
.hx .hx-signin h1 { font-size: 2.1rem; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 .4rem; max-width: none; }
.hx .hx-signin .box.wide h1 { font-size: 1.9rem; }
@media (max-width: 640px) { .hx .hx-signin h1 { font-size: 1.7rem; } }
.hx-wide .hx-feats { flex-wrap: nowrap; }
.hx-wide .hx-feats a { padding: 0 .75rem; font-size: .9rem; }
.hx-wide .hx-feats i { width: 50px; height: 50px; }
.hx-wide .hx-pill { font-size: .9rem; }

/* ================= Release 2026.11.03d: app links in the footer; light menu after sign-in like the home page ================= */
.site-foot .sf-grid { grid-template-columns: 1.1fr .9fr 1.25fr .9fr; }
.sf-app .sf-stores { display: flex; gap: 1rem; flex-wrap: wrap; }
.sf-store { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.sf-qr { width: 104px; height: 104px; padding: 2px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-sizing: border-box; }
.sf-qr svg { display: block; width: 100%; height: 100%; }
.sf-store .pub-store-btn { min-width: 0; padding: .35rem .7rem; white-space: nowrap; }
.sf-store .pub-store-btn span { font-size: .92rem; white-space: nowrap; }
.sf-app .sf-scan { display: block; margin-top: .4rem; color: var(--muted); }
@media (max-width: 1100px) { .site-foot .sf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .site-foot .sf-grid { grid-template-columns: 1fr; } }
/* menu after sign-in (gym, Super Admin, partner): white like the home page header, orange pill for the open page */
.side { background: var(--surface); color: var(--ink); border-right: 1px solid var(--line); box-shadow: 4px 0 24px rgba(15, 26, 46, .05); }
.brand { color: var(--ink); border-bottom-color: #edf1f7; }
.brand .logo-chip { box-shadow: none; padding: 0; background: transparent; }
.brand small { color: var(--muted); }
.nav a { color: var(--ink); border-radius: 999px; }
.nav a svg { color: var(--ink); opacity: .85; }
.nav a:hover { background: #fff1e9; color: var(--brand); }
.nav a:hover svg { color: var(--brand); }
.nav a.on { background: linear-gradient(90deg, #f7752d, #f2581c); color: #fff; box-shadow: 0 6px 14px rgba(242, 104, 54, .3); }
.nav a.on svg { color: #fff; }
.nav a.on::before { content: none; }
.nav .sep { background: #edf1f7; }
.nav a.on .badge { background: #fff; color: var(--brand); }
.side-foot { color: var(--muted); }
/* member login top bar */
.portal-top { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 6px 20px rgba(15, 26, 46, .06); }
.portal-top .logo-chip { box-shadow: none; padding: 0; background: transparent; }
.portal-top .grow small { color: var(--muted); }
.portal-top .btn { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; }
.portal > .support-bar { background: var(--surface-2); color: var(--muted); }

/* ===== 2026.11.04: very light cream public background (home, features, devices, partner login, how it works, contact) ===== */
:root { --cream: #fffcf9; --peach-dot: #fbd3bd; }
.hx { background:
    radial-gradient(520px 400px at 100% 0, rgba(253, 200, 170, .22) 0, rgba(253, 200, 170, 0) 70%),
    radial-gradient(460px 360px at 0 100%, rgba(253, 200, 170, .18) 0, rgba(253, 200, 170, 0) 70%),
    linear-gradient(180deg, #fffaf6, #fffdfb); }
.hx-waves { opacity: .35; }
.hx-waves path[fill="#14306b"] { fill: #fde6d8; }
.hx-waves path[fill="#f47a2a"] { fill: #fbc5a5; }
.hx-feats i { background: #fff0e7; color: #f2581c; }
.hx::before, .hx::after { background-image: radial-gradient(var(--peach-dot) 2px, transparent 2.5px); opacity: .8; }
body.auth-page { background: var(--cream); }
.pub-sec { position: relative; isolation: isolate; background:
    radial-gradient(420px 300px at 100% 0, rgba(253, 200, 170, .12) 0, rgba(253, 200, 170, 0) 70%), var(--cream); }
.pub-sec::before { content: ""; position: absolute; z-index: -1; right: 2%; top: 2.2rem; width: 110px; height: 110px; background-image: radial-gradient(var(--peach-dot) 2px, transparent 2.5px); background-size: 20px 20px; opacity: .6; }
.pub-soft { background: radial-gradient(500px 340px at 0 0, rgba(253, 200, 170, .12) 0, rgba(253, 200, 170, 0) 70%), #fffaf6; }
.pub-dark { color: var(--ink); background: radial-gradient(520px 380px at 100% 100%, rgba(253, 190, 155, .16) 0, rgba(253, 190, 155, 0) 70%), #fffaf6; }
.pub-dark .pub-h2 { color: var(--ink); }
.pub-dark .pub-list li { color: #4b5568; }
.pub-dark .pub-list li b { color: var(--ink); }
.pub-dark .pd-tags span { background: #fff; border-color: #f8e1d3; color: var(--ink); box-shadow: 0 4px 12px rgba(242, 104, 54, .06); }
.pub-dark .pd-body { box-shadow: 0 20px 60px rgba(242, 104, 54, .22); }
.pub-features article { background: #fff; border-color: #f8e6da; box-shadow: 0 8px 22px rgba(242, 104, 54, .05); }
.pf-ic { border-radius: 50%; background: linear-gradient(135deg, #f7752d, #f2581c); color: #fff; box-shadow: 0 0 0 6px #fff0e7; }
.site-foot { background: #fff8f3; border-top-color: #f8e1d3; }
.site-foot .sf-copy { border-top-color: #f8e1d3; }
@media (max-width: 980px) {
  .hx { background: radial-gradient(420px 300px at 100% 0, rgba(253, 200, 170, .22) 0, rgba(253, 200, 170, 0) 70%), linear-gradient(180deg, #fffaf6, #fffdfb); }
  .pub-sec::before { display: none; }
}

/* ===== 2026.11.04: Super Admin - gyms on one row, icon actions, password card, delete dialogs ===== */
.nowrap { white-space: nowrap; }
.row-acts { display: flex; gap: .3rem; justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.row-acts form { margin: 0; }
.btn.ib { padding: .32rem .5rem; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.btn .bi { flex: none; vertical-align: -3px; }
.gym-grid { font-size: .86rem; }
.gym-grid th { font-size: .68rem; }
.gym-grid th, .gym-grid td { padding-left: .45rem; padding-right: .45rem; vertical-align: middle; }
.gym-grid td.small { font-size: .8rem; }
.gym-grid .pill { font-size: .72rem; }
.pw-box { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; background: var(--green-bg); border: 1px solid #a6e9c1; border-radius: 12px; padding: .75rem 1rem; margin: .8rem 0 .2rem; }
.pw-box code { font-size: 1.3rem; font-weight: 800; letter-spacing: .06em; background: #fff; border: 1px dashed var(--green); border-radius: 8px; padding: .15rem .7rem; color: var(--ink); user-select: all; }
.pw-ok { color: var(--green); font-weight: 700; }
.pw-err { color: var(--red); font-weight: 700; }
.pw-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem; }
.pw-form input[type=text] { max-width: 280px; }
.danger-card { border-left: 4px solid var(--red); }
.danger-card h2 { color: var(--red); display: flex; gap: .4rem; align-items: center; }
#admin-login h2 { display: flex; gap: .4rem; align-items: center; }
dialog.sa-dlg { border: 0; border-radius: 18px; width: min(520px, 92vw); padding: 1.4rem 1.5rem; box-shadow: 0 30px 70px rgba(0, 0, 0, .3); color: var(--ink); background: var(--surface); }
dialog.sa-dlg::backdrop { background: rgba(15, 26, 46, .45); }
.sa-dlg h2 { margin: 0 0 .5rem; display: flex; gap: .45rem; align-items: center; color: var(--red); font-size: 1.2rem; }
.sa-dlg ul { margin: 0 0 1rem; padding-left: 1.1rem; font-size: .9rem; line-height: 1.6; }
.sa-dlg .field { margin-bottom: .8rem; }
.sa-dlg textarea, .sa-dlg input[type=text] { width: 100%; }
.sa-dlg .dlg-act { display: flex; justify-content: flex-end; gap: .6rem; }
.sa-dlg .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== 2026.11.04: Cashfree + Autopay ===== */
.ap-pill { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; font-weight: 800; white-space: nowrap; vertical-align: middle; }
.ap-green { background: var(--green-bg); color: var(--green); }
.ap-red { background: var(--red-bg); color: var(--red); }
.ap-yellow { background: var(--yellow-bg); color: #a16207; }
.ap-grey { background: var(--surface-2); color: var(--muted); }
.ap-card { border-left: 4px solid var(--line); }
.ap-card.ap-green { border-left-color: var(--green); background: var(--surface); color: inherit; }
.ap-card.ap-red { border-left-color: var(--red); background: var(--surface); color: inherit; }
.ap-card.ap-yellow { border-left-color: var(--yellow-plate); background: var(--surface); color: inherit; }
.ap-card.ap-grey { background: var(--surface); color: inherit; }
.ap-h { display: flex; gap: .5rem; align-items: center; }
.ap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem 1.4rem; margin: .6rem 0; }
.ap-grid > div span { display: block; font-size: .78rem; color: var(--muted); }
.ap-grid > div b { font-size: 1rem; }
.ap-grid > div small { display: block; }
@media (max-width: 760px) { .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-chk { display: flex; gap: .5rem; align-items: flex-start; background: #fff7f1; border: 1px solid #fbd5c2; border-radius: 10px; padding: .5rem .65rem; margin: .55rem 0 .45rem; font-size: .84rem; line-height: 1.35; font-weight: 400; text-align: left; cursor: pointer; }
.ap-chk input { margin-top: .15rem; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.ap-line { display: block; margin-top: .25rem; font-size: .72rem; color: var(--muted); }
.ap-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.ap-stats .card { margin: 0; padding: .8rem 1rem; }
.ap-stats span { display: block; color: var(--muted); font-size: .8rem; }
.ap-stats b { font-size: 1.4rem; }
.ap-stats b.red { color: var(--red); }
@media (max-width: 900px) { .ap-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-next { margin-top: 1rem; border-left: 4px solid var(--brand); }
.ap-hist summary { cursor: pointer; color: var(--link); font-weight: 600; }


/* ---------- Chat widgets: home page assistant + "May I help you?" robot agent (release 2026.11.07) ---------- */
.cw { position: fixed; right: 18px; bottom: 18px; z-index: 60; font-family: var(--font); }
.cw-fab { display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer; background: var(--primary); color: #fff; font: 800 .95rem/1 var(--font);
  padding: .7rem 1.1rem .7rem .75rem; border-radius: 999px; box-shadow: 0 8px 22px rgba(217, 86, 15, .38); }
.cw-fab:hover { background: var(--primary-hover); }
.cw-bot { width: 26px; height: 26px; flex: none; }
.cw.open .cw-fab { display: none; }
.cw-panel { position: absolute; right: 0; bottom: 0; width: 380px; max-width: calc(100vw - 24px); height: min(600px, calc(100vh - 36px));
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(15, 26, 46, .28);
  display: flex; flex-direction: column; overflow: hidden; }
.cw-panel[hidden] { display: none; }
.cw-head { display: flex; align-items: center; gap: .6rem; background: #0f1a2e; color: #fff; padding: .7rem .8rem; }
.cw-bot-head { width: 32px; height: 32px; }
.cw-who { flex: 1; min-width: 0; line-height: 1.25; }
.cw-who b { display: block; font-size: .95rem; }
.cw-who small { color: #b8c1d1; font-size: .74rem; }
.cw-x { background: transparent; border: 0; color: #fff; font-size: 1.35rem; line-height: 1; cursor: pointer; padding: .2rem .35rem; border-radius: 8px; opacity: .85; }
.cw-x:hover { background: rgba(255, 255, 255, .12); opacity: 1; }
.cw-msgs { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .55rem; background: var(--surface-2); }
.cw-msg { max-width: 86%; padding: .55rem .75rem; border-radius: 14px; font-size: .9rem; line-height: 1.45; word-wrap: break-word; }
.cw-msg.ai { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.cw-msg.me { background: #ffe9dc; color: #4a1d06; border-bottom-right-radius: 4px; align-self: flex-end; }
.cw-msg.err { background: var(--red-bg); color: var(--red); align-self: stretch; max-width: none; font-size: .85rem; }
.cw-msg.ask { border-color: #f3b3b3; background: #fff8f8; }
.cw-msg.ok { border-color: #9cd3ae; background: #f1fbf4; }
.cw-link { display: inline-block; margin-top: .35rem; font-weight: 800; }
.cw-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cw-chip { border: 1px solid #f0b48f; background: var(--surface); color: var(--link); border-radius: 999px; padding: .32rem .75rem; font: 700 .82rem/1.2 var(--font); cursor: pointer; }
.cw-chip:hover { background: #fff3ec; }
.cw-chip.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.cw-note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem; font-size: .85rem; }
.cw-note textarea { width: 100%; margin-top: .3rem; font: inherit; }
.cw-note-row { display: flex; gap: .4rem; margin-top: .45rem; }
.cw-input { display: flex; gap: .45rem; padding: .6rem; border-top: 1px solid var(--line); background: var(--surface); margin: 0; }
.cw-input input { flex: 1; min-width: 0; border-radius: 999px; padding: .5rem .85rem; }
.cw-foot { display: block; text-align: center; font-size: .74rem; color: var(--muted); padding: .35rem .6rem .5rem; background: var(--surface); }
a.cw-foot { color: var(--link); font-weight: 700; font-size: .8rem; }
.cw-typing i { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: cw-dot 1s infinite ease-in-out; }
.cw-typing i:nth-child(2) { animation-delay: .15s; } .cw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cw-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cw-msg.me { background: #4a2512; color: #ffe2d2; } :root:not([data-theme="light"]) .cw-msg.ask { background: #3b1a1d; } :root:not([data-theme="light"]) .cw-msg.ok { background: #12301f; } }
@media (max-width: 560px) {
  .cw { right: 12px; bottom: 12px; }
  .cw-fab span { display: none; }
  .cw-fab { padding: .7rem; }
  .cw-panel { position: fixed; inset: 0; width: auto; max-width: none; height: auto; border-radius: 0; }
}
@media print { .cw { display: none; } }

/* tickets / inquiries */
.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.tk-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .85rem; }
.tk-stats b { display: block; font-size: 1.5rem; line-height: 1.2; }
.tk-stats small { color: var(--muted); }
.tk-sub { color: var(--muted); font-size: .8rem; display: block; }
.tk-chat { display: flex; flex-direction: column; gap: .45rem; max-height: 460px; overflow-y: auto; padding: .7rem; background: var(--surface-2); border-radius: var(--radius); }
.tk-ev { border-left: 3px solid var(--line); padding: .35rem .75rem; margin: .5rem 0; }
.tk-ev.Support { border-left-color: var(--green); }
.tk-ev.Gym { border-left-color: var(--brand); }
.tk-ev.Robot { border-left-color: #8a94a6; }
.tk-ev small { color: var(--muted); display: block; }
.tk-answer { background: var(--green-bg); border-left: 4px solid var(--green); border-radius: 8px; padding: .65rem .85rem; margin: .6rem 0; white-space: pre-wrap; }
.kv-grid { display: grid; grid-template-columns: 140px 1fr; gap: .3rem .8rem; font-size: .92rem; }
.kv-grid dt { color: var(--muted); }
.kv-grid dd { margin: 0; }

/* ---------- Training: PT, classes, diet & workout (2026.11.08) ---------- */
.pbar { display: block; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: .3rem; }
.pbar i { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.pbar.big { height: 12px; border-radius: 7px; }
.pt-big { font-size: 1.05rem; margin: .3rem 0; }
.pt-big b { font: 800 1.6rem/1 var(--font); }
.row-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.row-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; min-width: 110px; }
.row-form label input, .row-form label select { width: 100%; }
.mini-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; }
.mini-form input, .mini-form select { max-width: 160px; }
.inline-edit { display: inline-block; }
.inline-edit > summary { list-style: none; cursor: pointer; }
.inline-edit > summary::-webkit-details-marker { display: none; }
.inline-edit[open] { display: block; }
.btn.plain { background: none; border-color: transparent; color: var(--muted); }
.btn.plain:hover { color: var(--red); }
.wk-grid { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 760px; }
.wk-grid th, .wk-grid td { border: 1px solid var(--line); padding: .3rem; vertical-align: top; font-size: .85rem; }
.wk-grid thead th { background: var(--surface-2); text-align: center; }
.wk-grid th.today, .wk-grid td.today { background: var(--green-bg); }
.wk-grid th.tm { width: 70px; color: var(--muted); font-weight: 600; text-align: right; background: none; }
.wk-cls { display: block; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 6px; padding: .3rem .4rem; margin-bottom: .25rem; color: var(--ink); line-height: 1.25; }
.wk-cls:hover { text-decoration: none; background: var(--surface-2); }
.wk-cls.full { border-left-color: var(--red); }
.wk-cls b { display: block; }
.wk-n { font-size: .78rem; color: var(--muted); }
.veg-dot { display: inline-block; width: 11px; height: 11px; border: 1.5px solid var(--green); border-radius: 2px; position: relative; vertical-align: middle; margin-right: .3rem; }
.veg-dot::after { content: ""; position: absolute; inset: 2px; background: var(--green); border-radius: 50%; }
.veg-dot.nonveg { border-color: var(--red); }
.veg-dot.nonveg::after { background: var(--red); }
.mac-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: .8rem 0; }
.mac-row > div { background: var(--surface-2); border-radius: 8px; padding: .55rem .7rem; font-size: .88rem; }
.mac-row b { font: 800 1.25rem/1.1 var(--font); }
.mac-row .mac.over { background: var(--yellow-bg); }
.mac-row .mac.over .pbar i { background: var(--yellow-plate); }
.calc { margin: .8rem 0; border: 1px dashed var(--line); border-radius: 8px; padding: .5rem .8rem; }
.calc > summary { cursor: pointer; font-weight: 600; }
.targets { margin-top: .4rem; }
.meal-ed { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; margin: .7rem 0; background: var(--surface); }
.meal-head { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.meal-head .meal-name { flex: 1; font-weight: 700; }
.meal-head input[type=time] { width: 120px; }
.gym-grid.ed td { padding: .2rem .3rem; }
.gym-grid.ed input { width: 100%; padding: .3rem .4rem; }
.gym-grid.ed input.w-num { width: 70px; }
.gym-grid.ed input.w-mid { width: 100px; }
.gym-grid.ed input[readonly] { background: var(--surface-2); color: var(--muted); }
.meal-sheet { padding: .5rem 0; border-top: 1px solid var(--line); }
.meal-sheet div { margin-top: .2rem; }
.wo-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.wo-day > b { display: block; margin-bottom: .3rem; }
@media (max-width: 700px) {
  .gym-grid.ed thead { display: none; }
  .gym-grid.ed tr { display: grid; grid-template-columns: 1fr 70px 70px; gap: .25rem; border-bottom: 1px solid var(--line); padding: .3rem 0; }
  .gym-grid.ed td:first-child { grid-column: 1 / -1; }
}
@media print { .plan-sheet { box-shadow: none; border: 0; } .mac-row > div { background: none; border: 1px solid #ccc; } }
.wk-grid thead small { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; }
.portal-nav { display: flex; gap: .2rem; padding: 0 1.5rem; background: var(--rack); overflow-x: auto; }
.portal-nav a { color: #c8d0de; padding: .55rem .9rem; border-bottom: 3px solid transparent; font-weight: 600; white-space: nowrap; }
.portal-nav a:hover { color: #fff; text-decoration: none; }
.portal-nav a.on { color: #fff; border-bottom-color: var(--yellow-plate); }
.class-row, .tick-row { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.class-row:first-of-type, .tick-row:first-of-type { border-top: 0; }
.class-row .grow, .tick-row .grow { flex: 1; min-width: 0; }
.tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: #fff; font-weight: 800; cursor: pointer; flex: none; }
.tick-row.done .tick { background: var(--green); border-color: var(--green); }
.tick-row.done b { color: var(--muted); }
.meal-head { flex-wrap: wrap; }
.meal-head .meal-name { min-width: 0; flex: 1 1 140px; }
.wk-cls small { display: block; color: var(--muted); font-size: .76rem; }
.wk-cls .wk-n { display: block; margin-top: .1rem; font-weight: 600; }

/* release 2026.11.10: Super Admin > Device control */
.dc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dc-stats div.stat .l::after { content: none; }
.dc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.dc-grid > .card { margin: 0; }
.dc-meters { display: grid; gap: .8rem; margin-bottom: .9rem; }
.dc-m-top { display: flex; justify-content: space-between; align-items: baseline; }
.dc-m-top .num { font-weight: 800; font-size: 1.15rem; }
.dc-bar { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin: .25rem 0 .2rem; }
.dc-bar i { display: block; height: 100%; border-radius: 6px; background: var(--green); min-width: 2px; }
.dc-bar i.yellow { background: var(--yellow-plate); } .dc-bar i.red { background: var(--red); } .dc-bar i.grey { background: var(--line); }
.dc-kv { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dc-kv th { text-align: left; font-weight: 600; color: var(--muted); padding: .3rem .5rem .3rem 0; width: 50%; }
.dc-kv td { padding: .3rem 0; }
.dc-bars { height: 160px; gap: 3px; }
.dc-bars i { max-width: 22px; }
.dc-bars em { font-size: .65rem; }
.dc-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.dc-search { display: flex; gap: .4rem; }
.dc-search input { min-width: 240px; }
.dc-table td { vertical-align: top; }
@media (max-width: 900px) { .dc-grid { grid-template-columns: minmax(0, 1fr); } .dc-kv th { width: 45%; } .dc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dc-bars em { display: none; } .dc-search, .dc-search input { min-width: 0; width: 100%; } }
@media print { .dc-search, .year-tabs, .page-head .btn { display: none !important; } }
@media (min-width: 901px) { .dcg-stats { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* release 2026.11.10: Member Check-in - 7 cards (with Unknown IDs) on one line, no scrolling */
.stats-compact.ma-stats { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; }
.ma-stats .stat { padding: .55rem .7rem .5rem; min-width: 0; }
.ma-stats .stat .v { font-size: 1.45rem; }
.ma-stats .stat .v.sm { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .stats-compact.ma-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
    .stats-compact.ma-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
    .ma-stats .stat { padding: .4rem .45rem .35rem; }
    .ma-stats .stat .v { font-size: 1.1rem; }
    .ma-stats .stat .v.sm { font-size: .78rem; white-space: normal; line-height: 1.2; }
    .ma-stats .stat .l { font-size: .68rem; white-space: normal; line-height: 1.15; }
    .ma-stats .stat .sub { display: none; }
}
