/* PowerShed admin — dark sidebar on a wide screen, scrolling tabs on a phone.
   Black / red / grey, like the public site; its own sheet so the admin never depends on site.css. */

/* The fonts, from this site (assets/fonts/, PSA_23525): the same four rules as site.css, with this
   sheet's path. Variable fonts, so one file per script covers every weight. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Oswald'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('../assets/fonts/oswald-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Oswald'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('../assets/fonts/oswald-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The tokens (STYLE rank 10, PSA_23593). A name site.css also has carries the SAME value here, so a
   rule copied between the two sheets keeps its colour, font and size. A name only this sheet has is
   the admin's own (its light surfaces, its status tints). No rule below writes a raw colour: a new
   one joins this list first. */
:root {
  /* colours shared with site.css, same values */
  --black: #0d0d0e; --ink: #16171a; --char: #222428; --steel: #3a3d43; --white: #fff;
  /* grey TEXT, two shades as in site.css. The admin is a light page, so its --grey is the dark
     shade (5.4 : 1 on --bg); the black sidebar, a stat and a table head take the light one */
  --grey-on-dark: #8a8f98; --grey-on-light: #5f646d; --grey: var(--grey-on-light); --grey-light: #c9ccd1;
  /* red: --red-text is red TEXT on black; --red-deep is a link's hover (STYLE rank 6) */
  --red: #d71920; --red-dark: #a8121a; --red-deep: #7a0d13; --red-text: #ff5a60;
  --red-glow: color-mix(in srgb, var(--red) 35%, transparent); --red-night: #2a0d0f;   /* the login page's dark red glow */
  --clay: #a8532c; --clay-dark: #7a3b1f;
  /* status fills, as on the public pills (STYLE rank 2): paid is solid green, a free hour solid turf */
  --green-fill: #23803a; --turf: #2f6b2a;
  /* amber, as on the public demo stripe: the admin's demo strip is the same yellow (STYLE rank 30) */
  --amber: #e0a020; --amber-light: #f0b43a;
  /* the admin's own. --amber-text, never --amber: site.css's --amber is a lighter colour */
  /* one value per job (STYLE rank 29): near-duplicates folded onto one token each */
  --bg: #f3f3f1; --bg-soft: #fafafa;   /* the page; a row head and the waiver text */
  --line: #e3e4e7; --line-mid: #d5d7db; --line-strong: #b9bcc2;   /* a row line, a chip edge, a closed cell's line */
  --fill: #ececee;          /* a pressed button, a plain badge, an info notice */
  --closed-bg: var(--fill); /* a holiday hour: lighter than --line-strong, so 4 PM and 5 PM read as two (PSA_23609) */
  --side-text: var(--grey-light);   /* sidebar and top-bar tab text on black, as the public nav's */
  --red-press: #8e0f15;     /* a red button held down */
  --green: var(--green-fill); --green-bg: #e3f3e7; --amber-text: #8a5a00; --amber-bg: #fff2d6;
  /* --due is the admin's PROBLEM red: a danger button, a past-due stat, an error notice and a family
     name in red, all on a light page (6.9 : 1 on white). --red stays the brand fill: a red pill (as on
     the public pills), the active tab, the primary button (STYLE rank 30) */
  --due: #b3141b; --due-bg: #fde4e4; --red-tint: #fff5f5; --due-on-red: #ffd0d0;
  --demo: var(--amber-light); --demo-bg: var(--amber-bg); --demo-line: var(--amber);   /* the demo strip and the demo-login hint */
  --paper: #fff; --paper-ink: #000;   /* a printed page: pure black on white (the Sales tax report, PSA_23812) */

  /* type, the public faces and size scale (site.css, STYLE rank 11): every font-size below is a
     step. The admin's body is --fs-md (15.2px), a denser page than the public 16px */
  --font-display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: .78rem; --fs-sm: .875rem; --fs-md: .95rem; --fs-base: 1rem; --fs-lg: 1.15rem;
  --fs-h3: 1.35rem; --fs-xl: 1.6rem; --fs-2xl: 1.9rem;

  /* spacing and shape, site.css's space scale (STYLE rank 12): 4, 8, 12, 16, 24, 40, 64 px.
     Only a 1-3px nudge or a negative offset stays raw */
  --s0: .25rem; --s1: .5rem; --s1-5: .75rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem;
  /* shape, as site.css's (STYLE ranks 26 and 31): a panel --radius, a control or row --radius-sm,
     a status pill --radius-pill; one accent edge, --edge, on a panel's top */
  --radius: 10px; --radius-sm: 6px; --radius-xs: 4px; --radius-pill: 999px; --edge: 5px;
  --ring: 0 0 0 3px var(--red-glow);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: var(--fs-md)/1.5 var(--font-body); color: var(--ink); background: var(--bg); }
a { color: var(--red-dark); }
/* a text link (one with no class) takes the public light-surface look (STYLE rank 6): underlined,
   darker and a thicker line on hover. A classed link (button, chip, tab, a-name) keeps its own */
a:not([class]) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:not([class]):hover { color: var(--red-deep); text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; line-height: 1.15; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.a-muted { color: var(--grey); }
.a-small { font-size: var(--fs-xs); }
.a-center { text-align: center; }
.a-right { text-align: right; }
/* the public site's keyboard cue (site.css), not the browser's thin blue line (STYLE rank 4) */
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.a-demo { background: var(--demo); color: var(--black); font-size: var(--fs-xs); font-weight: 600; text-align: center; padding: var(--s0) var(--s1-5); }

/* ── Shell ───────────────────────────────────────────────── */
.a-shell { display: flex; min-height: calc(100vh - 28px); }
.a-side { width: 230px; flex: none; background: var(--black); color: var(--side-text); display: flex; flex-direction: column;
  padding: var(--s3) var(--s2); position: sticky; top: 0; height: 100vh; border-right: 3px solid var(--red); }
.a-brand { display: flex; flex-direction: column; gap: var(--s1); text-decoration: none; padding: 0 var(--s1) var(--s2); }
.a-brand img { width: 150px; height: auto; }
.a-brand span { font: 600 var(--fs-xs)/1 var(--font-display); letter-spacing: .25em; text-transform: uppercase; color: var(--red-text); }
.a-nav { display: flex; flex-direction: column; gap: 2px; }
.a-nav a { color: var(--side-text); text-decoration: none; padding: var(--s1-5) var(--s1-5); border-radius: var(--radius-sm); font-weight: 500; }
.a-nav a:hover { background: var(--char); color: var(--white); }
.a-nav a.is-active { background: var(--red); color: var(--white); }
.a-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s1-5); font-size: var(--fs-sm); }
.a-side-foot a { color: var(--grey-on-dark); text-decoration: none; }
.a-side-foot a:hover { color: var(--white); }
.a-side-foot .a-logout { margin: 0; }
.a-side-link { background: none; border: 0; padding: 0; font: inherit; color: var(--grey-on-dark); cursor: pointer; text-align: left; }
/* every small link Tim taps is at least 24px tall (UI 5 #11): names, phones and days in a table
   or list, the "Full schedule →" links, View site and Log out */
