/* Kerckh. – eenvoudige zaalreservering voor kerken. Rustig, compact, toegankelijk, mobiel eerst. Geen animaties.
   Standaardkleuren van Kerckh.: warm antraciet/blauwgrijs, zachte zandtinten en een klein koperkleurig accent.
   De huisstijl van de kerk (kerk.json → huisstijl) overschrijft deze variabelen via /static/kerk.css.
   Regel: --primary is de knop/linkkleur (contrast ≥ 4,5:1 op wit); --accent alleen als accent, nooit voor tekst. */

:root {
  --bg: #ffffff;
  --surface: #f6f2ec;
  --tint: #f1ebe2;
  --text: #24292e;
  --muted: #5d5850;
  --border: #ddd5c9;
  --line: #ebe5dc;
  --accent: #b5733d;         /* klein warm accent (koper); niet voor tekst */
  --primary: #3b4a57;        /* knoppen/links: antraciet-blauwgrijs */
  --primary-dark: #2a3640;
  --input-border: #ada595;
  --ok: #2f6b3a;
  --ok-bg: #edf5ee;
  --warn: #7a5200;
  --warn-bg: #fdf5e3;
  --error: #a12626;
  --error-bg: #fbecec;
  --info: #24527a;
  --info-bg: #eaf1f8;
  --radius: 8px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
}
body.admin { font-size: 0.9375rem; line-height: 1.45; }

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 2px; }

h1 { font-size: 1.5rem; line-height: 1.25; margin: 0.4rem 0 0.6rem; font-weight: 700; }
h2 { font-size: 1.1rem; line-height: 1.3; margin: 1rem 0 0.4rem; font-weight: 700; }
h3 { font-size: 1rem; margin: 0.75rem 0 0.3rem; }
p { margin: 0.4rem 0; }
body.admin h1 { font-size: 1.3rem; margin: 0.25rem 0 0.4rem; }
body.admin h2 { font-size: 1rem; margin: 0.9rem 0 0.4rem; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 760px; }
.container.wide { max-width: 1240px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.0625rem; margin: 0 0 0.6rem; }
.error-text { color: var(--error); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -10000px; top: 0; background: #fff; color: var(--primary); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- kop (logo = afzender) */

.site-header { background: #fff; border-bottom: 1px solid var(--line); padding: 0.95rem 0; }
/* Kerk links (afzender, met "Zaalverhuur"), Kerckh. rechts. Past het niet op één regel, dan schuift Kerckh. naar een
   tweede regel, rechts uitgelijnd; de kerk blijft altijd vooraan. */
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 0.55rem 1.25rem; flex-wrap: wrap; }
.header-brand { display: flex; align-items: center; gap: 0.9rem; min-width: 0; flex-wrap: wrap; row-gap: 0.3rem; }
.header-end { display: flex; align-items: center; gap: 0.5rem 1.1rem; margin-left: auto; }
.brand-link { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.church-logo { display: block; height: 56px; width: auto; max-width: none; }
.church-logo.small { height: 34px; }
/* Kerk zonder logo: de naam als rustig tekstmerk. */
.church-name { font-family: Georgia, 'Times New Roman', serif; font-size: 1.3rem; font-weight: 700; color: var(--primary); line-height: 1.15; }
.church-name.small { font-size: 1.05rem; }
.site-label { color: var(--muted); font-size: 0.875rem; padding-left: 0.9rem; border-left: 1px solid var(--border); line-height: 1.2; }
.header-link { font-size: 0.875rem; }
/* Kerckh.-logo (merk v5, combinatie): bescheiden, duidelijk lager dan het kerklogo; alleen de hoogte via CSS. */
.product-header { display: inline-flex; align-items: center; flex: 0 0 auto; }
.product-header-logo { display: block; height: 20px; width: auto; max-width: none; }
@media (max-width: 480px) {
  .site-header { padding: 0.75rem 0; }
  .header-row { column-gap: 0.75rem; }
  .church-logo { height: 44px; }
  .header-brand { gap: 0.7rem; }
  .site-label { padding-left: 0.7rem; }
  .product-header-logo { height: 17px; }
}

/* ---------------------------------------------------------------- voet */

.site-footer { margin-top: 3rem; padding: 1.3rem 0 1.7rem; background: var(--surface); border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.site-footer p { margin: 0.25rem 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.footer-owner { color: var(--text); }
.admin-footer { margin-top: 2rem; padding: 0.6rem 0 1.2rem; border-top: 1px solid var(--line); }

/* Productregel (Kerckh.) en ontwikkelaar: klein en rustig; logo's alleen in hoogte geschaald (verhouding en kleuren
   ongewijzigd). */
.credit { margin: 0.7rem 0 0; font-size: 0.8125rem; line-height: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.6rem; color: var(--muted); }
.credit-sep { color: var(--muted); }
.product-mark { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0; }
.product-logo { display: block; height: 17px; width: auto; max-width: none; }
.credit-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; color: var(--muted); text-decoration: none; }
.credit-link:hover .credit-label, .credit-link:focus-visible .credit-label { text-decoration: underline; }
.credit-logo { display: block; height: 26px; width: auto; max-width: none; }

/* ---------------------------------------------------------------- publieke inhoud */

main { padding-top: 0.9rem; }
/* Publieke pagina's: wat meer ademruimte tussen kop, titel, uitleg en formulier. */
body.public main { padding-top: 1.75rem; }
body.public h1 { margin: 0 0 0.7rem; }
body.public .lead { margin-bottom: 1rem; }
@media (min-width: 700px) {
  body.public main { padding-top: 2.4rem; }
  body.public h1 { margin-bottom: 0.85rem; }
}
.callout { background: var(--tint); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 1rem 0 1.6rem; }
.callout p { margin: 0.2rem 0; }
details.how { margin: 0.3rem 0 0; }
details.how > summary { font-size: 0.9rem; color: var(--primary); min-height: 0; padding: 0.15rem 0; font-weight: 600; }

.steps { list-style: none; counter-reset: stap; margin: 0.5rem 0; padding: 0; }
.steps li { counter-increment: stap; position: relative; padding: 0 0 0.5rem 2.2rem; }
.steps li::before {
  content: counter(stap);
  position: absolute; left: 0; top: 0.05rem;
  width: 1.55rem; height: 1.55rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--accent); color: var(--primary); font-weight: 700; font-size: 0.85rem; background: #fff;
}
.steps li.done::before { content: '✓'; background: var(--primary); border-color: var(--primary); color: #fff; }
.steps strong { display: block; font-size: 0.95rem; }
.steps span { display: block; color: var(--muted); font-size: 0.875rem; }

.content h2 { font-size: 1.1rem; margin-top: 1.1rem; }
.content p, .content li { max-width: 42rem; }

.received-head { display: flex; align-items: center; gap: 0.75rem; margin: 0.4rem 0 0.2rem; }
.received-head h1, body.public .received-head h1 { margin: 0; }
.received-head p { margin: 0.1rem 0 0; }
.received-head .check { flex: 0 0 auto; display: inline-flex; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--primary); color: #fff; align-items: center; justify-content: center; font-size: 1.1rem; }
.reference { letter-spacing: 0.04em; }
.summary { border-top: 1px solid var(--line); margin-top: 0.9rem; }

/* Demonstratieomgeving: rustige melding boven de inhoud (geen waarschuwing). */
.demo-note { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--tint); color: var(--muted); font-size: 0.85rem; line-height: 1.35; }
.demo-note::before { content: ''; flex: 0 0 auto; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent); }

/* ---------------------------------------------------------------- formulieren */

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.request-form > fieldset { padding: 1.4rem 0 0.7rem; border-top: 1px solid var(--line); }
.required-note { margin: 0 0 0.6rem; }
legend.section-title { font-size: 1.05rem; font-weight: 700; padding: 0; margin-bottom: 0.8rem; float: left; width: 100%; }
legend.section-title + * { clear: both; }

.field { margin-bottom: 0.7rem; }
body.public .field { margin-bottom: 1rem; }
.field label, .field legend { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.2rem; }
.optional { font-weight: 400; color: var(--muted); font-size: 0.875rem; }
.hint { color: var(--muted); margin: 0 0 0.3rem; font-size: 0.875rem; font-weight: 400; }
.field-error { color: var(--error); font-weight: 600; font-size: 0.9rem; margin: 0 0 0.25rem; }
.has-error input, .has-error textarea, .has-error select { border-color: var(--error); border-width: 2px; }
.has-error { border-left: 3px solid var(--error); padding-left: 10px; }

input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='date'], input[type='time'],
input[type='password'], input:not([type]), textarea, select {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* 16px: voorkomt inzoomen op iOS */
  color: inherit;
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
  min-height: 44px;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { min-height: 4.5rem; resize: vertical; }
.field.short input { max-width: 10rem; }

.grid-2, .grid-3, .grid-4 { display: grid; grid-template-columns: 1fr; gap: 0 0.9rem; }
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Keuzes: compacte, goed klikbare regels; op bredere schermen in twee kolommen. */
.radio-group legend { margin-bottom: 0.3rem; }
.options-grid { display: grid; grid-template-columns: 1fr; gap: 0.5rem 0.7rem; }
@media (min-width: 560px) { .options-grid { grid-template-columns: 1fr 1fr; } }
.radio, .checkbox { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.15rem 0; }
.options-grid .radio, .options-grid .checkbox {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  background: #fff;
}
.options-grid .radio:hover, .options-grid .checkbox:hover { border-color: var(--accent); }
.options-grid .radio:has(input:checked), .options-grid .checkbox:has(input:checked) { border-color: var(--primary); background: var(--tint); }
.radio input, .checkbox input { width: 1.15rem; height: 1.15rem; margin: 0.15rem 0 0; flex: 0 0 auto; accent-color: var(--primary); }
.radio label, .checkbox label { font-weight: 400; margin: 0; cursor: pointer; flex: 1; }
.checkbox-field { margin: 0.6rem 0; }
.other-text { margin-top: 0.5rem; max-width: 28rem; }
/* "Andere voorziening" alleen tonen als "Anders" is aangevinkt (of bij een foutmelding). */
.checkbox-list:not(:has(input[name='voorziening_anders']:checked)) + .other-text:not(.has-error) { display: none; }

.price-indication { background: var(--surface); border-radius: var(--radius); padding: 0.7rem 0.9rem; margin: 0.2rem 0 1rem; }
.price-indication p { margin: 0.15rem 0; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.price-line strong { font-size: 1.1rem; }

.form-end { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 0.4rem; }
.privacy-note { margin: 0.4rem 0 0.8rem; }

/* Honeypot: buiten beeld voor mensen. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- knoppen */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0.4rem 0.95rem;
  font: inherit; font-weight: 600; line-height: 1.2;
  border-radius: var(--radius); border: 1px solid var(--primary);
  background: #fff; color: var(--primary);
  cursor: pointer; text-decoration: none;
}
.button:hover { background: var(--tint); }
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button.danger { border-color: var(--error); color: var(--error); }
.button.danger:hover { background: var(--error-bg); }
.button.submit { min-height: 46px; padding: 0.55rem 1.6rem; font-size: 1.0625rem; }
@media (max-width: 560px) { .button.submit { width: 100%; } }
.button:disabled { opacity: 0.6; cursor: wait; }
body.admin .button { min-height: 34px; padding: 0.3rem 0.75rem; font-size: 0.9rem; }
body.admin input[type='text'], body.admin input[type='email'], body.admin input[type='tel'], body.admin input[type='number'],
body.admin input[type='date'], body.admin input[type='time'], body.admin input[type='password'], body.admin input:not([type]),
body.admin textarea, body.admin select { min-height: 36px; padding: 0.3rem 0.5rem; font-size: 0.9375rem; }
body.admin .field { margin-bottom: 0.5rem; }
body.admin .field label { font-size: 0.875rem; margin-bottom: 0.1rem; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 0.6rem; }
.edit-grid .span-2 { grid-column: 1 / -1; }
@media (min-width: 1200px) { .edit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .edit-grid .span-2 { grid-column: auto; } }
.checklist td:first-child { width: 34%; }
.checklist select { min-width: 10.5rem; }
/* Mobiel: per onderwerp label en status op één regel, notitie eronder. */
@media (max-width: 699px) {
  .table.checklist tr { display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem; gap: 0.2rem 0.5rem; align-items: center; padding: 0.35rem 0; }
  .table.checklist td { padding: 0; width: auto; }
  .table.checklist td:last-child { grid-column: 1 / -1; }
  .table.checklist select { min-width: 0; width: 100%; }
  .table.checklist input { min-height: 30px; }
}

.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.action-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.35rem 0; }
.action-buttons form { margin: 0; }

