:root {
  --blue: #064ca2;            /* HZS donkerblauw (logo) */
  --brand-light: #009fe0;     /* HZS lichtblauw (logo) */
  --blue-dark: #043a7c;
  --aqua: #e6f5fc;
  --ink: #17212b;
  --muted: #4b5866;
  --line: #d9e2ea;
  --bg: #f5f8fb;
  --ok: #1f7a4d;
  --bad: #b3261e;
  --training: #064ca2;
  --competition: #c2410c;
  --club: #6d28d9;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; padding-bottom: 40px; min-height: 70vh; }
a { color: var(--blue); }
h1 { font-size: 1.6rem; margin: 0 0 16px; color: var(--blue); }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.center { text-align: center; }

/* header */
.topbar { background: #fff; color: var(--ink); border-bottom: 4px solid var(--brand-light); box-shadow: 0 1px 6px rgba(6,76,162,.12); }
.bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--blue); font-weight: 700; text-decoration: none; font-size: 1.15rem; }
.logo { height: 46px; width: auto; display: block; }
.login-logo { display: block; height: 84px; width: auto; margin: 0 auto 8px; }
.foot { color: var(--muted); font-size: .85rem; padding-bottom: 24px; }

/* knoppen */
.btn { display: inline-block; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--aqua); }
.topbar .btn-ghost { color: var(--blue); border-color: var(--blue); }
.topbar .btn-ghost:hover { background: var(--aqua); }
.btn-small { padding: 5px 11px; font-size: .9rem; }