.a-side-foot a, .a-side-link, .a-more, .a-list-main a, .a-table td a:not(.a-btn), .a-table th a:not(.a-btn) { display: inline-block; padding-block: var(--s0); }
.a-side-link:hover { color: var(--white); }
.a-main { flex: 1; min-width: 0; padding: var(--s3) var(--s4) var(--s5); max-width: 1240px; }
.a-title { font-size: var(--fs-2xl); margin: 0 0 var(--s0); text-transform: uppercase; }
.a-sub { margin: 0 0 var(--s2); }
.a-h2 { font-size: var(--fs-h3); margin: var(--s3) 0 var(--s1-5); }

/* the sidebar turns into top tabs below 1100px, the same width the dashboard goes to one column:
   below that a 230px sidebar leaves too little room for the members table (PSA_23075) */
@media (max-width: 1099.98px) {
  .a-shell { display: block; }
  .a-side { position: sticky; top: 0; z-index: 10; width: auto; height: auto; flex-direction: row; align-items: center;
    padding: var(--s1) var(--s1-5); gap: var(--s1); border-right: 0; border-bottom: 3px solid var(--red); }
  .a-brand { padding: 0; flex: none; }
  .a-brand img { width: 74px; }
  .a-brand span { display: none; }
  .a-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
  .a-nav::-webkit-scrollbar { display: none; }
  .a-nav a { white-space: nowrap; padding: var(--s1) var(--s1-5); font-size: var(--fs-sm); }
  /* the tabs fade out at the right edge, so a cut-off tab says "more this way"; the spacer lets
     the last tab scroll clear of the fade (PSA_23543) */
  .a-nav { -webkit-mask-image: linear-gradient(to right, var(--black) calc(100% - 36px), transparent);
    mask-image: linear-gradient(to right, var(--black) calc(100% - 36px), transparent); }
  .a-nav::after { content: ""; flex: none; width: 30px; }
  /* the top bar keeps the Log out button at its right end; "View site" stays sidebar-only (PSA_23529) */
  .a-side-foot { flex: none; margin: 0; padding: 0; flex-direction: row; align-items: center; }
  .a-side-foot > a { display: none; }
  .a-side-foot .a-side-link { color: var(--side-text); font-size: var(--fs-sm); font-weight: 500; padding: var(--s1) var(--s1-5); border-radius: var(--radius-sm);
    white-space: nowrap; border: 1px solid var(--steel); }
  .a-side-foot .a-side-link:hover { background: var(--char); color: var(--white); }
  .a-main { padding: var(--s2) var(--s2) var(--s4); }
  .a-title { font-size: var(--fs-xl); }
}
/* a phone: logo and Log out on the first line, the tabs on a full-width line of their own (PSA_23543) */
@media (max-width: 719.98px) {
  .a-side { flex-wrap: wrap; row-gap: var(--s1); }
  .a-side-foot { margin-left: auto; }
  .a-nav { order: 3; flex: 1 0 100%; }
}

/* ── Buttons, forms, notices ─────────────────────────────── */
.a-btn { display: inline-block; border: 1px solid var(--steel); background: var(--white); color: var(--ink); border-radius: var(--radius-sm);
  padding: var(--s1-5) var(--s2); font: 600 var(--fs-sm)/1.2 var(--font-body); text-decoration: none; cursor: pointer; }
.a-btn:hover { border-color: var(--ink); }
.a-btn:active { background: var(--fill); }
.a-btn-sm { padding: var(--s1) var(--s1-5); font-size: var(--fs-xs); }
.a-btn-primary { background: var(--red); border-color: var(--red); color: var(--white); }
.a-btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.a-btn-primary:active { background: var(--red-press); border-color: var(--red-press); }
.a-btn-danger { background: var(--due); border-color: var(--due); color: var(--white); }
.a-btn-danger:hover { background: var(--red-dark); border-color: var(--red-dark); }
.a-btn-danger:active { background: var(--red-press); border-color: var(--red-press); }
/* a disabled button looks off, as the public "Class full" one does (STYLE rank 20) */
.a-btn[disabled], .a-btn[disabled]:hover, .a-btn[disabled]:active { background: var(--steel); border-color: var(--steel); color: var(--grey-on-dark); cursor: not-allowed; }
.a-btn-block { display: block; width: 100%; }
.a-row { display: flex; flex-wrap: wrap; gap: var(--s1-5); align-items: center; }
.a-form { display: flex; flex-direction: column; gap: var(--s2); }
.a-form label { display: flex; flex-direction: column; gap: var(--s0); font-weight: 600; font-size: var(--fs-sm); }
/* every admin box and select, one look (STYLE rank 8): one height, --ink text, a red border and
   glow on focus like the public .form */
.a-input { font: var(--fs-md)/1.2 var(--font-body); color: var(--ink); height: 42px;
  padding: 0 var(--s1-5); border: 1px solid var(--grey-light); border-radius: var(--radius-sm); background: var(--white); }
