/* Club Sports Platform — base styles. Club colors arrive as CSS variables
   from the layout (--brand, --brand-deep, --accent). */
:root {
  --brand: #22419A; --brand-deep: #132A6B; --accent: #FDD651;
  --bg: #F5F7FC; --surface: #FFFFFF; --band: #EAF0FB;
  --ink: #141C3A; --muted: #55607F; --line: #DCE1EE;
  --good: #1E7A46; --good-bg: #E3F4EA; --warn: #8A5A00; --warn-bg: #FFF3D6;
  --bad: #A3262A; --bad-bg: #FBE6E6;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--body); }
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; line-height: 1.05; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(32px, 5vw, 46px); letter-spacing: .01em; }
h2 { font-size: 28px; letter-spacing: .01em; }
h3 { font-size: 21px; letter-spacing: .02em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 640px; }
main { padding-block: 36px 64px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; display: block; }

/* Header */
.site-head { background: var(--brand-deep); color: #fff; border-bottom: 3px solid var(--accent); }
.site-head .wrap { display: flex; align-items: center; gap: 12px 20px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; margin-right: auto; }
.brand img { width: 38px; height: auto; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; font-weight: 600; font-size: 15px; }
.nav a, .nav button { color: #fff; text-decoration: none; opacity: .92; background: none; border: 0; font: inherit; cursor: pointer; padding: 4px 0; }
.nav a:hover, .nav button:hover, .nav a[aria-current] { opacity: 1; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.nav form { margin: 0; }

/* Footer */
.site-foot { background: var(--brand-deep); color: #DCE4FA; padding-block: 28px; font-size: 15px; border-top: 4px solid var(--accent); }
.site-foot a { color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px var(--body); text-decoration: none; padding: 10px 18px; border-radius: 6px; border: 2px solid var(--brand-deep); background: var(--brand-deep); color: #fff; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--brand); border-color: var(--brand); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--brand-deep); }
.btn-accent:hover { background: var(--accent); filter: brightness(1.06); border-color: var(--accent); }
.btn-line { background: transparent; color: var(--brand-deep); }
.btn-line:hover { background: var(--band); color: var(--brand-deep); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-sm { padding: 5px 12px; font-size: 14px; min-height: 34px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.link-btn { background: none; border: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* Cards and panels */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; margin-bottom: 20px; }
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-bottom: 12px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.stat b { display: block; font: 800 32px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }

/* Alerts */
.alert { border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; border: 1px solid; }
.alert-ok { background: var(--good-bg); border-color: #B9E2C9; color: var(--good); }
.alert-warn { background: var(--warn-bg); border-color: #F2D68F; color: var(--warn); }
.alert-bad { background: var(--bad-bg); border-color: #F0BDBD; color: var(--bad); }
.alert ul { margin: 6px 0 0; padding-left: 20px; }

/* Badges */
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--band); color: var(--brand-deep); white-space: nowrap; }
.badge-paid, .badge-open { background: var(--good-bg); color: var(--good); }
.badge-pending_payment, .badge-draft { background: var(--warn-bg); color: var(--warn); }
.badge-cancelled, .badge-closed, .badge-archived { background: #ECEEF3; color: var(--muted); }
.badge-accent { background: var(--accent); color: var(--brand-deep); }

/* Forms */
form { margin: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 700; margin-bottom: 4px; font-size: 16px; }
.hint { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=datetime-local],
input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; font: 17px var(--body); color: var(--ink); background: #fff; border: 1px solid #B8C0D6; border-radius: 6px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); border-color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 8px; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.error { color: var(--bad); font-size: 14px; margin-top: 4px; display: block; }
.input-error { border-color: var(--bad) !important; }

/* Program choice */
.choice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.choice input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.choice.disabled { opacity: .6; cursor: not-allowed; background: #F7F8FB; }
.choice b { display: block; }
.choice .meta { color: var(--muted); font-size: 15px; }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }

/* Waiver text */
.waiver-text { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #FBFCFE; white-space: pre-wrap; font-size: 15px; margin-bottom: 14px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--brand); color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tfoot td { font-weight: 700; background: var(--band); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { font-weight: 700; }
dl.facts dd { margin: 0; color: var(--ink); }

/* Filters bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 160px; flex: 1 1 160px; }

/* Admin sub-nav */
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 4px 22px; flex-wrap: wrap; padding-block: 10px; font-weight: 600; font-size: 15px; }
.subnav a { text-decoration: none; color: var(--muted); padding: 4px 0; }
.subnav a[aria-current], .subnav a:hover { color: var(--brand-deep); box-shadow: inset 0 -3px 0 var(--accent); }

.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.steps li { padding: 4px 12px; border-radius: 999px; background: #E6EAF4; color: var(--muted); }
.steps li[aria-current] { background: var(--brand-deep); color: #fff; }

.hero { background: var(--brand); color: #fff; padding-block: 44px; }
.hero h1 { color: #fff; }
.hero p { color: #DCE4FA; font-size: 19px; max-width: 52ch; }
.hero .eyebrow { color: var(--accent); }
.empty { text-align: center; padding: 32px 20px; color: var(--muted); }
.qr svg { max-width: 220px; height: auto; background: #fff; padding: 10px; border-radius: 8px; }
.codes { font-family: ui-monospace, Menlo, monospace; background: #F3F5FA; padding: 12px 16px; border-radius: 8px; columns: 2; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media print { .site-head, .site-foot, .subnav, .actions, .no-print { display: none !important; } body { background: #fff; } }
@media (max-width: 600px) { .hide-sm { display: none; } th, td { padding: 9px 10px; } }
