/* Gymwise · light workspace, black panels, crimson accent. */
:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --ink: #15171c;
  --muted: #6a7083;
  --line: #e3e5ea;
  --dark: #15171c;
  --dark-2: #22252e;
  --brand: #e11d2e;
  --brand-ink: #ffffff;
  --brand-soft: #fdecee;
  --ok: #0f7a4a;
  --ok-soft: #e3f7ec;
  --warn: #9a5b00;
  --warn-soft: #fff2d9;
  --bad: #b3182a;
  --bad-soft: #fdecee;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(21, 23, 28, .05), 0 10px 26px rgba(21, 23, 28, .07);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
img, svg { max-width: 100%; }
.boot { padding: 60px 20px; text-align: center; color: var(--muted); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { letter-spacing: -.015em; }

/* ---- header ---- */
.top { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; color: #fff; }
.logo { width: 38px; height: 38px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 900; font-size: 19px; }
.brand b { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.brand .who { min-width: 0; }
.brand .sub { display: block; font-size: 12px; color: #a6adbe; font-weight: 500; text-transform: none; letter-spacing: 0; }
.navlink { text-decoration: none; color: #c3c9d6; font-weight: 700; font-size: 14px; padding: 8px 11px; border-radius: 8px; }
.navlink:hover { background: var(--dark-2); color: #fff; }

/* ---- buttons ---- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 14px; padding: 10px 15px; border-radius: 9px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px; line-height: 1.2;
}
.btn:hover { border-color: #c9cdd6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #c4162a; }
.btn.dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn.dark:hover { background: var(--dark-2); }
.btn.danger { color: var(--bad); background: transparent; border-color: transparent; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 7px 11px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- public hero ---- */
.hero { background: var(--dark); color: #fff; padding: 46px 0 52px; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.03; margin: 0 0 14px; font-weight: 900; text-transform: uppercase; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { margin: 0 0 22px; color: #b9c0cf; font-size: 17px; max-width: 50ch; }
.kicker { display: inline-block; font: 800 12px/1 inherit; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 14px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- plans ---- */
.sectitle { margin: 34px 0 16px; }
.sectitle h2 { font-size: 20px; margin: 0; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.sectitle p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; box-shadow: var(--shadow); }
.plan.popular { border-color: var(--brand); border-width: 2px; }
.plan .flag { position: absolute; top: -11px; left: 20px; background: var(--brand); color: #fff;
  font: 800 11px/1 inherit; letter-spacing: .09em; text-transform: uppercase; padding: 6px 9px; border-radius: 5px; }
.plan h3 { margin: 0 0 6px; font-size: 17px; text-transform: uppercase; letter-spacing: .03em; }
.plan .price { font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.plan .price small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan p { color: var(--muted); font-size: 14px; margin: 10px 0 16px; }

/* ---- classes table ---- */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 15px; }
thead th { border-top: 0; background: #f7f8fa; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.scroll-x { overflow-x: auto; }

/* ---- forms ---- */
select, input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px;
}
input::placeholder { color: #9aa1b2; }
select:focus, input:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { resize: vertical; min-height: 90px; }
.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 14px; }
.panel h2 { margin: 0 0 12px; font-size: 17px; text-transform: uppercase; letter-spacing: .05em; }
.note { background: #f7f8fa; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; font-size: 14px; }
.note.good { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.note.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.note.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.page-head { margin: 24px 0 16px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(23px, 4vw, 30px); font-weight: 900; text-transform: uppercase; }
.page-head p { margin: 0; color: var(--muted); }
.narrow { max-width: 620px; margin: 0 auto; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); align-items: start; }

/* ---- auth ---- */
.auth { min-height: 86vh; display: grid; place-items: center; padding: 24px 16px; background: var(--dark); }
.auth .panel { width: 100%; max-width: 400px; }
.auth h1 { font-size: 22px; margin: 12px 0 18px; font-weight: 900; text-transform: uppercase; }

/* ---- admin ---- */
.adminbar { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 20; }
.adminbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.tabs { background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs .wrap { display: flex; gap: 2px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; font: 700 14px/1 inherit; color: var(--muted);
  padding: 14px 13px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }
.badge { background: var(--brand); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 2px 7px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 20px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; }
.stat b { display: block; font-size: 27px; font-weight: 900; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.hot b { color: var(--brand); }
.stat.dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.stat.dark span { color: #a6adbe; }
.rows { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; gap: 12px; align-items: center; padding: 13px 15px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row:first-child { border-top: 0; }
.row .main { flex: 1 1 240px; min-width: 0; }
.row .main b { display: block; overflow-wrap: anywhere; }
.row .meta { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.row .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font: 800 11px/1 inherit; padding: 4px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.pill.live { background: var(--ok-soft); color: var(--ok); }
.pill.soon { background: var(--warn-soft); color: var(--warn); }
.pill.out { background: var(--bad-soft); color: var(--bad); }
.pill.grey { background: #eef0f4; color: var(--muted); }
.code { font: 800 13px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; color: var(--brand); }
.admin-main { padding: 6px 0 56px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.toolbar .grow { flex: 1 1 220px; min-width: 0; }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 34px 18px; text-align: center; color: var(--muted); }

/* ---- check-in desk ---- */
.desk { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 24px; }
.desk h2 { margin: 0 0 6px; font-size: 19px; text-transform: uppercase; letter-spacing: .05em; }
.desk p { margin: 0 0 16px; color: #a6adbe; font-size: 14px; }
.desk .row-in { display: flex; gap: 10px; flex-wrap: wrap; }
.desk input { flex: 1 1 220px; background: var(--dark-2); border-color: #333845; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .06em; }
.desk input::placeholder { color: #767d8f; }
.desk-result { margin-top: 16px; border-radius: 10px; padding: 15px; font-weight: 600; }
.desk-result.ok { background: #0f7a4a; color: #fff; }
.desk-result.no { background: var(--brand); color: #fff; }

/* ---- dialog + toast ---- */
dialog { border: 0; border-radius: var(--radius); padding: 0; max-width: 580px; width: calc(100% - 28px);
  background: var(--panel); color: var(--ink); box-shadow: 0 24px 60px rgba(21, 23, 28, .3); }
dialog::backdrop { background: rgba(21, 23, 28, .5); }
.dlg-head { padding: 17px 20px; border-bottom: 1px solid var(--line); font-weight: 800; }
.dlg-body { padding: 18px 20px; max-height: 66vh; overflow: auto; }
.dlg-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; display: grid; gap: 8px; z-index: 80; width: max-content; max-width: calc(100% - 28px); }
.toast { background: var(--dark); color: #fff; padding: 11px 16px; border-radius: 9px; font-size: 14px; box-shadow: var(--shadow); }
.toast.good { background: var(--ok); }
.toast.bad { background: var(--brand); }

.foot-note { color: var(--muted); font-size: 14px; text-align: center; padding: 34px 16px 46px; }

@media (max-width: 640px) {
  .top .wrap { min-height: 58px; }
  .brand .sub { display: none; }
  .hero { padding: 32px 0 38px; }
  .row .ops { width: 100%; }
  th, td { padding: 10px; font-size: 14px; }
}