.a-input:focus { border-color: var(--red); outline: none; box-shadow: var(--ring); }
.a-input::placeholder { color: var(--grey-on-dark); }
/* text typed in a one-line box, or shown in a select, is centred like the site's (PSA_23072); a textarea stays left */
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=search], input:not([type]), select { text-align: center; }
select { text-align-last: center; }
textarea { text-align: left; }
/* four kinds, each with the public notice's left bar (site.css .notice). Error is only for what went
   wrong: a holiday line or "call these families" is warn, never red (STYLE rank 3). Info is grey, as on
   the public site: Tim's colours are black, red and grey (STYLE rank 30) */
.a-notice { padding: var(--s1-5) var(--s2); border-radius: var(--radius-sm); border-left: 5px solid var(--grey); margin: 0 0 var(--s2); font-weight: 500; }
.a-notice-error { background: var(--due-bg); color: var(--due); border-left-color: var(--due); }
.a-notice-ok { background: var(--green-bg); color: var(--green); border-left-color: var(--green); }
.a-notice-warn { background: var(--amber-bg); color: var(--amber-text); border-left-color: var(--amber-text); }
.a-notice-info { background: var(--fill); color: var(--ink); border-left-color: var(--steel); }

/* ── Login ───────────────────────────────────────────────── */
.admin-bare { background: var(--black) radial-gradient(circle at 50% 0, var(--red-night), var(--black) 60%); min-height: 100vh; }
.a-bare { display: flex; justify-content: center; padding: var(--s4) var(--s2); }
.a-login { width: 100%; max-width: 380px; background: var(--white); border-radius: var(--radius); padding: var(--s3); border-top: var(--edge) solid var(--red); }
.a-login-logo { display: block; width: 170px; height: auto; margin: -6px auto var(--s1); background: var(--black); padding: var(--s1-5) var(--s2); border-radius: var(--radius-sm); }
.a-login h1 { text-align: center; margin: var(--s1) 0 var(--s2); text-transform: uppercase; }
.a-demo-login { background: var(--demo-bg); border: 1px dashed var(--demo-line); border-radius: var(--radius-sm); padding: var(--s1-5); text-align: center; font-size: var(--fs-sm); margin: var(--s2) 0 var(--s1); }

/* ── Cards, stats, lists ─────────────────────────────────── */
.a-card { background: var(--white); border-radius: var(--radius); padding: var(--s2) var(--s3); margin: 0 0 var(--s2); box-shadow: 0 1px 2px color-mix(in srgb, var(--black) 6%, transparent); border: 1px solid var(--line); }
.a-card h2 { font-size: var(--fs-lg); margin: 0 0 var(--s1-5); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s1-5); flex-wrap: wrap; }
.a-card h3 { font-size: var(--fs-h3); margin: 0 0 var(--s1-5); display: flex; align-items: center; gap: var(--s1-5); flex-wrap: wrap; }
.a-more { font: 500 var(--fs-xs) var(--font-body); letter-spacing: 0; text-decoration: none; }
.a-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s2); }
.a-stat { background: var(--black); color: var(--white); border-radius: var(--radius); padding: var(--s2) var(--s2); text-decoration: none;
  display: flex; flex-direction: column; gap: 2px; border-top: var(--edge) solid var(--steel); }
.a-stat:hover { border-top-color: var(--red); }
.a-stat, .a-table thead th { --grey: var(--grey-on-dark); }   /* black surfaces keep the light grey */
.a-stat-n { font: 600 var(--fs-2xl)/1.1 var(--font-display); }
.a-stat-n small { font-size: var(--fs-lg); color: var(--grey); }
.a-stat-l { font-weight: 600; }
.a-stat-s { color: var(--grey); font-size: var(--fs-xs); }
.a-stat-alert { background: var(--due); border-top-color: var(--red-deep); }
.a-stat-alert .a-stat-s { color: var(--due-on-red); }
/* minmax(0,1fr), not 1fr: a 1fr track never shrinks below its longest line, which ran the cards
   off the right edge just above the 1000px one-column switch (PSA_23075) */
.a-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s2); }
@media (max-width: 1099.98px) { .a-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .a-grid { grid-template-columns: minmax(0, 1fr); } }
.a-list { list-style: none; margin: 0; padding: 0; }
.a-list li { display: flex; align-items: center; gap: var(--s1-5); padding: var(--s1) 0; border-top: 1px solid var(--line); }
.a-list li:first-child { border-top: 0; }
.a-list-time { flex: none; width: 112px; font-weight: 600; font-size: var(--fs-sm); color: var(--steel); }
.a-list-main { flex: 1; min-width: 0; }
/* Dashboard "Today's cages": each booked hour once, its cages one line each under it (PSA_23082).
   The pay badge sits under the name and a long name wraps, so nothing runs past the card at any width */
.a-hours > li { align-items: flex-start; }
.a-hours .a-list-time { padding-top: var(--s0); }
.a-cages { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s1); }
.a-cages li { display: flex; align-items: baseline; gap: var(--s1-5); min-width: 0; padding: 0; border: 0; }
.a-cage-no { flex: none; width: 104px; font-size: var(--fs-xs); font-weight: 600; color: var(--grey); }
.a-cage-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s0); }
.a-cage-who { max-width: 100%; overflow-wrap: anywhere; }
.a-cages li.is-open .a-cage-who { font-size: var(--fs-xs); }
.a-cage-body .ab { max-width: 100%; white-space: normal; }   /* "Free member hour" wraps rather than leave the card */
/* a phone (PSA_23543): the cage's name sits above its booking, so a long name leaves the booking its
   full width. (A narrow two-column dashboard above the 1000px switch needed it too; the switch is now
   1100px, where each column is 387px wide, so it no longer does.) */
@media (max-width: 519.98px) {
  .a-cages li { flex-direction: column; align-items: stretch; gap: 2px; }
  .a-cage-no { width: auto; }
}
.a-count { font: 600 var(--fs-lg) var(--font-display); }
.a-count-big { font-size: var(--fs-xl); }
.a-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s1-5) var(--s3); margin: 0; }
.a-dl dt { color: var(--grey); font-size: var(--fs-xs); }
.a-dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ── Badges ──────────────────────────────────────────────── */
/* ONE STATUS LOOK ON BOTH SIDES (STYLE rank 2): the public .badge's shape and type (site.css), with
   its own font so a pill in an Oswald heading and one in a table read the same, and ONE COLOUR PER
   STATE as a family sees it:
     open → green tint · paid → solid green · free (a member hour, a free class) → solid turf ·
     pending → amber tint · full and past due / missing → solid red · off → grey
   A family's name in red (a.a-name.is-problem, below) is the same "problem" cue in text. */