/* kaarten en lijsten */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.card.narrow.wide { max-width: 640px; }
pre { white-space: pre-wrap; word-break: break-all; background: #f0f3f6; padding: 10px; border-radius: 8px; font-size: .85rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cards .card { margin: 0; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { border-color: var(--blue); }
.is-off { opacity: .6; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.row-between h1, .row-between h2 { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a { text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat { border-top: 4px solid var(--brand-light); }
.stat strong { display: block; font-size: 1.8rem; color: var(--blue); }
.stat span { color: var(--muted); font-size: .9rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.section-title { margin: 22px 0 10px; color: var(--blue); }
.cat-head { margin: 8px 0 0; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.card.cat-border-swim_school { border-left: 5px solid var(--brand-light); }
.card.cat-border-competition { border-left: 5px solid var(--competition); }

.tabs { display: flex; gap: 6px; margin: 12px 0 14px; border-bottom: 2px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a[aria-current=page] { color: var(--blue); border-bottom-color: var(--brand-light); }

details.collapsible > summary { list-style: none; cursor: pointer; display: inline-block; }
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible[open] > summary { margin-bottom: 12px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--competition); color: #fff; font-size: .75rem; text-align: center; line-height: 20px; }
[hidden] { display: none !important; }
textarea { resize: vertical; }

/* chips */
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--aqua); color: var(--blue-dark); }
.chip.ok { background: #e3f4ea; color: var(--ok); }
.chip.cat-swim_school { background: var(--aqua); color: var(--blue-dark); }
.chip.cat-competition { background: #fde6d8; color: var(--competition); }
.chip.warn { background: #fff4d6; color: #8a5a00; }
.chip.off { background: #eceff2; color: var(--muted); }
.chip.type-training { background: #dbe8f7; color: var(--training); }
.chip.type-competition { background: #fde6d8; color: var(--competition); }
.chip.type-club { background: #ece3fb; color: var(--club); }
.chip.att-present { background: #e3f4ea; color: var(--ok); }
.chip.att-absent { background: #fbe4e2; color: var(--bad); }
.chip.att-unknown { background: #eceff2; color: var(--muted); }

/* meldingen */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.alert ul { margin: 0; padding-left: 20px; }
.alert-success { background: #e3f4ea; border-color: #b7e0c8; color: #14532d; }
.alert-warning { background: #fff4d6; border-color: #f0d58a; color: #6b4a00; }
.alert-info { background: #e4eefb; border-color: #b5cdf0; color: #12365f; }
.alert-error { background: #fbe4e2; border-color: #f2b8b3; color: #7a1c15; }

/* tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.table td form { margin: 0; display: inline; }
.table.attendance th:not(:first-child), .table.attendance td:not(:first-child) { text-align: center; width: 90px; }
.radio input { width: 22px; height: 22px; accent-color: var(--blue); }
.radio-present input { accent-color: var(--ok); }
.radio-absent input { accent-color: var(--bad); }

/* formulieren */
.form label, .filters label, .inline-form label { display: block; font-weight: 600; margin-bottom: 12px; }
input:not([type=radio]):not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; font: inherit; font-weight: 400; border: 1px solid #b9c6d2; border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 1px; }
.card.narrow form label { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 4px; margin: 0 0 14px; }
legend { font-weight: 600; padding: 0 6px; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }
.check input { width: auto; margin: 0; }
.group-picks { margin: 6px 0 6px 24px; }
.group-picks[hidden] { display: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select { margin: 0; width: auto; min-width: 200px; }
.inline-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.inline-form label { margin: 0; }
.inline-form .btn { margin-bottom: 0; }

/* kalender */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cal-title { font-size: 1.1rem; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { text-align: center; font-weight: 600; color: var(--muted); padding: 4px 0; font-size: .85rem; }
.cal-day { background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: 96px; padding: 4px; overflow: hidden; }
.cal-day.empty { background: transparent; border-color: transparent; }
.cal-day.is-today { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.cal-num { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.cal-dayname { display: none; }
.cal-add { margin-left: auto; text-decoration: none; font-weight: 700; padding: 0 6px; border-radius: 6px; }
.cal-add:hover { background: var(--aqua); }
.cal-event { display: block; font-size: .78rem; line-height: 1.25; text-decoration: none; padding: 2px 5px; margin-bottom: 2px; border-radius: 5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.type-training { background: var(--training); }
.cal-event.type-competition { background: var(--competition); }
.cal-event.type-club { background: var(--club); }
.cal-event.other { background: #c9d0d7; color: #4a5560; cursor: default; }
.cal-event.cancelled { background: #8a97a3; text-decoration: line-through; }
.cal-event .time { font-weight: 700; }

@media (max-width: 720px) {
  .grid2 { grid-template-columns: 1fr; }
  .cal-grid { display: block; }
  .cal-head, .cal-day.empty, .cal-day:not(.has-events) { display: none; }
  .cal-day { margin-bottom: 8px; min-height: 0; padding: 8px; }
  .cal-num { font-size: .95rem; color: var(--ink); font-weight: 600; }
  .cal-dayname { display: inline; text-transform: capitalize; }
  .cal-event { font-size: .9rem; padding: 6px 8px; white-space: normal; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { margin-top: 8px; }
  .bar { gap: 6px 12px; }
  .filters input, .filters select { width: 100%; }
}

/* ===== Mobiel (telefoon) ===== */
@media (max-width: 720px) {
  body { font-size: 16px; -webkit-text-size-adjust: 100%; }
  .wrap { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  main.wrap { padding-top: 14px; }
  h1 { font-size: 1.35rem; margin-bottom: 12px; }
  .card { padding: 14px; border-radius: 10px; }
  .card.narrow { margin: 16px auto; }

  /* compacte header: logo links, gebruiker rechts, menu als scrollbare rij */
  .logo { height: 36px; }
  .bar { min-height: 0; padding-top: 4px; padding-bottom: 4px; }

  /* grotere aanraakdoelen */
  .btn { padding: 12px 18px; min-height: 44px; text-align: center; }
  .btn-small { padding: 9px 14px; min-height: 40px; }
  input:not([type=radio]):not([type=checkbox]), select, textarea { padding: 12px; font-size: 16px; }
  .check { padding: 6px 0; }
  .check input { width: 22px; height: 22px; flex: none; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
  .row-between > .btn { width: 100%; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form .btn { width: 100%; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat strong { font-size: 1.5rem; }
  .cards { grid-template-columns: 1fr; }
  .list li { padding: 12px 0; }
  .cal-nav .btn { flex: 1; }
  .cal-title { text-align: center; flex: 2; }

  /* tabellen worden kaarten: elke rij een blok met label per veld */
  .table-wrap { overflow: visible; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack { background: transparent; }
  .table.stack thead { display: none; }
  .table.stack tr { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
  .table.stack td { border: 0; padding: 5px 0; text-align: left !important; display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
  .table.stack td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; font-weight: 600; flex: 0 0 38%; }
  .table.stack td[data-label=""]::before { display: none; }
  .table.stack td:first-child { font-weight: 600; font-size: 1.05rem; }
  .table.stack td:first-child::before { display: none; }
  .table.stack td { overflow-wrap: anywhere; min-width: 0; }
  .table.stack td > * { min-width: 0; }
  .table.stack td.right { justify-content: flex-end; }
  .table.stack td .btn { width: 100%; }
  .table.stack td form { display: block; width: 100%; }

  /* aanwezigheid: grote radioknoppen, vaste kolombreedte */
  .table.attendance th:not(:first-child), .table.attendance td:not(:first-child) { width: 62px; padding-left: 4px; padding-right: 4px; }
  .table.attendance th { font-size: .7rem; }
  .table.attendance td:first-child { max-width: 38vw; overflow-wrap: anywhere; }
  .radio { display: inline-flex; padding: 8px; }
  .radio input { width: 26px; height: 26px; }
}


/* Trainingsreeksen */
.actions-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.inline-form input[type=text], .inline-form input:not([type]) { flex: 1 1 180px; min-width: 0; }
.slot-row { display: grid; grid-template-columns: 120px 110px 110px 1fr; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line, #e3e7ea); }
.slot-row input { margin: 0; }
@media (max-width: 640px) { .slot-row { grid-template-columns: 1fr 1fr; } .slot-row .slot-day { grid-column: 1 / -1; } .slot-row .slot-loc { grid-column: 1 / -1; } }

fieldset.child-extra.is-collapsed { display: none; }
fieldset.child-extra { position: relative; }
.remove-child { position: absolute; top: -27px; right: 14px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--muted, #667); font-size: 24px; line-height: 1; cursor: pointer; }
.remove-child:hover, .remove-child:focus-visible { background: #fdecee; color: #b00020; }
.backlink { margin: 0 0 10px; font-size: .95rem; }
.backlink a { display: inline-block; padding: 6px 0; text-decoration: none; }
.backlink a:hover { text-decoration: underline; }

/* Publieke website */
.public-site .bar { justify-content: space-between; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 0; align-items: center; }
.site-nav a { padding: 8px 10px; font-size: .95rem; }
.nav-group { position: relative; display: inline-block; }
.nav-group .sub { display: none; position: absolute; left: 0; top: 100%; z-index: 20; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.nav-group .sub a { display: block; padding: 8px 10px; color: var(--ink); }
.nav-group:hover .sub, .nav-group:focus-within .sub { display: block; }
.nav-login { font-weight: 700; }
@media (max-width: 820px) {
  .site-nav.is-collapsed { display: none; }
  .site-nav { flex-direction: column; align-items: flex-start; flex-basis: 100%; }
  .nav-group .sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; }
  .site-nav a { padding: 8px 0; }
}
.hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero h1 { margin-top: 0; }
.home-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 820px) { .home-cols { grid-template-columns: 1fr; } }
.post-card { display: flex; gap: 14px; align-items: flex-start; }
.post-card h3 { margin: 0 0 4px; }
.post-thumb { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; }
@media (max-width: 520px) { .post-card { flex-direction: column; } .post-thumb { width: 100%; height: 160px; } }
.post-hero { max-width: 100%; border-radius: 10px; margin: 8px 0 14px; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose h2, .prose h3 { color: var(--blue); }
.prose p.md-figure { margin: 12px 0; }
.event { margin-bottom: 10px; }
.cancelled-text { text-decoration: line-through; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { margin-bottom: 10px; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.thumb-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }
.thumb-grid code { display: block; font-size: .75rem; word-break: break-all; background: #f1f4f7; padding: 4px 6px; border-radius: 6px; margin: 6px 0; user-select: all; }
.md-help { font-size: .85rem; }
textarea.editor { min-height: 320px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92rem; }
.check-col { width: 36px; text-align: center; }
.check-col input { width: 20px; height: 20px; }
.move-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

.no-margin { margin: 0; }
.mt-s { margin-top: 8px; }
.thumb-small { max-width: 220px; border-radius: 8px; }
form.inline-form, .actions-inline form { display: inline; }

/* ===== Beheer-app: zijmenu ===== */
body.has-sidebar { background: var(--bg); }
.app-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #05264d; color: #cfe0ef; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px 14px; }
.side-brand { color: #fff; padding: 2px 10px 18px; font-size: 1.25rem; font-style: italic; }
.side-brand .logo { height: 40px; }
.side-nav { flex: 1; }
.side-section { margin-bottom: 16px; }
.side-label { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #7fa3c7; padding: 4px 12px 6px; }
.side-link { display: flex; align-items: center; gap: 12px; color: #dbe8f4; text-decoration: none; padding: 9px 12px; border-radius: 9px; font-weight: 600; margin-bottom: 2px; }
.side-link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.side-link.is-active { background: #fff; color: var(--blue); }
.side-link.is-active .side-icon { color: var(--brand-light); }
.side-icon { flex: none; opacity: .9; }
.side-link .badge { margin-left: auto; }
.side-link-ext { font-weight: 500; font-size: .92rem; color: #9fc0de; }
.side-user { border-top: 1px solid rgba(255, 255, 255, .15); padding: 14px 6px 0; display: flex; flex-direction: column; gap: 10px; margin: 8px 0 0; }
.side-who { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-light); color: #fff; display: grid; place-items: center; font-weight: 800; }
.side-user .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.side-user .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.app-content { min-width: 0; }
.app-content .wrap { max-width: 1100px; }
.app-topbar, .app-overlay { display: none; }
.app-topbar .brand, .topbar .brand { color: var(--blue); }

@media (max-width: 959px) {
  .app-shell { display: block; }
  .app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 4px solid var(--brand-light); padding: 6px max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left)); }
  .app-menu-btn { background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font: 700 1rem system-ui, sans-serif; cursor: pointer; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto; transform: translateX(-102%); transition: transform .2s ease; visibility: hidden; }
  body.nav-open .sidebar { transform: none; visibility: visible; box-shadow: 0 0 30px rgba(0, 0, 0, .35); }
  body.nav-open { overflow: hidden; }
  .app-overlay { position: fixed; z-index: 40; inset: 0; background: rgba(5, 38, 77, .55); }
  body.nav-open .app-overlay { display: block; }
  .side-brand { display: none; }
  .sidebar { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ===== Filters en knoppenrijen (opgeruimd) ===== */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
form.filters input:not([type=radio]):not([type=checkbox]), form.filters select { margin: 0; width: auto; min-width: 180px; flex: 1 1 180px; }
form.filters input[type=search] { flex: 2 1 260px; }
form.filters .btn { align-self: center; flex: 0 0 auto; padding: 9px 20px; }
form.filters > a { align-self: center; font-size: .9rem; }
.row-between > div, .row-between .actions-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions-inline, .actions { gap: 10px; align-items: center; }
.actions-inline form { display: block; margin: 0; }
.card .actions, .card .actions-inline { margin-top: 14px; }
@media (max-width: 640px) {
  form.filters input:not([type=radio]):not([type=checkbox]), form.filters select { flex-basis: 100%; }
  form.filters .btn { width: 100%; }
  .actions-inline form, .actions-inline .btn { flex: 1 1 100%; }
  .actions-inline form .btn { width: 100%; }
}
form.filters select { min-width: 220px; flex-basis: 220px; }
form.filters input[type=search] { flex: 1 1 200px; min-width: 200px; }
.actions-inline { margin-bottom: 16px; }
.card .actions-inline { margin-bottom: 0; }
form.filters select { min-width: 200px; flex-basis: 200px; }
form.filters input[type=search] { min-width: 180px; flex: 1 1 180px; }
@media (max-width: 640px) {
  form.filters { flex-direction: column; flex-wrap: nowrap; }
  form.filters input:not([type=radio]):not([type=checkbox]), form.filters select, form.filters input[type=search] { flex: 0 0 auto; width: 100%; min-width: 0; }
}
@media (min-width: 641px) { form.filters input[type=search] { min-width: 140px; flex: 1 1 140px; } form.filters select { flex: 1 1 220px; } }
.cards.cards-compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cards-compact .card { padding: 10px 12px; }
.cards-compact .card h2 { font-size: 1rem; margin: 0 0 4px; }
.cards-compact .card p { margin: 2px 0; }
.cards-series { gap: 12px; }
.cal-skip { margin-left: 0; color: var(--bad, #b3261e); }

/* Kalender: kleur per groep */
.cal-event.g-0, .swatch.g-0 { background: #064ca2; }
.cal-event.g-1, .swatch.g-1 { background: #0f766e; }
.cal-event.g-2, .swatch.g-2 { background: #4d7c0f; }
.cal-event.g-3, .swatch.g-3 { background: #a16207; }
.cal-event.g-4, .swatch.g-4 { background: #be185d; }
.cal-event.g-5, .swatch.g-5 { background: #0e7490; }
.cal-event.g-6, .swatch.g-6 { background: #7c2d12; }
.cal-event.g-7, .swatch.g-7 { background: #4338ca; }
.cal-event.g-club, .swatch.g-club { background: var(--club); }
.cal-event.other { background: #c9d0d7; color: #4a5560; }
.cal-event.cancelled { background: #8a97a3; }
.cal-event .grp { display: block; font-size: .72rem; opacity: .9; overflow: hidden; text-overflow: ellipsis; }
.cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 12px 0; font-size: .85rem; }
.cal-legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.swatch.is-comp-sw { background: #fff; border: 1px solid var(--line); border-left: 4px solid #fbbf24; }
.cal-event.g-8, .swatch.g-8 { background: #9d174d; }
.cal-event.g-9, .swatch.g-9 { background: #166534; }
.cal-event.g-10, .swatch.g-10 { background: #1e3a8a; }
.cal-event.g-11, .swatch.g-11 { background: #b45309; }
.swatch { margin-right: 6px; vertical-align: -1px; }
.cal-legend .swatch { margin-right: 0; }
.inline-form-card { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 12px 16px; }
.inline-form-card label { margin: 0; }
.inline-form-card input[type=date] { width: auto; }
.inline-form-card .small { flex: 1 1 100%; margin: 0; }
.cat-banner { margin: 28px 0 4px; padding: 8px 14px; border-radius: 10px; font-size: 1.15rem; color: #fff; background: var(--blue); }
.cat-banner-swim_school { background: #0b7ab8; }
.cat-banner-competition { background: var(--competition); }
.cat-banner .small { opacity: .85; font-weight: 400; }
h3.section-title { margin: 16px 0 8px; font-size: 1.05rem; }

.week-grid td{vertical-align:top;min-width:9rem}
.week-block{margin-bottom:.5rem}
.week-block .chip,.week-block .group-chip{margin:0 .25rem .25rem 0}

.table td form.assign-form,.assign-form{display:flex !important;gap:10px;align-items:center;margin:0}
@media (max-width:700px){.assign-form{flex-direction:column;align-items:stretch}.assign-form select,.assign-form .btn{width:100%;min-height:44px}}

/* ===== Uniforme keuzelijsten en knoppen (overal) ===== */
select{appearance:none;-webkit-appearance:none;padding-right:40px;font-weight:600;color:var(--ink);cursor:pointer;border:2px solid #9db6d9;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23064ca2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center}
select:hover{border-color:#064ca2}
select:focus,select:focus-visible{border-color:#064ca2}
.assign-form select{flex:1 1 auto;min-width:0;max-width:340px;width:auto}
.btn{font-weight:700;padding:10px 20px;border-width:2px;line-height:1.3;white-space:nowrap}
.btn-small{padding:7px 14px;font-size:.92rem}
.btn-ghost{border-color:#9db6d9}
.btn-ghost:hover{border-color:var(--blue)}
@media (max-width:700px){.btn-small{padding:10px 16px;min-height:44px}}
input:not([type=radio]):not([type=checkbox]):not([type=file]), textarea{border:2px solid #9db6d9}
input:not([type=radio]):not([type=checkbox]):hover, textarea:hover{border-color:#064ca2}
label + .btn, label + button.btn{margin-top:12px}
form.filters select{min-width:230px}

/* ===== Statistieken ===== */
.stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:12px 0 18px}
.stat-tile{background:var(--aqua);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column}
.stat-num{font-size:1.9rem;font-weight:800;color:var(--blue);line-height:1.1}
svg.chart-bars{display:block;width:100%;height:140px;border-bottom:2px solid var(--line);background:linear-gradient(#fff,#f5f8fb);border-radius:8px 8px 0 0}
.chart-bar{fill:var(--brand-light)}
.chart-bar:hover{fill:var(--blue)}
.chart-axis{display:flex;justify-content:space-between;margin:4px 2px 16px}
.stat-cols{display:grid;grid-template-columns:1.3fr 1fr;gap:24px}
.stat-cols h3{margin:6px 0 8px;font-size:1.05rem}
.table .num{text-align:right;white-space:nowrap}
.share-list{list-style:none;margin:0 0 14px;padding:0}
.share-list li{display:grid;grid-template-columns:minmax(90px,1.2fr) 2fr auto;gap:10px;align-items:center;padding:4px 0}
progress.share-track{appearance:none;-webkit-appearance:none;width:100%;height:10px;border:0;border-radius:99px;background:var(--line);overflow:hidden}
progress.share-track::-webkit-progress-bar{background:var(--line)}
progress.share-track::-webkit-progress-value{background:var(--blue);border-radius:99px}
progress.share-track::-moz-progress-bar{background:var(--blue);border-radius:99px}
.stat-days{margin-top:10px}
.stat-days summary{cursor:pointer;font-weight:600;color:var(--blue)}
@media (max-width:760px){.stat-cols{grid-template-columns:1fr}}

.side-build{margin:0 12px 6px;font-size:.75rem;color:#8fa6c4;word-break:break-all}

/* v0.11: zoeken, account, rapporten */
.side-search{margin:0 0 12px}
.side-search input{width:100%;margin:0;padding:8px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.1);color:#fff}
.side-search input::placeholder{color:#b9c9e0}
.side-account{color:#fff;text-decoration:none}
.side-account:hover{text-decoration:underline}
code.big{font-size:1.25rem;letter-spacing:.06em;background:#eef3fa;padding:8px 12px;border-radius:8px;display:inline-block;word-break:break-all}
td progress.share-track{display:block;margin-top:4px;width:90px}

/* v0.11 website: fotogalerij (beheer) */
.photo-edit { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 16px; align-items: start; }
.photo-edit img { width: 100%; height: auto; border-radius: 10px; }
.photo-edit form[data-confirm] { grid-column: 2; }
@media (max-width: 640px) { .photo-edit { grid-template-columns: 1fr; } .photo-edit form[data-confirm] { grid-column: 1; } }

/* Trainersplanning competitie */
.chip.bad { background: #fbe4e2; color: var(--bad); }
.cal-event .short-flag { display: inline-block; width: 16px; height: 16px; margin-right: 4px; border-radius: 50%; background: #fff; color: var(--bad); font-weight: 800; font-size: .72rem; line-height: 16px; text-align: center; }
.swatch.short-sw { background: #fff; outline: 3px solid var(--bad); outline-offset: -3px; }
.cover-week { margin: 22px 0 10px; font-size: 1.05rem; color: var(--muted); }
.cover-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--ok); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; scroll-margin-top: 80px; }
.cover-card.is-short { border-left-color: var(--bad); background: #fffafa; }
.cover-card.is-past { opacity: .65; }
.cover-card:target { box-shadow: 0 0 0 3px #fbbf24; }
.cover-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.cover-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cover-when { font-weight: 700; margin-right: 4px; }
.cover-title { font-weight: 700; }
.cover-trainers { list-style: none; padding: 0; margin: 10px 0 0; }
.cover-trainers li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.cover-trainers li.is-absent .cover-name { text-decoration: line-through; color: var(--muted); }
.cover-name { font-weight: 600; }
.cover-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.cover-actions form { margin: 0; }
.cover-absent > summary { list-style: none; cursor: pointer; }
.cover-absent > summary::-webkit-details-marker { display: none; }
.cover-absent[open] > summary { margin-bottom: 6px; }
.cover-absent .inline-form { margin-top: 0; padding-top: 0; border-top: 0; }
.cover-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cover-foot form { margin: 0; }
.cover-assign { display: flex; gap: 6px; flex-wrap: wrap; }
.cover-assign select { min-width: 180px; }
.cover-problems { border-left: 5px solid var(--bad); }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cover-block { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.cover-slot { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.cover-slot:first-of-type { border-top: 0; }
.cover-slot > strong { min-width: 150px; }
.cover-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.cover-checks .check { margin: 0; font-weight: 400; }
.cover-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.cover-share form { margin: 0; }
.cover-link { flex: 1 1 260px; min-width: 0; font-size: .85rem; }
@media (max-width: 640px) {
  .cover-actions { margin-left: 0; width: 100%; }
  .cover-foot > form, .cover-assign, .cover-assign select { width: 100%; }
  .cover-foot .btn { width: 100%; }
}
.cover-assign { align-items: center; flex-wrap: nowrap; }
.cover-assign select { width: auto; flex: 0 1 240px; margin: 0; }
.cover-foot details[open] { flex-basis: 100%; }
@media (max-width: 640px) { .cover-assign { flex-wrap: wrap; } .cover-assign select { flex: 1 1 100%; } }
/* Trainersplanning: meerdere tegelijk */
.cover-bulk { border-left: 5px solid var(--blue); }
.cover-bulk h2 { margin-bottom: 4px; }
.cover-bulk-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.cover-bulk-row label { margin: 0; flex: 1 1 180px; }
.cover-bulk-row .btn { flex: 0 0 auto; }
.cover-bulk-select { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.cover-bulk-select select { width: auto; margin: 0; }
.cover-pick { width: 22px; height: 22px; margin: 0 4px 0 0; flex: 0 0 auto; accent-color: var(--blue); }
@media (max-width: 640px) { .cover-bulk-row .btn { width: 100%; } .cover-bulk-select select { width: 100%; } }
/* Definitief verwijderen */
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-ghost.btn-danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.danger-zone { border-left: 5px solid var(--bad); }
.bulk-do { border: 0; padding: 0; margin: 0; }
.bulk-do legend { font-weight: 600; margin-bottom: 4px; }
.bulk-do .check { margin: 2px 0; }
.bulk-table .check-col { width: 44px; text-align: center; }
.bulk-table input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--blue); }
.btn-wrap { white-space: normal; height: auto; text-align: left; max-width: 100%; }
.input-narrow { max-width: 110px; }

/* Trainersplanning: wisselen tussen lijst en weekkalender */
.cover-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin: 12px 0 14px; border-bottom: 2px solid var(--line); }
.cover-toolbar .tabs { margin: 0; border-bottom: 0; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 8px; background: #fff; }
.segmented a { padding: 7px 14px; text-decoration: none; font-weight: 600; color: var(--muted); font-size: .9rem; }
.segmented a + a { border-left: 1px solid var(--line); }
.segmented a[aria-current=page] { background: var(--blue); color: #fff; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.week-day { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-height: 140px; min-width: 0; }
.week-day.is-today { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.week-head { font-size: .82rem; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.week-empty { margin: 0; }
.week-item { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 6px; padding: 5px 6px; margin-bottom: 6px; font-size: .8rem; line-height: 1.25; }
.week-item:hover { background: var(--aqua); }
.week-item.is-short { border-left-color: var(--bad); background: #fffafa; }
.week-item.is-past { opacity: .6; }
.week-item .chip { align-self: flex-start; font-size: .7rem; }
.week-time { font-weight: 700; }
.week-title { font-weight: 600; }
.week-trainers { display: flex; flex-direction: column; color: var(--muted); }
.week-trainers .is-me { color: var(--ink); font-weight: 600; }
.week-trainers .is-absent { text-decoration: line-through; }
@media (max-width: 820px) {
  .week-grid { display: block; }
  .week-day { min-height: 0; margin-bottom: 8px; }
  .week-day:not(.has-events) { display: none; }
  .week-head { font-size: .95rem; color: var(--ink); }
  .week-item { font-size: .9rem; }
  .cover-toolbar { align-items: stretch; }
}
.week-plain .week-item.type-training { border-left-color: var(--training); }
.week-plain .week-item.type-competition { border-left-color: var(--competition); }
.week-plain .week-item.type-club { border-left-color: var(--club); }
.week-plain .week-trainers { color: var(--ink); }
.card .segmented { margin-bottom: 0; }
.week-title { hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 820px) {
  .week-nav { flex-wrap: wrap; }
  .week-nav .cal-title { order: -1; flex-basis: 100%; text-align: center; }
  .week-nav .actions-inline { margin-left: auto; }
}
@media (max-width: 820px) {
  .week-nav { gap: 6px; }
  .week-nav .btn { width: auto; flex: 0 0 auto; padding: 6px 9px; font-size: .88rem; }
  .week-nav .actions-inline { display: flex; flex-wrap: nowrap; gap: 6px; }
  .week-nav > .btn, .week-nav .actions-inline { margin-top: 0; }
}
/* Trainingen van de aangemelde trainer */
.chip.mine-chip { background: var(--blue); color: #fff; font-weight: 700; }
.cover-card.is-mine { box-shadow: 0 0 0 2px var(--blue); }
.cover-card.is-mine:not(.is-short) { background: var(--aqua); }
.week-item.is-mine { box-shadow: 0 0 0 2px var(--blue); }
.week-item.is-mine:not(.is-short) { background: var(--aqua); }
.week-item .mine-chip { font-size: .7rem; }
/* Tekorten duidelijker: rood vlak in plaats van enkel een rand */
.week-item.is-short:not(.is-past) { border: 2px solid var(--bad); border-left-width: 6px; background: #fde4e4; }
.week-item.is-short:not(.is-past) .chip.bad { background: var(--bad); color: #fff; font-weight: 700; }
.cover-card.is-short:not(.is-past) { border: 2px solid var(--bad); border-left-width: 6px; background: #fdecec; }
.cover-card.is-short .cover-head .chip.bad { background: var(--bad); color: #fff; font-weight: 700; }
/* Kalender: groepskleuren licht (tint + gekleurde rand), zodat tekorten (rood) en eigen groep opvallen */
.cal-event.g-0 { --gc: #064ca2; } .cal-event.g-1 { --gc: #0f766e; } .cal-event.g-2 { --gc: #4d7c0f; } .cal-event.g-3 { --gc: #a16207; }
.cal-event.g-4 { --gc: #be185d; } .cal-event.g-5 { --gc: #0e7490; } .cal-event.g-6 { --gc: #7c2d12; } .cal-event.g-7 { --gc: #4338ca; }
.cal-event.g-8 { --gc: #9d174d; } .cal-event.g-9 { --gc: #166534; } .cal-event.g-10 { --gc: #1e3a8a; } .cal-event.g-11 { --gc: #b45309; }
.cal-event.g-club { --gc: var(--club); }
.cal-event[class*=" g-"]:not(.other):not(.cancelled) {
  background: color-mix(in srgb, var(--gc) 16%, #fff);
  color: color-mix(in srgb, var(--gc) 75%, #000);
  border-left: 4px solid var(--gc);
}
.cal-event[class*=" g-"]:not(.other):not(.cancelled):hover { background: color-mix(in srgb, var(--gc) 28%, #fff); }
.cal-event.other { background: #eef1f4; color: #6b7783; }
.cal-event.cancelled { background: #eef1f4; color: #8a97a3; }
/* Legende in dezelfde stijl als de activiteiten: lichte tint + gekleurde rand */
.swatch.g-0 { --gc: #064ca2; } .swatch.g-1 { --gc: #0f766e; } .swatch.g-2 { --gc: #4d7c0f; } .swatch.g-3 { --gc: #a16207; }
.swatch.g-4 { --gc: #be185d; } .swatch.g-5 { --gc: #0e7490; } .swatch.g-6 { --gc: #7c2d12; } .swatch.g-7 { --gc: #4338ca; }
.swatch.g-8 { --gc: #9d174d; } .swatch.g-9 { --gc: #166534; } .swatch.g-10 { --gc: #1e3a8a; } .swatch.g-11 { --gc: #b45309; }
.swatch.g-club { --gc: var(--club); }
.cal-legend .swatch[class*=" g-"] { background: color-mix(in srgb, var(--gc) 16%, #fff); border: 1px solid color-mix(in srgb, var(--gc) 35%, #fff); border-left: 4px solid var(--gc); }
.cal-legend .swatch { width: 22px; }
.swatch.is-comp-sw { border-left-color: #f59e0b; }
.activity-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.activity-actions .inline-form { margin: 0; padding: 0; border: 0; }
.cover-multi { flex-direction: column; align-items: flex-start; }
.cover-multi fieldset { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cover-multi legend { padding: 0; margin-bottom: 4px; }
.cover-multi .check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }

/* ===== UX-advies november 2026 ===== */
/* Eén tekortsignaal: rode badge met ! (groepskleur blijft leesbaar) */
.short-badge { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; background: var(--bad); color: #fff; font-weight: 700; font-size: .75rem; line-height: 1.2; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
h2 .short-badge, h3 .short-badge { font-size: .8rem; vertical-align: 2px; }
.cal-event.short { box-shadow: inset 0 0 0 2px var(--bad); font-weight: 700; }
.cal-event .short-flag, .short-flag-legend { background: var(--bad); color: #fff; }
.short-flag-legend { display: inline-block; width: 18px; height: 18px; border-radius: 50%; text-align: center; font-weight: 800; font-size: .75rem; line-height: 18px; margin-right: 6px; }
.week-item.is-short:not(.is-past) { border: 2px solid var(--bad); border-left-width: 6px; background: #fff7f7; }
.cover-card.is-short:not(.is-past) { border: 2px solid var(--bad); border-left-width: 6px; background: #fff7f7; }
.meet-icon { font-size: .85em; }
.cal-event .meet-icon { margin-right: 2px; }
.ok-line { background: #ecf8f1; color: #14532d; border-radius: 8px; padding: 8px 12px; margin: 8px 0 14px; }
.ok-line a { color: inherit; font-weight: 600; }

/* Kop met actiemenu (⋯) en uitleg achter ⓘ */
.page-head { align-items: center; }
.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 6px 14px; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 6px; display: flex; flex-direction: column; }
.more-list a, .more-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.more-list a:hover, .more-list button:hover { background: var(--aqua); }
.more-list form { margin: 0; }
.howto { margin: 0 0 12px; }
.howto > summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: .92rem; display: inline-block; }
.howto p { color: var(--muted); max-width: 70ch; }

/* Weeknavigatie: ‹ 9–15 nov › */
.week-nav { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.week-arrow { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; font-size: 1.4rem; line-height: 1; color: var(--blue); font-weight: 700; }
.week-arrow:hover { background: var(--aqua); }
.week-range { min-width: 9.5em; text-align: center; font-size: 1.05rem; }
.week-now { margin-left: 6px; font-size: .9rem; font-weight: 600; }
.week-groups { display: flex; flex-direction: column; color: var(--ink); }
.week-loc { color: var(--muted); font-size: .78rem; }
@media (max-width: 820px) {
  .week-nav { flex-wrap: nowrap; justify-content: center; }
  .week-loc { font-size: .85rem; }
}

/* Overzicht: volgende training (ouders, zwemmers) */
.next-trainings { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.next-card { margin: 0; border-left: 5px solid var(--blue); }
.next-card.is-absent { border-left-color: #d97706; }
.next-label { margin: 0 0 4px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.next-when { display: block; font-size: 1.25rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.next-what { margin: 2px 0 10px; color: var(--muted); }
.next-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.next-actions input[name=reason] { flex: 1 1 160px; width: auto; margin: 0; }
.up-list li { display: grid; grid-template-columns: 8.5em 1fr; gap: 2px 10px; align-items: baseline; }
.up-list li > .muted { grid-column: 2; }
.up-when { font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.up-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.card-foot { margin: 12px 0 0; }
.action-card h3 { font-size: 1rem; margin: 0; }
.action-block + .action-block, .action-block + .action-line { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.action-line { margin: 10px 0 0; }
.badge-soft { background: #eceff2; color: var(--ink); }

/* Activiteitspagina: gevarenzone */
.danger-zone { margin: 28px 0 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.danger-zone > summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.danger-zone form { margin: 6px 0 0; }
.link-danger { background: none; border: 0; padding: 0; color: var(--bad); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.cover-loc { color: var(--muted); }

@media (max-width: 959px) { .hide-mobile { display: none !important; } }

/* Mobiel: tabbalk onderaan */
.tabbar { display: none; }
@media (max-width: 959px) {
  .tabbar { display: flex; position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(5,38,77,.08); padding: 4px max(6px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
  .tabbar .tab { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--muted); text-decoration: none; font: inherit; font-size: .72rem; font-weight: 600; background: none; border: 0; border-radius: 8px; cursor: pointer; }
  .tabbar .tab.is-active { color: var(--blue); }
  .tabbar .tab.is-active svg { stroke-width: 2.3; }
  .tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
  body.has-sidebar .app-content { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .app-topbar { justify-content: center; }
}

/* Filters die meteen toepassen: geen knop, compact (op telefoon naast elkaar) */
form.filters.is-auto button[type=submit] { display: none; }
@media (max-width: 640px) {
  form.filters.is-auto { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 8px; }
  form.filters.is-auto select { flex: 1 1 40%; width: auto; min-width: 0; }
  form.filters.is-auto input[type=search], form.filters.is-auto input[type=text] { flex: 1 1 100%; width: 100%; min-width: 0; }
  form.filters.is-auto label { flex: 1 1 100%; }
  form.filters.is-auto > a { flex: 0 0 auto; }
}

/* Ledenlijst op telefoon: compacte rijen (naam, groep, ouder), details na een tik */
@media (max-width: 760px) {
  .member-table thead, .member-table .col-contact { display: none; }
  .member-table, .member-table tbody { display: block; }
  .member-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
  .member-table td { display: inline; padding: 0; border: 0; }
  .member-table .col-name { flex: 1 1 auto; font-weight: 600; }
  .member-table .col-groups { flex: 0 0 auto; font-size: .85rem; }
  .member-table .col-parents { flex: 1 1 100%; font-size: .85rem; color: var(--muted); }
  .member-table .col-parents:has(> .muted:only-child) { display: none; }
  .member-table .col-status:empty { display: none; }
}
.head-actions { display: inline-flex; gap: 8px; align-items: center; }
.page-head { flex-wrap: nowrap; }
.page-head .btn { width: auto; }
.month-nav { justify-content: center; margin: 4px 0 12px; }
.cover-card.is-compact .cover-head { justify-content: flex-start; }
.cover-card.is-compact .cover-head > div:not(:has(*)) { display: none; }
@media (max-width: 640px) { .page-head h1 { margin: 0; } }
.week-item .short-badge { white-space: normal; max-width: 100%; }
.week-nav { justify-content: center; }

/* ---- v0.23: UX-analyse ronde 2 ---- */
/* Afmelden: eerst enkel de knop, de reden pas na de tik */
.absence-pick { display: inline-block; }
.absence-pick > summary { list-style: none; }
.absence-pick > summary::-webkit-details-marker { display: none; }
.absence-pick[open] > summary { display: none; }
.absence-pick .absence-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 0; padding: 10px; background: #fff8eb; border: 1px solid #f3d9a6; border-radius: 10px; }
.absence-form { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.reason-picks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.reason-picks legend { float: none; width: auto; font-size: .85rem; font-weight: 600; padding: 0; margin: 0 0 4px; }
.reason-picks .pick { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border: 1px solid #9db6d9; border-radius: 999px; background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; }
.reason-picks .pick:has(input:checked) { background: var(--blue); color: #fff; border-color: var(--blue); }
.reason-picks .pick input { margin: 0; width: auto; }
.absence-form input[name=reason] { flex: 1 1 160px; width: auto; margin: 0; }
.up-absence { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 4px; }
.reminder { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }

/* Kalender: vandaag en voorbije dagen */
.today-chip { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--blue); color: #fff; font-size: .72rem; font-weight: 700; vertical-align: middle; }
.cal-day.is-past .cal-event { opacity: .55; }
.cal-day.is-past .cal-num { color: var(--muted); }
.cal-none { margin: 4px 0 0; }
.swatch-other { background: #eceff2; border: 1px solid #c5ccd3; }
@media (max-width: 959px) {
  .cal-day.is-today { display: block; }
}

/* Activiteit: compacte deelnemerslijst */
.roster-count { margin: 0 0 8px; color: var(--muted); }
.roster-list { list-style: none; padding: 0; margin: 0; }
.roster-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.roster-list li:last-child { border-bottom: 0; }
.roster-list .roster-name { flex: 1 1 160px; font-weight: 600; }
.roster-list li.is-absent .roster-name { color: #8a5a00; }
.roster-list li.is-own { background: #f3f8fe; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }

/* Lege velden als uitnodiging */
.missing { color: var(--muted); }
.missing.is-important { color: #8a5a00; font-weight: 600; }
.missing a { font-weight: 600; }

/* Formulieren: één hoofdactie, Annuleren als link; tussentitel in plaats van kader */
.cancel-link { align-self: center; font-weight: 600; padding: 8px 4px; }
.form-section { font-size: 1.05rem; margin: 18px 0 2px; padding-top: 14px; border-top: 1px solid var(--line); }
legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; }
legend + * { clear: both; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
form[data-autosubmit].is-auto button[type=submit] { display: none; }

/* Ouder toevoegen bij 18+: geen losse kaart, enkel een link tot je hem openklapt */
details.parents-collapsed:not([open]) { background: none; border: 0; box-shadow: none; padding: 0; margin-top: -6px; }
details.parents-collapsed > summary.add-link { color: var(--blue); font-weight: 600; cursor: pointer; list-style: none; }
details.parents-collapsed > summary.add-link::-webkit-details-marker { display: none; }
.up-list .up-absence { grid-column: 2; }
form[data-autosubmit] select { max-width: 360px; }
.link-btn { background: none; border: 0; padding: 8px 4px; color: var(--blue); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.text-bad { color: var(--bad); }

/* Controlevraag: verborgen veld voor bots (niet display:none, sommige bots slaan dat over) */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* "Ik ben geen robot" */
.robot-check { margin: 4px 0 14px; }
.robot-box { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fb; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.robot-box:hover { background: var(--aqua); }
.robot-tick { flex: 0 0 26px; height: 26px; border: 2px solid #8a97a3; border-radius: 5px; background: #fff; position: relative; }
.is-busy .robot-tick { border-color: var(--blue); border-right-color: transparent; border-radius: 50%; animation: robot-spin .8s linear infinite; }
.is-done .robot-tick { background: #15803d; border-color: #15803d; }
.is-done .robot-tick::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.is-done .robot-box { border-color: #15803d; background: #ecf8f1; cursor: default; }
.is-fail .robot-box { border-color: var(--bad); }
@keyframes robot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-busy .robot-tick { animation: none; } }
/* Zoekveld in de menubalk even breed als de geselecteerde pagina (zelfde inspringing en afronding) */
.sidebar .side-search input { box-sizing: border-box; width: 100%; border-radius: 9px; }