/* ---------------------------------------------------------------- meldingen */

.notice { border-radius: var(--radius); padding: 0.55rem 0.8rem; margin: 0.7rem 0; border: 1px solid transparent; border-left-width: 4px; }
.notice p { margin: 0.2rem 0; }
.notice ul { margin: 0.2rem 0; padding-left: 1.2rem; }
.notice h2 { margin: 0.1rem 0 0.2rem; font-size: 1rem; }
.notice-ok { background: var(--ok-bg); border-color: var(--ok); }
.notice-warn { background: var(--warn-bg); border-color: var(--warn); }
.notice-error { background: var(--error-bg); border-color: var(--error); }
.error-summary h2 { font-size: 1rem; }
.error-summary a { color: var(--error); font-weight: 600; }

/* ---------------------------------------------------------------- beheer */

.env-banner { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #e8d3a8; text-align: center; font-weight: 600; padding: 0.2rem 16px; font-size: 0.8rem; }
/* Demonstratieomgeving (DEMO_MODE): zelfde balk, rustig blauw in plaats van waarschuwingsgeel. */
.env-banner.env-demo { background: var(--info-bg); color: var(--info); border-bottom-color: #c8d8e8; letter-spacing: 0.01em; }
.env-short { display: none; }
@media (max-width: 700px) { .env-long { display: none; } .env-short { display: inline; } .env-banner { padding: 0.1rem 16px; font-size: 0.75rem; } }

.admin-header { background: #fff; border-bottom: 1px solid var(--border); }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-top: 0.6rem; padding-bottom: 0.3rem; flex-wrap: wrap; }
.brand-admin .site-label { font-size: 0.85rem; }
/* Kerckh. rechts vóór gebruiker/uitloggen, met een dun scheidingslijntje. Op smalle schermen blijven kerklogo en
   Kerckh. samen op de eerste regel (zoals de publieke kop) en schuiven gebruiker/uitloggen zo nodig rechts eronder. */
.admin-product { margin-left: auto; padding-right: 1rem; border-right: 1px solid var(--line); }
.admin-product .product-header-logo { height: 18px; }
.logout { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.logout a { color: var(--text); text-decoration: none; }
.logout a.active, .logout a:hover { text-decoration: underline; }
@media (max-width: 559px) {
  .admin-product { padding-right: 0; border-right: 0; }
  .admin-product .product-header-logo { height: 16px; }
  .logout { margin-left: auto; }
}
.admin-nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
/* Modules als groepen: op smalle schermen breekt het menu netjes af naar een tweede regel, nooit buiten beeld. */
.admin-nav-group { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.admin-nav-module { padding-left: 1.4rem; border-left: 1px solid var(--line); }
@media (max-width: 480px) {
  .admin-nav, .admin-nav-group { gap: 0 1rem; }
  .admin-nav-module { padding-left: 0; border-left: 0; flex-basis: 100%; border-top: 1px solid var(--line); }
}
.admin-nav a { color: var(--muted); text-decoration: none; padding: 0.4rem 0 0.35rem; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.admin-nav a:hover { color: var(--text); }
.admin-nav a.active { color: var(--text); border-bottom-color: var(--primary); }
@media (max-width: 560px) { .brand-admin .site-label { display: none; } }

.crumbs { margin: 0 0 0.2rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; }
.page-head form { margin: 0; }

.card, .panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.8rem; margin: 0.6rem 0; }
.card > h2:first-child, .panel > h2:first-child { margin-top: 0.1rem; }
.panel { background: var(--surface); border-color: var(--line); }
.empty-state { color: var(--muted); font-size: 0.9rem; margin: 0.3rem 0 0.6rem; }
.count { display: inline-block; min-width: 1.4rem; padding: 0 0.35rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; font-weight: 600; text-align: center; vertical-align: 1px; }

.booking-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.booking-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.05rem 0.8rem; align-items: baseline;
  padding: 0.45rem 0.3rem; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--text);
}
.booking-row:hover { background: var(--surface); }
.booking-row .when { font-weight: 600; white-space: nowrap; grid-column: 1; grid-row: 1; }
.booking-row .tags { grid-column: 2; grid-row: 1; text-align: right; white-space: normal; }
.booking-row .what, .booking-row .where { grid-column: 1 / -1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-row .where { font-size: 0.85rem; color: var(--muted); }
@media (min-width: 900px) {
  .booking-row { grid-template-columns: 12.5rem minmax(0, 1fr) 12rem 13rem; }
  .booking-row .what { grid-column: 2; grid-row: 1; }
  .booking-row .where { grid-column: 3; grid-row: 1; font-size: inherit; color: inherit; }
  .booking-row .tags { grid-column: 4; }
}
.room-name { white-space: nowrap; }
.room-dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: -0.05rem; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.rooms-table .input-color { width: 6.5rem; font-family: ui-monospace, monospace; }
.list-scope { margin: 0.2rem 0 0.4rem; }

.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.45rem; border-radius: 999px; white-space: nowrap; letter-spacing: 0.01em; }
.badge-nieuw { color: var(--info); background: var(--info-bg); }
.badge-in_behandeling { color: var(--warn); background: var(--warn-bg); }
.badge-definitief { color: var(--ok); background: var(--ok-bg); }
.badge-afgewezen, .badge-geannuleerd { color: #555; background: #eee; }
.badge-special { color: #6b2f7a; background: #f3e8f6; }
.badge-member { color: var(--ok); background: var(--ok-bg); }
.badge-error, .badge-mail-mislukt { color: var(--error); background: var(--error-bg); }
.badge-warn, .badge-mail-wachtrij { color: var(--warn); background: var(--warn-bg); }
.badge-mail-verzonden { color: var(--ok); background: var(--ok-bg); }
.badge-wish { color: var(--primary); background: var(--tint); margin-left: 0.4rem; font-weight: 600; }

/* Aanvraagdetail: centraal werkscherm. Kop = wie/status, wat, wanneer/waar; daarna direct de afhandeling. */
.detail-header { margin: 0.1rem 0 0.4rem; }
.detail-header h1 { margin: 0 0 0.1rem; line-height: 1.25; }
.detail-header h1 .badge { vertical-align: 0.2em; font-size: 0.7rem; }
.detail-header p { margin: 0; }
.detail-header p + p { color: var(--muted); }
.detail-top .panel { margin-top: 0.3rem; }
.panel.actions h2 { margin-bottom: 0.3rem; }
.secondary-actions { display: flex; flex-wrap: wrap; gap: 0 1.2rem; margin-top: 0.35rem; border-top: 1px solid var(--line); }
.secondary-actions .danger-zone { border: 0; padding: 0; margin: 0.15rem 0 0; }
.secondary-actions details[open] { flex-basis: 100%; }
.status-line { margin: 0.35rem 0; padding: 0.3rem 0.6rem; border-radius: var(--radius); font-size: 0.9rem; }
.status-line.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-line.status-ok a { color: inherit; }
.availability-line .small { margin: 0.15rem 0.6rem; }
.facts { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 0.2rem 0.6rem; margin: 0.2rem 0 0.3rem; }
.facts dt { color: var(--muted); font-size: 0.85rem; padding-top: 0.08rem; }
.facts dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
@media (min-width: 620px) { .facts { grid-template-columns: 10rem minmax(0, 1fr); } }
.edit-details { margin: 0.4rem 0 0; border-top: 1px solid var(--line); padding-top: 0.2rem; }
.edit-details > summary { color: var(--primary); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.1rem; grid-template-areas: 'top' 'main' 'side'; }
.detail-top { grid-area: top; }
.detail-main { grid-area: main; }
.detail-side { grid-area: side; }
@media (min-width: 1000px) {
  .detail-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-areas: 'main top' 'main side'; grid-template-rows: auto 1fr; }
}
.availability h2 { margin: 0.05rem 0 0.15rem; font-size: 0.95rem; }
.availability-status { font-weight: 800; }

.filters { display: grid; grid-template-columns: 1fr; gap: 0 0.8rem; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.7rem 0; margin-bottom: 0.7rem; }
@media (min-width: 900px) { .filters { grid-template-columns: 11rem 13rem 11rem 1fr auto; } .filters .button { margin-bottom: 0.7rem; } }

.table { width: 100%; border-collapse: collapse; margin: 0.3rem 0 0.7rem; font-size: 0.875rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.32rem 0.45rem; border-bottom: 1px solid var(--line); }
.table th { font-weight: 600; color: var(--muted); }
.table input, .table select { min-height: 34px; font-size: 0.9rem; padding: 0.25rem 0.4rem; }
.table .num, .num { text-align: right; white-space: nowrap; }
.table tr.inactive td { color: var(--muted); }
@media (max-width: 699px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td, .table tfoot, .table th { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 0.3rem 0; }
  .table td, .table th { border: 0; padding: 0.15rem 0; text-align: left; }
}

details { margin: 0.5rem 0; }
details > summary { cursor: pointer; font-weight: 600; padding: 0.25rem 0; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 0.25rem; }
.danger-zone > summary { font-size: 0.9rem; color: var(--muted); }

.deflist { display: grid; grid-template-columns: 1fr; margin: 0; }
.deflist dt { font-weight: 600; color: var(--muted); font-size: 0.875rem; margin-top: 0.35rem; }
.deflist dd { margin: 0; white-space: pre-line; }
@media (min-width: 620px) { .deflist { grid-template-columns: 11rem 1fr; } .deflist dt, .deflist dd { margin: 0.15rem 0; } }

.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 0.8rem; }
.inline-form .field { min-width: 9rem; }
.inline-form .button { margin-bottom: 0.7rem; }
.extra-charges { margin: 0.2rem 0 0.6rem; }
.extra-charges legend { font-weight: 600; margin-bottom: 0.25rem; }
.charge-row { display: grid; grid-template-columns: minmax(0, 1fr) 8rem; gap: 0.5rem; margin-bottom: 0.35rem; }
.costs tfoot th { color: var(--text); }
.grid-3.keep-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 0.5rem; }
/* Kostenregels mobiel: omschrijving links (met toelichting eronder), bedrag rechts. */
@media (max-width: 699px) {
  .table.costs tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 0.6rem; padding: 0.3rem 0; }
  .table.costs td, .table.costs th { width: auto; }
  .table.costs td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 0.85rem; }
  .table.costs .num { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
.finance-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; }
.finance-foot form { margin: 0; }
/* Tikdoel op mobiel ("Opnieuw vastleggen"): minstens 44px hoog, zoals de andere linkknoppen. */
.finance-foot .link-button { min-height: 44px; display: inline-flex; align-items: center; }
.service-info { margin: 0 0 0.6rem; padding: 0.5rem 0.7rem; border-left: 3px solid var(--accent); background: var(--tint); }
.service-info p, .service-info ul { margin: 0.1rem 0; }
.service-info ul { padding-left: 1.1rem; }
.time-pair { display: flex; align-items: center; gap: 0.35rem; }
.time-pair input { min-width: 0; flex: 1 1 0; }

.settings-list { list-style: none; padding: 0; margin: 0.4rem 0; border-top: 1px solid var(--line); max-width: 48rem; }
.settings-list li { display: flex; flex-wrap: wrap; gap: 0.1rem 1rem; padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--line); }
.settings-list a { font-weight: 600; min-width: 15rem; }
@media (min-width: 620px) {
  .settings-list li { display: grid; grid-template-columns: 18.5rem minmax(0, 1fr); gap: 0 1rem; align-items: baseline; }
  .settings-list a { min-width: 0; }
}