.ab { display: inline-block; padding: 2px var(--s1); border: 1px solid transparent; border-radius: var(--radius-pill);
  font: 600 var(--fs-xs)/1.4 var(--font-display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.ab-open { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.ab-paid { background: var(--green-fill); color: var(--white); }
.ab-free { background: var(--turf); color: var(--white); }
.ab-pending { background: var(--amber-bg); color: var(--amber-text); border-color: color-mix(in srgb, var(--amber-text) 35%, transparent); }
.ab-full, .ab-due { background: var(--red); color: var(--white); }
.ab-off { background: var(--fill); color: var(--grey); }
.a-ok { color: var(--green); font-weight: 700; font-size: var(--fs-lg); }
.a-due { color: var(--due); }

/* ── Day chips ───────────────────────────────────────────── */
.a-chips { position: relative; display: flex; gap: var(--s1); overflow-x: auto; padding: 2px 0 var(--s1-5); margin-bottom: var(--s1); align-items: stretch; }
/* above a phone the chips wrap to a second line rather than scroll by a few px (STYLE rank 16);
   a phone keeps the sideways scroll, and Members' filter chips sit a little closer to fit at 360 */
@media (min-width: 720px) { .a-chips { flex-wrap: wrap; overflow-x: visible; } }
@media (max-width: 719.98px) { .a-filters { gap: var(--s1); } .a-filters .a-chip-inline { padding: var(--s1) var(--s1-5); } }
.a-chip { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 70px; padding: var(--s1) var(--s1-5);
  background: var(--white); border: 1px solid var(--line-mid); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-size: var(--fs-xs); }
.a-chip strong { font: 600 var(--fs-base) var(--font-display); }
.a-chip.is-active { background: var(--black); color: var(--white); border-color: var(--black); box-shadow: inset 0 -3px 0 var(--red); }
.a-chip-inline { flex-direction: row; gap: var(--s1); font-size: var(--fs-sm); min-width: 0; padding: var(--s1) var(--s2); }
.a-chip-inline strong { font: 700 var(--fs-xs) var(--font-body); background: color-mix(in srgb, var(--black) 8%, transparent); border-radius: var(--radius-pill); padding: 1px var(--s1); }
.a-chip.is-active.a-chip-inline strong { background: var(--red); }
/* Cages: the day chips, then the any-date picker; on a phone the picker takes its own line (PSA_23543) */
.a-daybar { display: flex; align-items: flex-start; gap: var(--s1); margin-bottom: var(--s1); }
.a-daybar .a-chips { flex: 0 1 auto; min-width: 0; margin-bottom: 0; }
.a-daybar .a-chip-form { padding: 2px 0 var(--s1-5); align-self: stretch; }
@media (max-width: 719.98px) {
  .a-daybar { flex-direction: column; align-items: stretch; gap: 0; }
  .a-daybar .a-chip-form { justify-content: center; padding-top: 0; }
}
.a-chip-form { flex: none; display: flex; gap: var(--s1); align-items: center; margin-left: var(--s1); }

/* ── Tables ──────────────────────────────────────────────── */
.a-table-wrap { overflow-x: auto; }
.a-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: var(--fs-sm); }
.a-card > .a-table, .a-card .a-table-wrap .a-table { background: transparent; }
main > .a-table, main > .a-table-wrap > .a-table { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.a-table th, .a-table td { padding: var(--s1-5) var(--s1-5); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.a-table thead th { background: var(--black); color: var(--white); font: 500 var(--fs-xs) var(--font-body); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.a-table tbody tr:last-child > * { border-bottom: 0; }
.a-table .a-num { color: var(--grey); width: 32px; }
.a-table tr.is-due td { background: var(--red-tint); }
.a-table th.a-right, .a-table td.a-right { text-align: right; }

/* Members — the two plan kinds, each under its own heading with a count pill */
.a-h2 + .a-sub { margin-top: -8px; }
.a-count-note { display: inline-block; vertical-align: middle; font: 600 var(--fs-xs)/1.4 var(--font-display); letter-spacing: .1em; background: var(--black); color: var(--white); border-radius: var(--radius-pill); padding: 1px var(--s1); }
.a-table-wrap + .a-h2 { margin-top: var(--s3); }
/* only the short cells stay on one line; the rest wrap so the table fits its column at any
   width above the phone stack (PSA_23075: nowrap on every cell ran it off the edge below ~1250px) */
.a-members td:nth-child(3), .a-members td:nth-child(4) { white-space: nowrap; }
.a-members td:nth-child(2) { min-width: 110px; }
.a-stack thead th { white-space: normal; }
.a-members th, .a-members td { padding: var(--s1-5) var(--s1); }   /* tight sides: the table fits beside the sidebar at 1100px */
/* Find a family / Has this child signed? — a plain GET search over the page (ui-fold #13, #43) */
.a-search { display: flex; flex-direction: column; align-items: center; gap: var(--s1); margin: 0 0 var(--s2); }
.a-search label { font-weight: 600; font-size: var(--fs-sm); }
.a-search-row { display: flex; gap: var(--s1); width: 100%; max-width: 520px; }
.a-search input { flex: 1; min-width: 0; }
.a-search-row .a-btn { display: flex; align-items: center; }
.a-families td:nth-child(2), .a-families td:nth-child(5), .a-families td:nth-child(6) { white-space: nowrap; }
.a-families .a-who .a-muted { display: block; overflow-wrap: anywhere; }   /* the email under the name, short or long */
.a-plain { list-style: none; margin: 0; padding: 0; }
.a-plain li + li { margin-top: 2px; }
.a-wfamily h2 a { text-decoration: none; color: var(--ink); }
.a-wfamily h2 .a-more { overflow-wrap: anywhere; }
.a-wfamily .a-list-main .a-small { display: block; }
.a-who strong { display: block; }
.a-who .a-muted { font-size: var(--fs-xs); }
.a-who a { text-decoration: none; }
/* a family's name in a list is plain ink; red only when the family has a problem: a plan past due or
   not paid yet, or a cage hour not paid (PSA_23609, walk tab 50) */
a.a-name { color: var(--ink); }
/* a hover underlines a name, a count or a "more" link in its own colour, so a name never turns red */
a.a-name:hover, .a-wfamily h2 a:hover, .a-count-link:hover, .a-more:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a.a-name:hover, .a-wfamily h2 a:hover { color: var(--ink); }
a.a-name.is-problem { color: var(--due); }
.a-contact a { overflow-wrap: anywhere; }

/* Schedule grid */
.a-sched { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.a-sched { table-layout: fixed; }   /* every cage column the same width */
.a-sched thead th:first-child { width: 92px; }
.a-sched thead th + th { text-align: center; }
.a-sched thead th { white-space: normal; overflow-wrap: anywhere; }   /* long cage names wrap inside their own column (PSA_23493) */
.a-sched-about { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--grey); }
.a-sched tbody th { width: 92px; white-space: nowrap; font-weight: 600; color: var(--steel); background: var(--bg-soft); }
.a-sched td { min-width: 220px; height: 52px; }
.a-sched td.is-booked { background: var(--white); box-shadow: inset 4px 0 0 var(--red); }
.a-sched td.is-open { background: repeating-linear-gradient(135deg, var(--bg-soft) 0 8px, var(--bg) 8px 16px); }
/* a class hour or a holiday: cages closed. A class hour takes Book a Cage's infield-dirt stripes,
   a holiday stays plain grey, so Tim tells them apart at a glance (STYLE rank 15) */
.a-sched td.is-class, .a-sched td.is-holiday { text-align: center; }
.a-sched td.is-class { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--clay) 22%, transparent) 0 8px, color-mix(in srgb, var(--clay) 8%, transparent) 8px 16px), var(--white); }
.a-sched td.is-class .a-sched-closed { color: var(--clay-dark); }
/* two closed hours one above the other kept the light row line, which vanished into their grey and
   stripes: a closed cell carries a darker line, so 4 PM and 5 PM read as two hours (PSA_23609, walk tab 12) */
.a-sched td.is-holiday { background: var(--closed-bg); }
.a-sched td.is-class, .a-sched td.is-holiday { border-bottom-color: var(--line-strong); }
.a-sched-closed { font-size: var(--fs-xs); font-weight: 600; color: var(--steel); }
.a-sched tr.is-past th,.a-sched tr.is-past td { opacity: .55; }
.a-slot { display: flex; justify-content: space-between; align-items: center; gap: var(--s1-5); }
.a-slot-who { display: flex; flex-direction: column; gap: 1px; font-size: var(--fs-xs); min-width: 0; }
.a-slot-who strong { font-size: var(--fs-sm); }
.a-sched td .ab { max-width: 100%; white-space: normal; }   /* "$16.38 card + $10 credit" wraps inside its cage column on a phone (PSA_23739) */
.a-slot-pay { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s0); flex: none; }

/* Class overview + sessions */
.a-overview td, .a-overview th { white-space: nowrap; }
.a-overview tr.is-current > * { background: var(--red-tint); }
.a-count-link { font: 600 var(--fs-base) var(--font-display); color: var(--ink); text-decoration: none; }
.a-count-link.is-full { color: var(--red); }
.a-session { border-top: var(--edge) solid var(--steel); }
.a-session.is-full { border-top-color: var(--red); }

/* Waiver */
.a-waiver-text { margin: var(--s2) 0; padding: var(--s2) var(--s2); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--fs-sm); max-height: 360px; overflow: auto; }
.a-signature { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s1-5) var(--s3); border-top: 2px solid var(--ink); padding-top: var(--s1-5); }
.a-signature > div { display: flex; flex-direction: column; font-size: var(--fs-sm); }
.a-signature .a-muted { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; }
.a-sig-name { font: italic 600 var(--fs-h3) Georgia, serif; }

