/* Weydon boxing club: one stylesheet for the booking page and the admin. */
@font-face { font-family: Roboto; font-weight: 400; font-display: swap; src: url(/fonts/roboto-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Roboto; font-weight: 500; font-display: swap; src: url(/fonts/roboto-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Roboto; font-weight: 700; font-display: swap; src: url(/fonts/roboto-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Roboto Condensed'; font-weight: 700; font-display: swap; src: url(/fonts/roboto-condensed-latin-700-normal.woff2) format('woff2'); }

:root {
  --indigo: #322A80;
  --indigo-dark: #281F6B;
  --page: #F4F2FA;
  --card: #FFFFFF;
  --ink: #231633;
  --muted: #5B5270;
  --line: #E1DEEC;
  --field: #8E86A8;
  --lilac: #E6E2F3;
  --lilac-soft: #F3F1FA;
  --green: #1B6B4A;
  --green-bg: #E2F1EA;
  --amber: #8A4B00;
  --amber-bg: #FFF0D9;
  --amber-line: #E8B25A;
  --red: #A8232D;
  --red-bg: #FBE6E8;
  --grey-mark: #5B5270;
  --cond: 'Roboto Condensed', 'Arial Narrow', Roboto, system-ui, sans-serif;
  --body: Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 1px 3px rgba(35, 22, 51, .08), 0 1px 2px rgba(35, 22, 51, .04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.5 var(--body); }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: var(--indigo); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8F86D9; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
svg.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: 422px; margin: 0 auto; padding: 0 16px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.wordmark { display: inline-flex; flex-direction: column; align-items: flex-end; font: 700 26px/1 var(--cond); letter-spacing: .01em; }
.wordmark small { font: 500 9px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; margin-top: 2px; }
.brand .rule { width: 1px; align-self: stretch; min-height: 28px; background: rgba(255, 255, 255, .35); }
.brand .sub { font: 700 14px/1.2 var(--cond); letter-spacing: .14em; text-transform: uppercase; }
.brand .by { display: block; font: 400 12px/1.3 var(--body); letter-spacing: 0; text-transform: none; color: #E3E0F2; margin-top: 2px; }

/* ---------- headings, text ---------- */
.h1 { font: 700 34px/1.05 var(--cond); text-transform: uppercase; color: var(--indigo); letter-spacing: .005em; }
.h2 { font: 700 24px/1.1 var(--cond); text-transform: uppercase; color: var(--indigo); }
.h2.green { color: var(--green); }
.h2.amber { color: var(--amber); }
.hint { color: var(--muted); font-size: 14px; }
.label-caps { font: 700 12px/1.2 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.big { font-size: 17px; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; margin: 0 0 20px; }
.card > .hint { margin-top: 2px; }
.card > .h2 + .hint + * , .card > .h2 + .field { margin-top: 16px; }

/* ---------- fields ---------- */
.field { display: block; margin-top: 16px; }
.field > label, .field > .lab { display: block; font-weight: 500; margin-bottom: 6px; }
.field .hint { display: block; margin-bottom: 6px; }
.field .hint.after { margin: 6px 0 0; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--field); border-radius: 10px; background: #fff; font-size: 16px; }
textarea.input { min-height: 96px; resize: vertical; }
.input.short { max-width: 220px; }
.input:focus { outline: 3px solid #CFC9EE; outline-offset: 0; border-color: var(--indigo); }
.err { color: var(--red); font-size: 14px; margin-top: 6px; font-weight: 500; }
.invalid .input, .invalid.choice, .consent.invalid { border-color: var(--red); }
.two { display: grid; gap: 0 14px; }
.notice { background: var(--lilac-soft); border-radius: 12px; padding: 14px 16px; margin-top: 16px; }
.notice b { color: var(--indigo); }
.notice.bad { background: var(--red-bg); color: var(--red); font-weight: 500; }
.notice.warn { background: var(--amber-bg); color: var(--amber); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--field); background: #fff; color: var(--ink); font-weight: 500; font-size: 16px; text-decoration: none; }
.btn.primary { background: var(--indigo); border-color: var(--indigo); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--indigo-dark); }
.btn.outline { border-color: var(--indigo); }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.block { display: flex; width: 100%; min-height: 56px; font-size: 17px; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--indigo); text-decoration: underline; }
.iconbtn { background: none; border: 0; padding: 8px; border-radius: 8px; color: var(--ink); display: inline-flex; }

/* ---------- pills, tags, chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill svg.i { width: 14px; height: 14px; stroke-width: 2.5; }
.pill.paid, .pill.open { background: var(--green-bg); color: var(--green); }
.pill.owes, .pill.full { background: var(--amber-bg); color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-line); }
.pill.full { box-shadow: none; font-size: 12px; padding: 2px 8px; }
.pill.wait { background: var(--lilac); color: var(--indigo); }
.pill.closed, .pill.gone { background: #ECEAF2; color: var(--muted); }
.pill.medical { background: var(--red-bg); color: var(--red); }
.pill.tag { background: var(--lilac-soft); color: var(--muted); font-weight: 500; }
.pill.onindigo { background: rgba(255, 255, 255, .18); color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { padding: 5px 10px; border-radius: 8px; background: var(--lilac); color: var(--indigo-dark); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.past { background: none; border: 1px dashed #CFCBE0; color: var(--muted); text-decoration: line-through; padding: 4px 9px; }

/* ---------- booking page ---------- */
.hero { background: var(--indigo); color: #fff; padding: 22px 0 64px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; width: 400px; height: 400px; right: -140px; top: 130px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .07); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font: 700 40px/1 var(--cond); text-transform: uppercase; margin: 22px 0 12px; }
.hero .lede { font-size: 17px; line-height: 1.55; color: #ECEAF7; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-weight: 500; font-size: 15px; }
.facts svg.i { width: 18px; height: 18px; }
.page { margin-top: -20px; position: relative; z-index: 2; }
.trust { display: flex; gap: 14px; align-items: flex-start; }
.trust .badge { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--lilac); color: var(--indigo); display: grid; place-items: center; }
.trust .badge svg.i { width: 24px; height: 24px; }
.trust h2 { font: 700 16px/1.3 var(--body); }
.trust p { color: var(--muted); font-size: 15px; line-height: 1.6; }

.termopt { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--field); border-radius: 12px; margin-top: 12px; cursor: pointer; }
.termopt.on { border: 2px solid var(--indigo); background: var(--lilac-soft); padding: 15px; }
.termopt input, .choice input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 3px 0 0; border: 1.5px solid var(--muted); border-radius: 50%; background: #fff; display: grid; place-items: center; }
.termopt input:checked, .choice input:checked { border-color: var(--indigo); }
.termopt input:checked::after, .choice input:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--indigo); }
.termopt .name { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.termopt .when { color: var(--muted); font-size: 15px; }
.choices { display: flex; gap: 10px; margin-top: 14px; }
.choice { display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px 12px 16px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; cursor: pointer; }
.choice input { margin: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--lilac-soft); border: 1px solid transparent; border-radius: 12px; padding: 14px; margin-top: 14px; cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--indigo); }
.payline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; color: var(--muted); }
.payline strong { font: 700 28px/1 var(--cond); color: var(--indigo); white-space: nowrap; }
.reserve .btn { margin: 14px 0 12px; }
.foot { color: var(--muted); font-size: 15px; padding-top: 12px; padding-bottom: 48px; }
.foot p + p { margin-top: 8px; }
.foot b { color: var(--muted); }

.bank { border: 2px solid var(--indigo); border-radius: 12px; overflow: hidden; margin: 16px 0; }
.bank div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.bank div:first-child { background: var(--indigo); color: #fff; border-top: 0; }
.bank dt { color: var(--muted); }
.bank div:first-child dt { color: #fff; }
.bank dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.result p + p { margin-top: 12px; }

/* ---------- admin ---------- */
.bar { background: var(--indigo); padding: 12px 0; position: sticky; top: 0; z-index: 5; }
.bar .wordmark { font-size: 22px; }
.admin main { padding-top: 20px; padding-bottom: 56px; }
.headrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.back { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 8px 8px 0; margin-bottom: 4px; font-weight: 500; }
.subline { color: var(--muted); font-size: 14px; margin-top: 4px; }

.termcard { display: flex; width: 100%; text-align: left; align-items: center; gap: 10px; background: var(--indigo); color: #fff; border: 0; border-radius: 16px; padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.termcard .grow { flex: 1; min-width: 0; }
.termcard h2 { font: 700 24px/1.1 var(--cond); text-transform: uppercase; }
.termcard p { color: #E3E0F2; font-size: 15px; margin-top: 4px; }

.list { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; margin: 10px 0 20px; }
.row { display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); background: none; text-decoration: none; color: var(--ink); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; font-size: 17px; overflow-wrap: anywhere; }
.row .desc { color: var(--muted); font-size: 14px; }
button.row:hover, a.row:hover { background: var(--lilac-soft); }
.empty { padding: 16px; color: var(--muted); }

.stats { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; margin: 16px 0 12px; }
.stats div { padding: 14px 16px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stats div:nth-child(odd) { border-left: 0; }
.stats div:nth-child(-n+2) { border-top: 0; }
.stats b { display: block; font: 700 28px/1.1 var(--cond); color: var(--indigo); }
.stats b small { font-size: 16px; color: var(--muted); }
.stats b.amber { color: var(--amber); }
.stats span { color: var(--muted); font-size: 14px; }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--indigo); border-bottom-color: var(--indigo); }
.tabs .wide { display: none; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.seg button { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font-weight: 500; }
.seg button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }

.datestrip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 8px; scroll-snap-type: x proximity; }
.datestrip button { flex: none; width: 64px; padding: 8px 0; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-align: center; scroll-snap-align: center; }
.datestrip button small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.datestrip button b { font-size: 17px; }
.datestrip button.past { border-style: dashed; border-color: #CFCBE0; }
.datestrip button[aria-pressed=true] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.datestrip button[aria-pressed=true] small { color: #fff; }
.dayhead { font: 700 24px/1.1 var(--cond); color: var(--indigo); }
.daysum { font-size: 14px; color: var(--muted); margin: 2px 0 14px; }
.daysum b { color: var(--ink); }

.marks { display: flex; gap: 6px; flex: none; }
.mark { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--field); background: #fff; color: var(--muted); display: grid; place-items: center; }
.mark svg.i { width: 22px; height: 22px; stroke-width: 2.5; }
.mark.here[aria-pressed=true] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.mark.away[aria-pressed=true] { background: var(--grey-mark); border-color: var(--grey-mark); color: #fff; }

.gridwrap { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: 14px; }
.grid th, .grid td { padding: 6px 4px; text-align: center; border-top: 1px solid var(--line); white-space: nowrap; }
.grid thead th { border-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 6px; line-height: 1.5; }
.grid th.name, .grid td.name { text-align: left; padding-left: 16px; padding-right: 12px; font-weight: 500; position: sticky; left: 0; background: var(--card); z-index: 1; }
.grid tfoot td { font-weight: 700; padding: 12px 4px; }
.grid .next { background: var(--lilac-soft); }
.cell { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #fff; display: inline-grid; place-items: center; padding: 0; }
.cell svg.i { width: 18px; height: 18px; stroke-width: 3; }
.cell.P { background: var(--indigo); border-color: var(--indigo); }
.cell.A { background: var(--grey-mark); border-color: var(--grey-mark); }
.cell.off { border-color: #F1EFF7; cursor: default; }

.secthead { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
table.pay { width: 100%; border-collapse: collapse; font-size: 15px; }
.pay th { text-align: left; font: 700 12px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 8px; }
.pay td { padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: break-word; }
.pay td:nth-child(3) { overflow-wrap: anywhere; }
.pay th:first-child, .pay td:first-child { padding-left: 16px; }
.pay .amt { text-align: right; white-space: nowrap; }
.pay .neg { color: var(--red); }

.switchrow { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-weight: 500; font-size: 17px; }
.switch { flex: none; width: 48px; height: 28px; border-radius: 999px; border: 0; background: #B9B4C9; position: relative; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked=true] { background: var(--green); }
.switch[aria-checked=true]::after { left: 23px; }
.datelist { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 14px; }
.datelist li { display: inline-flex; align-items: center; gap: 4px; background: var(--lilac); border-radius: 999px; padding: 4px 6px 4px 14px; font-weight: 500; }
.datelist .iconbtn { padding: 6px; color: var(--muted); }
.datelist svg.i { width: 16px; height: 16px; }
.subhead { font-weight: 500; font-size: 17px; margin-top: 24px; }

/* ---------- dialogs ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(35, 22, 51, .55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.dialog { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px rgba(35, 22, 51, .3); }
.dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--indigo); color: #fff; padding: 12px 10px 12px 18px; }
.dialog header h2 { font: 700 20px/1.2 var(--cond); text-transform: uppercase; overflow-wrap: anywhere; }
.dialog header .iconbtn { color: #fff; }
.dialog .body { padding: 18px; overflow-y: auto; }
dl.facts2 { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
dl.facts2 dt { color: var(--muted); }
dl.facts2 dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--indigo); flex: none; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgba(35, 22, 51, .3); font-weight: 500; }
.toast.bad { background: var(--red); }

/* ---------- sign-in ---------- */
.login { min-height: 100vh; min-height: 100dvh; background: var(--indigo); display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 380px; background: #fff; border-radius: 20px; padding: 28px 22px 22px; text-align: center; }
.login .logo { display: inline-flex; background: var(--indigo); color: #fff; border-radius: 12px; padding: 12px 22px 14px; }
.login h1 { font: 700 26px/1.2 var(--body); text-transform: uppercase; color: var(--indigo); margin: 18px 0 8px; letter-spacing: .02em; }
.login p { color: var(--muted); margin-bottom: 14px; }
.login .input { border-width: 2px; border-color: var(--indigo); margin-bottom: 12px; }
.login .err { margin: 0 0 12px; }

/* ---------- wider screens ---------- */
@media (min-width: 720px) {
  .wrap { max-width: 720px; }
  .hero { padding-bottom: 76px; }
  .hero::after { width: 420px; height: 420px; right: -220px; top: 60px; }
  .hero h1 { font-size: 56px; }
  .hero .lede { max-width: 600px; }
  .two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .admin .wrap { max-width: 1200px; padding: 0 24px; }
  .admin .h1 { font-size: 44px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats div, .stats div:nth-child(odd) { border-top: 0; border-left: 1px solid var(--line); }
  .stats div:first-child { border-left: 0; }
  .tabs .wide { display: inline; }
  .tabs .narrow { display: none; }
  .narrowcol { max-width: 560px; }
  .termcard, .settingslist { max-width: 560px; }
}

/* plain buttons that look like text (names that open a child) */
.plain { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; }
.row .plain.grow { display: block; }
.result .chips + p { margin-top: 18px; }

/* school logo (white on transparent) */
.logo-img { display: block; width: 146px; height: auto; }
.bar .logo-img { width: 104px; }
.login .logo .logo-img { width: 150px; }
