/* Cascade Complex – huisstijl van de VvE-presentaties */
:root {
  --ink: #1A1714;
  --ink-2: #262119;
  --paper: #FFFFFF;
  --paper-2: #FAF8F5;
  --terra: #B5563A;
  --terra-dark: #9A4730;
  --gold: #E0A458;
  --sand: #C9A272;
  --olive: #5F6B47;
  --muted: #787572;
  --muted-2: #A4A29F;
  --line: #E9E4DD;
  --on-dark-muted: #D5D5D4;
  --on-dark-faint: #918F8E;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .10);
  --font-head: "Source Serif 4", Cambria, "Times New Roman", Georgia, serif;
  --font-body: "Source Sans 3", Calibri, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper-2);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.25rem, 7.5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.9rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.eyebrow {
  display: block; font-family: var(--font-body); font-weight: 700;
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 14px;
}
.dark .eyebrow { color: var(--gold); }
.lead { color: var(--muted); font-size: 1.125rem; max-width: 56ch; }
.dark .lead { color: var(--on-dark-muted); }

/* Knoppen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 1.35rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1; white-space: nowrap;
  border: 2px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }
.btn-terra { background: var(--terra); color: #fff; }
.btn-terra:hover { background: var(--terra-dark); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #d6964a; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; background: rgba(255,255,255,.06); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.14); }
.btn-outline { border-color: var(--terra); color: var(--terra); background: transparent; }
.btn-outline:hover { background: var(--terra); color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 14px 0; transition: background .25s, box-shadow .25s, padding .25s;
}
.site-header .wrap { display: flex; align-items: center; gap: 8px; }
@media (min-width: 480px) { .site-header .wrap { gap: 12px; } }
.site-header .login {
  order: 0; min-height: 44px; padding: 0 .85rem; font-size: .95rem;
  border-color: rgba(255,255,255,.7); color: #fff; background: rgba(26,23,20,.28); backdrop-filter: blur(8px);
}
.site-header .login:hover { background: #fff; color: var(--ink); border-color: #fff; }
.brand { order: 1; margin-left: 4px; display: inline-flex; align-items: baseline; gap: .35em; color: #fff; font-family: var(--font-head); font-size: 1rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand small { font-family: var(--font-body); font-weight: 700; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.brand:hover { text-decoration: none; }
.nav { order: 2; margin-left: auto; display: none; gap: 4px; }
.nav a { color: rgba(255,255,255,.88); font-weight: 600; padding: 10px 14px; border-radius: 999px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.menu-btn {
  order: 3; margin-left: auto; min-height: 44px; min-width: 44px; padding: 0 .9rem;
  border-radius: 999px; border: 2px solid rgba(255,255,255,.7); background: rgba(26,23,20,.28); backdrop-filter: blur(8px);
  color: #fff; font: 700 .95rem var(--font-body); display: inline-flex; align-items: center; gap: .5em; cursor: pointer;
}
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn .label { display: none; }
@media (min-width: 480px) { .menu-btn .label { display: inline; } .brand { font-size: 1.15rem; } }
@media (max-width: 419px) { .site-header .brand small { display: none; } }
.site-header.scrolled { background: rgba(255,255,255,.94); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line), 0 8px 30px rgba(0,0,0,.06); padding: 10px 0; }
.site-header.scrolled .login { border-color: var(--terra); color: var(--terra); background: transparent; }
.site-header.scrolled .login:hover { background: var(--terra); color: #fff; }
.site-header.scrolled .brand { color: var(--ink); }
.site-header.scrolled .nav a { color: var(--ink); }
.site-header.scrolled .nav a:hover { background: var(--paper-2); }
.site-header.scrolled .menu-btn { border-color: var(--terra); color: var(--terra); background: transparent; }
.mobile-nav {
  display: none; position: fixed; z-index: 49; left: var(--gutter); right: var(--gutter); top: 76px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; flex-direction: column;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 14px 16px; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.mobile-nav a:hover { background: var(--paper-2); text-decoration: none; }
.mobile-nav a + a { border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
@media (min-width: 900px) { .nav { display: flex; } .menu-btn, .mobile-nav { display: none !important; } .brand { font-size: 1.3rem; } }

/* Hero */
.hero {
  position: relative; isolation: isolate; color: #fff; background: var(--ink-2);
  min-height: 100svh; display: flex; align-items: flex-end;
  padding: calc(96px + env(safe-area-inset-top)) 0 clamp(40px, 8vw, 96px);
}
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(26,23,20,.55) 0%, rgba(26,23,20,.15) 35%, rgba(26,23,20,.0) 55%),
    linear-gradient(0deg, rgba(26,23,20,.92) 0%, rgba(26,23,20,.65) 40%, rgba(26,23,20,.15) 75%, rgba(26,23,20,0) 100%);
}
.hero .wrap { max-width: 760px; margin-left: calc((100% - min(100% - 2 * var(--gutter), var(--max))) / 2); }
.hero .lead { margin-top: 20px; }
.hero .meta { margin-top: 18px; color: var(--on-dark-faint); font-size: .95rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
@media (max-width: 480px) { .hero .actions .btn { flex: 1 1 100%; } }

/* Secties */
section { padding: clamp(56px, 9vw, 112px) 0; scroll-margin-top: 72px; }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 56px); }
.section-head .lead { margin-top: 16px; }
.light { background: var(--paper); }
.tint { background: var(--paper-2); }
.dark { background: var(--ink-2); color: #fff; }

.split { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split .media img { border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); aspect-ratio: 4 / 4.4; object-fit: cover; width: 100%; }
.split.reverse .media { order: -1; }
@media (min-width: 820px) {
  .split { grid-template-columns: 1.05fr .95fr; }
  .split.reverse { grid-template-columns: .95fr 1.05fr; }
  .split.reverse .media { order: 0; }
  .split.reverse .copy { order: 1; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 32px; }
.stat { background: var(--paper-2); border-radius: var(--radius); padding: 22px 20px; }
.light .stat { background: var(--paper-2); }
.tint .stat { background: #fff; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--font-head); font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 600; line-height: 1; color: var(--terra); }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: .95rem; font-weight: 600; }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card {
  position: relative; background: #fff; border-radius: var(--radius); padding: 28px 26px 26px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.icon { width: 54px; height: 54px; border-radius: 50%; background: var(--terra); display: grid; place-items: center; color: #fff; margin-bottom: 6px; }
.icon svg { width: 26px; height: 26px; }
.card p { color: var(--muted); flex: 1; }
.card .more { color: var(--terra); font-weight: 700; display: inline-flex; align-items: center; gap: .4em; margin-top: 4px; }
.card .more svg { width: 1em; height: 1em; transition: transform .2s; }
.card:hover .more svg { transform: translateX(4px); }

.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.points li { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 14px 16px; color: var(--on-dark-muted); }
.points .num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.dark .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.contact { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.contact .card { padding: 26px; }
.contact .card b { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; }
.contact .card a.plain { color: var(--ink); font-weight: 600; word-break: break-word; }

/* Footer */
footer { background: var(--ink); color: var(--on-dark-faint); padding: 40px 0 calc(32px + env(safe-area-inset-bottom)); font-size: .95rem; }
footer .wrap { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
footer .brand { order: 0; color: #fff; font-size: 1.1rem; }
footer nav { order: 1; }
footer .copy { order: 2; }
@media (min-width: 700px) { footer .wrap { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; } }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer nav a { color: var(--on-dark-muted); font-weight: 600; }
footer nav a:hover { color: #fff; }
footer .copy { flex-basis: 100%; }

/* Inlogpagina */
.auth { min-height: 100svh; display: grid; background: var(--paper-2); }
.auth-visual { position: relative; isolation: isolate; color: #fff; padding: calc(96px + env(safe-area-inset-top)) var(--gutter) 40px; display: flex; align-items: flex-end; min-height: 42svh; }
.auth-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.auth-visual::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(26,23,20,.92), rgba(26,23,20,.35) 60%, rgba(26,23,20,.55)); }
.auth-visual h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
.auth-form { padding: clamp(32px, 6vw, 72px) var(--gutter); display: grid; align-content: center; }
.auth-form form { width: min(100%, 440px); margin-inline: auto; display: grid; gap: 18px; }
.auth-form h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
label { display: grid; gap: 8px; font-weight: 700; font-size: .95rem; }
input[type="email"], input[type="password"], input[type="text"] {
  font: inherit; font-size: 1.05rem; padding: 14px 16px; border-radius: 12px; border: 1.5px solid #D9D2C8; background: #fff; color: var(--ink); min-height: 52px; width: 100%;
}
input:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(181,86,58,.15); }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .95rem; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); }
.check input { width: 20px; height: 20px; accent-color: var(--terra); }
.notice { background: #fff; border-radius: 14px; padding: 14px 16px; color: var(--muted); font-size: .95rem; border: 1px solid var(--line); }
@media (min-width: 900px) {
  .auth { grid-template-columns: 1fr 1fr; }
  .auth-visual { min-height: 100svh; padding: 120px clamp(32px, 5vw, 72px) 64px; }
}

/* ===== Portaal (na inloggen) ===== */
.portal-body { background: var(--paper-2); }
.portal-body .site-header { position: sticky; }
.portal-body .site-header .wrap { justify-content: space-between; }
.portal-body .brand { order: 0; margin-left: 0; }
.who { color: var(--muted); font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.portal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 24px 0 56px; align-items: start; }
.portal-main { min-width: 0; display: grid; gap: 18px; }
.portal-main > * { min-width: 0; max-width: 100%; }
.portal-menu { order: -1; min-width: 0; }
.portal-menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.portal-menu ul::-webkit-scrollbar { display: none; }
.portal-menu li { flex: none; }
.portal-menu a, .portal-menu .soon, .portal-menu button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 999px;
  background: #fff; color: var(--ink); font: 600 .98rem var(--font-body); border: 1.5px solid var(--line); cursor: pointer; white-space: nowrap; text-decoration: none !important;
}
.portal-menu svg { width: 20px; height: 20px; color: var(--terra); flex: none; }
.portal-menu a:hover, .portal-menu button:hover { border-color: var(--terra); }
.portal-menu a.active { background: var(--terra); color: #fff; border-color: var(--terra); }
.portal-menu a.active svg { color: #fff; }
.portal-menu em { font-style: normal; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-left: 4px; }
.portal-menu a.active em { color: #fff; opacity: .85; }
.portal-menu .soon { color: var(--muted-2); border-style: dashed; cursor: default; }
.portal-menu .soon svg { color: var(--muted-2); }
.portal-menu .soon em { color: var(--muted-2); }
.portal-menu .logout form { margin: 0; }
@media (min-width: 900px) {
  .portal { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 36px 0 80px; }
  .portal-menu { position: sticky; top: 84px; }
  .portal-menu ul { flex-direction: column; overflow: visible; gap: 6px; }
  .portal-menu li { flex: initial; }
  .portal-menu a, .portal-menu .soon, .portal-menu button { display: flex; width: 100%; border-radius: 14px; padding: 0 14px; min-height: 48px; background: transparent; border-color: transparent; }
  .portal-menu a:hover, .portal-menu button:hover { background: #fff; border-color: var(--line); }
  .portal-menu a.active { background: var(--terra); border-color: var(--terra); }
  .portal-menu em { margin-left: auto; }
  .portal-menu .logout { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
}
.panel { background: #fff; border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); }
.panel h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.panel h2 { font-size: 1.35rem; margin-bottom: 10px; }
.panel .lead { margin-top: 10px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--paper-2); color: var(--terra); vertical-align: middle; }
.badge.superadmin { background: var(--terra); color: #fff; }
.badge.admin { background: var(--gold); color: var(--ink); }
.badge.off { background: var(--line); color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin-top: 14px; font-size: .98rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.tiles .card { padding: 22px; gap: 8px; }
.tiles .card h3 { font-size: 1.1rem; }
.alert { border-radius: 14px; padding: 14px 16px; font-weight: 600; border: 1px solid; }
.alert-error { background: #FBEDE9; border-color: #EBC2B6; color: #8A3A26; }
.alert-ok { background: #EEF3E8; border-color: #CBD7BB; color: #41532C; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 640px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--paper-2); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { color: var(--muted-2); }
.portal-footer { background: transparent; color: var(--muted-2); padding: 0 0 calc(28px + env(safe-area-inset-bottom)); font-size: .9rem; }
.auth-form .alert { margin-bottom: 4px; }

/* ===== Gebruikersbeheer ===== */
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.panel-head h1, .panel-head h2 { margin: 0; }
.btn-sm { min-height: 38px; padding: 0 .9rem; font-size: .9rem; }
.btn-danger { border-color: #B5563A; color: #B5563A; background: transparent; }
.btn-danger:hover { background: #B5563A; color: #fff; }
.btn-quiet { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-quiet:hover { border-color: var(--terra); color: var(--terra); }
.acties { display: flex; flex-wrap: wrap; gap: 6px; }
.acties form { margin: 0; display: inline; }
tr.inactief td { color: var(--muted-2); }
tr.inactief td .badge { opacity: .7; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 18px; }
.form-grid .span2 { grid-column: 1 / -1; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .klein { grid-template-columns: initial; } }
.form-grid label small, label .hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.form-grid label.fout input, .form-grid label.fout select { border-color: #B5563A; box-shadow: 0 0 0 4px rgba(181,86,58,.12); }
.veldfout { color: #8A3A26; font-size: .88rem; font-weight: 600; }
select { font: inherit; font-size: 1.05rem; padding: 14px 16px; border-radius: 12px; border: 1.5px solid #D9D2C8; background: #fff; color: var(--ink); min-height: 52px; width: 100%; }
select:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(181,86,58,.15); }
.form-acties { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; align-items: center; }
.form-acties .spacer { flex: 1; }
.ww-box { background: var(--paper-2); border: 1px dashed var(--sand); border-radius: 14px; padding: 18px; margin-top: 16px; }
.ww-box code { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: .04em; color: var(--ink); word-break: break-all; margin-top: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.radio-list { display: grid; gap: 10px; margin-top: 14px; }
.radio-list label { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; font-weight: 600; cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--terra); background: #fff; }
.radio-list input { width: 20px; height: 20px; accent-color: var(--terra); margin-top: 2px; flex: none; }
.radio-list .hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 52px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--terra); }

/* Iconknoppen voor acties in lijsten */
.btn-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--terra); cursor: pointer; padding: 0; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; }
.btn-icon svg { width: 20px; height: 20px; }
.btn-icon:hover, .btn-icon:focus-visible { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn-icon.danger { color: #8A3A26; }
.btn-icon.danger:hover { background: #8A3A26; border-color: #8A3A26; color: #fff; }
.btn-icon.ok { color: var(--olive); }
.btn-icon.ok:hover { background: var(--olive); border-color: var(--olive); color: #fff; }
.acties { gap: 6px; flex-wrap: nowrap; }
table.data td.acties-cel { white-space: nowrap; }

/* Admin-tabbladen */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none !important; }
.admin-tabs a svg { width: 18px; height: 18px; color: var(--terra); }
.admin-tabs a:hover { border-color: var(--terra); }
.admin-tabs a.active { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.admin-tabs a.active svg { color: var(--gold); }

/* Registratie en statussen */
.badge.pending { background: var(--gold); color: var(--ink); }
.badge.ok { background: #EEF3E8; color: #41532C; }
tr.pending td { background: #FFF8EC; }
.stappen { list-style: none; counter-reset: stap; display: flex; gap: 6px; padding: 0; margin: 0 0 6px; font-size: .85rem; font-weight: 600; color: var(--muted-2); flex-wrap: wrap; }
.stappen li { counter-increment: stap; display: inline-flex; align-items: center; gap: 6px; }
.stappen li::before { content: counter(stap); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--muted); font-size: .75rem; }
.stappen li.actief { color: var(--ink); }
.stappen li.actief::before { background: var(--terra); color: #fff; }
.stappen li.klaar { color: var(--olive); }
.stappen li.klaar::before { content: "✓"; background: var(--olive); color: #fff; }
.stappen li + li::after { content: ""; }
.code-input { font-size: 1.8rem !important; letter-spacing: .4em; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
label.check.fout span { color: #8A3A26; }
.auth-form .form-grid { margin-top: 0; }
.auth-form .form-grid.klein { grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-form .form-grid.klein .span2 { grid-column: 1 / -1; }
@media (max-width: 420px) { .auth-form .form-grid.klein { grid-template-columns: 1fr; } }

/* Breder portaal: de lijsten hebben ruimte nodig */
.portal-body .wrap { --max: 1680px; }
@media (min-width: 900px) {
  .portal { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .portal-menu a, .portal-menu .soon, .portal-menu button { padding: 0 12px; min-height: 44px; font-size: .95rem; }
}
@media (min-width: 1100px) {
  .portal { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
}
/* Compacte datatabel */
table.data { font-size: .92rem; min-width: 0; }
table.data th, table.data td { padding: 10px 10px; }
table.data th:first-child, table.data td:first-child { padding-left: 14px; }
table.data th:last-child, table.data td:last-child { padding-right: 14px; }
table.data td.email { word-break: break-all; }
table.data td.nowrap { white-space: nowrap; }
table.data .badge { font-size: .7rem; padding: 3px 8px; white-space: nowrap; }
.acties { gap: 4px; }
.btn-icon { width: 36px; height: 36px; border-radius: 10px; }
.btn-icon svg { width: 18px; height: 18px; }
@media (max-width: 899px) { table.data { min-width: 640px; } }
.panel.panel-tabel { padding: 10px; }
.panel.panel-tabel .table-wrap { margin-top: 0; border: 0; }

/* Nog compacter voor schermen tussen 900 en 1400 pixels */
.portal-body { --gutter: clamp(16px, 2.5vw, 32px); }
table.data th, table.data td { padding: 9px 8px; }
table.data td .badge.pending { white-space: normal; line-height: 1.25; display: inline-block; max-width: 9em; }
table.data th { letter-spacing: .06em; font-size: .72rem; }
.btn-icon { width: 34px; height: 34px; }
td .id-klein { display: none; color: var(--muted-2); font-size: .8rem; margin-left: 4px; }
@media (min-width: 900px) and (max-width: 1199px) {
  .portal { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
  table.data .kol-id { display: none; }
  td .id-klein { display: inline; }
}
@media (min-width: 900px) and (max-width: 1049px) { table.data .kol-login { display: none; } }

/* Op telefoons: elke tabelrij wordt een kaart */
.panel-tabel .tabel-titel { padding: 12px 14px 4px; }
@media (max-width: 699px) {
  .panel.panel-tabel { padding: 0; background: transparent; box-shadow: none; }
  .panel-tabel .tabel-titel { padding: 0 4px 10px; }
  .table-wrap { overflow: visible; border: 0; margin-top: 0; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; min-width: 0; width: 100%; }
  table.data thead { display: none; }
  table.data tr { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px 12px; margin-bottom: 12px; }
  table.data tr.pending { background: #FFF8EC; }
  table.data tr.inactief { background: #F6F4F1; }
  table.data tr:last-child td { border-bottom: 0; }
  table.data td { border: 0; padding: 5px 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: center; font-size: .97rem; }
  table.data td::before { content: attr(data-label); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
  table.data td.kol-id { display: none; }
  table.data td .id-klein { display: inline; }
  table.data td.naam { display: block; font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; padding: 0 0 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
  table.data td.naam::before { display: none; }
  table.data td.email { word-break: break-all; }
  table.data td.acties-cel { display: block; padding: 10px 0 0; margin-top: 6px; border-top: 1px solid var(--line); white-space: normal; }
  table.data td.acties-cel::before { display: none; }
  table.data td.acties-cel .acties { gap: 10px; flex-wrap: wrap; }
  table.data td.acties-cel .btn-icon { width: 44px; height: 44px; border-radius: 12px; }
  table.data td.acties-cel .btn-icon svg { width: 20px; height: 20px; }
  table.data td .badge.pending { max-width: none; }
}

/* ===== Lijsten: zoeken, filters, paginering ===== */
.lijst-zoek { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 12px 14px; }
.zoekveld { position: relative; flex: 1 1 260px; display: flex; align-items: center; gap: 6px; }
.zoekveld .zoekicoon { position: absolute; left: 14px; color: var(--muted-2); display: grid; }
.zoekveld .zoekicoon svg { width: 18px; height: 18px; }
.zoekveld input[type="search"] { font: inherit; font-size: 1rem; min-height: 44px; padding: 0 12px 0 42px; border-radius: 12px; border: 1.5px solid #D9D2C8; background: #fff; color: var(--ink); width: 100%; -webkit-appearance: none; }
.zoekveld input:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(181,86,58,.15); }
.zoekveld .btn-icon { width: 44px; height: 44px; flex: none; }
.lijst-filter { display: grid; gap: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lijst-filter select { min-height: 44px; padding: 0 34px 0 12px; font-size: .95rem; border-radius: 12px; width: auto; }
.lijst-reset { width: 44px; height: 44px; }
.lijst-voet { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 14px; color: var(--muted); font-size: .92rem; }
.paginering { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.paginering .pag { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; font-weight: 600; color: var(--ink); text-decoration: none !important; border: 1.5px solid transparent; }
.paginering .pag:hover { border-color: var(--terra); color: var(--terra); }
.paginering .pag.actief { background: var(--terra); color: #fff; }
.paginering .dots { color: var(--muted-2); padding: 0 4px; }
.paginering .btn-icon.uit { opacity: .35; cursor: default; }
@media (max-width: 699px) {
  .lijst-zoek { padding: 0 0 12px; }
  .lijst-filter { flex: 1 1 40%; }
  .lijst-filter select { width: 100%; }
  .lijst-voet { padding: 4px 4px 0; }
  .panel-tabel .lijst-zoek + .table-wrap { margin-top: 0; }
}

/* Bevestigingsvenster */
dialog.bevestig { border: 0; border-radius: 20px; padding: 0; max-width: min(92vw, 440px); width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.3); background: #fff; color: var(--ink); }
dialog.bevestig::backdrop { background: rgba(26,23,20,.55); backdrop-filter: blur(3px); }
dialog.bevestig form { padding: 28px 26px 22px; display: grid; gap: 10px; justify-items: start; }
dialog.bevestig .bevestig-icoon { width: 52px; height: 52px; border-radius: 50%; background: #FBEDE9; color: #8A3A26; display: grid; place-items: center; }
dialog.bevestig .bevestig-icoon svg { width: 26px; height: 26px; }
dialog.bevestig h2 { font-size: 1.5rem; margin: 4px 0 0; }
dialog.bevestig p { color: var(--muted); line-height: 1.5; }
dialog.bevestig .form-acties { margin-top: 14px; width: 100%; }
.btn-rood { background: #8A3A26; color: #fff; }
.btn-rood:hover { background: #6F2C1C; }
@media (max-width: 480px) { dialog.bevestig .form-acties .btn { flex: 1 1 100%; } }

/* Sorteerbare kolomkoppen */
th.sorteerbaar .kop-sort { display: inline-flex; align-items: center; gap: 6px; }
th.sorteerbaar .pijlen { display: inline-grid; gap: 0; }
th.sorteerbaar .sort { display: grid; place-items: center; width: 18px; height: 11px; color: var(--muted-2); border-radius: 4px; }
th.sorteerbaar .sort svg { width: 14px; height: 14px; }
th.sorteerbaar .sort:hover { color: var(--terra); background: #fff; }
th.sorteerbaar .sort.actief { color: var(--terra); }
.lijst-sorteer { display: none; }
@media (max-width: 699px) { .lijst-sorteer { display: grid; } }

/* Keuzelijsten: eigen pijltje, iets verder van de rechterrand dan de standaardpijl van de browser */
select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23787572' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px 18px;
  padding-right: 44px !important;
}
select:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B5563A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
select::-ms-expand { display: none; }

/* Gebruikersmenu in de kop */
.gebruikersmenu { position: relative; }
.gebruikersmenu summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer; max-width: 60vw; }
.gebruikersmenu summary::-webkit-details-marker { display: none; }
.gebruikersmenu summary svg { width: 18px; height: 18px; color: var(--terra); flex: none; }
.gebruikersmenu summary .naam { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gebruikersmenu summary:hover, .gebruikersmenu[open] summary { border-color: var(--terra); }
.gebruikersmenu[open] summary svg:last-child { transform: rotate(180deg); }
.gebruikersmenu .menu-lijst { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 60; display: grid; }
.gebruikersmenu .menu-lijst a, .gebruikersmenu .menu-lijst button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); font: 600 .98rem var(--font-body); text-align: left; cursor: pointer; text-decoration: none !important; }
.gebruikersmenu .menu-lijst a:hover, .gebruikersmenu .menu-lijst button:hover { background: var(--paper-2); }
.gebruikersmenu .menu-lijst svg { width: 18px; height: 18px; color: var(--terra); }
.gebruikersmenu .menu-lijst form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
@media (max-width: 480px) { .gebruikersmenu summary .naam { display: none; } .gebruikersmenu summary { padding: 0 10px; } }

/* Instellingen: 2FA */
.tfa-opzet { display: grid; gap: 18px; margin-top: 16px; }
@media (min-width: 700px) { .tfa-opzet { grid-template-columns: 220px 1fr; align-items: start; } }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; width: 220px; }
.qr svg { width: 100%; height: auto; display: block; }
.sleutel { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; background: var(--paper-2); border-radius: 10px; padding: 10px 12px; word-break: break-all; font-size: .95rem; }
.herstelcodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0; }
.herstelcodes code { display: block; background: #fff; border: 1px dashed var(--sand); border-radius: 10px; padding: 10px 12px; font-size: 1.05rem; letter-spacing: .06em; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.status-rij { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.stappen-uitleg { margin: 12px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.6; }
.stappen-uitleg li + li { margin-top: 4px; }

/* Iconen in paneelkoppen */
.panel h1 svg, .panel h2 svg { width: 22px; height: 22px; vertical-align: -4px; color: var(--terra); margin-right: 6px; }

/* Rechten */
table.rechten { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.rechten th, table.rechten td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.rechten th { background: var(--paper-2); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
table.rechten th.kol-rol, table.rechten td.kol-rol { text-align: center; width: 110px; }
table.rechten tr.groep td { background: #fff; font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; padding-top: 18px; color: var(--ink); }
table.rechten .sleutel { display: block; color: var(--muted-2); font-size: .78rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
table.rechten input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--terra); vertical-align: middle; }
table.rechten .vast { color: var(--olive); display: inline-grid; place-items: center; }
table.rechten .vast svg { width: 22px; height: 22px; }
table.rechten select.afw { min-height: 40px; padding: 0 40px 0 10px !important; font-size: .92rem; width: auto; }
table.rechten td.effectief { white-space: nowrap; }
.badge.aan { background: #EEF3E8; color: #41532C; }
.badge.uit { background: var(--line); color: var(--muted); }
.badge.afw { background: var(--gold); color: var(--ink); }
.rechten-uitleg { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .9rem; margin-top: 10px; }
@media (max-width: 699px) {
  table.rechten thead { display: none; }
  table.rechten, table.rechten tbody, table.rechten tr, table.rechten td { display: block; width: 100%; }
  table.rechten tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.rechten tr.groep { border: 0; }
  table.rechten td { border: 0; padding: 4px 0; }
  table.rechten td.kol-rol { text-align: left; width: auto; display: flex; align-items: center; gap: 10px; }
  table.rechten td.kol-rol::before { content: attr(data-label); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; min-width: 90px; }
}

/* Meldingen */
.melding-body { white-space: pre-wrap; line-height: 1.65; margin-top: 14px; }
.bijlagen { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.bijlagen li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.bijlagen li a:hover { border-color: var(--terra); }
.bijlagen li a svg { width: 18px; height: 18px; color: var(--terra); flex: none; }
.bijlagen li a .naam { flex: 1; word-break: break-all; }
.bijlagen li a .grootte { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.upload-veld { border: 2px dashed var(--sand); border-radius: 14px; padding: 16px; background: var(--paper-2); }
.upload-veld input[type="file"] { width: 100%; font: inherit; }
.upload-veld .hint { display: block; margin-top: 8px; color: var(--muted); font-size: .88rem; font-weight: 400; }
#upload-lijst { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: .9rem; }
#upload-lijst li.te-groot { color: #8A3A26; font-weight: 600; }
textarea { font: inherit; font-size: 1.05rem; padding: 14px 16px; border-radius: 12px; border: 1.5px solid #D9D2C8; background: #fff; color: var(--ink); width: 100%; min-height: 180px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(181,86,58,.15); }
.meta-rij { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .95rem; margin-top: 10px; }
.badge.concept { background: var(--gold); color: var(--ink); }
.badge.publiek { background: #EEF3E8; color: #41532C; }
tr.concept td { background: #FFF8EC; }
.meta-rij span { display: inline-flex; align-items: center; gap: 6px; }
.meta-rij svg { width: 16px; height: 16px; color: var(--terra); flex: none; }
.badge svg { width: 12px; height: 12px; vertical-align: -2px; }

/* Status en doorzetten bij een melding */
.badge.status-badge { background: var(--ink-2); color: #fff; }
.beheer-rij { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: end; margin-top: 22px; padding: 16px; background: var(--paper-2); border-radius: 14px; }
.beheer-rij form { margin: 0; }
.beheer-rij .status-form label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: grid; gap: 6px; }
.beheer-rij .status-form select { min-height: 44px; font-size: .98rem; width: auto; min-width: 200px; }
.beheer-rij form { max-width: 100%; min-width: 0; }
.beheer-rij .btn { white-space: normal; text-align: left; max-width: 100%; }
@media (max-width: 480px) { .beheer-rij { flex-direction: column; align-items: stretch; } .beheer-rij .status-form select { width: 100%; } .beheer-rij .btn { width: 100%; justify-content: center; text-align: center; } }

/* E-mailvoorkeuren */
.notif-lijst { display: grid; gap: 10px; }
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.notif:has(input:checked) { border-color: var(--terra); background: #fff; }
.notif input { width: 22px; height: 22px; accent-color: var(--terra); margin-top: 2px; flex: none; }
.notif .hint { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.uitleg-details { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.uitleg-details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.uitleg-details ul { margin: 10px 0 6px; padding-left: 20px; line-height: 1.6; }

/* Berichten: envelop naast de naam, leesstatus */
.envelop { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--terra); background: #fff; color: var(--terra); margin-right: 8px; text-decoration: none !important; }
.envelop svg { width: 20px; height: 20px; }
.envelop .teller { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--terra); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.envelop:hover { background: var(--terra); color: #fff; }
.portal-body .site-header .wrap { gap: 8px; }
.portal-body .brand { flex: 1; min-width: 0; }
tr.ongelezen td.naam a, td.naam a.ongelezen { font-weight: 700; }
.badge.nieuw { background: var(--terra); color: #fff; }
.badge.verlopen { background: var(--line); color: var(--muted); }
.lees-kolommen { display: grid; gap: 18px; margin-top: 14px; }
@media (min-width: 700px) { .lees-kolommen { grid-template-columns: 1fr 1fr; } }
.lees-lijst { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.lees-lijst li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; }
.lees-lijst li span:last-child { color: var(--muted); white-space: nowrap; }
.lees-lijst li.leeg { color: var(--muted-2); border-style: dashed; }
.voortgang { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.voortgang i { display: block; height: 100%; background: var(--olive); }
input[type="datetime-local"] { font: inherit; font-size: 1.05rem; padding: 12px 16px; border-radius: 12px; border: 1.5px solid #D9D2C8; background: #fff; color: var(--ink); min-height: 52px; width: 100%; }
input[type="datetime-local"]:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(181,86,58,.15); }
.bijlagen li form { display: inline; }
.bijlagen li.bewerkbaar { display: flex; align-items: center; gap: 8px; }
.bijlagen li.bewerkbaar a { flex: 1; }

/* Ontvangers kiezen bij een bericht */
#ontvangers-blok > label { font-weight: 700; font-size: .95rem; }
#ontvangers-blok.fout .selectie { border-color: #B5563A; }
.selectie { margin-top: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.selectie-kop { padding: 12px; background: var(--paper-2); display: grid; gap: 10px; }
.selectie-kop .zoekveld { flex: none; }
.selectie-knoppen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.selectie-knoppen .hint { margin-left: auto; color: var(--muted); font-size: .88rem; font-weight: 600; }
.ontvangers { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; display: grid; gap: 2px; }
.ontvangers li[hidden] { display: none; }
.ontvangers label { display: grid; grid-template-columns: 24px 1fr; grid-template-areas: "box naam" "box detail"; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 400; }
.ontvangers label:hover { background: var(--paper-2); }
.ontvangers label:has(input:checked) { background: #FBEDE9; }
.ontvangers input { grid-area: box; width: 20px; height: 20px; accent-color: var(--terra); }
.ontvangers .o-naam { grid-area: naam; font-weight: 600; }
.ontvangers .o-detail { grid-area: detail; color: var(--muted); font-size: .85rem; word-break: break-all; }
#geen-treffers { padding: 10px 14px 14px; color: var(--muted); }

/* Aanvullingen bij een melding: tijdlijn */
.tijdlijn { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; position: relative; }
.tijdlijn li { position: relative; padding: 14px 16px 14px 28px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tijdlijn li::before { content: ""; position: absolute; left: 11px; top: 20px; width: 10px; height: 10px; border-radius: 50%; background: var(--terra); }
.tijdlijn li.intern { background: #FFF8EC; border-color: #F1DDB3; }
.tijdlijn li.intern::before { background: var(--gold); }
.tijdlijn-kop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .92rem; color: var(--muted); }
.tijdlijn-kop .tijd { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.tijdlijn-kop .tijd svg { width: 15px; height: 15px; color: var(--terra); }
.tijdlijn-kop .door { font-weight: 600; }
.tijdlijn-kop .tijdlijn-weg { margin-left: auto; }
.tijdlijn .bijlagen { margin-top: 10px; }
.tijdlijn .melding-body { font-size: .98rem; }
.aanvul-form { margin-top: 18px; padding: 16px; background: var(--paper-2); border-radius: 14px; }
.aanvul-form h3 { font-size: 1.1rem; margin-bottom: 4px; }
.aanvul-form .form-grid { margin-top: 10px; }
.aanvul-form textarea { min-height: 110px; }

/* Fotobijlagen als thumbnails */
.fotos { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fotos li a { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; text-decoration: none !important; color: var(--muted); transition: transform .15s, box-shadow .15s; }
.fotos li a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--terra); }
.fotos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-2); }
.fotos .foto-naam { display: block; padding: 6px 8px; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fotos + .bijlagen { margin-top: 10px; }
@media (max-width: 480px) { .fotos { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox voor foto's */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; display: none; }
dialog.lightbox[open] { display: grid; place-items: center; }
dialog.lightbox::backdrop { background: rgba(26,23,20,.88); backdrop-filter: blur(2px); }
dialog.lightbox figure { margin: 0; display: grid; gap: 10px; max-width: min(96vw, 1400px); max-height: 96vh; }
dialog.lightbox img { display: block; max-width: 96vw; max-height: calc(96vh - 70px); width: auto; height: auto; object-fit: contain; border-radius: 10px; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
dialog.lightbox figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #D5D5D4; font-size: .92rem; padding: 0 2px; }
dialog.lightbox figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.lightbox .btn { flex: none; }
.lb-sluit { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: rgba(26,23,20,.55); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.lb-sluit svg { width: 24px; height: 24px; }
.lb-sluit:hover { background: #fff; color: var(--ink); }
@media (max-width: 480px) { dialog.lightbox figcaption { flex-direction: column; align-items: stretch; } dialog.lightbox figcaption span { text-align: center; } }

/* ===== Prikbord ===== */
.prikbord-panel { background: transparent; box-shadow: none; padding: 0; }
.prikbord-panel .lijst-zoek { padding: 0 0 12px; }
.prikbord { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .prikbord { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .prikbord { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 480px) { .prikbord { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.tegel { position: relative; background: var(--tegel-bg); color: var(--tegel-fg); border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.10); transition: transform .15s, box-shadow .15s; }
.tegel:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 16px 36px rgba(0,0,0,.16); }
.tegel .tegel-link { display: block; padding: 22px 18px 16px; color: inherit; text-decoration: none !important; min-height: 150px; }
.tegel h3 { font-family: var(--font-head); font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.25; font-weight: 600; margin: 0 0 14px; padding-right: 30px; overflow-wrap: anywhere; }
.tegel-voet { display: grid; gap: 4px; font-size: .82rem; opacity: .85; }
.tegel-door { font-weight: 700; }
.tegel-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tegel-meta svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.tegel-reacties { background: var(--terra); color: #fff; border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.tegel-fav { position: absolute; top: 10px; right: 10px; margin: 0; z-index: 1; }
.ster { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35); color: var(--tegel-fg); display: grid; place-items: center; cursor: pointer; }
.ster svg { width: 20px; height: 20px; }
.ster:hover { background: rgba(255,255,255,.6); }
.ster.aan { background: var(--gold); color: var(--ink); }
.ster.groot { width: 48px; height: 48px; background: rgba(255,255,255,.4); }
.ster.groot.aan { background: var(--gold); }
.ster.groot svg { width: 26px; height: 26px; }
.tegel-detail { background: var(--tegel-bg); color: var(--tegel-fg); }
.tegel-detail h1 { color: var(--tegel-fg); }
.tegel-detail .meta-rij svg { color: var(--tegel-fg); }
.tegel-detail-kop { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.tegel-detail-kop form { margin: 0; flex: none; }
.kleuren { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.kleur { display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: .78rem; color: var(--muted); font-weight: 600; }
.kleur input { position: absolute; opacity: 0; width: 0; height: 0; }
.kleur .staal { width: 46px; height: 46px; border-radius: 14px; background: var(--kbg); color: var(--kfg); border: 2px solid rgba(0,0,0,.08); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.kleur .staal svg { width: 22px; height: 22px; opacity: 0; }
.kleur:has(input:checked) .staal { outline: 3px solid var(--terra); outline-offset: 2px; }
.kleur:has(input:checked) .staal svg { opacity: 1; }
.kleur:has(input:checked) .kleur-naam { color: var(--ink); }
.tijdlijn li.nieuw { border-color: var(--terra); }
.tijdlijn li.nieuw::before { background: var(--terra); box-shadow: 0 0 0 4px rgba(181,86,58,.2); }

/* Iconen in labels en losse tekst: altijd een vaste, kleine maat */
label > svg, .lead > svg, p > svg, h3 > svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--terra); margin-right: 4px; }
.kleur .staal svg { width: 22px; height: 22px; margin: 0; color: var(--kfg); }
label:has(> svg):not(:has(input, select, textarea)) { display: flex; align-items: center; gap: 6px; }

/* Tellers bij menu-items */
.menu-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--terra); color: #fff; font-size: .74rem; font-weight: 700; font-style: normal; line-height: 1; margin-left: 4px; }
.portal-menu a.active .menu-badge { background: #fff; color: var(--terra); }
@media (min-width: 900px) { .portal-menu a .menu-badge { margin-left: auto; } .portal-menu a em + .menu-badge { margin-left: 8px; } }

/* Gesprekken op een tegel */
.gesprek { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.gesprek + .gesprek { margin-top: 14px; }
.gesprek h3 { font-size: 1.05rem; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.gesprek h3 small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.gesprek .tijdlijn { margin-top: 6px; }
.gesprek .tijdlijn li.van-maker { background: var(--paper-2); }
.gesprek .antwoord-form { margin-top: 10px; padding: 12px; }
.gesprek .antwoord-form textarea { min-height: 80px; }

/* Teller op het icoon van een overzichtstegel */
.card .icon { position: relative; }
.icon-teller { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink-2); color: #fff; font-size: .74rem; font-weight: 700; font-style: normal; display: grid; place-items: center; border: 2px solid #fff; }
.card h3 .badge { vertical-align: middle; }

/* Lijst wordt op de achtergrond ververst */
.panel-tabel.laadt .table-wrap, .panel-tabel.laadt .prikbord, .panel-tabel.laadt .lijst-voet { opacity: .55; transition: opacity .15s; }
.panel-tabel.laadt .zoekveld .zoekicoon { animation: zoek-puls .8s ease-in-out infinite; }
@keyframes zoek-puls { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Vangnet: elk icoon uit portal_icon() heeft een standaardgrootte; specifiekere regels (knoppen, menu, tegels) gaan voor. */
svg.ico { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }

/* ---------- Agenda ---------- */
.agenda-balk { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 16px; }
.agenda-tabs { display: flex; gap: 2px; background: var(--paper-2); padding: 4px; border-radius: 999px; }
.agenda-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--muted); text-decoration: none; }
.agenda-tabs a svg { width: 16px; height: 16px; }
.agenda-tabs a:hover { color: var(--ink); text-decoration: none; }
.agenda-tabs a.actief { background: var(--terra); color: #fff; }
.agenda-nav { display: flex; align-items: center; gap: 8px; }
.agenda-nav h2 { margin: 0; font-size: 1.1rem; min-width: 150px; text-align: center; }
.agenda-nav h2::first-letter { text-transform: uppercase; }
.agenda-maand { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 16px; }
.agenda-maand .dagkop { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; padding: 6px 0; font-weight: 700; }
.agenda-dag { position: relative; min-height: 104px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; min-width: 0; }
.agenda-dag.ander { background: var(--paper-2); }
.agenda-dag.ander .dagnr { color: var(--muted-2); }
.agenda-dag.vandaag { border-color: var(--terra); box-shadow: inset 0 0 0 1px var(--terra); }
.agenda-dag .dagnr { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 999px; font-weight: 700; font-size: .85rem; color: var(--ink); text-decoration: none; margin-bottom: 4px; }
.agenda-dag .dagnr:hover { background: var(--paper-2); text-decoration: none; }
.agenda-dag.vandaag .dagnr { background: var(--terra); color: #fff; }
.agenda-aantal { display: none; }
.agenda-item { display: block; font-size: .78rem; line-height: 1.3; padding: 3px 6px; border-radius: 6px; background: rgba(181,86,58,.10); border-left: 3px solid var(--terra); color: var(--ink); text-decoration: none; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.agenda-item:hover { background: rgba(181,86,58,.18); text-decoration: none; }
.agenda-item .tijd { color: var(--terra-dark); font-weight: 700; margin-right: 4px; }
.agenda-item.nieuw { font-weight: 700; }
.agenda-item.nieuw::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--terra); margin-right: 5px; vertical-align: middle; }
.agenda-item.selectie { background: rgba(95,107,71,.12); border-left-color: var(--olive); }
.agenda-item.selectie .tijd { color: var(--olive); }
.agenda-meer { display: block; font-size: .75rem; color: var(--muted); margin-top: 3px; }
.agenda-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.agenda-week .wdag { border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 180px; background: #fff; min-width: 0; }
.agenda-week .wdag.vandaag { border-color: var(--terra); box-shadow: inset 0 0 0 1px var(--terra); }
.agenda-week .wdag h3 { font-size: .9rem; margin: 0 0 8px; }
.agenda-week .wdag h3 a { color: inherit; text-decoration: none; }
.agenda-week .wdag.vandaag h3 a { color: var(--terra); }
.agenda-week .agenda-item { white-space: normal; }
.agenda-geen { color: var(--muted-2); }
.agenda-daglijst { display: grid; gap: 10px; margin-top: 16px; }
.agenda-kaart { display: flex; gap: 16px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: inherit; }
.agenda-kaart:hover { border-color: var(--terra); text-decoration: none; }
.agenda-kaart.nieuw { border-left: 4px solid var(--terra); }
.agenda-kaart .wanneer { flex: none; min-width: 96px; font-weight: 700; color: var(--terra); padding-top: 2px; }
.agenda-kaart .inhoud { min-width: 0; }
.agenda-kaart h3 { margin: 0 0 4px; font-size: 1.05rem; }
.agenda-kaart p { margin: 0; color: var(--muted); font-size: .92rem; display: flex; align-items: center; gap: 6px; }
.agenda-kaart p svg { width: 15px; height: 15px; color: var(--terra); }
.agenda-leeg { color: var(--muted); padding: 28px 0; text-align: center; }
.agenda-meta svg { width: 16px; height: 16px; }
.form-grid label.vink { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-grid label.vink input { width: 20px; height: 20px; accent-color: var(--terra); }
.form-grid label.vink small { flex-basis: 100%; }
@media (max-width: 700px) {
  .agenda-balk { align-items: stretch; }
  .agenda-tabs { justify-content: space-between; }
  .agenda-tabs a { padding: 8px 10px; flex: 1; justify-content: center; }
  .agenda-tabs a span { display: none; }
  .agenda-nav { justify-content: space-between; }
  .agenda-nav h2 { flex: 1 1 0; min-width: 0; font-size: .98rem; }
  .agenda-nav .btn { flex: none; }
  .agenda-maand { gap: 2px; }
  .agenda-dag { min-height: 58px; padding: 4px; }
  .agenda-dag .dagnr { position: relative; z-index: 1; }
  .agenda-dag .agenda-item, .agenda-dag .agenda-meer { display: none; }
  .agenda-dag .agenda-aantal { display: inline-block; position: absolute; right: 5px; bottom: 5px; min-width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 999px; background: rgba(181,86,58,.15); color: var(--terra-dark); font-size: .72rem; font-weight: 700; }
  .agenda-dag .agenda-aantal.nieuw { background: var(--terra); color: #fff; }
  .agenda-dag .dagnr::after { content: ''; position: absolute; inset: -4px; }
  .agenda-week { grid-template-columns: 1fr; }
  .agenda-week .wdag { min-height: 0; }
  .agenda-kaart { flex-direction: column; gap: 6px; }
  .agenda-kaart .wanneer { min-width: 0; }
}

/* ---------- Nieuws ---------- */
.nieuws-rooster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.nieuws-kaart { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.nieuws-kaart:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.12); }
.nieuws-kaart.verlopen { opacity: .72; }
.nieuws-kaart.uitgelicht { grid-column: 1 / -1; flex-direction: row; }
.nieuws-kaart.uitgelicht .nieuws-foto { flex: 0 0 55%; aspect-ratio: auto; min-height: 320px; }
.nieuws-kaart.uitgelicht .nieuws-tekst { padding: 28px 30px; }
.nieuws-kaart.uitgelicht h2 { font-size: 1.7rem; }
.nieuws-kaart.uitgelicht p { font-size: 1.02rem; }
.nieuws-foto { position: relative; display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #F3EDE4, #E6DCCF); overflow: hidden; }
.nieuws-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.nieuws-kaart:hover .nieuws-foto img { transform: scale(1.04); }
.nieuws-geenfoto { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sand); }
.nieuws-geenfoto svg { width: 56px; height: 56px; opacity: .7; }
.nieuws-label { position: absolute; top: 12px; left: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.nieuws-tekst { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 16px; min-width: 0; flex: 1; }
.nieuws-datum { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terra); }
.nieuws-datum::first-letter { text-transform: uppercase; }
.nieuws-kaart h2 { margin: 0; font-size: 1.2rem; line-height: 1.25; }
.nieuws-kaart h2 a { color: var(--ink); text-decoration: none; }
.nieuws-kaart h2 a:hover { color: var(--terra); }
.nieuws-kaart p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; flex: 1; }
.nieuws-voet { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.nieuws-meer { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--terra); text-decoration: none; }
.nieuws-meer svg { width: 16px; height: 16px; transition: transform .15s; }
.nieuws-meer:hover svg { transform: translateX(3px); }
.nieuws-meta { display: inline-flex; gap: 12px; color: var(--muted); font-size: .85rem; margin-left: auto; }
.nieuws-meta span { display: inline-flex; align-items: center; gap: 4px; }
.nieuws-meta svg { width: 15px; height: 15px; }
.nieuws-voet .acties { display: inline-flex; gap: 4px; }
.nieuws-artikel { padding-top: 0; overflow: hidden; }
.nieuws-artikel > .eyebrow { margin-top: 22px; }
.nieuws-kop { display: block; margin: 0 calc(-1 * clamp(22px, 4vw, 36px)) 8px; max-height: 460px; overflow: hidden; background: var(--paper-2); }
.nieuws-kop img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; display: block; }
.nieuws-body { font-size: 1.05rem; line-height: 1.7; max-width: 72ch; }
.stat-tegels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--paper-2); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 1.8rem; line-height: 1.1; color: var(--terra); font-family: inherit; }
.stat span { color: var(--muted); font-size: .85rem; }
.staafjes { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 0 22px; position: relative; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.staaf { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 0; }
.staaf i { display: block; background: var(--terra); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .85; }
.staaf:hover i { opacity: 1; }
.staaf span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap; margin-top: 4px; }
@media (max-width: 1000px) { .nieuws-rooster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .nieuws-rooster { grid-template-columns: 1fr; gap: 14px; }
  .nieuws-kaart.uitgelicht { flex-direction: column; }
  .nieuws-kaart.uitgelicht .nieuws-foto { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .nieuws-kaart.uitgelicht .nieuws-tekst { padding: 18px 20px 16px; }
  .nieuws-kaart.uitgelicht h2 { font-size: 1.3rem; }
  .nieuws-kop { max-height: 260px; }
  .nieuws-kop img { max-height: 260px; }
  .staafjes { height: 90px; }
  .stat-tegels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat b { font-size: 1.5rem; }
}