/* Messages, reset */
.a-msg header { display: flex; justify-content: space-between; gap: var(--s1-5); flex-wrap: wrap; }
.a-msg-from { margin: 2px 0 var(--s1); font-size: var(--fs-sm); overflow-wrap: anywhere; }
/* Messages: Reply / Archive side by side, and the page's Show archive button in the top right (PSA_23083) */
.a-msg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.a-msg-actions form { margin: 0; }
.a-msg-when { font-size: var(--fs-xs); }
.a-main { position: relative; }
.a-toplink { position: absolute; top: var(--s3); right: var(--s4); }   /* .a-main's padding */
.a-main:has(.a-toplink) .a-title { padding-right: 150px; }
@media (max-width: 1099.98px) { .a-toplink { top: var(--s2); right: var(--s2); } }
.a-reset { max-width: 620px; }

/* Holidays (was the page's own <style> block, STYLE rank 8) */
.a-hol-add { display: flex; flex-wrap: wrap; gap: var(--s1-5); align-items: flex-end; justify-content: center; }
.a-hol-add label { display: flex; flex-direction: column; gap: var(--s0); font-weight: 600; font-size: var(--fs-sm); text-align: center; }
.a-hol-add input[name=name] { min-width: 220px; }
/* Report card tests: one table, a drag handle on the left (PSA_25776) */
.a-tests .a-input { width: 100%; min-width: 0; }
.a-tests td { vertical-align: middle; }
.a-tests th, .a-tests td { padding-inline: var(--s1); }
.a-tests td[data-label=Name] .a-input { min-width: 170px; }
.a-tests td[data-label=Unit] .a-input { min-width: 116px; }
.a-tests td[data-label="Better is"] .a-input { min-width: 156px; }
.a-tests td[data-label=Description] { width: 100%; }
.a-tests td[data-label=Description] .a-input { min-width: 130px; }
.a-tests .a-th-note { text-transform: none; letter-spacing: 0; opacity: .8; }
.a-tests-n { white-space: nowrap; }
.a-tests-do { white-space: nowrap; }
.a-tests-do form { display: inline-block; margin: 0; }
.a-tests-do form + form { margin-left: var(--s0); }
@media (max-width: 1239.98px) {   /* too narrow for the seven columns beside the sidebar: each test a card, as .a-stack is on a phone */
  .a-tests, .a-tests tbody, .a-tests tr, .a-tests td { display: block; width: 100%; }
  .a-tests thead { display: none; }
  .a-card .a-table.a-tests tr { position: relative; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: var(--s1) 0 var(--s1) 48px; }
  .a-tests tr.is-dragging { background: var(--red-tint); }
  .a-tests td { display: flex; justify-content: space-between; align-items: center; gap: var(--s1-5); padding: var(--s0) 0; border: 0; }
  .a-tests td::before { content: attr(data-label); color: var(--grey); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; text-align: left; flex: none; width: 96px; }
  .a-tests td[data-label] .a-input { flex: 1 1 auto; min-width: 0; }
  .a-tests td.a-grip-cell { position: absolute; left: 0; top: var(--s1); width: 44px; padding: 0; }
  .a-table.a-tests td.a-tests-do { justify-content: center; gap: var(--s1); }
  .a-table.a-tests td.a-tests-do::before { content: none; }
  .a-tests td.a-tests-do form + form { margin: 0; }
}
.a-grip-cell { width: 44px; padding-right: 0 !important; }
.a-grip { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 42px; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--grey); font-size: 1.4rem; line-height: 1; cursor: grab; touch-action: none; user-select: none; }
.a-grip:hover { color: var(--ink); border-color: var(--line); }
.a-grip:focus-visible { outline: none; box-shadow: var(--ring); color: var(--ink); }
.a-tests tr.is-dragging td { background: var(--red-tint); }
.a-tests tr.is-dragging .a-grip { cursor: grabbing; }
.a-order-status { min-height: 1.4em; margin: var(--s0) 0; font-weight: 600; font-size: var(--fs-sm); }
.a-order-status.is-bad { color: var(--red); }
/* Classes: "Add an athlete" under a session's roster (PSA_24982) */
.a-class-add { display: flex; flex-wrap: wrap; gap: var(--s1-5); align-items: flex-end; justify-content: center; margin-top: var(--s2); }
.a-class-add label { display: flex; flex-direction: column; gap: var(--s0); font-weight: 600; font-size: var(--fs-sm); text-align: center; flex: 0 1 420px; min-width: 0; }
.a-class-add select { width: 100%; text-align: center; text-align-last: center; }
/* Cage schedule: "Add a booking", a member family's free hour (PSA_24983) */
.a-cage-add-card { text-align: center; scroll-margin-top: 120px; }   /* an Open slot's link lands below the phone's sticky header */
.a-cage-add-card summary { cursor: pointer; font-weight: 600; }
.a-cage-add { display: flex; flex-wrap: wrap; gap: var(--s1-5); align-items: flex-end; justify-content: center; margin-top: var(--s1-5); }
.a-cage-add label { display: flex; flex-direction: column; gap: var(--s0); font-weight: 600; font-size: var(--fs-sm); text-align: center; flex: 0 1 260px; min-width: 0; }
.a-cage-add select { width: 100%; text-align: center; text-align-last: center; }
/* …its second step, once the free hour is used: a warning, then charge or free (PSA_24997) */
.a-cage-second { margin-top: var(--s1-5); padding: var(--s1-5); background: var(--amber-bg); color: var(--amber-text); border-left: 4px solid var(--amber-text); border-radius: var(--radius); }
.a-cage-second p { margin: 0 0 var(--s1); }
.a-cage-second-form { display: flex; flex-wrap: wrap; gap: var(--s1-5); align-items: center; justify-content: center; }
.a-cage-second-back { font-size: var(--fs-sm); }
.a-slot-add { display: inline-block; font-size: var(--fs-xs); font-weight: 600; color: var(--steel); text-decoration: none; padding: 2px 8px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--white); }
.a-slot-add:hover, .a-slot-add:focus-visible { color: var(--red); border-color: var(--red); }
.a-hol-past td { color: var(--grey); }
.a-hol-past summary { cursor: pointer; font-weight: 600; }
.a-hol-list form { margin: 0; }
.a-hol-list .a-held { font-size: var(--fs-xs); }
.a-notice ul { margin: var(--s1) 0 0; padding-left: var(--s3); text-align: left; }

