/* Alcmaria Flames house style, shared with planning.alcmariaflames.nl (AF-Planning: public_html/assets/app.css) */
:root {
  --black: #0C0E12;
  --red: #D5231B;
  --red-dark: #B01C15;
  --gold: #F2B400;
  --slate: #5B6675;
  --line: #C9D1DA;
  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --text: #1A1D23;
  --field-height: 2.5rem;
  --green: #1F8A4C;
  --green-bg: #E3F4EA;

}

* { box-sizing: border-box; }
/* Anchors (#match-…) land below the sticky top bar. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; font: 16px/1.45 Barlow, system-ui, sans-serif; color: var(--text); background: var(--bg); }
h1, h2, .brand, .status-tile-count, .login-box h1 { font-family: 'Big Shoulders Display', Barlow, sans-serif; letter-spacing: .01em; }
h1 { font-size: 2rem; margin: 0 0 .75rem; }
h2 { font-size: 1.4rem; margin: 1.5rem 0 .5rem; }
h1 small, h2 small { font-family: Barlow, sans-serif; font-size: .9rem; color: var(--slate); font-weight: 500; }
a { color: var(--red); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.icon { width: 1.05em; height: 1.05em; vertical-align: -.15em; flex: none; }

/* Top bar */
/* Stays visible while scrolling; above popovers and dropdowns (z-index 30/40). */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
  padding: .6rem 16px; background: var(--black); color: #fff; border-bottom: 4px solid var(--red);
}
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-size: 1.6rem; font-weight: 700; }
.brand strong { color: var(--gold); }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.menu a, .menu .link { color: #fff; text-decoration: none; font-weight: 600; }
.menu a:hover, .menu .link:hover { color: var(--gold); }
.language { display: inline-flex; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; overflow: hidden; }
.language a { padding: .1rem .45rem; font-size: .8rem; }
.language a.current { background: var(--gold); color: var(--black); }
/* Phone: logo and a menu button; the button folds the links out below the bar. */
.menu-toggle { display: none; }
@media (max-width: 640px) {
  .topbar { padding: .4rem 16px; }
  .brand { font-size: 1.35rem; }
  .brand img { width: 32px; height: 32px; }
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 40px; padding: 0 10px; background: none; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; cursor: pointer;
  }
  .menu-toggle span { display: block; height: 2px; background: #fff; border-radius: 1px; transition: transform .15s, opacity .15s; }
  .topbar.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topbar.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .topbar.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .topbar.menu-open .menu { display: flex; }
  .menu > a, .menu .link { display: block; width: 100%; padding: .65rem 0; text-align: left; border-top: 1px solid rgba(255,255,255,.12); }
  .menu > form { display: block; width: 100%; }
  .menu .language { align-self: flex-start; margin: .6rem 0 .3rem; }
}

.content { max-width: 1200px; margin: 0 auto; padding: 1rem 16px 4rem; }
.inline { display: inline; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* Cards, messages, small elements */
.card { background: var(--surface); border-radius: 10px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(12,14,18,.08); margin-bottom: 1rem; }
.card.flush { padding: 0; overflow: hidden; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
/* Breadcrumb above a page title: "Settings › Teams › U13". */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .45rem; margin: 0 0 .35rem; font-size: .85rem; font-weight: 600; color: var(--slate); }
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--red); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }
.crumb-sep { color: var(--line); font-weight: 700; }
.msg { padding: .7rem 1rem; border-radius: 8px; margin-bottom: .75rem; font-weight: 500; }
.msg-ok { background: #E3F4EA; color: #14532D; }
.msg-error { background: #FDE4E2; color: #8A1A13; }
.msg-warning { background: #FFF6D6; color: #6B4E00; }
.muted { color: var(--slate); }
.dim { color: var(--slate); font-size: .9em; white-space: nowrap; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 0 .4rem; border-radius: 4px; background: var(--bg); color: var(--slate); vertical-align: middle; }
.alert { color: var(--red); font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

/* Forms: every single-line field has the same height */
.form { display: grid; gap: .75rem; }
.form label, .filters label { display: grid; gap: .2rem; font-weight: 600; font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.wide { grid-column: 1 / -1; }
.buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; }
/* Fixed widths in filter bars, so a field never grows or shifts with its value. */
.filters label { flex: none; }
.filters input[type=date] { width: 11rem; }
.filters input[type=time] { width: 7rem; }
.filters select { width: 13rem; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--text); background: #fff;
  border: 1px solid var(--line); border-radius: 6px; padding: 0 .6rem; width: 100%; min-width: 0; margin: 0;
}
input:not([type=checkbox]):not([type=radio]), select { height: var(--field-height); line-height: normal; }
/* Buttons and fields use the same box model, so equal heights really look equal. */
button, .btn { box-sizing: border-box; line-height: 1; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; }
textarea { padding: .5rem .6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem; display: grid; gap: .3rem; }
.form label.check, label.check { display: flex; align-items: center; gap: .4rem; font-weight: 500; }
.check input { width: auto; height: auto; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; height: var(--field-height);
  font: inherit; font-weight: 700; padding: 0 1rem; border: 0; border-radius: 6px;
  background: var(--red); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--red-dark); }
.btn.light { background: #fff; color: var(--black); border: 1px solid var(--line); }
.btn.light:hover { border-color: var(--black); }
.btn.small { padding: 0 .75rem; font-size: .9rem; }
.btn.tiny { height: auto; padding: .05rem .5rem; font-size: .75rem; vertical-align: middle; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  border: 0; border-radius: 6px; background: transparent; color: var(--slate); cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover { background: var(--bg); color: var(--black); }
.icon-btn.danger:hover { background: #FDE4E2; color: var(--red); }
.icon-btn.on { color: var(--green); }

/* Tables and rows */
.table { width: 100%; border-collapse: collapse; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.table th, .table td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--bg); vertical-align: middle; }
.table th { font-size: .85rem; color: var(--slate); }
.table .right { text-align: right; }
.table tr.inactive td { color: var(--slate); }
.table tr.row-link { cursor: pointer; }
.table tr.row-link:hover td { background: var(--bg); }

/* ---- Shared with Planning: groups, phone tables, dialogs, dashboard, lists ---- */
.btn-group { display: inline-flex; }
.btn-group > .btn { border-radius: 0; margin-left: -1px; }
.btn-group > .btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.btn-group > .btn:last-child { border-radius: 0 6px 6px 0; }
.btn[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }
.btn.danger { color: var(--red); }
.btn.light.danger:hover { border-color: var(--red); background: #FDE4E2; }
.show-phone { display: none; }
@media (max-width: 640px) { .hide-phone { display: none; } .show-phone { display: inline; } }

.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 1.25rem; border: 0; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.modal::backdrop { background: rgba(12,14,18,.55); }
.modal-close { position: sticky; top: 0; float: right; background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--slate); }
.modal h2 { margin-top: 0; }

/* Confirmation dialog (replaces the browser's confirm()) */
.confirm-dialog {
  width: min(380px, calc(100vw - 32px)); padding: 1.5rem 1.25rem 1.25rem; border: 0; border-radius: 12px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.confirm-dialog::backdrop { background: rgba(12,14,18,.55); }
.confirm-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
  border-radius: 50%; background: #FDE4E2; color: var(--red); font-size: 1.5rem;
}
.confirm-message { font-size: 1.05rem; font-weight: 600; margin: .9rem 0 1.25rem; }
.confirm-dialog .buttons { justify-content: center; }
.confirm-dialog .btn { min-width: 8rem; }

.small { font-size: .85rem; }
.spaced { margin-top: .75rem; }
.lead { font-size: 1.15rem; font-weight: 600; }
.break { overflow-wrap: anywhere; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; overflow-wrap: anywhere; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Dashboard: wide main column and narrow side column; one column on small screens. */
.dashboard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.dashboard .card { margin: 0; }
.dashboard h2 { margin-top: 0; display: flex; align-items: center; gap: .4rem; }
@media (max-width: 900px) { .dashboard { grid-template-columns: 1fr; } }
.card.attention { border-left: 5px solid var(--gold); }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.list > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .75rem; padding: .45rem 0; border-bottom: 1px solid var(--bg); }
.list > li:last-child { border-bottom: 0; }
.big-number { font-size: 2.2rem; font-weight: 800; margin: 0; font-family: 'Big Shoulders Display', Barlow, sans-serif; }
.big-number small { font-family: Barlow, sans-serif; font-size: .95rem; font-weight: 500; color: var(--slate); }
.copy { color: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.copy:hover { text-decoration: underline dotted; }
.copy.copied::after { content: " \2713  " attr(data-done); font-size: .75rem; font-weight: 600; color: #14532D; }

@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .table th, .table td { padding: .4rem .25rem; }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  .topbar, .no-print, .msg, .modal, .confirm-dialog, .filters, .btn, .toast { display: none !important; }
  .content { max-width: none; padding: 0; }
  .card { box-shadow: none; padding: 0; }
}

/* ---- Academy ---- */
.menu > a.current { color: var(--gold); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.card > h2:first-child { margin-top: 0; }
.detail .card label { display: grid; gap: .2rem; font-weight: 600; font-size: .9rem; }
.detail textarea { width: 100%; }
input:disabled, input[readonly] { background: var(--bg); color: var(--slate); }

/* Status of a registration: chip and dashboard tile, one colour per status. */
.status-1 { --c: #1E40AF; --c-bg: #E6EEFC; }
.status-2 { --c: #A16207; --c-bg: #FEF6D8; }
.status-3 { --c: #EA580C; --c-bg: #FFEEDF; }
.status-4 { --c: #16A34A; --c-bg: #E3F6EA; }
.status-5 { --c: #14532D; --c-bg: #DCEFE3; }
.status-6 { --c: #B91C1C; --c-bg: #FDE4E2; }
.status-other { --c: var(--slate); --c-bg: var(--bg); }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .55rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--c, var(--line)); background: var(--c-bg, var(--bg)); color: var(--c, var(--slate));
}
/* Equipment condition and availability */
.condition-nieuw { --c: #1E40AF; --c-bg: #E6EEFC; }
.condition-goed { --c: #14532D; --c-bg: #E3F4EA; }
.condition-matig { --c: #8A4B00; --c-bg: #FFF1DC; }
.condition-slecht { --c: #B01C15; --c-bg: #FDE4E2; }
.chip.available { --c: #14532D; --c-bg: #E3F4EA; }
.chip.lent { --c: #B01C15; --c-bg: #FDE4E2; }
.count { font-weight: 700; text-decoration: none; color: var(--text); }
.count.ok { color: #14532D; }
.count.warn { color: #8A4B00; }

/* Four dots for the trial lessons taken */
.dots { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--red); }
.dots i.on { background: var(--red); }
.dots small { margin-left: .35rem; font-size: .8rem; color: var(--slate); font-weight: 600; }

/* New registrations per week */
.trend { display: flex; align-items: flex-end; gap: .4rem; height: 100px; margin-top: .5rem; }
.trend-week { flex: 1; display: grid; justify-items: center; align-content: end; gap: 2px; height: 100%; }
.trend-count { font-size: .75rem; font-weight: 700; color: var(--slate); min-height: 1em; }
.trend-bar { width: 100%; max-width: 34px; background: var(--line); border-radius: 4px 4px 0 0; }
.trend-bar.current { background: var(--red); }
.trend-label { font-size: .72rem; color: var(--slate); }

/* Lists: search bar, sortable headers, paging */
.live-filters { margin-bottom: .75rem; justify-content: space-between; }
.filters .search-field { display: block; position: relative; flex: 1 1 18rem; max-width: 26rem; }
.search-field .icon { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--slate); }
.search-field input { padding-left: 2.1rem; }
a.sort { color: inherit; text-decoration: none; white-space: nowrap; }
a.sort:hover, a.sort.active { color: var(--red); }
.table td.empty { text-align: center; padding: 1.25rem; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: .75rem; font-size: .9rem; }
[data-live-list].loading { opacity: .55; transition: opacity .15s; }

/* Fields with buttons next to them (phone, e-mail, rental set + deposit) */
.input-with-buttons { display: flex; gap: .3rem; align-items: stretch; font-weight: 400; }
.input-with-buttons > input, .input-with-buttons > select { flex: 1 1 auto; }
.btn.square { width: var(--field-height); padding: 0; flex: none; }
.deposit-btn { flex: none; min-width: 6.5rem; }
.deposit-btn.on { background: var(--green); }
.deposit-btn.on:hover { background: #166B3B; }
.deposit-btn.off { background: var(--red); }
.deposit-btn:disabled { cursor: default; opacity: .6; }
option.taken { color: var(--red); }
option.mine { font-weight: 700; }
.date-field { position: relative; display: block; font-weight: 400; }
.date-field .date-clear { position: absolute; right: 2.1rem; top: 50%; transform: translateY(-50%); width: 1.6rem; height: 1.6rem; }

.export-fields legend { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.check-columns { columns: 16rem; column-gap: 1.5rem; }
.check-columns label { margin: .2rem 0; break-inside: avoid; }

/* Toast after saving in the background */
.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 80; padding: .7rem 1rem; border-radius: 8px; font-weight: 600;
  background: var(--black); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); border-left: 5px solid var(--green);
}
.toast.error { border-left-color: var(--red); }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--black); background-image: linear-gradient(160deg, #1A1D23 0%, var(--black) 60%); }
.login-box { width: min(400px, 100%); padding: 2.5rem 2rem 1.5rem; border-radius: 14px; background: var(--surface); text-align: center; border-top: 5px solid var(--red); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-logo { margin-bottom: .5rem; }
.login-box h1 { font-size: 1.9rem; margin: 0 0 .25rem; }
.login-box h1 span { color: var(--red); }
.btn-google { width: 100%; height: 2.9rem; gap: .6rem; margin-top: 1.25rem; }
.login-language { display: inline-flex; margin: 1.5rem 0 0; border-color: var(--line); }
.login-language a { color: var(--slate); text-decoration: none; font-weight: 600; }
.login-language a.current { color: var(--black); }

/* OAuth consent */
.consent-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--bg); color: var(--red); font-size: 1.5rem; }
.facts-list { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 1rem 0; }
.facts-list dt { font-weight: 600; color: var(--slate); }
.facts-list dd { margin: 0; overflow-wrap: anywhere; }
.consent-buttons { justify-content: flex-end; margin-top: 1rem; }
code.mono { display: block; margin-top: .3rem; padding: .4rem .5rem; background: var(--bg); border-radius: 6px; }

/* ---- Screens per task (ticket #15) ---- */
.hide-desk { display: none; }
@media (max-width: 640px) { .hide-desk { display: inline; } }
.buttons.end { justify-content: flex-end; }
.btn.square[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* Lists: calm rows (dark names, the whole row is clickable) */
.table.rows td { padding: .6rem .5rem; }
.table.rows .row-link a { color: var(--text); font-weight: 600; text-decoration: none; }
.table.rows .row-link:hover a { color: var(--red); }
.table.rows .c-date, .table.rows .c-city { color: var(--slate); }

/* Quick filters as buttons with a count */
.filter-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .1rem 0 .4rem; margin-bottom: .25rem; scrollbar-width: thin; }
.filter-chip {
  flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.25rem; padding: 0 .8rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.filter-chip span { font-size: .78rem; color: var(--slate); background: var(--bg); border-radius: 999px; padding: 0 .45rem; }
.filter-chip:hover { border-color: var(--black); }
.filter-chip.active { background: var(--black); border-color: var(--black); color: #fff; }
.filter-chip.active span { background: rgba(255,255,255,.2); color: #fff; }
.filter-chip[class*="status-"]::before { content: ''; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); }

/* Phone: every list row becomes a small block with the important things on the first line */
@media (max-width: 640px) {
  .table.rows thead { display: none; }
  .table.rows tr { display: grid; gap: .15rem .6rem; align-items: center; padding: .7rem .2rem; border-bottom: 1px solid var(--bg); }
  .table.rows td { padding: 0; border: 0; min-width: 0; }
  .table.rows td:empty { display: none; }
  .table.rows td.empty { grid-column: 1 / -1; padding: 1rem 0; }
  .table.rows .c-name a { font-size: 1.02rem; }
  /* Row colours on the whole block, not per cell (cells have gaps between them here). */
  .table.rows tr.row-link:hover td, .table.rows tr.today td { background: none; }
  .table.rows tr.row-link:hover { background: var(--bg); }
  .table.rows tr.today { background: #EDF8F1; }

  .table.registrations tr { grid-template-columns: auto auto 1fr auto; grid-template-areas: "name name name status" "age city date trial"; }
  .registrations .c-name { grid-area: name; } .registrations .c-status { grid-area: status; justify-self: end; }
  .registrations .c-age { grid-area: age; font-size: .88rem; } .registrations .c-city { grid-area: city; font-size: .88rem; }
  .registrations .c-date { grid-area: date; font-size: .8rem; } .registrations .c-trial { grid-area: trial; justify-self: end; }

  .table.trial-table tr { grid-template-columns: auto 1fr auto; grid-template-areas: "name name action" "age trial action"; }
  .trial-table .c-name { grid-area: name; } .trial-table .c-age { grid-area: age; font-size: .88rem; color: var(--slate); }
  .trial-table .c-trial { grid-area: trial; } .trial-table .c-action { grid-area: action; }

  .table.equipment tr { grid-template-columns: auto 1fr auto; grid-template-areas: "set size condition" "holder holder deposit"; }
  .equipment .c-set { grid-area: set; } .equipment .c-size { grid-area: size; font-weight: 600; }
  .equipment .c-condition { grid-area: condition; justify-self: end; }
  .equipment .c-holder { grid-area: holder; font-size: .9rem; } .equipment .c-deposit { grid-area: deposit; justify-self: end; font-size: .85rem; }
  .equipment .c-date { display: none; }

  .table.history tr { grid-template-columns: auto auto 1fr; grid-template-areas: "name name condition" "out in in"; }
  .history .c-name { grid-area: name; } .history .c-condition { grid-area: condition; justify-self: end; }
  .history .c-out { grid-area: out; font-size: .88rem; } .history .c-in { grid-area: in; font-size: .88rem; }

  .table.changes tr { grid-template-columns: 1fr auto; grid-template-areas: "field when" "old old" "new new" "who who"; }
  .changes .c-field { grid-area: field; font-weight: 700; } .changes .c-when { grid-area: when; font-size: .8rem; color: var(--slate); }
  .changes .c-old { grid-area: old; color: var(--slate); text-decoration: line-through; font-size: .9rem; }
  .changes .c-new { grid-area: new; } .changes .c-who { grid-area: who; font-size: .8rem; color: var(--slate); }

  .table.agents tr { grid-template-columns: 1fr auto; grid-template-areas: "agent action" "user user" "used valid"; }
  .agents .c-agent { grid-area: agent; } .agents .c-action { grid-area: action; }
  .agents .c-user { grid-area: user; font-size: .9rem; } .agents .c-used { grid-area: used; font-size: .85rem; } .agents .c-valid { grid-area: valid; font-size: .85rem; }
}

/* Dashboard: statuses in one compact strip, then lists of people to act on */
.status-strip { display: flex; gap: .5rem; margin-bottom: 1rem; }
.status-pill {
  flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; gap: .45rem; padding: .55rem .8rem; border-radius: 10px;
  background: var(--surface); border-left: 5px solid var(--c); color: var(--text); text-decoration: none; box-shadow: 0 1px 3px rgba(12,14,18,.08);
}
.status-pill:hover { box-shadow: 0 0 0 2px var(--gold); }
.status-pill strong { font: 800 1.6rem 'Big Shoulders Display', Barlow, sans-serif; color: var(--c); line-height: 1; }
.status-pill span { font-size: .85rem; font-weight: 600; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .status-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.count-badge {
  display: inline-flex; justify-content: center; min-width: 1.7rem; padding: .05rem .45rem; border-radius: 999px;
  background: var(--bg); color: var(--slate); font: 700 .85rem Barlow, sans-serif;
}
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--bg); }
.people li:last-child { border-bottom: 0; }
.person { flex: 1; min-width: 0; display: grid; gap: .05rem; color: var(--text); text-decoration: none; }
.person-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person:hover .person-name { color: var(--red); }
.person-meta { font-size: .85rem; color: var(--slate); }
.person-actions { display: flex; gap: .3rem; flex: none; }
.list a { color: var(--text); font-weight: 600; text-decoration: none; }
.list a:hover { color: var(--red); }
.facts-line { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: .25rem 0 .25rem; color: var(--slate); font-weight: 600; }
.facts-line strong { font: 800 1.7rem 'Big Shoulders Display', Barlow, sans-serif; color: var(--text); margin-right: .2rem; }
.sub-head { font: 700 1rem Barlow, sans-serif; margin: 1rem 0 0; }

/* Detail pages: a head with what you need most, then the rest */
.detail-head .detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.detail-head h1 { margin: 0; line-height: 1.1; overflow-wrap: anywhere; }
.detail-head h1 small { font-family: Barlow, sans-serif; font-size: 1rem; font-weight: 600; color: var(--slate); white-space: nowrap; }
.detail-head .btn-group { flex: none; }
.detail-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .9rem; }
.status-select { flex: 1 1 13rem; max-width: 22rem; }
.status-select select { font-weight: 700; }
.contact-buttons { display: flex; gap: .4rem; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; margin: .8rem 0 0; font-size: .88rem; color: var(--slate); }
.detail-meta a { color: var(--slate); }
.detail-meta a:hover { color: var(--red); }
.save-state { margin-left: auto; font-weight: 700; }
.save-state.saving { color: var(--slate); }
.save-state.saved { color: var(--green); }
.save-state.error { color: var(--red); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 1rem; min-width: 0; }
.detail-grid .card { margin: 0; }
.detail-head { margin-bottom: 1rem; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.card-head h2 { display: flex; align-items: center; gap: .5rem; }
.grid.dates { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.equipment-assign { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; }
.equipment-assign > label { flex: 1 1 15rem; }
.deposit-btn { min-width: 11rem; }

/* Blocks that fold away (open by default on a PC) */
details.section > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; list-style: none; cursor: pointer; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary h2 { margin: 0; }
details.section > summary::after {
  content: ''; flex: none; width: .55rem; height: .55rem; margin-right: .3rem;
  border-right: 2px solid var(--slate); border-bottom: 2px solid var(--slate); transform: rotate(45deg); transition: transform .15s;
}
details.section[open] > summary { margin-bottom: .8rem; }
details.section[open] > summary::after { transform: rotate(-135deg); }

/* Trial lessons: a clear button per participant */
.trial-table .dates { display: block; font-size: .8rem; font-weight: 400; }
.trial-table tr.today td { background: #EDF8F1; }
.today-btn { min-width: 6.5rem; }
.today-btn.on { background: var(--green); }
.today-btn.on:hover { background: #166B3B; }
.chip.done { --c: #6B4E00; --c-bg: #FFF6CC; }

/* Equipment */
.deposit { font-weight: 600; white-space: nowrap; }
.deposit.yes { color: var(--green); }
.deposit.no { color: var(--red); }
.danger-zone { display: flex; justify-content: flex-end; margin: 0 0 1rem; }
