:root {
  --black: #000000;
  --panel: #0e0e0f;
  --panel-2: #141416;
  --line: #262629;
  --line-soft: #1c1c1f;
  --text: #f2f2f3;
  --muted: #8b8b93;
  --red: #e10600;
  --red-dim: #a80500;
  --red-glow: rgba(225, 6, 0, 0.35);
  --green: #22c55e;
  --amber: #f59e0b;
  --radius: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--red); }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__mark path { fill: var(--red); }
.brand__img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__heat { font-weight: 800; font-size: 19px; letter-spacing: 0.06em; color: var(--red); }
.brand__sub { font-size: 9px; letter-spacing: 0.42em; color: #fff; margin-top: 3px; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 26px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(225, 6, 0, 0.28);
}

.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a {
  padding: 8px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.is-active { background: rgba(225, 6, 0, 0.12); color: var(--red); }

.me { display: flex; align-items: center; gap: 10px; }
.me__avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.me__name { font-size: 13px; font-weight: 600; }
.me__role { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 30px 26px 70px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
h1 .accent { color: var(--red); }
h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

/* ---------- Cards & stats ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}
.card--flush { padding: 0; overflow: hidden; }
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.card__head h2 { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--red);
}
.stat--muted::before { background: var(--line); }
.stat__label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.stat__value { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -0.01em; }
.stat__meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat__value.is-owed { color: var(--red); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 700; }
.row-void td { opacity: 0.45; text-decoration: line-through; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge--active { color: var(--green); background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); }
.badge--expiring { color: var(--amber); background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); }
.badge--expired { color: var(--muted); background: rgba(255, 255, 255, 0.04); border-color: var(--line); }
.badge--voided { color: var(--red); background: rgba(225, 6, 0, 0.1); border-color: rgba(225, 6, 0, 0.35); }
.badge--paid { color: var(--green); background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); }
.badge--owed { color: var(--red); background: rgba(225, 6, 0, 0.12); border-color: rgba(225, 6, 0, 0.35); }
.badge--manager { color: var(--red); border-color: rgba(225, 6, 0, 0.4); }
.badge--staff { color: var(--muted); border-color: var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: #3a3a3f; color: var(--text); }
.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.btn--primary:hover { background: var(--red-dim); border-color: var(--red-dim); color: #fff; }
.btn--danger { color: var(--red); border-color: rgba(225, 6, 0, 0.35); }
.btn--danger:hover { background: rgba(225, 6, 0, 0.12); border-color: var(--red); }
.btn--sm { padding: 6px 10px; font-size: 12px; }
.btn--ghost { background: transparent; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
label.lbl {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}
input[type="text"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
input::placeholder, textarea::placeholder { color: #55555c; }
textarea { min-height: 74px; resize: vertical; }
select option { background: var(--black); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checkbox input { width: auto; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.toolbar .field { margin-bottom: 0; }
.inline-form { display: inline; }

/* ---------- Alerts ---------- */
.alert {
  border-radius: 8px;
  padding: 11px 15px;
  margin-bottom: 18px;
  font-size: 14px;
  border: 1px solid;
}
.alert--ok { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.35); color: #86efac; }
.alert--err { background: rgba(225, 6, 0, 0.08); border-color: rgba(225, 6, 0, 0.4); color: #fca5a5; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(225, 6, 0, 0.16), transparent 55%),
    var(--black);
}
.login__card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 40px 34px;
  text-align: center;
}
.login__mark { width: 88px; height: 88px; margin: 0 auto 18px; display: block; }
.login__mark path { fill: var(--red); }
.login__img { width: 130px; margin: 0 auto 18px; display: block; }
.login__title { font-size: 30px; font-weight: 800; letter-spacing: 0.08em; color: var(--red); margin: 0; }
.login__sub { font-size: 11px; letter-spacing: 0.46em; color: #fff; margin: 6px 0 0; }
.login__rule { height: 1px; background: var(--line); margin: 26px 0; }
.login__text { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.btn--discord {
  width: 100%;
  justify-content: center;
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
  padding: 13px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.btn--discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; }
.login__foot { margin-top: 20px; font-size: 12px; color: var(--muted); }

/* ---------- Misc ---------- */
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.muted { color: var(--muted); }
.strong-red { color: var(--red); font-weight: 700; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.pill.is-active { border-color: var(--red); color: var(--red); background: rgba(225, 6, 0, 0.1); }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .wrap { padding: 22px 16px 60px; }
}

/* ---------- Read-only figures on the sale form ---------- */
.readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}
.readout__item { background: var(--panel-2); padding: 14px 16px; }
.readout__label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.readout__value { display: block; font-size: 20px; font-weight: 800; margin-top: 5px; }
.readout__value--red { color: var(--red); }
.readout__note { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ================= Public website ================= */
.pub-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 34px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.pub-nav { display: flex; gap: 22px; flex: 1; }
.pub-nav a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pub-nav a:hover { color: var(--red); }

.hero {
  position: relative;
  padding: 96px 26px 88px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(225, 6, 0, 0.22), transparent 70%),
    var(--black);
}
.hero__inner { max-width: 720px; margin: 0 auto; }
.hero__logo { width: 190px; max-width: 60vw; margin: 0 auto 26px; display: block; }
.hero__mark { width: 120px; height: 120px; margin: 0 auto 10px; display: block; }
.hero__mark path { fill: var(--red); }
.hero__wordmark {
  margin: 0;
  font-size: clamp(48px, 12vw, 86px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--red);
  line-height: 1;
}
.hero__sub {
  margin: 10px 0 0;
  font-size: clamp(11px, 3vw, 15px);
  letter-spacing: 0.62em;
  text-indent: 0.62em;
  color: #fff;
}
.hero__tagline {
  margin: 30px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero__intro { margin: 16px auto 0; max-width: 560px; color: var(--muted); font-size: 16px; }
.hero__actions { justify-content: center; margin-top: 30px; }

.pub { max-width: 1080px; margin: 0 auto; padding: 0 26px 40px; }
.pub-section { padding: 70px 0; border-bottom: 1px solid var(--line-soft); }
.pub-section:last-child { border-bottom: 0; }
.pub-h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red);
}
.pub-lead { margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.pub-note { margin: 26px 0 0; color: var(--muted); font-size: 13px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-top: 30px; }
.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
}
.plan--feature { border-color: var(--red); box-shadow: 0 0 0 1px rgba(225, 6, 0, 0.25); }
.plan__name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  min-height: 30px;
}
.plan__price { font-size: 30px; font-weight: 800; margin-top: 10px; letter-spacing: -0.02em; }
.plan--feature .plan__price { color: var(--red); }
.plan__period { font-size: 12px; color: var(--muted); margin-top: 4px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 30px; }
.feature {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.feature::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--red); }
.feature__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.feature__body { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 30px; }
.visit__block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.visit__label {
  margin: 0 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.visit__addr { margin: 0 0 10px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.visit__headline {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--red);
  line-height: 1.1;
}

.pub-foot {
  border-top: 1px solid var(--line);
  padding: 26px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.pub-foot__sep { margin: 0 10px; }
.pub-foot a { color: var(--muted); }
.pub-foot a:hover { color: var(--red); }

@media (max-width: 700px) {
  .pub-bar { flex-wrap: wrap; gap: 14px; padding: 14px 18px; }
  .pub-nav { order: 3; width: 100%; gap: 16px; }
  .hero { padding: 62px 20px 58px; }
  .pub-section { padding: 50px 0; }
}

/* ---------- Public: product shelf ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 30px; }
.product {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 24px;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product:hover { border-color: rgba(225, 6, 0, 0.55); transform: translateY(-2px); }
.product__shot {
  display: grid;
  place-items: center;
  height: 190px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 60%, rgba(225, 6, 0, 0.14), transparent 68%), var(--black);
}
.product__shot img { max-height: 100%; max-width: 100%; object-fit: contain; }
.product__mark { width: 62px; height: 62px; opacity: 0.35; }
.product__mark path { fill: var(--red); }
.product__name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.product__tagline { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- Public: signup perk callout ---------- */
.perk {
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px solid rgba(225, 6, 0, 0.45);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(225, 6, 0, 0.12), rgba(225, 6, 0, 0.03));
}
.perk__badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.perk__title {
  margin: 14px 0 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.perk__body { margin: 10px 0 0; color: var(--muted); font-size: 15px; max-width: 640px; }

/* ---------- Public: product price ---------- */
.product__price { margin-top: 8px; font-size: 20px; font-weight: 800; color: var(--red); }

/* ---------- Manager: product thumbnails ---------- */
.thumb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--black);
  overflow: hidden;
}
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb__none { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #4a4a52; }

/* ---------- Public: gym photo gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 30px;
}
.shot {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  aspect-ratio: 16 / 10;
  transition: border-color 0.15s ease;
}
.shot--wide { grid-column: span 2; }
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
  filter: saturate(0.9) contrast(1.05);
}
.shot:hover { border-color: rgba(225, 6, 0, 0.6); }
.shot:hover img { transform: scale(1.04); filter: saturate(1.05) contrast(1.08); }

@media (max-width: 700px) {
  .shot--wide { grid-column: span 1; }
}