/* Emails (PSA_26530): the group picker, then one panel: the addresses box, Copy all and Download CSV,
   then the families table. Centred like every page; the box is a wide read-only textarea */
.a-emails-pick { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; justify-content: center; margin: 0 0 var(--s2); }
.a-emails-pick label { font-weight: 600; font-size: var(--fs-sm); }
.a-emails-pick select { max-width: 100%; width: auto; }
.a-emails h2 { justify-content: center; text-align: center; }
.a-emails-box { display: block; width: 100%; height: auto; min-height: 96px; padding: var(--s1) var(--s1-5); font-size: var(--fs-sm); line-height: 1.5; resize: vertical; margin: var(--s1) 0; }
.a-emails-tools { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; justify-content: center; margin: 0 0 var(--s2); }
.a-emails-table td:nth-child(2) { word-break: break-all; }

/* Sales tax (PSA_23812): the month picker and Print, then the report in one white panel. The totals
   are a narrow two-column table; the money columns never wrap */
.a-tax-tools { display: flex; flex-wrap: wrap; gap: var(--s1-5); align-items: flex-end; justify-content: center; margin: 0 0 var(--s2); }
.a-tax-pick { display: flex; flex-wrap: wrap; gap: var(--s1); align-items: center; justify-content: center; margin: 0; }
.a-tax-pick label { font-weight: 600; font-size: var(--fs-sm); }
.a-tax { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2) var(--s3) var(--s3); }
.a-tax-head { text-align: center; margin-bottom: var(--s2); }
.a-tax-head h2 { font-size: var(--fs-xl); margin: 0 0 var(--s0); }
.a-tax-head p { margin: 0 0 var(--s0); }
.a-tax-h { font-size: var(--fs-lg); margin: var(--s3) 0 var(--s1); text-align: center; }
.a-tax .a-table { background: transparent; }
.a-tax-totals { max-width: 460px; margin: 0 auto; font-size: var(--fs-md); }
.a-tax-totals th { font-weight: 500; }
.a-tax-totals tr.is-total > * { font-weight: 700; border-top: 2px solid var(--ink); }
.a-tax-totals tr.is-part th { padding-left: var(--s3); color: var(--grey); }
.a-tax-note { text-align: center; margin: var(--s1-5) 0 0; }
.a-tax-kinds th[scope=row] { font-weight: 500; }
.a-tax-kinds tfoot > *, .a-tax-lines tfoot > * { font-weight: 700; }
.a-tax-kinds tfoot th, .a-tax-kinds tfoot td, .a-tax-lines tfoot th, .a-tax-lines tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; }
.a-tax-lines td:first-child, .a-tax-lines td.a-right, .a-tax-kinds td.a-right, .a-tax-totals td { white-space: nowrap; }
.a-tax-lines tr.is-refund td { color: var(--due); }
@media (max-width: 719.98px) {
  .a-tax { padding: var(--s1-5) var(--s1-5) var(--s2); }
  .a-tax-kinds th, .a-tax-kinds td { padding: var(--s1) var(--s0); }
  .a-tax-kinds thead th { white-space: normal; }   /* "Sales before tax" on two lines, so the table fits 390px */
  .a-tax-lines tfoot { display: block; }
  .a-tax-lines tfoot tr { display: block; width: 100%; padding: var(--s1) var(--s1-5); }
  .a-tax-lines tfoot th { display: none; }
  .a-tax-lines tfoot td { display: flex; justify-content: space-between; border: 0; padding: var(--s0) 0; }
  .a-tax-lines tfoot td::before { content: "Total " attr(data-label); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; }
}
/* On paper only the report: no sidebar, top bar, demo strip, picker or button; black on white, every
   table head plain, and the widths of a Letter page. The phone's stacked cards never apply to paper */