.tariff-form .checks { display: flex; flex-direction: column; justify-content: flex-end; }
.tariff-form .form-buttons { display: flex; align-items: flex-end; }
.tariff-list { list-style: none; padding: 0; margin: 0.4rem 0 0.8rem; border-top: 1px solid var(--line); }
.tariff-list li { border-bottom: 1px solid var(--line); }
.tariff-list li.inactive summary { color: var(--muted); }
.tariff-item { margin: 0; }
.tariff-item > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 1rem; padding: 0.4rem 0.3rem; font-weight: 400; list-style: none; align-items: baseline; }
.tariff-item .t-what { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tariff-item .t-desc { font-weight: 400; font-size: 0.85rem; }
.tariff-item .t-amount, .tariff-item .t-valid, .tariff-item .t-status { white-space: nowrap; }
.tariff-item .t-amount { text-align: right; }
.tariff-group-title { font-size: 1.05rem; margin: 1.1rem 0 0.2rem; }
.tariff-item > summary::-webkit-details-marker { display: none; }
.tariff-item > summary:hover { background: var(--surface); }
.tariff-item[open] > summary { background: var(--surface); }
.tariff-item > form { padding: 0.5rem 0.3rem 0.2rem; }
@media (min-width: 900px) { .tariff-item > summary { grid-template-columns: minmax(0, 1fr) 14rem 11rem 9rem; } }

.agenda-day h2 { font-size: 0.95rem; margin: 0.9rem 0 0.2rem; }
.agenda-table td:first-child { width: 7rem; }
.agenda-table .tags { text-align: right; }

.mail-preview { white-space: pre-wrap; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem; font-family: var(--font); }
.mail-frame { width: 100%; height: 600px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

body.login main { padding-top: 1.75rem; }
body.login .card { max-width: 26rem; }

/* ---------------------------------------------------------------- account */
.narrow-form { max-width: 26rem; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.inline-actions form { margin: 0; }
code.password { font-size: 1.05rem; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 0.1rem 0.35rem; user-select: all; }
.break { word-break: break-all; }

/* ---------- Factuur (afdrukken of als PDF bewaren) ---------- */
.form-medium { max-width: 44rem; }
.invoice-block { margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.invoice-block h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.invoice-block p { margin: 0.2rem 0; }
.invoice-send { margin-top: 0.6rem; padding: 0.55rem 0.7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.invoice-send form { margin: 0.35rem 0 0; }
.invoice-send .resend summary { cursor: pointer; color: var(--primary); }
.invoice-body { background: var(--surface); }
.invoice-toolbar, .invoice-warnings { max-width: 210mm; box-sizing: border-box; margin: 0.8rem auto 0; }
.invoice-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0 16px; }
.invoice-warnings { padding: 0.5rem 0.8rem 0.5rem 1.8rem; background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); font-size: 0.9rem; }
.invoice { position: relative; box-sizing: border-box; max-width: 210mm; min-height: 270mm; margin: 0.8rem auto 2rem; padding: 18mm 20mm; background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); font-size: 0.95rem; line-height: 1.45; }
.invoice-concept { position: absolute; top: 8mm; right: 20mm; margin: 0; padding: 0.1rem 0.45rem; border: 1px solid currentColor; border-radius: 3px; color: var(--warn); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 14mm; }
.invoice-sender { display: flex; flex-direction: column; font-style: normal; font-size: 0.9rem; }
.invoice .invoice-logo { height: 52px; width: auto; }
.invoice-to { margin: 0 0 10mm; }
.invoice-meta p { margin: 0.1rem 0; }
.invoice-number { font-weight: 600; }
.invoice-table { width: 100%; border-collapse: collapse; margin: 8mm 0; font-size: 0.92rem; }
.invoice-table th, .invoice-table td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.invoice-table thead th { color: var(--muted); border-bottom-color: var(--border); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; }
.invoice-table td:first-child { width: 4.5rem; white-space: nowrap; }
.invoice-table .num { text-align: right; white-space: nowrap; }
.invoice-table tfoot th { border-bottom: 0; border-top: 2px solid var(--text); }
.invoice-pay { margin-top: 10mm; }
@media (max-width: 640px) {
  .invoice { min-height: 0; padding: 8mm 6mm; }
  .invoice-head { flex-direction: column-reverse; }
}
@page { size: A4; margin: 18mm 20mm; }
@media print {
  .no-print, .skip-link { display: none !important; }
  .invoice-body { background: #fff; }
  .invoice { max-width: none; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .invoice-concept { top: 0; right: 0; }
}

/* E-mail: compacte lijst, acties alleen bij mislukte mail */
.mail-table td { vertical-align: top; }
.mail-table .mail-to { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: center; margin-top: 0.25rem; }
.mail-actions form { margin: 0; }
.badge-handled { opacity: 0.75; }
.button.small { padding: 0.2rem 0.6rem; font-size: 0.85rem; }

/* Logboek */
.audit-tech { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.audit-tech summary { cursor: pointer; display: inline; }
.audit-tech div { overflow-wrap: anywhere; }
.filter-links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0.2rem 0 0.4rem; }
.filter-links a.active { font-weight: 700; text-decoration: none; color: var(--text); }

/* Geweest: onder de actuele aanvragen, gedempt */
.booking-list .is-past .booking-row { color: var(--muted); }
.booking-list .is-past .booking-row .when { font-weight: 500; }
.booking-list .is-past .badge { opacity: 0.75; }
.list-divider { padding: 0.5rem 0.3rem 0.2rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.past-section { margin-top: 1.4rem; }
.past-title { font-size: 1rem; color: var(--muted); margin: 0 0 0.3rem; }

/* Agenda: reserveringen uit de app tegenover overige bezetting uit Google Agenda */
.agenda-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0.2rem 0 0.6rem; }
.legend-item { padding-left: 0.6rem; border-left: 4px solid var(--primary); }
.legend-item.legend-google { border-left: 4px dotted #8a918b; color: var(--muted); }
.agenda-table tr.agenda-app { border-left: 4px solid var(--primary); }
.agenda-table tr.agenda-google { border-left: 4px dotted #9ea49f; background: #f6f6f4; }
.agenda-table tr.agenda-google td { color: var(--muted); }
.agenda-table tr > td:first-child { padding-left: 0.6rem; }
.badge-google { color: #4f5650; background: #e7e9e6; font-weight: 600; }
.agenda-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin: 0 0 0.8rem; }
.agenda-nav select { width: auto; }

/* ---------------------------------------------------------------- beheer op desktop: iets meer lucht
   Mobiel blijft compact (alle waarden hierboven). Vanaf 900px alleen extra witruimte tussen navigatie, titel,
   secties en voettekst; lettergroottes en de lichte opmaak blijven gelijk. */
@media (min-width: 900px) {
  .admin-top { padding-top: 0.6rem; padding-bottom: 0.3rem; }
  body.admin main { padding-top: 1.6rem; }
  body.admin main > h1 { margin-bottom: 0.8rem; }
  body.admin .page-head { margin-bottom: 0.55rem; }
  body.admin .page-head h1 { margin: 0.25rem 0; }
  .crumbs { margin-bottom: 0.45rem; }
  .detail-header { margin: 0.2rem 0 1rem; }
  body.admin .notice { margin: 0.9rem 0 1.2rem; }

  /* Overzicht: Nieuwe aanvragen, In behandeling en Komende reserveringen duidelijk als aparte blokken. */
  .dash-group { margin-top: 1.5rem; }
  .dash-group + .dash-group { margin-top: 2.25rem; }

  /* Lijsten en tabellen: regels iets ruimer, zelfde letters. */
  .booking-row { padding: 0.55rem 0.4rem; }
  .filters { padding: 0.7rem 0.9rem 0.05rem; margin-bottom: 0.9rem; }
  .list-scope { margin: 0.4rem 0 0.8rem; }
  .past-section { margin-top: 2.25rem; }
  body.admin .table th, body.admin .table td { padding: 0.45rem 0.55rem; }
  .tariff-item > summary { padding: 0.5rem 0.4rem; }
  .settings-list li { padding: 0.65rem 0.3rem; }
  .settings-list { max-width: 60rem; }

  /* Blokken op het aanvraagdetail: iets meer ruimte tussen en binnen, geen zwaardere kaarten. */
  body.admin .card, body.admin .panel { padding: 0.8rem 1rem; margin: 0.9rem 0; }
  .detail-grid { column-gap: 1.6rem; }

  /* Agenda: dagen los van elkaar; kolommen op alle dagen recht onder elkaar. */
  .agenda-legend { margin: 0.5rem 0 0.8rem; }
  .agenda-nav { margin-bottom: 1.3rem; }
  .agenda-day + .agenda-day { margin-top: 1.5rem; }
  .agenda-table { table-layout: fixed; }
  .agenda-table td:first-child { width: 7.5rem; }
  .agenda-table td:nth-child(2) { width: 14rem; }
  .agenda-table td.tags { width: 12rem; }

  .admin-footer { margin-top: 4rem; padding-top: 0.9rem; }
}
/* Brede schermen: contentkolom iets ruimer, zodat ook de langste zaalnaam volledig past. */
@media (min-width: 1200px) {
  .container.wide { max-width: 1300px; }
  .booking-row { grid-template-columns: 12.5rem minmax(0, 1fr) 20.5rem 13rem; }
  .agenda-table td:nth-child(2) { width: 19rem; }
  .agenda-table td.tags { width: 14rem; }
}

/* /toegang: instructievideo (16:9) en tekst met regelafbrekingen */
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0.6rem 0 1rem; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pre-line { white-space: pre-line; }
.warn-text { color: #7a5200; }

/* ---------------------------------------------------------------- organisatiebeheer (module 'organisatie')
   Desktop: boom links, details rechts. Mobiel (< 820px): eerst de lijst; met een gekozen onderdeel alleen de details
   met een terugknop. Grote klikvlakken (min. 44px) in de lijst. */

.org-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.4rem 1rem; margin: 0.3rem 0 0.6rem; }
.org-intro { margin: 0; }
.org-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.org-layout { display: grid; grid-template-columns: minmax(16rem, 23rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.org-tree-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem; }
.org-detail-pane { min-width: 0; }
.org-search { display: flex; gap: 0.4rem; }
.org-search input { flex: 1; min-width: 0; min-height: 38px; border: 1px solid var(--input-border); border-radius: 6px; padding: 0.3rem 0.55rem; font: inherit; background: #fff; }
.org-filter { margin: 0.35rem 0 0.5rem; }
.org-tree, .org-tree-sub { list-style: none; margin: 0; padding: 0; }
.org-tree-sub { margin-left: 0.85rem; padding-left: 0.6rem; border-left: 1px solid var(--border); }
.org-node { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 0.5rem; min-height: 44px; padding: 0.3rem 0.5rem; margin: 1px 0; border-radius: 6px; color: var(--text); text-decoration: none; align-content: center; }
.org-node:hover { background: #fff; }
.org-node.is-current { background: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.org-node-name { font-weight: 600; overflow-wrap: anywhere; }
.org-node-meta { grid-row: 2; color: var(--muted); font-size: 0.8125rem; }
.org-count { grid-row: 1 / span 2; grid-column: 2; align-self: center; min-width: 1.6rem; text-align: center; font-size: 0.8125rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0 0.4rem; }
.org-node.is-archived .org-node-name { color: var(--muted); font-weight: 400; }
.org-node.is-hit .org-node-name { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.org-empty, .org-placeholder { padding: 1rem; }
.org-placeholder { border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }
.org-back { display: none; }
.org-path { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.15rem; }
.org-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; }
body.admin .org-detail-head h2 { font-size: 1.3rem; margin: 0.1rem 0 0.2rem; }
.org-kind { font-size: 0.8125rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 0.5rem; }
.org-description { max-width: 46rem; }
.org-section { border-top: 1px solid var(--line); margin-top: 0.9rem; padding-top: 0.3rem; }
.org-section h3 { font-size: 0.95rem; }
.org-people, .org-children, .org-people-list { list-style: none; margin: 0.2rem 0 0.6rem; padding: 0; }
.org-people li, .org-people-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.org-children li { padding: 0.25rem 0; }
.org-person { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; }
.org-person a { font-weight: 600; }
.org-role { font-size: 0.875rem; background: var(--tint); border-radius: 4px; padding: 0 0.4rem; }
.org-form h4 { margin: 0.1rem 0 0.4rem; font-size: 0.95rem; }
.org-form input:not([type=hidden]), .org-form select, .org-form textarea { width: 100%; }
.org-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 0.9rem; }
.org-new { max-width: 34rem; }
.org-inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 0.8rem; max-width: 34rem; }
.org-inline-form .field { flex: 1; min-width: 12rem; }
.org-inline-form .button { margin-bottom: 0.5rem; }
.org-archive { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin: 0.6rem 0; }
.org-archive .hint { margin: 0; }
.org-history ul { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; }
.org-crumb { margin: 0.3rem 0 0; }
form.inline { display: inline; margin: 0; }
.org-who { list-style: none; margin: 0.6rem 0; padding: 0; max-width: 48rem; }
.org-who-unit { padding: 0.45rem 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.org-who-unit.depth-1 { padding-left: 1rem; }
.org-who-unit.depth-2 { padding-left: 2rem; }
.org-who-unit.depth-3, .org-who-unit.depth-4 { padding-left: 3rem; }
.org-who-head a { font-weight: 700; color: var(--text); }
.org-who-people { list-style: none; margin: 0.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.org-who-vacant { color: var(--warn); margin: 0.15rem 0 0; }
@media print {
  .env-banner, .admin-header, .admin-footer, .no-print { display: none !important; }
  body.admin { font-size: 11pt; }
  .org-who-head a { text-decoration: none; }
}
.org-node.is-vacant .org-count { border-style: dashed; border-color: var(--accent); color: var(--warn); }
.org-agreements { margin: 0.4rem 0; }
.org-pre { white-space: pre-line; max-width: 46rem; }
.org-row-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
.org-row-actions .org-transfer { margin: 0; }
.org-row-actions .link-button { min-height: 44px; display: inline-flex; align-items: center; }
.org-transfer > summary { list-style: none; font-weight: 400; color: var(--primary); text-decoration: underline; min-height: 44px; padding: 0; display: flex; align-items: center; font-size: 0.875rem; }
.org-transfer > summary::-webkit-details-marker { display: none; }
.org-transfer[open] { flex-basis: 100%; order: 2; }
.org-transfer .org-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.75rem; max-width: 28rem; }
.org-order { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0.5rem 0; }
.org-order .hint { margin: 0; }
.org-order .button:disabled { opacity: 0.45; cursor: default; }
.org-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; margin: 0.5rem 0 0.8rem; font-size: 0.875rem; }
.org-legend div { display: flex; gap: 0.35rem; }
.org-legend dt { font-weight: 700; }
.org-legend dd { margin: 0; color: var(--muted); }
.org-access { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.org-access li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.org-access-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.org-access-form select { max-width: 16rem; }
.org-access-form .field { margin: 0; }
.org-access-form label { font-size: 0.8125rem; font-weight: 600; display: block; }
.org-access-form { align-items: flex-end; }
.org-check { display: flex; align-items: center; gap: 0.4rem; min-height: 40px; }
.org-check input, .org-form .org-check input[type=checkbox] { width: 20px; height: 20px; margin: 0; flex: none; }
.org-form-grid .org-check { align-self: end; }
.org-check label { margin: 0; }
.org-access li { flex-direction: column; align-items: stretch; }
.org-access li.is-disabled .org-access-who { color: var(--muted); }
.org-access-summary { display: block; color: var(--muted); }
.org-access-actions { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
.org-access-actions .link-button { min-height: 44px; }
.org-invite-link code { word-break: break-all; }
.org-access-who .org-role { margin-left: 0.4rem; }
.org-access-form select { min-height: 40px; }
.org-people .link-button { min-height: 44px; padding: 0; }

@media (max-width: 820px) {
  .org-layout { grid-template-columns: minmax(0, 1fr); }
  .org-layout.has-selection .org-tree-pane { display: none; }
  .org-layout:not(.has-selection) .org-detail-pane { display: none; }
  /* Mobiel met een gekozen onderdeel: direct de details, de terugknop bovenaan (kop en hoofdknoppen staan in de lijst). */
  .org-head.has-selection { display: none; }
  .org-order .hint { flex-basis: 100%; }
  .org-back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
  .org-head .org-actions { width: 100%; }
  .org-head .org-actions .button { flex: 1; justify-content: center; min-height: 44px; }
}

/* Tweestapsverificatie */
.mfa-key { display: inline-block; font-size: 1.05rem; letter-spacing: 0.06em; padding: 0.35rem 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); word-break: break-all; user-select: all; }
.mfa-steps { padding-left: 1.2rem; }
.mfa-steps > li { margin-bottom: 0.8rem; }
.mfa-code-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.35rem 0.8rem; }
.mfa-code-list code { font-size: 1rem; letter-spacing: 0.05em; }
@media print { .mfa-codes { border: 0; } }

/* Denckh. instance-register (lokaal) */
.register-list { list-style: none; padding: 0; margin: 0; }
.register-list h2 { font-size: 1.05rem; margin: 0.1rem 0 0.4rem; }
.register-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.8rem; margin: 0; }
.register-facts dt { color: var(--muted); }
.register-facts dd { margin: 0; }
@media (min-width: 900px) { .register-facts { grid-template-columns: repeat(3, max-content 1fr); } }

/* ---------------------------------------------------------------- platform: modulemenu, submenu en startpagina */
.admin-nav-platform { gap: 0 1.6rem; }
.module-nav { margin: 0.5rem 0 0.2rem; border-bottom: 1px solid var(--line); }
.module-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem 1.1rem; overflow-x: auto; scrollbar-width: thin; }
.module-nav li { flex: none; }
.module-nav a { display: inline-block; padding: 0.45rem 0.1rem 0.4rem; min-height: 40px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; font-weight: 600; white-space: nowrap; }
.module-nav a:hover { color: var(--text); }
.module-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.module-nav a.module-nav-action { color: var(--primary); }
.module-nav a.module-nav-action::before { content: "+ "; }
@media print { .module-nav { display: none; } }

.home-head { margin: 0.6rem 0 0.4rem; }
.home-head p { margin: 0; }
.home-modules { list-style: none; margin: 0.8rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; max-width: 64rem; }
.home-module { display: flex; flex-direction: column; gap: 0.2rem; height: 100%; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); text-decoration: none; }
.home-module:hover { border-color: var(--primary); }
.home-module-title { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.home-module-text { color: var(--muted); font-size: 0.9rem; }
.home-module-signals { margin-top: auto; padding-top: 0.35rem; font-size: 0.875rem; }
.home-owner { max-width: 64rem; border-top: 1px solid var(--line); padding-top: 0.4rem; }
.home-attention { margin: 0.3rem 0 0.8rem; padding-left: 1.1rem; }
.home-attention li { margin: 0.2rem 0; }
.home-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin: 0.4rem 0; }
.home-facts div { min-width: 7rem; }
.home-facts dt { color: var(--muted); font-size: 0.85rem; }
.home-facts dd { margin: 0; font-size: 1.15rem; font-weight: 700; }
.home-table { border-collapse: collapse; margin: 0.3rem 0 0.6rem; min-width: min(100%, 22rem); }
.home-table th, .home-table td { text-align: left; padding: 0.35rem 1.2rem 0.35rem 0; border-bottom: 1px solid var(--line); }
.home-table th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }

/* Organisatie: inklapbare acties ("Persoon koppelen", "Functie geven") en personenlijst */
.org-koppel { margin: 0.5rem 0 0.8rem; }
.org-koppel > summary { display: inline-flex; align-items: center; min-height: 40px; padding: 0.35rem 0.85rem; border: 1px solid var(--primary); border-radius: 6px; color: var(--primary); font-weight: 600; cursor: pointer; list-style: none; }
.org-koppel > summary::-webkit-details-marker { display: none; }
.org-koppel > summary::before { content: "+ "; margin-right: 0.25rem; }
.org-koppel[open] > summary::before { content: "− "; }
.org-koppel[open] > summary { margin-bottom: 0.5rem; }
.org-people-tools { margin: 0.5rem 0 0.4rem; }
.org-people-search { max-width: 34rem; margin: 0.6rem 0 0.3rem; }
.org-no-role { color: var(--warn); }

/* Gebruikers en rechten (issue #4 A3) */
.access-list { list-style: none; margin: 0.6rem 0; padding: 0; max-width: 64rem; }
.access-list li { display: grid; grid-template-columns: minmax(10rem, 1.1fr) minmax(0, 2fr) auto auto; align-items: center; gap: 0.2rem 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.access-list li.is-disabled .access-name { color: var(--muted); }
.access-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; }
.access-name { font-weight: 600; }
.access-edit { white-space: nowrap; }
@media (max-width: 760px) {
  .access-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .access-what { grid-column: 1 / -1; grid-row: 2; }
  .access-flags { grid-column: 1; grid-row: 3; }
  .access-edit { grid-column: 2; grid-row: 1; }
}
.access-form { max-width: 44rem; }
.access-step { border: 0; border-top: 1px solid var(--line); margin: 0.6rem 0 0; padding: 0.5rem 0 0.2rem; min-width: 0; }
.access-step legend { font-weight: 700; padding: 0 0.3rem 0 0; }
.access-step.is-inapplicable { opacity: 0.55; }
.access-choices { display: grid; gap: 0.35rem; margin: 0.3rem 0 0.5rem; }
.access-choice { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; min-height: 44px; }
.access-choice input, .org-form .access-choice input { margin-top: 0.25rem; flex: none; width: auto; min-height: 0; }
.access-choice span { display: flex; flex-direction: column; }
.access-choice .hint { margin: 0; }
.access-choice:has(input:checked) { border-color: var(--primary); background: var(--surface); }
.access-module { max-width: 20rem; }
.access-account { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0; }

/* Personenimport (issue #4 A5) */
.import-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0.3rem 0 0.8rem; padding: 0; counter-reset: stap; font-size: 0.875rem; color: var(--muted); }
.import-steps li { counter-increment: stap; }
.import-steps li::before { content: counter(stap) ". "; }
.import-steps li.is-current { color: var(--text); font-weight: 700; }
.import-steps li.is-done { color: var(--ok); }
.import-intro { max-width: 46rem; }
.import-intro ul { margin: 0.3rem 0 0.6rem; padding-left: 1.1rem; }
.import-options { margin: 0.6rem 0; max-width: 52rem; }
.import-options > summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.import-summary { list-style: none; padding: 0; margin: 0.3rem 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.import-summary .import-errors { color: var(--error); }
.table-scroll { overflow-x: auto; max-width: 100%; margin: 0.5rem 0; }
.import-table { border-collapse: collapse; min-width: 32rem; font-size: 0.875rem; }
.import-table th, .import-table td { text-align: left; padding: 0.3rem 0.8rem 0.3rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.import-table th { color: var(--muted); font-weight: 600; }
.import-table tr.has-error td { background: var(--error-bg); }
.import-fout { color: var(--error); font-weight: 600; }
.import-error-list { max-width: 52rem; }
.import-error-list ul { padding-left: 1.1rem; font-size: 0.875rem; }
.import-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0; }

/* Module Vrijwilligers (issue #4 B6) */
.vol-month h3 { font-size: 0.95rem; text-transform: capitalize; margin: 0.8rem 0 0.2rem; }
.vol-list { list-style: none; margin: 0.2rem 0 0.6rem; padding: 0; max-width: 60rem; }
.vol-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.vol-what { min-width: 0; overflow-wrap: anywhere; }
.vol-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; }
.vol-status { font-size: 0.8125rem; border-radius: 999px; padding: 0.05rem 0.55rem; border: 1px solid var(--border); white-space: nowrap; }
.vol-status-geen { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.vol-status-gezocht { color: var(--info); background: var(--info-bg); border-color: transparent; }
.vol-status-gevonden, .vol-status-afgerond { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.vol-status-vervallen { color: var(--muted); }

/* Module Catechisatie (issue #4 B7) */
.cat-privacy { max-width: 46rem; border-left: 3px solid var(--accent); padding-left: 0.6rem; }
.cat-move select { width: auto; max-width: 12rem; min-height: 32px; font-size: 0.875rem; }

/* =====================================================================================================================
   Kerckh.-platform (organisatie en modules). Alleen binnen body.platform: de pilot (zaalverhuur zonder platform) en de
   publieke pagina's behouden hun bestaande uitstraling. Warm en rustig: zandkleurige ondergrond, witte kaarten met een
   zachte schaduw, per module één accentkleur (icoon + naam erbij, nooit kleur alleen). Contrast tekst ≥ 4,5:1.
   ===================================================================================================================== */
body.platform {
  --canvas: #f6f2ec;
  --card: #ffffff;
  --card-border: #e6ded2;
  --shadow: 0 1px 2px rgba(36, 41, 46, 0.05), 0 4px 14px rgba(36, 41, 46, 0.05);
  --shadow-hover: 0 2px 4px rgba(36, 41, 46, 0.07), 0 8px 22px rgba(36, 41, 46, 0.08);
  --r: 12px;
  /* module-accenten (tekstkleur op wit ≥ 4,5:1) en zachte tinten */
  --m: #3b4a57; --m-tint: #eaeef2;
  background: var(--canvas);
}
body.platform .m-start, body.platform.m-start { --m: #3b4a57; --m-tint: #eaeef2; }
body.platform .m-organisatie, body.platform.m-organisatie { --m: #2f4e6b; --m-tint: #e6eef6; }
body.platform .m-vrijwilligers, body.platform.m-vrijwilligers { --m: #2c6a52; --m-tint: #e3f1ea; }
body.platform .m-catechisatie, body.platform.m-catechisatie { --m: #6a4580; --m-tint: #f0e8f5; }
body.platform .m-clubs, body.platform.m-clubs { --m: #9a4f1f; --m-tint: #f8ebe0; }
body.platform .m-vog, body.platform.m-vog { --m: #8a3436; --m-tint: #f6e6e6; }
body.platform .m-activiteiten, body.platform.m-activiteiten { --m: #1f6a78; --m-tint: #e1f0f3; }
body.platform .m-roosters, body.platform.m-roosters { --m: #4a4f8f; --m-tint: #e9eaf6; }
body.platform .m-documenten, body.platform.m-documenten { --m: #6b5b22; --m-tint: #f3eedb; }
body.platform .m-zaalverhuur, body.platform.m-zaalverhuur { --m: #8a4b23; --m-tint: #f6e9df; }
body.platform .m-kerkbeheer, body.platform.m-kerkbeheer { --m: #4a4f57; --m-tint: #ececee; }

body.platform main { padding-top: 1rem; padding-bottom: 1rem; }
body.platform h1 { font-size: 1.45rem; letter-spacing: -0.01em; }
body.platform h2 { font-size: 1.05rem; }
body.platform .icon { flex: none; vertical-align: middle; }

/* ---- kop en modulebalk */
body.platform .platform-header { background: #fff; border-bottom: 0; box-shadow: 0 1px 0 var(--card-border); position: relative; }
body.platform .user-link { display: inline-flex; align-items: center; gap: 0.3rem; }
body.platform .platform-nav { border-top: 1px solid var(--line); background: #fff; }
body.platform .platform-nav ul { list-style: none; margin: 0 auto; display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: thin; padding-top: 0.35rem; padding-bottom: 0.35rem; }
body.platform .platform-nav li { flex: none; }
body.platform .platform-nav a { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.35rem 0.75rem; border-radius: 999px; color: #4a4f57; font-weight: 600; text-decoration: none; white-space: nowrap; }
body.platform .platform-nav a .icon { color: var(--m); }
body.platform .platform-nav a:hover { background: var(--m-tint); color: #24292e; }
body.platform .platform-nav a.active { background: var(--m); color: #fff; }
body.platform .platform-nav a.active .icon { color: #fff; }

/* ---- submenu van een module: tabs in het accent */
body.platform .module-nav { border-bottom: 1px solid var(--card-border); margin-top: 0.2rem; }
body.platform .module-nav a.active { border-bottom-color: var(--m); color: var(--m); }
body.platform .module-nav a.module-nav-action { color: var(--m); }

/* ---- kaarten */
body.platform .card, body.platform .org-tree-pane, body.platform .home-module, body.platform .who-card, body.platform .panel-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r); box-shadow: var(--shadow);
}
body.platform .panel-card { padding: 0.9rem 1rem; margin: 0.8rem 0; }
body.platform .panel-card > h2:first-child { margin-top: 0; display: flex; align-items: center; gap: 0.45rem; }
body.platform .org-tree-pane { background: #fff; }
body.platform .button { border-radius: 8px; }
body.platform .button.primary { background: var(--m); border-color: var(--m); }
body.platform .button.primary:hover { filter: brightness(0.92); background: var(--m); }

/* ---- modulekop */
.module-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 0.9rem; margin: 0.4rem 0 0.8rem; }
.module-head-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--m-tint); color: var(--m); flex: none; }
.module-head-text { flex: 1; min-width: 12rem; }
.module-head-text h1 { margin: 0; }
.module-head-text p { margin: 0.1rem 0 0; }
.module-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---- kerngetallen */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; margin: 0.6rem 0 1rem; }
.stat { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.7rem 0.85rem; background: #fff; border: 1px solid var(--card-border); border-left: 4px solid var(--m, #3b4a57); border-radius: 10px; color: var(--text); text-decoration: none; }
a.stat:hover { border-color: var(--m); }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 0.85rem; color: var(--muted); }
.stat-ok { border-left-color: var(--ok); }
.stat-warn { border-left-color: #b07a00; }
.stat-error { border-left-color: var(--error); }
.stat-info { border-left-color: var(--info); }

/* ---- statuschips (bezetting, opvolging, aanmelding) */
.chip { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.78rem; font-weight: 600; line-height: 1; padding: 0.3rem 0.55rem; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.chip-onbezet { background: var(--error-bg); color: var(--error); }
.chip-onderbezet { background: var(--warn-bg); color: var(--warn); }
.chip-compleet { background: var(--ok-bg); color: var(--ok); }
.chip-overbezet { background: var(--info-bg); color: var(--info); }
.chip-neutraal { background: #f1efeb; color: #4a4f57; }

/* ---- soort onderdeel: zes rustige tinten (tekst ≥ 4,5:1) */
.kind-chip { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 6px; }
.kind-1 { background: #e6eef6; color: #2f4e6b; }
.kind-2 { background: #e3f1ea; color: #2c6a52; }
.kind-3 { background: #f0e8f5; color: #6a4580; }
.kind-4 { background: #e1f0f3; color: #1f5d69; }
.kind-5 { background: #f8ebe0; color: #8a4518; }
.kind-6 { background: #f3eedb; color: #63541f; }

/* ---- startpagina */
body.platform .home-head h1 { font-size: 1.6rem; }
body.platform .home-modules { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.9rem; max-width: none; }
body.platform .home-module { position: relative; padding: 1rem 1.1rem 0.9rem; border-top: 4px solid var(--m); gap: 0.35rem; }
body.platform .home-module-title { display: flex; align-items: center; gap: 0.5rem; color: var(--m); font-size: 1.1rem; }
body.platform .home-module-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--m-tint); }
.home-module-stats { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; padding-top: 0.5rem; }
.home-alerts { list-style: none; margin: 0.4rem 0 1rem; padding: 0; display: grid; gap: 0.4rem; max-width: 56rem; }
.home-alerts a { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.8rem; border-radius: 10px; background: #fff; border: 1px solid var(--card-border); color: var(--text); text-decoration: none; }
.home-alerts a:hover { border-color: var(--m); }
.home-alerts .icon { color: var(--warn); }
.home-alerts .alert-go { margin-left: auto; color: var(--muted); }

/* ---- organisatieboom */
body.platform .org-node { border-radius: 8px; }
body.platform .org-node.is-current { background: var(--m-tint); box-shadow: inset 3px 0 0 var(--m); }
body.platform .org-node-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.org-occupancy { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.2rem 0 0.6rem; }

/* ---- Wie doet wat: per onderdeel een kaart; personen als nette regels (functie | naam) */
.who-group { margin: 1rem 0 0.4rem; }
.who-group > h2 { display: flex; align-items: center; gap: 0.5rem; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 0.75rem; }
.who-card { padding: 0.75rem 0.9rem; break-inside: avoid; display: flex; flex-direction: column; gap: 0.35rem; }
.who-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 0.5rem; }
.who-card-head a { font-weight: 700; color: var(--text); text-decoration: none; }
.who-card-head a:hover { text-decoration: underline; }
.who-path { font-size: 0.78rem; color: var(--muted); }
.who-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.who-rows li { display: grid; grid-template-columns: minmax(6.5rem, 40%) minmax(0, 1fr); gap: 0.5rem; padding: 0.3rem 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.who-rows li:first-child { border-top: 0; }
.who-role { color: var(--muted); font-size: 0.85rem; }
.who-name { font-weight: 600; overflow-wrap: anywhere; }
.who-term { display: block; font-weight: 400; font-size: 0.78rem; color: var(--muted); }
.who-need { font-size: 0.85rem; color: var(--warn); font-weight: 600; }

/* ---- lege toestanden */
.empty { display: grid; justify-items: center; text-align: center; gap: 0.35rem; padding: 1.6rem 1rem; border: 1px dashed var(--card-border); border-radius: var(--r); background: #fff; color: var(--muted); margin: 0.6rem 0; }
.empty .icon { color: var(--m, #3b4a57); }
.empty-title { color: var(--text); font-weight: 700; margin: 0; }

/* ---- tabellen in kaarten */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { text-align: left; padding: 0.45rem 0.6rem 0.45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- beweging: alleen subtiel, en helemaal niet bij reduced motion */
@media (prefers-reduced-motion: no-preference) {
  body.platform .home-module, body.platform .stat, body.platform .platform-nav a, body.platform .who-card, body.platform .home-alerts a, body.platform .button {
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
  }
  body.platform .home-module:hover, body.platform .who-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
  body.platform .notice { animation: kerckh-in 0.2s ease-out; }
}
@keyframes kerckh-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  body.platform h1 { font-size: 1.25rem; }
  .module-head-icon { width: 38px; height: 38px; }
  .who-rows li { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media print {
  body.platform { background: #fff; }
  body.platform .platform-nav, body.platform .module-nav { display: none; }
  body.platform .who-card { box-shadow: none; }
}
.who-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; }
.occ-rows { display: grid; gap: 0 0.6rem; }
.occ-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 0 0.6rem; }
@media print { .who-grid { display: block; } .who-card { margin: 0 0 0.5rem; } }
.who-grid { list-style: none; margin: 0; padding: 0; }
.wb-issues ul { margin: 0.2rem 0; padding-left: 1.1rem; font-size: 0.9rem; max-height: 22rem; overflow: auto; }
.wb-error { border-left: 4px solid var(--error); }
.wb-warn { border-left: 4px solid #b07a00; }
.wb-info { border-left: 4px solid var(--info); }
.wb-names { overflow-wrap: anywhere; }
.wb-confirm { display: grid; gap: 0.5rem; }
.wb-intro ol { padding-left: 1.2rem; }

/* Fase B: catechisatie en clubs */
.cat-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0.4rem 0 0.6rem; }
.cat-filter a.active { font-weight: 700; color: var(--text); text-decoration: none; border-bottom: 2px solid var(--m, var(--primary)); }
.cat-class-input { max-width: 9rem; min-height: 32px; }
.cat-links { margin: 0.3rem 0; padding-left: 1.1rem; font-size: 0.875rem; }
.cat-links code { overflow-wrap: anywhere; }
select.is-suggested { border-color: var(--warn); background: var(--warn-bg); }
.access-sub { display: block; margin-top: 0.3rem; font-size: 0.85rem; }
.club-group h3 { margin: 0.6rem 0 0.1rem; font-size: 0.95rem; }
.club-member-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.club-member-form select, .club-member-form input { width: auto; max-width: 9rem; min-height: 32px; font-size: 0.875rem; }
/* Praktijktest B-F10: kleine tekstknoppen (lid opslaan, catecheet ontkoppelen, activiteit verwijderen) waren op mobiel ~22 px hoog. */
.club-member-form .link-button, .org-people-list form.inline .link-button, .who-rows form.inline .link-button { min-height: 32px; display: inline-flex; align-items: center; }
.register { max-width: 34rem; }
.register-form .access-choice { margin-bottom: 0.4rem; }
.vol-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.2rem 0.8rem; margin: 0.4rem 0 0.8rem; }
.vol-filter .field { margin-bottom: 0.3rem; }
.vol-filter .button { margin-bottom: 0.45rem; }

/* Roosters (fase C) */
.roster-list { list-style: none; margin: 0.4rem 0; padding: 0; display: grid; gap: 0.5rem; max-width: 60rem; }
.roster-shift { display: grid; grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr) auto; align-items: center; gap: 0.3rem 0.8rem; padding: 0.6rem 0.8rem; background: #fff; border: 1px solid var(--card-border); border-left: 4px solid var(--warn); border-radius: 10px; }
.roster-shift.is-full { border-left-color: var(--ok); }
.roster-when { display: flex; flex-direction: column; }
.roster-who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.roster-person { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 0.2rem; background: var(--m-tint, #eee); border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.875rem; }
/* Uitplannen (×): tikdoel minstens 24×24 px (WCAG 2.5.8), ook op mobiel. */
.roster-person .link-button { min-width: 24px; min-height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.who-name .link-button { min-width: 24px; min-height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.roster-assign { display: flex; gap: 0.3rem; }
.roster-assign select { width: auto; max-width: 12rem; min-height: 34px; }
@media (max-width: 760px) { .roster-shift { grid-template-columns: minmax(0, 1fr); } }

/* Activiteiten en Documenten (fase D) */
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 0.8rem; margin: 0.8rem 0; }
.panel-grid .panel-card { margin: 0; }
.task-list { list-style: none; margin: 0.3rem 0 0.6rem; padding: 0; display: grid; gap: 0.35rem; }
.task-list li { display: flex; align-items: center; gap: 0.5rem; }
.task-list li.is-done > span:last-child { text-decoration: line-through; color: var(--muted, #666); }
.task-check { display: inline-grid; place-items: center; width: 22px; height: 22px; min-height: 22px; padding: 0; border: 2px solid var(--m, #777); border-radius: 6px; background: #fff; color: #fff; cursor: pointer; }
.task-list li.is-done .task-check { background: var(--m, #2e7d32); }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip-row a.chip { text-decoration: none; }
.who-name form.inline { margin-left: 0.35rem; }
.doc-links { list-style: none; margin: 0.3rem 0; padding: 0; display: grid; gap: 0.3rem; }

/* Bereik kiezen (meerdere onderdelen) */
.scope-picker { margin-top: 0.3rem; }
.scope-search { width: 100%; max-width: 24rem; margin-bottom: 0.4rem; }
.scope-list { list-style: none; margin: 0.3rem 0; padding: 0.2rem 0; max-height: 18rem; overflow: auto; border: 1px solid var(--card-border); border-radius: 10px; background: #fff; }
.scope-list-flat { max-height: none; border: 0; background: transparent; }
.scope-item { margin: 0; }
.scope-item.depth-1 .scope-choice { padding-left: 1.6rem; }
.scope-item.depth-2 .scope-choice { padding-left: 2.6rem; }
.scope-item.depth-3 .scope-choice { padding-left: 3.6rem; }
.scope-item.depth-4 .scope-choice { padding-left: 4.6rem; }
.scope-choice { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.6rem; cursor: pointer; border-radius: 8px; }
.scope-choice:hover { background: var(--m-tint, #f3f1ec); }
.scope-choice input, .org-form .scope-choice input, .access-form .scope-choice input { width: auto; min-height: 0; margin: 0; flex: none; }
.scope-choice > span { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; align-items: baseline; }
.scope-kind { font-size: 0.8rem; color: var(--muted, #666); }
.scope-field.is-collapsed { display: none; }
.access-sub-scope { border: 0; padding: 0; margin: 0.4rem 0 0; }
.access-sub-scope legend { font-weight: 600; font-size: 0.9rem; }

/* Uitnodigen in stappen */
.wizard-steps { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; list-style: none; margin: 0.4rem 0 0.8rem; padding: 0; counter-reset: none; }
.wizard-steps li { display: flex; align-items: center; gap: 0.4rem; color: var(--muted, #666); font-size: 0.9rem; }
.wizard-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); font-weight: 600; font-size: 0.85rem; }
.wizard-steps li.is-current { color: inherit; font-weight: 600; }
.wizard-steps li.is-current .wizard-num { border-color: var(--m, var(--accent)); background: var(--m, var(--accent)); color: #fff; }
.wizard-steps li.is-done .wizard-num { border-color: var(--ok); color: var(--ok); }
.wizard-sub { margin: 0 0 0.5rem 2.2rem; }
.wizard-sub.is-collapsed { display: none; }
.wizard-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; margin-top: 0.8rem; }
.wizard-actions .primary { margin-left: auto; }
.summary-list { display: grid; grid-template-columns: minmax(7rem, 10rem) 1fr; gap: 0.35rem 0.8rem; margin: 0.4rem 0 0.8rem; }
.summary-list dt { color: var(--muted, #666); }
.summary-list dd { margin: 0; }
.person-account { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.4rem; margin: -0.2rem 0 0.6rem; }
.person-link { margin: 0.2rem 0 0.6rem; }
@media (max-width: 480px) { .summary-list { grid-template-columns: 1fr; gap: 0.1rem; } .summary-list dt { margin-top: 0.4rem; } }

/* Volledig aanklikbare kaarten: de hoofdlink wordt over de hele kaart uitgerekt; andere knoppen en links blijven erboven. */
.who-card { position: relative; }
.who-card .card-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.who-card:has(.card-link) { cursor: pointer; }
.who-card:has(.card-link:hover) { border-color: var(--m, var(--primary)); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.who-card:has(.card-link:focus-visible) { outline: 3px solid var(--focus, #2a5bd7); outline-offset: 2px; }
.who-card .card-link:focus-visible { outline: none; }
.who-card form, .who-card button, .who-card select, .who-card input, .who-card .who-rows a, .who-card a:not(.card-link) { position: relative; z-index: 1; }
@media (prefers-reduced-motion: no-preference) { .who-card { transition: border-color 0.15s ease, box-shadow 0.15s ease; } }
/* Terugkeer naar de pagina waar je vandaan kwam (bijv. een club) */
.org-return { margin: 0 0 0.6rem; }
.org-return .button { min-height: 40px; }

/* Algemene aanmeldlink en beoordeling (catechisatie) */
.share-box { display: grid; gap: 0.4rem; margin: 0.4rem 0; }
.share-url { display: block; padding: 0.5rem 0.6rem; background: var(--m-tint, #f3f1ec); border-radius: 8px; overflow-wrap: anywhere; font-size: 0.9rem; }
.share-actions, .share-manage { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.share-manage { margin-top: 0.5rem; }
.reg-list { list-style: none; margin: 0.4rem 0; padding: 0; display: grid; gap: 0.6rem; }
.reg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 0.8rem; }
.reg-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.8rem; margin: 0.3rem 0; font-size: 0.925rem; }
.reg-facts dt { color: var(--muted, #666); }
.reg-facts dd { margin: 0; }
.reg-actions { display: grid; gap: 0.4rem; margin-top: 0.4rem; }
.reg-actions .org-inline-form { align-items: center; }
.assign-counts { margin: 0.2rem 0 0.6rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.register .access-choice.has-error { border-color: var(--error, #b3261e); }
@media (max-width: 480px) { .reg-facts { grid-template-columns: 1fr; gap: 0; } .reg-facts dt { margin-top: 0.3rem; } }

/* Startpagina: welkomsttekst en inrichtingsstappen */
.home-welcome { max-width: 56rem; margin: 0.4rem 0 0; }
.home-setup { max-width: 56rem; }
.setup-steps { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.setup-steps li { display: flex; align-items: flex-start; gap: 0.55rem; }
.setup-steps li.is-done a { color: var(--muted, #666); text-decoration: line-through; }
.setup-check { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border: 2px solid var(--line); border-radius: 50%; color: #fff; margin-top: 0.05rem; }
.setup-steps li.is-done .setup-check { background: var(--ok); border-color: var(--ok); }
/* Roosters: wisseling */
.roster-swap { display: inline-block; }
.roster-swap > summary { list-style: none; cursor: pointer; padding: 0 0.2rem; color: var(--muted, #666); }
.roster-swap > summary::-webkit-details-marker { display: none; }
.roster-swap[open] > summary { color: var(--m, inherit); }
/* Open wisselpaneel: binnen de schermbreedte blijven (smal scherm: keuzelijst en knop onder elkaar). */
.roster-swap .roster-assign { margin: 0.3rem 0; flex-wrap: wrap; max-width: 100%; }
.roster-swap .roster-assign select { max-width: 100%; }

/* Catechisatie: mogelijke bestaande jongeren bij een aanmelding via de link. */
.reg-matches { margin: 0.4rem 0; padding-left: 1.1rem; }
.reg-matches li { margin: 0.25rem 0; }

/* Hulp bij het beheer: inklapbare onderwerpen met korte stappen. */
.help-list { display: grid; gap: 0.6rem; margin: 1rem 0; }
.help-topic summary { cursor: pointer; list-style: revert; }
.help-topic summary h2 { display: inline; font-size: 1.05rem; margin: 0; }
.help-steps { margin: 0.8rem 0 0.4rem; padding-left: 1.3rem; }
.help-steps li { margin: 0.35rem 0; }

/* ---------------------------------------------------------------- praktijktest eigenaar 13 okt (laptop + iPhone) */
/* Tekst: geen losse woorden op een nieuwe regel, en een leesbare maximale breedte voor toelichtingen. */
p, li, dd, .hint, .lead, label { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }
.hint, .lead, .org-intro, .module-intro, .notice p, .register > p { max-width: 78ch; }
.data-table select { max-width: 24rem; }
.hint-after { margin: 0.25rem 0 0; }
.hint-list { margin: 0.2rem 0 0.6rem; padding-left: 1.1rem; }
.hint-list li { margin: 0.1rem 0; }
.notice-info { background: var(--info-bg); border-color: var(--info); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; }
.section-head h2 { margin-bottom: 0.2rem; }

/* Punt 1: persoon koppelen in een rustig raster van twee kolommen (mobiel onder elkaar); velden beginnen op één hoogte. */
.org-form-grid { align-items: start; }
@media (min-width: 640px) {
  .org-form-grid.org-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .org-form-grid.org-grid-3 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
}
.org-form-grid input, .org-form-grid select { width: 100%; }

/* Punt 2: Wijzigen / Overdragen / Beëindigen op een vaste plek; het formulier opent onder de persoon. */
.org-row-actions .org-action { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.875rem; color: var(--primary); }
.org-row-actions .org-action.is-open { text-decoration-thickness: 3px; text-underline-offset: 4px; color: var(--text); }
.org-people li.has-panel { background: var(--surface); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: var(--radius); }
.org-row-panel { flex-basis: 100%; order: 3; margin: 0.2rem 0 0.6rem; padding: 0.6rem 0.75rem; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: var(--radius); }
.org-panel-title { font-size: 0.95rem; margin: 0 0 0.3rem; }

/* Punt 4: rechten in drie regels in plaats van één lange regel. */
.access-now { margin: 0.4rem 0 0.9rem; }
.access-now-title { font-size: 0.95rem; margin: 0 0 0.3rem; }
.access-overview { display: grid; gap: 0.3rem; margin: 0; max-width: 46rem; }
.access-overview > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0 0.8rem; align-items: baseline; }
.access-overview dt { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.access-overview dd { margin: 0; }
.access-overview-note { margin: 0.1rem 0 0; }
@media (max-width: 480px) { .access-overview > div { grid-template-columns: 1fr; } }
.access-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.access-chips .chip { white-space: normal; line-height: 1.25; font-weight: 500; }
.access-list .access-what { margin-top: 0.2rem; }

/* Punt 3: QR-code voor de authenticator-app; de sleutel als alternatief. */
.mfa-qr { width: 13rem; max-width: 70vw; margin: 0.4rem 0; padding: 0.4rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.mfa-qr svg { display: block; width: 100%; height: auto; }
.mfa-manual { margin-top: 0.6rem; }
.mfa-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* Punt 5 en 6: opvolgingen met functie, onderdeel, functiehouder, opvolger en datum op vaste plekken. */
.vol-successions { list-style: none; margin: 0.2rem 0 0.8rem; padding: 0; display: grid; gap: 0.6rem; max-width: 60rem; }
.vol-succession { padding: 0.65rem 0.85rem; background: #fff; border: 1px solid var(--card-border, var(--line)); border-radius: 10px; scroll-margin-top: 1rem; }
.vol-succession.is-highlight { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok-bg); }
.vol-succession-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 0.8rem; }
.vol-succession-title { font-size: 1rem; margin: 0; }
.vol-succession-unit { font-weight: 400; color: var(--muted); }
.vol-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.3rem 1rem; margin: 0.4rem 0 0; }
.vol-facts dt { color: var(--muted); font-size: 0.8rem; }
.vol-facts dd { margin: 0; }
.vol-succession-note { margin: 0.45rem 0 0; font-size: 0.875rem; color: var(--text); }
.vol-status-aandacht { color: var(--warn); background: var(--warn-bg); border-color: transparent; }

/* Punt 9: tellingen per avond en klas zijn links naar de aanmeldingen (dus ook zo vormgegeven). */
.count-list { list-style: none; margin: 0; padding: 0; }
.count-list a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; padding: 0.3rem 0.2rem; border-bottom: 1px solid var(--line); color: var(--primary); text-decoration: none; }
.count-list a:hover span:first-child, .count-list a:focus-visible span:first-child { text-decoration: underline; }
.count-list a::after { content: "›"; color: var(--muted); margin-left: -0.6rem; }
.count-list .num { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }

/* Punt 10: al ingedeeld als inklapbaar blok onder "Nog in te delen". */
.assign-done > summary { list-style: revert; }
.assign-done > summary h2 { display: inline; font-size: 1rem; }

/* Punt 7, 8 en 14: openbaar aanmeldformulier. */
.register-context { margin: 0 0 0.2rem; color: var(--muted); font-size: 0.9rem; }
.class-other { margin: 0.5rem 0 0; }
body.public main { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
.site-footer { padding-bottom: calc(1.7rem + env(safe-area-inset-bottom, 0px)); }

/* Punt 13: makerregel op één lijn (breed) of twee nette regels (smal); tekst en woordmerken op dezelfde hoogte. */
.credit { align-items: center; column-gap: 0.7rem; row-gap: 0.1rem; line-height: 1.2; }
.product-mark, .credit-link { align-items: center; gap: 0.4rem; min-height: 32px; padding: 0; }
.credit-label { white-space: nowrap; }
@media (max-width: 560px) {
  .credit { flex-direction: column; align-items: flex-start; }
  .credit-sep { display: none; }
}
.hint-list { max-width: 92ch; }
.org-check label .hint { display: block; margin: 0.1rem 0 0; }
/* De woordmerken staan op hun eigen grondlijn (onderkant letters); de labels zakken mee, zodat tekst en woordmerk op één lijn staan. */
.credit-label, .credit-sep { position: relative; top: 4px; }
.mfa-key { word-break: normal; overflow-wrap: break-word; }