@page { size: letter; margin: .5in; }
@media print {
  body, .a-tax, .a-tax .a-table { background: var(--paper); color: var(--paper-ink); }
  body { font-size: 10pt; }
  .a-side, .a-demo, .a-tax-tools, .a-title { display: none !important; }
  .a-shell { display: block; min-height: 0; }
  .a-main { padding: 0; max-width: none; }
  .a-tax { border: 0; border-radius: 0; padding: 0; }
  .a-tax .a-muted, .a-tax-totals tr.is-part th, .a-tax-lines tr.is-refund td { color: var(--paper-ink); }
  .a-tax .a-table thead th { background: var(--paper); color: var(--paper-ink); border-bottom: 1.5px solid var(--paper-ink); }
  .a-tax .a-table th, .a-tax .a-table td { padding: 3pt 5pt; border-color: var(--paper-ink); }
  .a-tax-totals tr.is-total > *, .a-tax tfoot th, .a-tax tfoot td { border-top-color: var(--paper-ink); }
  /* a page narrower than 720px (A4) would match the phone's stack rules below: the .a-tax prefix wins */
  .a-tax table.a-tax-lines { display: table; width: 100%; }
  .a-tax .a-tax-lines tbody { display: table-row-group; }
  .a-tax .a-tax-lines thead { display: table-header-group; }
  .a-tax .a-tax-lines tfoot { display: table-footer-group; }
  .a-tax .a-tax-lines tr, .a-tax .a-tax-lines tfoot tr { display: table-row; break-inside: avoid; padding: 0; border: 0; margin: 0; }
  .a-tax .a-tax-lines td, .a-tax .a-tax-lines tfoot td { display: table-cell; width: auto; text-align: left; }
  .a-tax .a-tax-lines td.a-right, .a-tax .a-tax-lines tfoot td.a-right { text-align: right; }
  .a-tax .a-tax-lines td::before, .a-tax .a-tax-lines tfoot td::before { content: none; }
  .a-tax .a-tax-lines tfoot th { display: table-cell; }
  .a-tax-h { break-after: avoid; }
  a { color: var(--paper-ink); text-decoration: none; }
}

/* ── Phone: tables become stacked cards ──────────────────── */
@media (max-width: 719.98px) {
  .a-stack, .a-stack tbody, .a-stack tr, .a-stack td { display: block; width: 100%; }
  .a-stack thead { display: none; }
  .a-stack { background: transparent !important; border: 0 !important; }
  .a-stack tr { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s1) var(--s1-5); margin-bottom: var(--s1-5); }
  .a-card .a-stack tr { border-width: 0 0 1px; border-radius: 0; padding: var(--s1) 0; margin: 0; }
  .a-stack td { display: flex; justify-content: space-between; align-items: center; gap: var(--s1-5); padding: var(--s0) 0; border: 0; text-align: right; }
  .a-stack td::before { content: attr(data-label); color: var(--grey); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; text-align: left; flex: none; }
  .a-stack td:not([data-label]) { justify-content: flex-end; }
  .a-stack td.a-num { display: none; }
  .a-members td, .a-families td { white-space: normal; }
  .a-families td.a-who { flex-wrap: wrap; row-gap: 0; }   /* name beside its label, the email on a line of its own */
  .a-families .a-who .a-muted { flex: 1 0 100%; margin: 0; text-align: right; }
  .a-plain { text-align: right; }
  .a-wfamily .a-list li { flex-wrap: wrap; }
  .a-who strong { display: inline; }
  .a-who .a-muted { margin-left: auto; }
  .a-list-time { width: 90px; font-size: var(--fs-xs); }
  .a-sched td { min-width: 0; }
  .a-sched { min-width: calc(74px + var(--cages, 1) * 150px); }   /* 2+ cages scroll sideways in .a-table-wrap */
  .a-sched thead th:first-child { width: 74px; }
  .a-sched tbody th { width: 74px; padding: var(--s1); font-size: var(--fs-xs); }
  .a-slot { flex-direction: column; align-items: flex-start; gap: var(--s1); }
  .a-slot-pay { flex-direction: row; align-items: center; }
  .a-chip-form { margin-left: 0; }
}

/* Measurements (PSA_23273): pick a class, then one row per athlete with a box per measurable.
   A phone stacks each athlete into a card: name on top, one labelled box per line */
.a-measure-pick { display: flex; justify-content: center; }
.a-measure-pick label { display: flex; flex-direction: column; align-items: center; gap: var(--s0); font-weight: 600; font-size: var(--fs-sm); width: 100%; max-width: 360px; }
.a-measure-pick .a-input { width: 100%; }
.a-measure h2 { justify-content: center; text-align: center; }
.a-measure-table th, .a-measure-table td { text-align: center; }
.a-measure-table thead th { white-space: normal; text-transform: none; letter-spacing: 0; font-size: var(--fs-xs); }
.a-unit { display: block; font-size: var(--fs-xs); color: var(--grey-light); font-weight: 400; }
.a-measure-table tbody th.a-measure-who { white-space: nowrap; font-weight: 600; background: var(--bg-soft); }
.a-measure-table .a-input { width: 100%; min-width: 78px; padding: 0 var(--s1); }
.a-measure-table .a-input::placeholder { font-size: var(--fs-xs); }
.a-errors { margin: var(--s1) 0 0; padding-left: var(--s3); text-align: left; }
/* above a phone: tight cells and boxes, so all seven boxes show without a sideways scroll beside the
   sidebar too (PSA_23543; was 761-1150px, STYLE rank 27) */
@media (min-width: 720px) {
  .a-measure-table th, .a-measure-table td { padding: var(--s1) var(--s0); }
  .a-measure-table thead th { font-size: var(--fs-xs); }
  .a-measure-table tbody th.a-measure-who { white-space: normal; }
  .a-measure-table .a-input { min-width: 58px; padding: 0 var(--s0); }
}
@media (max-width: 719.98px) {
  .a-measure-table tbody th.a-measure-who { display: block; text-align: center; background: transparent; font-size: var(--fs-base); padding: var(--s0) 0 var(--s1); border: 0; }
  .a-measure-table td { text-align: right; }
  .a-measure-table .a-input { width: 130px; min-width: 0; flex: none; }
  .a-measure-table td::before { flex: 0 1 auto; min-width: 0; white-space: normal; }   /* a long label wraps; the box keeps its 130px (PSA_23493) */
  .a-card .a-measure-table tr { padding: var(--s1-5) 0; }
}

/* Members › a family › Account credit: add or take back credit by hand, like a coupon (PSA_24584).
   One form above the other. From 1024px each form's Amount · Reason · button is ONE centred row, the
   quick fills a row under it (PSA_24594); narrower, every control stacks, centred, as every form (§4). */
.a-credit-forms { display: grid; gap: var(--s2); margin: 0 0 var(--s2); }
.a-credit-form { display: flex; flex-direction: column; align-items: center; gap: var(--s1); text-align: center;
  padding: var(--s2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.a-credit-form h3 { justify-content: center; margin: 0; }
.a-credit-row { display: flex; flex-direction: column; align-items: center; gap: var(--s1); width: 100%; }
.a-credit-form label { display: flex; flex-direction: column; gap: var(--s0); font-weight: 600; font-size: var(--fs-sm); width: 100%; max-width: 320px; }
.a-credit-form .a-input { text-align: center; width: 100%; }
.a-credit-form p { margin: 0; max-width: 560px; }
.a-credit-fills { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1); }
@media (min-width: 1024px) {
  .a-credit-row { flex-direction: row; justify-content: center; align-items: flex-end; }
  .a-credit-row label { width: 150px; }
  .a-credit-row label.a-credit-reason { width: 280px; max-width: none; }
}
@media (max-width: 1023.98px) { .a-credit-fills .a-btn { width: 100%; max-width: 320px; } }
/* a quick fill's flash on the Amount box (assets/js/admin-credit.js adds .a-flash for 1.2s); with
   reduced motion the colour shows and goes with no fade */
.a-credit-form .a-input.a-flash { background: var(--amber-bg); border-color: var(--amber); }
@media (prefers-reduced-motion: no-preference) {
  .a-credit-form .a-input.a-flash { animation: a-flash 1.2s ease-out; }
  @keyframes a-flash { 0%, 40% { background: var(--amber-light); } 100% { background: var(--amber-bg); } }
}

/* Members: edit a family's or an athlete's details (PSA_26529), a fold under Contact and in each
   athlete's cell; the form is one centred column, State and ZIP side by side */
.a-edit-wrap { margin-top: var(--s2); text-align: center; scroll-margin-top: 120px; }
.a-edit-wrap > p { margin: 0 0 var(--s1); }
.a-edit summary { cursor: pointer; font-weight: 600; color: var(--steel); }
.a-edit[open] summary { margin-bottom: var(--s1); }
.a-edit-form { display: flex; flex-direction: column; align-items: center; gap: var(--s1); margin: 0 auto; max-width: 320px; text-align: center; }
.a-edit-form label { display: flex; flex-direction: column; gap: var(--s0); font-weight: 600; font-size: var(--fs-sm); width: 100%; }
.a-edit-form .a-input { width: 100%; text-align: center; }
.a-edit-pair { display: flex; gap: var(--s1); width: 100%; }
.a-edit-pair label { flex: 1 1 0; min-width: 0; }
.a-athletes .a-edit { margin-top: var(--s0); font-size: var(--fs-sm); }
.a-athletes .a-edit-form { margin-top: var(--s1); }
.a-edit-saved { margin: var(--s0) 0; padding: var(--s0) var(--s1); }
#athletes { scroll-margin-top: 120px; }
@media (max-width: 719.98px) {   /* a phone's stacked row: the fold takes its own full-width line under the name */
  .a-athletes td[data-label=Athlete] { flex-wrap: wrap; }
  .a-athletes td[data-label=Athlete] .a-edit, .a-athletes td[data-label=Athlete] .a-edit-saved { flex: 1 0 100%; text-align: center; }
}
