/* Keeo+ — eigen ontwerp in de geest van een modern ledenbeheer-dashboard:
   zijbalk links, rustige witte werkruimte, één blauwe accentkleur. */
:root {
  --primary: #0053ff;
  --primary-hover: #0044d6;
  --primary-soft: #eaf0ff;
  --primary-soft-2: #d6e3ff;
  --ink: #0f1729;
  --ink-2: #3b4557;
  --muted: #6b7486;
  --faint: #9aa2b1;
  --line: #e7e9ee;
  --line-strong: #d7dbe3;
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --bg-3: #eef0f4;
  --success: #0e9f6e;
  --success-soft: #e3f7ef;
  --warning: #c27803;
  --warning-soft: #fff6e0;
  --danger: #e02424;
  --danger-soft: #fdecec;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 41, .06);
  --shadow: 0 4px 16px rgba(15, 23, 41, .08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 41, .18);
  --sidebar: 264px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.icon { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.icon.sm { width: 16px; height: 16px; }
svg.icon.lg { width: 24px; height: 24px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- knoppen & velden ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--bg-3); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--line); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.secondary { background: var(--bg); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--bg-2); }
.btn.ghost { background: transparent; color: var(--primary); padding: 0 10px; }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.danger:hover { background: #fbd5d5; }
.btn.icon-only { width: 38px; padding: 0; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.sm.icon-only { width: 32px; }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); outline: none; transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { display: block; margin-top: 4px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search .input { padding-left: 36px; }
.wachtwoord-veld { position: relative; }
.wachtwoord-veld .input { padding-right: 40px; }
.wachtwoord-toggle { position: absolute; right: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--faint); cursor: pointer; }
.wachtwoord-toggle:hover { color: var(--ink-2); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--bg-3); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.blue { background: var(--primary-soft); color: var(--primary); }
.pill.green { background: var(--success-soft); color: var(--success); }
.pill.orange { background: var(--warning-soft); color: var(--warning); }
.pill.red { background: var(--danger-soft); color: var(--danger); }
.pill.purple { background: #7c3aed1f; color: #7c3aed; }
.muted { color: var(--muted); }
.error-text { color: var(--danger); font-size: 13px; min-height: 18px; margin: 6px 0 0; }

/* ---------- aanmelden ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; background: var(--bg-2); }
.login-box { width: min(400px, 100%); padding: 32px; border-radius: 16px; background: var(--bg); box-shadow: var(--shadow); }
.login-box h1 { margin: 18px 0 4px; font-size: 24px; letter-spacing: -.3px; }
.login-box p { margin: 0 0 22px; color: var(--muted); }
.login-box .btn { width: 100%; height: 44px; margin-top: 6px; }
.logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--primary); color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -.5px; }

/* ---------- app-indeling ---------- */
.app { display: flex; min-height: 100%; }
.sidebar { position: sticky; top: 0; flex: 0 0 var(--sidebar); height: 100vh; height: 100dvh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg-2); }
.sidebar-head { display: flex; align-items: center; gap: 11px; padding: 18px 18px 12px; }
.sidebar-head strong { display: block; font-size: 15px; line-height: 1.2; }
.sidebar-head small { color: var(--muted); font-size: 12px; }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px 16px; }
.nav-label { margin: 18px 10px 6px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-2); font-weight: 500; text-align: left; cursor: pointer; text-decoration: none !important; }
.nav-item:hover { background: var(--bg-3); color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item .count { margin-left: auto; color: var(--faint); font-size: 12px; font-weight: 600; }
.nav-item.active .count { color: var(--primary); }
.nav-item .badge-dot { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nav-sub { margin: 2px 0 4px 21px; padding-left: 10px; border-left: 1px solid var(--line-strong); }
.nav-sub .nav-item { height: 34px; font-size: 13.5px; }
.nav-sub-label { margin: 10px 10px 2px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tak-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.sidebar-foot { padding: 10px; border-top: 1px solid var(--line); }
.me-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; text-align: left; cursor: pointer; }
.me-button:hover { background: var(--bg-3); }
.me-button strong { display: block; font-size: 13.5px; line-height: 1.25; }
.me-button small { color: var(--muted); font-size: 12px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.main { flex: 1; min-width: 0; }
.ev-editor { flex: 1; display: grid; grid-template-columns: minmax(320px, 440px) 1fr; min-height: 0; }
.ev-editor-voorbeeld { background: #e9edf3; display: flex; flex-direction: column; min-height: 0; }
@media (max-width: 820px) { .ev-editor { grid-template-columns: 1fr; } .ev-editor-voorbeeld { display: none; } }
.mail-html { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 12px; }
.mail-link { text-decoration: none; font-size: 12px; }
.testbalk { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #fff6e0; border-bottom: 1px solid #f3d38a; color: #7a4d00; font-size: 13.5px; }
.testbalk strong { color: #5c3a00; }
.testbalk .spacer { flex: 1; }
.page { max-width: 1180px; margin: 0 auto; padding: 32px 40px 110px; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.5px; font-weight: 700; }
.page-head p { margin: 5px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-top { display: none; }
.tabbar { display: none; }

/* ---------- kaarten, lijsten ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.card-pad { padding: 18px 20px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 30px 0 10px; }
.section-title h2 { margin: 0; font-size: 17px; letter-spacing: -.2px; }
.list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; text-decoration: none !important; color: inherit; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--bg-2); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row strong { display: block; font-weight: 600; }
.list-row small { display: block; color: var(--muted); font-size: 13px; }
.list-row > .icon:last-child { color: var(--faint); }
.list-row.static { cursor: default; }
.list-row.static:hover { background: none; }
.row-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.row-icon.orange { background: var(--warning-soft); color: var(--warning); }
.row-icon.green { background: var(--success-soft); color: var(--success); }
.row-icon.red { background: var(--danger-soft); color: var(--danger); }
.row-icon.gray { background: var(--bg-3); color: var(--ink-2); }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty .row-icon { margin: 0 auto 12px; width: 48px; height: 48px; }
.empty h3 { margin: 0 0 4px; color: var(--ink); font-size: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stat { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: inherit; text-decoration: none !important; transition: border-color .12s, box-shadow .12s; }
a.stat:hover { border-color: var(--primary-soft-2); box-shadow: var(--shadow-sm); }
.stat-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-value { margin-top: 6px; font-size: 28px; font-weight: 700; letter-spacing: -.6px; line-height: 1.1; }
.stat-sub { margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.meter { height: 6px; margin-top: 10px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 99px; background: var(--primary); transition: width .25s; }

/* ---------- toolbar & tabel ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .search { flex: 1 1 260px; max-width: 380px; }
.toolbar .spacer { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.chip button:hover { background: var(--primary-soft-2); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--bg); max-height: calc(100vh - 230px); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { position: sticky; top: 0; z-index: 1; height: 42px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; user-select: none; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--ink); }
.table th .sort { display: inline-flex; vertical-align: middle; margin-left: 2px; color: var(--primary); }
.table td { height: 48px; padding: 6px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--bg-2); }
.table tbody tr.selected td { background: var(--primary-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-check { width: 44px; padding-right: 0; }
.table .name-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.table .name-cell .avatar { width: 28px; height: 28px; font-size: 11px; }
.table .num { text-align: right; }
.table-foot { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 13px; }
.selection-bar { position: fixed; left: calc(var(--sidebar) + (100vw - var(--sidebar)) / 2); bottom: 22px; z-index: 30; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); animation: omhoog .16s ease-out; }
.selection-bar strong { margin-right: 8px; white-space: nowrap; }
.selection-bar .btn { background: rgba(255,255,255,.1); color: #fff; }
.selection-bar .btn:hover { background: rgba(255,255,255,.2); }
.selection-bar .btn.danger { background: rgba(224,36,36,.25); }
@keyframes omhoog { from { transform: translate(-50%, 12px); opacity: 0; } }
.member-cards { display: none; }

/* ---------- menu (popover) ---------- */
.popover { position: fixed; z-index: 60; min-width: 220px; max-width: 320px; max-height: 70vh; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow-lg); animation: verschijn .12s ease-out; }
@keyframes verschijn { from { opacity: 0; transform: translateY(-4px); } }
.popover-title { padding: 8px 10px 4px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--bg-2); }
.menu-item.danger { color: var(--danger); }
.menu-item .check { width: 100%; }
.menu-sep { height: 1px; margin: 5px 0; background: var(--line); }

/* ---------- sheet (ledenfiche) & dialogen ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 41, .32); animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(620px, 100vw); display: flex; flex-direction: column; background: var(--bg); box-shadow: var(--shadow-lg); animation: schuif .2s cubic-bezier(.2,.8,.2,1); }
@keyframes schuif { from { transform: translateX(40px); opacity: .4; } }
.sheet-bar { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.sheet-bar .spacer { flex: 1; }
.sheet-body { flex: 1; overflow-y: auto; padding: 22px 26px 40px; }
.sheet-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.sheet-hero h2 { margin: 0; font-size: 22px; letter-spacing: -.3px; line-height: 1.2; }
.sheet-hero .pills { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; margin: 0 -26px 20px; padding: 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab { position: relative; height: 42px; padding: 0 12px; border: 0; background: none; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); }
.tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.tab .pill { margin-left: 4px; height: 19px; font-size: 11px; }
.detail-block { margin-bottom: 22px; }
.detail-block h3 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.detail-list { border: 1px solid var(--line); border-radius: var(--radius); }
.detail-row { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 12px; min-height: 46px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { color: var(--muted); font-size: 13px; }
.detail-row dd { margin: 0; overflow-wrap: anywhere; }
.detail-row .btn { opacity: 0; }
.detail-row:hover .btn { opacity: 1; }
.hint { display: flex; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg-2); color: var(--muted); font-size: 13px; }
.hint.warning { background: var(--warning-soft); color: #8a5a00; }
.hint.info { background: var(--primary-soft); color: #1d3f91; }
.hint .icon { margin-top: 1px; }
.dialog { position: fixed; top: 50%; left: 50%; z-index: 51; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; transform: translate(-50%, -50%); border-radius: 14px; background: var(--bg); box-shadow: var(--shadow-lg); animation: dialoog .16s ease-out; }
.dialog.wide { width: min(700px, calc(100vw - 24px)); }
@keyframes dialoog { from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)); } }
.dialog-overlay { z-index: 50; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 0; }
.dialog-head h2 { margin: 0; font-size: 19px; letter-spacing: -.2px; }
.dialog-body { padding: 16px 20px; overflow-y: auto; }
.dialog-body p { margin-top: 0; color: var(--ink-2); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 11px 14px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); animation: verschijn .15s ease-out; }
.toast.error { background: var(--danger); }
.toast.success .icon { color: #6ee7b7; }

/* ---------- tijdlijn (logboek, geschiedenis, notities) ---------- */
.timeline-day { margin: 22px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.timeline-day:first-child { margin-top: 0; }
.log-row { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-row .row-icon { width: 34px; height: 34px; border-radius: 9px; }
.log-row .grow { flex: 1; min-width: 0; }
.log-row p { margin: 0; }
.log-row time { color: var(--muted); font-size: 12.5px; }
.log-icoon { position: relative; flex: 0 0 auto; align-self: flex-start; }
.log-teken { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); color: var(--ink-2); box-shadow: 0 0 0 2px var(--bg); }
.log-teken svg.icon.sm { width: 12px; height: 12px; stroke-width: 2.4; }
.log-teken.green { background: var(--success); color: #fff; }
.log-teken.red { background: var(--danger); color: #fff; }
.log-teken:not(.green):not(.red) { background: var(--bg-3); }
.log-tijd { display: block; color: var(--primary) !important; font-size: 11px !important; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.log-titel { font-weight: 500; }
.log-titel a, .log-door u, .log-titel u { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.log-door { color: var(--muted); font-size: 13px; }
.log-regels { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.log-regel { padding: 1px 0; }
.log-regel del { color: var(--danger); }
.log-regel ins { color: var(--success); text-decoration: none; font-weight: 500; }
.log-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.log-filters .field { margin-bottom: 0; }
.log-snel { margin: 8px 0 14px; color: var(--muted); font-size: 13px; }
.link-knop { border: 0; background: none; padding: 0 4px; color: var(--ink); font-weight: 600; cursor: pointer; }
.link-knop:hover { color: var(--primary); }
.link-knop.actief { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) { .log-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.diff { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-2); font-size: 13px; }
.diff div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 2px 0; }
.diff del { color: var(--danger); text-decoration: line-through; }
.diff ins { color: var(--success); text-decoration: none; }
.note { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--muted); font-size: 12.5px; }
.note-head strong { color: var(--ink); font-size: 13px; }
.note-head .btn { margin-left: auto; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- aanwezigheden ---------- */
.att-toolbar { display: grid; grid-template-columns: 170px 180px 1fr auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.att-summary { display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 14px; }
.att-summary .stat-value { margin: 0; }
.att-summary .grow { flex: 1; }
.att-group-head { display: flex; justify-content: space-between; padding: 10px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.att-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.att-row:last-child { border-bottom: 0; }
.att-row:hover { background: var(--bg-2); }
.att-row input { width: 20px; height: 20px; accent-color: var(--success); cursor: pointer; }
.att-row .grow { flex: 1; font-weight: 500; }
.att-row:has(input:checked) { background: #f3fbf7; }
.att-savebar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); }
.att-savebar .grow { flex: 1; }
.day-cards { display: flex; flex-wrap: wrap; gap: 8px; }
.day-card { min-width: 150px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.day-card b { display: block; }
.day-card span { color: var(--muted); font-size: 12.5px; }
.day-card .actions { display: flex; gap: 4px; margin-top: 6px; }
.day-card.off { opacity: .6; background: var(--bg-2); }
.day-card.off b { text-decoration: line-through; }
.day-card.current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.day-history { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.day-history div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
.day-history .ja { color: var(--success); }
.day-history .nee { color: var(--danger); }
.day-history .uit { opacity: .5; }

/* ---------- badges ---------- */
.badge-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 999px; background: #fff4d6; color: #7a5200; font-size: 13px; font-weight: 600; }
.badge-chip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.badge-chip button:hover { background: rgba(0,0,0,.08); }
.badge-member { display: grid; grid-template-columns: minmax(180px, 240px) 1fr minmax(220px, 300px); align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.badge-member:last-child { border-bottom: 0; }
.inline-form { display: flex; gap: 6px; }

/* ---------- mails ---------- */
.mail-layout { display: grid; grid-template-columns: 340px 1fr; min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.mail-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 220px); }
.mail-row { display: flex; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.mail-row:hover { background: var(--bg-2); }
.mail-row.active { background: var(--primary-soft); }
.mail-row .grow { flex: 1; min-width: 0; }
.mail-row .top { display: flex; justify-content: space-between; gap: 8px; }
.mail-row strong, .mail-row .subject, .mail-row .snippet { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row strong { font-weight: 500; }
.mail-row.unread strong, .mail-row.unread .subject { font-weight: 700; }
.mail-row time { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.mail-row .snippet { color: var(--muted); font-size: 13px; }
.mail-detail { padding: 24px 28px; overflow-y: auto; max-height: calc(100vh - 220px); }
.mail-detail h2 { margin: 0 0 16px; font-size: 21px; letter-spacing: -.3px; }
.mail-from { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mail-from .grow { flex: 1; min-width: 0; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.mail-images { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.mail-images img { max-width: 200px; max-height: 200px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; cursor: zoom-in; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.mail-back { display: none; }

/* ---------- accounts ---------- */
.role-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.role-toggle { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500; user-select: none; }
.role-toggle input { display: none; }
.role-toggle:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- bericht opstellen: Van / Aan ---------- */
.mail-kop { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.mail-regel { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 4px 12px; border-bottom: 1px solid var(--line); }
.mail-kop > :last-child { border-bottom: 0; }
.mail-label { width: 44px; flex: 0 0 auto; color: var(--muted); }
.mail-regel .select { flex: 1; min-width: 0; border-color: transparent; background-color: transparent; padding-left: 0; }
.mail-regel .select:hover, .mail-regel .select:focus { border-color: var(--line-strong); padding-left: 8px; }
.aan-knop { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 8px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.aan-knop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aan-knop[aria-expanded="true"] svg { transform: rotate(180deg); }
.aan-paneel { display: grid; gap: 14px; padding: 14px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.aan-kop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.aan-kop .btn { margin-left: auto; }

/* ---------- webshops en boekhouding: lijst met opties ---------- */
.shop-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.shop-zij { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--line); padding: 28px 12px; }
.shop-zij h1 { font-size: 24px; margin: 0 10px 16px; letter-spacing: -.3px; }
.shop-zij-link, .shop-zij-knop { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font-weight: 600; text-align: left; cursor: pointer; }
.shop-zij-link > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-zij-link:hover, .shop-zij-knop:hover { background: var(--bg-3); text-decoration: none; }
.shop-zij-link.active { background: var(--line-strong); }
.shop-zij-knop .count { margin-left: auto; color: var(--muted); font-weight: 500; }
.shop-zij nav { display: grid; gap: 2px; }
.shop-scheiding { height: 1px; background: var(--line-strong); margin: 14px 4px; }
.shop-stip { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--faint); }
.shop-stip.groen { background: var(--success); }
.shop-stip.rood { background: var(--danger); }
.shop-stip.groot { width: 10px; height: 10px; margin-left: 6px; vertical-align: middle; }
.shop-inhoud { min-width: 0; }
.shop-detail { max-width: 900px; margin: 0 auto; padding: 24px 32px 90px; }
.shop-top { display: flex; align-items: center; min-height: 34px; }
.shop-terug { display: none; }
.shop-bekijk { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.shop-titel { margin: 14px 0 4px; font-size: 30px; letter-spacing: -.4px; }
.shop-status { margin: 0 0 22px; }
.stappenplan { margin-bottom: 18px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.stappenplan summary { display: flex; align-items: center; gap: 8px; padding: 10px 4px; font-size: 16px; font-weight: 700; list-style: none; cursor: pointer; }
.stappenplan summary::-webkit-details-marker { display: none; }
.stappenplan:not([open]) summary svg { transform: rotate(-90deg); }
.stappenplan .optie-rij:hover { background: var(--bg-3); }
.optie-lijst { display: grid; }
.optie-rij { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.optie-lijst > .optie-rij:last-child { border-bottom: 0; }
.optie-rij:hover { background: var(--bg-2); text-decoration: none; }
.optie-rij .grow { flex: 1; min-width: 0; }
.optie-rij strong { display: block; font-size: 15px; font-weight: 600; }
.optie-rij small { display: block; color: var(--muted); font-size: 13.5px; }
.optie-rij > svg:last-child { color: var(--muted); }
.optie-icoon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.optie-icoon.groen { background: var(--success-soft); color: var(--success); }
.optie-icoon.rood { background: var(--danger-soft); color: var(--danger); }
.optie-icoon.oranje, .optie-icoon.geel { background: var(--warning-soft); color: var(--warning); }
.optie-icoon.paars { background: #7c3aed1f; color: #7c3aed; }
.optie-icoon.grijs { background: var(--bg-3); color: var(--ink-2); }
.optie-rij .bedrag { font-weight: 700; color: var(--primary); white-space: nowrap; }
.stap-klaar { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--success); color: #fff; box-shadow: 0 0 0 2px var(--bg-2); }
.stap-klaar svg.icon.sm { width: 11px; height: 11px; stroke-width: 3; }
.optie-kop { margin: 28px 0 4px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 17px; }
.optie-uitleg { margin: 0 0 6px; color: var(--muted); }
.actie-lijst { display: grid; }
.actie-rij { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.actie-rij:last-child { border-bottom: 0; }
.actie-rij .grow { flex: 1; min-width: 0; }
.actie-rij strong { display: block; font-weight: 600; }
.actie-rij small { display: block; color: var(--muted); }
.actie-rij .btn { min-width: 150px; justify-content: center; }
.btn.groen-knop { border-color: transparent; background: var(--success-soft); color: var(--success); }
.btn.rood-knop { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
.product-mini { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 9px; object-fit: cover; }
.product-foto { display: block; max-width: 100%; max-height: 160px; margin-bottom: 6px; border-radius: 10px; }
.balk { display: block; height: 6px; margin-top: 6px; overflow: hidden; border-radius: 3px; background: var(--bg-3); }
.balk span { display: block; height: 100%; border-radius: 3px; background: var(--primary); }
.dag-grafiek { display: flex; align-items: flex-end; gap: 6px; min-height: 170px; padding: 8px 0; overflow-x: auto; }
.dag-kolom { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 34px; }
.dag-balk { width: 22px; border-radius: 5px 5px 0 0; background: var(--primary); }
.dag-kolom small { color: var(--muted); font-size: 11px; }
.aantal-kiezer { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.aantal-kiezer button { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; }
.aantal-kiezer input { width: 56px; height: 36px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 12px; background: var(--bg-3); }
.segment button { height: 36px; border: 0; border-radius: 9px; background: none; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.segment button.actief { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-sm); }
.te-betalen { display: flex; justify-content: flex-end; align-items: baseline; gap: 40px; margin-top: 8px; font-size: 18px; }
.te-betalen strong { font-size: 22px; }

/* ---------- responsief ---------- */
@media (max-width: 960px) {
  .page { padding: 22px 20px 110px; }
  .shop-layout { grid-template-columns: 1fr; min-height: 0; }
  .shop-zij { position: static; height: auto; padding: 18px 10px; border-right: 0; }
  .shop-zij.met-detail { display: none; }
  .shop-inhoud.zonder-detail { display: none; }
  .shop-terug { display: inline-flex; }
  .shop-detail { padding: 14px 16px 110px; }
  .actie-rij { flex-wrap: wrap; }
  .actie-rij .btn { min-width: 0; }
  .att-toolbar { grid-template-columns: 1fr 1fr; }
  .badge-member { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  .sidebar { position: fixed; left: 0; z-index: 45; width: 290px; transform: translateX(-100%); transition: transform .2s, visibility .2s; visibility: hidden; }
  .app.drawer-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  .drawer-overlay { z-index: 44; }
  .mobile-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(8px); }
  .mobile-top strong { font-size: 16px; }
  .page { padding: 18px 16px 110px; }
  .page-head h1 { font-size: 24px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(8px); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none !important; cursor: pointer; }
  .tabbar .active { color: var(--primary); }
  .table-wrap { display: none; }
  .member-cards { display: block; }
  .selection-bar { left: 50%; bottom: 76px; max-width: calc(100vw - 20px); overflow-x: auto; }
  .toolbar .search { max-width: none; }
  .sheet { width: 100vw; }
  .sheet-body { padding: 18px 16px 40px; }
  .tabs { margin: 0 -16px 18px; padding: 0 12px; }
  .detail-row { grid-template-columns: 1fr auto; }
  .detail-row dt { grid-column: 1 / -1; margin-bottom: -8px; }
  .detail-row .btn { opacity: 1; }
  .grid-2 { grid-template-columns: 1fr; }
  .att-toolbar { grid-template-columns: 1fr; }
  .att-savebar { bottom: 74px; }
  .mail-layout { grid-template-columns: 1fr; }
  .mail-list { border-right: 0; max-height: none; }
  .mail-layout.detail-open .mail-list { display: none; }
  .mail-layout:not(.detail-open) .mail-detail { display: none; }
  .mail-back { display: inline-flex; margin-bottom: 12px; }
  .mail-detail { max-height: none; padding: 18px 16px; }
  .toasts { left: 12px; right: 12px; bottom: 76px; }
  .dialog { top: auto; bottom: 0; left: 0; width: 100vw; transform: none; border-radius: 16px 16px 0 0; animation: vanonder .2s ease-out; }
  @keyframes vanonder { from { transform: translateY(30px); opacity: 0; } }
}

/* ---------------------------------------------------------------- chat */
.nav-item .count.chat-teller-aan { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; display: inline-grid; place-items: center; font-size: 11px; }
.chat { --chat-bg: #f3f5fb; display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100vh; height: 100dvh; background: var(--bg); }
.chat-lijst { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.chat-lijst-kop { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 14px 12px 18px; }
.chat-lijst-kop h1 { margin: 0; font-size: 26px; letter-spacing: -.4px; }
.chat-nieuw-knop { border-radius: 999px; }
.chat-zoek { position: relative; display: flex; align-items: center; margin: 0 14px 10px; }
.chat-zoek svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.chat-zoek input { width: 100%; height: 40px; padding: 0 14px 0 36px; border: 0; border-radius: 999px; background: var(--bg-3); font: inherit; color: inherit; }
.chat-zoek input:focus { outline: 2px solid var(--primary-soft-2); background: var(--bg); }
.chat-filters { display: flex; gap: 6px; padding: 0 14px 8px; overflow-x: auto; scrollbar-width: none; }
.chat-filter { flex: 0 0 auto; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chat-filter:hover { background: var(--bg-2); }
.chat-filter.actief { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.chat-kanalen { flex: 1; overflow-y: auto; padding: 0 8px 20px; }
.chat-kop { display: flex; align-items: center; gap: 4px; width: 100%; padding: 14px 10px 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.chat-kop-knop { cursor: pointer; }
.chat-kop-knop:hover { color: var(--ink); }
.chat-kop .chat-badge { margin-left: 4px; letter-spacing: 0; }
.chat-mensen { display: flex; gap: 4px; padding: 4px 6px 6px; overflow-x: auto; scrollbar-width: thin; }
.chat-mens { flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; cursor: pointer; }
.chat-mens:hover { background: var(--bg-2); }
.chat-mens small { max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--ink-2); }
.chat-kanaal { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chat-kanaal:hover { background: var(--bg-2); }
.chat-kanaal.actief { background: var(--primary-soft); }
.chat-kanaal .grow { flex: 1; min-width: 0; }
.chat-kanaal-rij { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chat-kanaal-rij strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14.5px; }
.chat-kanaal-rij small { color: var(--faint); font-size: 11.5px; }
.chat-voorbeeld { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.chat-kanaal.ongelezen strong, .chat-kanaal.ongelezen .chat-voorbeeld { color: var(--ink); font-weight: 700; }
.chat-kanaal.ongelezen .chat-kanaal-rij small { color: var(--primary); font-weight: 600; }
.chat-badge { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.chat-start { color: var(--primary); }
.chat-uitnodiging strong { color: var(--primary); }
.chat-niets { padding: 30px 12px; text-align: center; color: var(--muted); }
.chat-avatar { position: relative; display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; background: #868e96; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.chat-avatar.klein { width: 30px; height: 30px; font-size: 11px; }
.chat-avatar.mini { width: 22px; height: 22px; font-size: 9px; }
.chat-avatar.groot { width: 52px; height: 52px; font-size: 17px; }
.chat-avatar.reus { width: 88px; height: 88px; font-size: 30px; }
.chat-avatar-algemeen { background: linear-gradient(135deg, #0053ff, #7048e8); font-size: 22px; }
.chat-avatar-algemeen.reus { font-size: 42px; }
.chat-avatar-plus { background: var(--primary-soft); color: var(--primary); }
.chat-avatar-plek { width: 30px; flex: 0 0 auto; }
.chat-avatar-groep { position: relative; display: inline-block; vertical-align: middle; width: 46px; height: 46px; flex: 0 0 auto; }
.chat-avatar-groep .chat-avatar { position: absolute; width: 32px; height: 32px; font-size: 11px; border: 2px solid var(--bg); }
.chat-avatar-groep .chat-avatar:first-child { top: 0; left: 0; }
.chat-avatar-groep .chat-avatar:nth-child(2) { right: 0; bottom: 0; }
.chat-avatar-groep .chat-avatar:only-child { top: 7px; left: 7px; }
.chat-avatar-groep.reus { width: 88px; height: 88px; }
.chat-avatar-groep.reus .chat-avatar { width: 60px; height: 60px; font-size: 20px; border-width: 3px; }
.chat-avatar-groep.reus .chat-avatar:only-child { top: 14px; left: 14px; }
.chat-avatar-groep.groot { width: 52px; height: 52px; }
.chat-gesprek { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--chat-bg);
  background-image: radial-gradient(rgba(0, 83, 255, .05) 1px, transparent 1px); background-size: 18px 18px; }
.chat-gesprek-kop { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); }
.chat-kop-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chat-kop-info:hover { background: var(--bg-2); }
.chat-kop-info .chat-avatar, .chat-kop-info .chat-avatar-groep { transform: scale(.87); }
.chat-kop-info .grow { flex: 1; min-width: 0; }
.chat-kop-info strong, .chat-kop-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-kop-info strong { font-size: 15.5px; }
.chat-kop-info small { color: var(--muted); }
.chat-terug { display: none; }
.chat-berichten { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 20px 6px; display: flex; flex-direction: column; }
.chat-laden { margin: auto; display: flex; gap: 6px; }
.chat-laden span { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); animation: chat-stip 1s infinite ease-in-out; }
.chat-laden span:nth-child(2) { animation-delay: .15s; }
.chat-laden span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-stip { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.chat-leeg { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 30px; }
.chat-leeg h3 { margin: 10px 0 0; font-size: 19px; }
.chat-leeg p { margin: 2px 0; }
.chat-welkom { margin: auto; padding: 24px; width: 100%; max-width: 440px; }
.chat-welkom-kaart { padding: 30px 26px; border-radius: 20px; background: var(--bg); box-shadow: var(--shadow); text-align: center; }
.chat-welkom-emoji { font-size: 46px; line-height: 1; }
.chat-welkom-kaart h2 { margin: 12px 0 4px; font-size: 22px; }
.chat-welkom-knoppen { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.chat-welkom-nieuw { margin-top: 18px; text-align: left; }
.chat-dag { position: sticky; top: 0; z-index: 1; display: flex; justify-content: center; margin: 12px 0 6px; pointer-events: none; }
.chat-dag span { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .95); box-shadow: var(--shadow-sm); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.chat-bericht { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; max-width: 100%; }
.chat-bericht.vervolg { margin-top: 2px; }
.chat-bericht.eigen { justify-content: flex-end; }
.chat-bel-wrap { display: flex; flex-direction: column; max-width: min(620px, 72%); min-width: 0; }
.chat-bericht.eigen .chat-bel-wrap { align-items: flex-end; }
.chat-naam { margin: 0 0 3px 12px; font-size: 12.5px; font-weight: 700; }
.chat-bel-rij { position: relative; display: flex; align-items: center; gap: 4px; max-width: 100%; }
.chat-bericht.eigen .chat-bel-rij { flex-direction: row-reverse; }
.chat-bel { min-width: 0; padding: 8px 12px 6px; border-radius: 18px; background: var(--bg); box-shadow: 0 1px 1px rgba(15, 23, 41, .06); line-height: 1.45; overflow-wrap: anywhere; font-size: 14.5px; }
.chat-bericht:not(.eigen) .chat-bel.staart { border-bottom-left-radius: 6px; }
.chat-bericht.eigen .chat-bel { background: linear-gradient(135deg, #1a66ff, #0047e0); color: #fff; }
.chat-bericht.eigen .chat-bel.staart { border-bottom-right-radius: 6px; }
.chat-bericht.eigen .chat-bel a { color: #fff; text-decoration: underline; }
.chat-bel.emoji { padding: 0 2px; background: none !important; box-shadow: none; font-size: 38px; line-height: 1.15; }
.chat-bel.emoji .chat-tijd { display: block; float: none; margin: 0; color: var(--muted); font-size: 10.5px; text-align: right; }
.chat-bel.weg { background: transparent !important; color: var(--muted) !important; box-shadow: none; border: 1px dashed var(--line-strong); font-style: italic; }
.chat-tekst { white-space: pre-wrap; }
.chat-tijd { float: right; margin: 7px 0 -3px 10px; font-size: 10.5px; opacity: .6; white-space: nowrap; }
.chat-citaat { margin: 0 0 6px; padding: 5px 9px; border-left: 3px solid var(--primary); border-radius: 8px; background: var(--bg-2); color: var(--ink-2); font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-citaat b { display: block; color: var(--primary); }
.chat-bericht.eigen .chat-citaat { border-left-color: #fff; background: rgba(255, 255, 255, .18); color: #fff; }
.chat-bericht.eigen .chat-citaat b { color: #fff; }
.chat-snel { position: absolute; top: 50%; left: calc(100% + 6px); z-index: 2; transform: translateY(-50%); display: flex; align-items: center; gap: 1px; padding: 2px; border-radius: 999px; background: var(--bg); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .12s; white-space: nowrap; }
.chat-bericht.eigen .chat-snel { left: auto; right: calc(100% + 6px); }
.chat-snel button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.chat-snel button:hover { background: var(--bg-3); transform: scale(1.12); }
.chat-bericht:hover .chat-snel, .chat-snel:focus-within { opacity: 1; pointer-events: auto; }
@media (hover: none) {
  .chat-snel { position: static; transform: none; opacity: 1; pointer-events: auto; background: none; box-shadow: none; }
  .chat-snel button:not([data-acties]) { display: none; }
}
.chat-reacties { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 8px 0; position: relative; z-index: 1; }
.chat-reactie { height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); box-shadow: var(--shadow-sm); font: inherit; font-size: 13px; cursor: pointer; }
.chat-reactie b { font-size: 11px; color: var(--ink-2); }
.chat-reactie.mijn { border-color: var(--primary); background: var(--primary-soft); }
.chat-gelezen { min-height: 18px; margin: 3px 4px 0; text-align: right; color: var(--muted); font-size: 11.5px; }
.chat-invoer { position: relative; padding: 8px 14px 12px; }
.chat-invoer-rij { display: flex; align-items: flex-end; gap: 8px; padding: 5px; border-radius: 26px; background: var(--bg); box-shadow: var(--shadow); }
.chat-invoer textarea { flex: 1; min-height: 38px; max-height: 160px; padding: 9px 4px; border: 0; background: none; font: inherit; font-size: 15px; color: inherit; resize: none; outline: none; }
.chat-rond { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; font-size: 20px; cursor: pointer; }
.chat-rond:hover { background: var(--bg-2); }
.chat-verstuur { background: var(--primary); color: #fff; }
.chat-verstuur:hover { background: var(--primary-hover); }
.chat-verstuur:disabled { background: var(--bg-3); color: var(--faint); cursor: default; }
.chat-emoji-paneel { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-bottom: 8px; padding: 8px; border-radius: 16px; background: var(--bg); box-shadow: var(--shadow); }
.chat-emoji-paneel[hidden] { display: none; }
.chat-emoji-paneel button { height: 38px; border: 0; border-radius: 10px; background: none; font-size: 22px; cursor: pointer; }
.chat-emoji-paneel button:hover { background: var(--bg-2); }
.chat-antwoord { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 12px; border-left: 4px solid var(--primary); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-sm); }
.chat-antwoord[hidden] { display: none; }
.chat-antwoord .grow { flex: 1; min-width: 0; }
.chat-antwoord b { color: var(--primary); }
.chat-antwoord small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.chat-info-kop { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 10px; }
.chat-info-kop h2 { margin: 12px 0 2px; font-size: 22px; }
.chat-info-kop p { margin: 0; }
.chat-info-leden { display: flex; flex-direction: column; }
.chat-info-lid { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.chat-info-lid .grow { flex: 1; min-width: 0; }
.chat-info-lid strong, .chat-info-lid small { display: block; }
.chat-info-lid .chat-avatar { width: 40px; height: 40px; font-size: 13px; }
.chat-kies-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chat-kies-chips:empty { display: none; }
.chat-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 4px; border: 0; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }
.chat-kies-takken { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.chat-personen { display: flex; flex-direction: column; max-height: min(46vh, 400px); overflow-y: auto; border-radius: 14px; background: var(--bg-2); padding: 4px; }
.chat-persoon { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chat-persoon:hover { background: var(--bg); }
.chat-persoon[hidden] { display: none; }
.chat-persoon .grow { flex: 1; min-width: 0; }
.chat-persoon strong, .chat-persoon small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-persoon .chat-avatar { width: 40px; height: 40px; font-size: 13px; }
.chat-vinkje { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border: 2px solid var(--line-strong); border-radius: 50%; color: transparent; }
.chat-persoon.gekozen { background: var(--primary-soft); }
.chat-persoon.gekozen .chat-vinkje { border-color: var(--primary); background: var(--primary); color: #fff; }
.chat-persoon.al { opacity: .5; cursor: default; }
.chat-avatar.met-foto { overflow: hidden; background: var(--bg-3); }
.chat-avatar.met-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-foto-knop { position: relative; display: inline-block; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.chat-foto-knop:hover .chat-avatar, .chat-foto-knop:hover .chat-avatar-groep { filter: brightness(.85); }
.chat-foto-camera { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 32px; height: 32px; border: 3px solid var(--bg); border-radius: 50%; background: var(--primary); font-size: 14px; }
.chat-info-kop h2 { display: inline-flex; align-items: center; gap: 4px; }
.chat-info-blok { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 4px 0 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.chat-beschrijving { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-info-acties { display: flex; justify-content: center; gap: 10px; margin: 4px 0 6px; }
.chat-info-acties button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 84px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chat-info-acties button:hover { background: var(--primary-soft); }
.chat-info-acties button span { display: grid; place-items: center; height: 22px; font-size: 18px; }
.chat-meelezen { margin: 8px 14px 12px; padding: 12px 14px; border-radius: 14px; background: var(--warning-soft); color: #7a5a00; font-size: 13px; text-align: center; }
.chat-privacy { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); color: var(--ink-2); font-size: 12.5px; }
.chat-melding { display: flex; justify-content: center; margin: 10px 0 4px; }
.chat-melding span { max-width: 80%; padding: 4px 12px; border-radius: 10px; background: rgba(255, 246, 224, .95); color: #7a5a00; font-size: 12px; text-align: center; box-shadow: var(--shadow-sm); }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100dvh - 54px - 62px - env(safe-area-inset-bottom)); }
  .chat-lijst { border-right: 0; }
  .chat-lijst-kop { padding-top: 14px; }
  .chat-nieuw-knop span { display: none; }
  .chat-nieuw-knop { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .chat.met-gesprek .chat-lijst { display: none; }
  .chat:not(.met-gesprek) .chat-gesprek { display: none; }
  .chat-terug { display: inline-flex; }
  .chat-gesprek-kop { padding: 6px 6px; }
  .chat-berichten { padding: 10px 10px 4px; }
  .chat-invoer { padding: 6px 8px 8px; }
  .chat-bel-wrap { max-width: 84%; }
}

/* ---------- spelen inspiratie ---------- */
.spelen-filters { display: grid; gap: 10px; margin-bottom: 12px; }
.spelen-zoek .input { height: 44px; font-size: 15px; }
.spelen-selecties { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.spelen-balk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; min-height: 28px; }
.spelen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.spel-kaart { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; min-width: 0; }
.spel-kaart:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.spel-kaart:focus-visible { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.spel-kaart.verborgen { opacity: .6; }
.spel-kop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.spel-jaar { margin-left: auto; font-size: 12px; font-weight: 600; }
.spel-titel { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.spel-sub { font-size: 12px; margin-top: -4px; }
.spel-doel { color: var(--ink-2); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spel-voet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; }
.spel-schrijvers, .spel-feiten { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.spel-feiten svg, .spel-schrijvers svg { width: 14px; height: 14px; }
.spel-samenvatting { color: var(--ink-2); line-height: 1.55; }
.spel-pad { font-size: 12px; overflow-wrap: anywhere; }
.spel-bestanden { display: grid; gap: 6px; }
.spel-bestand { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.spel-bestand.hoofd { border-color: var(--primary); background: var(--primary-soft); }
.spel-ext { flex: none; width: 44px; padding: 3px 0; border-radius: 6px; background: var(--bg-3); color: var(--ink-2); font-size: 11px; font-weight: 700; text-align: center; text-transform: uppercase; }
.spel-bestandnaam { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.spel-bestandnaam small { display: block; }
.spel-submap { display: flex; align-items: center; gap: 6px; margin: 8px 0 2px; font-size: 12px; font-weight: 600; }
.spel-kijker-balk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.spel-kijker-balk strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.spel-doc { max-height: 70vh; overflow: auto; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); line-height: 1.6; overflow-wrap: anywhere; }
.spel-doc p { margin: 0 0 8px; }
.spel-doc h3, .spel-doc h4 { margin: 16px 0 8px; }
.spel-doc ul { margin: 0 0 8px; padding-left: 20px; }
.spel-doc img { max-width: 100%; height: auto; }
.spel-doc .tabel { overflow-x: auto; margin: 8px 0 12px; }
.spel-doc table { border-collapse: collapse; min-width: 50%; }
.spel-doc td { padding: 6px 8px; border: 1px solid var(--line); vertical-align: top; }
.spel-doc td p { margin: 0; }
.spel-doc .kader { display: block; margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--line-strong); }
.spel-doc .dia { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.spel-pdf { width: 100%; height: 70vh; border: 0; background: #fff; }
.spel-themas { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; max-height: 190px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
@media (max-width: 600px) {
  .spelen-grid { grid-template-columns: 1fr; }
  .spelen-selecties { grid-template-columns: 1fr 1fr; }
  .spel-doc { padding: 14px; }
}

/* ---------- 4-uurtjes ---------- */
.vier-groepen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; margin-bottom: 16px; }
.vier-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vier-grafiek { display: block; width: 100%; height: auto; margin-top: 8px; }
.vier-legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.vier-legende i { display: inline-block; width: 12px; height: 12px; margin-right: 5px; border-radius: 3px; vertical-align: -1px; }
.vier-legende i.streep { height: 0; border-top: 2px dashed var(--muted); border-radius: 0; vertical-align: 3px; }
.vier-portie { gap: 12px; }
.vier-totaal { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font-size: 15px; }
@media (max-width: 600px) { .vier-stats { grid-template-columns: 1fr; } }
.vier-soort { padding: 12px 0; border-bottom: 1px solid var(--line); }
.vier-portie-rij { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vier-uitleg { margin-top: 6px; font-size: 12px; }
.vier-items { display: grid; gap: 2px; margin-top: 6px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-2); }
.vier-itemlijst { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.vier-itemkop { display: flex; justify-content: space-between; padding: 6px 12px; background: var(--bg-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.vier-itemrij { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); }
.vier-itemnaam { flex: 1; min-width: 0; font-size: 14px; }
.vier-itemprijs { width: 72px; text-align: right; font-weight: 600; }
.vier-gemiddelde { background: var(--bg-2); }
.vier-gemiddelde span:first-child { flex: 1; font-size: 13px; font-weight: 600; }
.vier-gemiddelde strong { width: 72px; text-align: right; }

/* ---------------------------------------------------------------- gsm en tablet */
/* Lange lijsten (269 leden) tekent de browser pas als je erbij scrollt: dat scheelt veel op een gsm. */
.list-row, .optie-rij, .chat-kanaal, .log-row { content-visibility: auto; contain-intrinsic-size: auto 56px; }

@media (max-width: 760px) {
  /* iPhone zoomt in zodra een invoerveld kleiner is dan 16px; daarom overal 16px op een gsm. */
  input, select, textarea, .input, .select, .textarea { font-size: 16px; }
  .chat-invoer textarea { font-size: 16px; }
  /* Alles wat je aantikt minstens zo groot als een vingertop. */
  .btn { min-height: 44px; }
  .btn.sm { min-height: 38px; }
  .btn.icon-only { min-width: 44px; }
  .btn.sm.icon-only { min-width: 38px; }
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
  .list-row { min-height: 54px; }
  .list-row label, .check { min-height: 44px; display: flex; align-items: center; gap: 10px; }
  .tab { min-height: 42px; }
  .chat-filter { height: 34px; }
  .role-toggle { min-height: 44px; }
  /* Titels wat compacter, zodat er meer inhoud op het scherm past. */
  .page-head h1 { font-size: 22px; }
  .page-head p { font-size: 13.5px; }
  .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .page-actions .btn { flex: 1 1 auto; justify-content: center; }
  .section-title h2 { font-size: 16px; }
  /* Tabellen die op een gsm toch blijven staan, blijven leesbaar door te schuiven in plaats van te persen. */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Wie liever geen animaties heeft (of een trage gsm), krijgt ze niet. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* 4-uurtjes: items kiezen per vergadering */
.plan-rij { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; margin-bottom: 10px; }
.plan-datum { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-left: 6px; border-left: 3px solid var(--primary); }
.plan-datum b { font-size: 22px; line-height: 1.1; }
.plan-datum span { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.plan-cellen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan-cel { display: flex; flex-direction: column; gap: 6px; min-height: 92px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.plan-cel:hover { border-color: var(--primary); background: var(--primary-soft); }
.plan-cel.ingevuld { border-style: solid; }
.plan-cel.vast { border-style: solid; background: var(--bg-2); cursor: default; }
.plan-cel.vast:hover { border-color: var(--line); background: var(--bg-2); }
.plan-groep { font-size: 13px; font-weight: 700; }
.plan-groep small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.plan-items { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-item { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.plan-niets { display: flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; }
.plan-prijs { margin-top: auto; font-size: 13px; }
.plan-kaarten { display: grid; gap: 8px; margin-bottom: 14px; }
.plan-kaart { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.plan-kaart.aan { border-color: var(--primary); background: var(--primary-soft); }
.plan-kaart-tekst { display: flex; flex-direction: column; min-width: 0; }
.plan-kaart-tekst small { color: var(--muted); }
.plan-stap { display: flex; align-items: center; gap: 6px; flex: none; }
.plan-aantal { min-width: 84px; text-align: center; font-size: 13px; }
.plan-kop { margin: 14px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.plan-ook { max-height: 190px; overflow: auto; }
@media (max-width: 700px) { .plan-cellen { grid-template-columns: 1fr; } .plan-rij { grid-template-columns: 44px minmax(0, 1fr); } }

/* 4-uurtjes: rustiger, ook op een gsm */
.vier-kop { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.vier-stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
details.vier-groep { margin-bottom: 12px; padding: 0; }
.vier-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.vier-sum::-webkit-details-marker { display: none; }
.vier-sum::after { content: '›'; flex: none; color: var(--muted); font-size: 22px; line-height: 1; transform: rotate(90deg); transition: transform .15s; }
details[open] > .vier-sum::after { transform: rotate(-90deg); }
.vier-sum > span:first-child { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.vier-sum-kost { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.vier-sum small { font-size: 13px; }
.vier-binnen { padding: 0 16px 16px; }
.vier-pertak { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.vier-kost { display: flex; flex-direction: column; align-items: flex-end; flex: none; gap: 2px; }
.vier-kost .check { margin: 0; font-size: 12px; color: var(--muted); }
.vier-lijst { border-top: 1px solid var(--line); }
.vier-oud { padding: 10px 16px; border-top: 1px solid var(--line); font-weight: 600; }
.vier-hulp { margin-bottom: 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); color: #1d3f91; font-size: 14px; }
.vier-hulp summary { cursor: pointer; font-weight: 600; }
.vier-hulp p { margin: 8px 0 0; }
@media (max-width: 700px) {
  .vier-groepen { margin-bottom: 0; }
  .vier-stats, .vier-stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vier-stats .stat { padding: 10px 12px; }
  .vier-stats .stat-value { font-size: 20px; }
  .vier-stats .stat-sub { font-size: 11.5px; }
  .vier-sum, .vier-binnen { padding-left: 14px; padding-right: 14px; }
  .tabs .tab { flex: 1; padding: 0 8px; }
  .plan-cellen { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .plan-cel { min-height: 0; padding: 8px 10px; gap: 4px; }
  .plan-groep small { display: none; }
  .plan-item { font-size: 12px; padding: 2px 8px; }
  .plan-prijs { font-size: 12px; }
}
.vier-groepen { gap: 12px; }
.vier-groepen > details.vier-groep { margin-bottom: 0; }
.vier-stats:not(.vier-stats-4) .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
button.plan-datum { border: 0; border-left: 3px solid var(--primary); background: none; color: inherit; font: inherit; padding: 0 0 0 6px; cursor: pointer; }
button.plan-datum:hover { background: var(--bg-2); }
.plan-meer { color: var(--faint); font-style: normal; line-height: .8; }
.plan-datum.uit b { opacity: .45; text-decoration: line-through; }
.plan-datum.uit { border-left-color: var(--faint); }

/* Rekening verdelen: een bestelronde delen met een link en QR-code */
.bestel-qr { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.bestel-qr img { display: block; width: 170px; height: 170px; margin-bottom: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }

/* Opkomst als taartje met percentage (ledenlijst) */
.opkomst { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; }
.opkomst b { font-weight: 700; min-width: 34px; text-align: right; }
.taart { flex: none; display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--k, var(--primary)) calc(var(--p, 0) * 1%), var(--bg-3, #e7eaf0) 0); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.list-row > .opkomst { margin-left: auto; }
.opkomst small { font-size: 11px; min-width: 30px; }

/* Telefoon: aanwezigheden naast de naam zonder overlap */
.member-cards .list-row .grow strong, .member-cards .list-row .grow small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row > .opkomst { flex: none; display: grid; grid-template-columns: auto auto; justify-items: end; align-items: center; gap: 1px 6px; }
.list-row > .opkomst small { grid-column: 1 / -1; display: block; min-width: 0; line-height: 1.1; }
.list-row > .opkomst b { min-width: 0; }

/* Leuke snufjes → Midweek verdeling */
.midweek-tabel th { white-space: normal; text-align: center; line-height: 1.25; height: auto; min-width: 84px; padding: 8px; vertical-align: bottom; }
.midweek-tabel th:first-child, .midweek-tabel td:first-child { position: sticky; left: 0; text-align: left; min-width: 130px; max-width: 170px; background: var(--bg); box-shadow: 1px 0 0 var(--line); }
.midweek-tabel th:first-child { z-index: 3; background: var(--bg-2); }
.midweek-tabel td:first-child { z-index: 2; font-weight: 600; }
.midweek-tabel td { text-align: center; font-variant-numeric: tabular-nums; }
.midweek-tabel td.num { text-align: right; }
.midweek-tabel tbody tr { cursor: default; }
.midweek-tabel input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.midweek-tabel tr.som td, .midweek-tabel tr.som td:first-child { background: var(--bg-2); font-weight: 600; }
.mw-rij { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.mw-rij.aankoop { grid-template-columns: minmax(0, 1fr) 110px auto auto; }
@media (max-width: 560px) {
  .mw-rij.aankoop { grid-template-columns: minmax(0, 1fr) 100px auto; }
  .mw-rij.aankoop .btn.kies { grid-column: 1 / -1; order: 3; }
}
.mw-rij.maaltijd { grid-template-columns: minmax(0, 1fr) 150px 110px auto; }
@media (max-width: 560px) {
  .mw-rij.maaltijd { grid-template-columns: minmax(0, 1fr) 110px auto; }
  .mw-rij.maaltijd [data-m-naam] { grid-column: 1 / -1; }
}
.mw-tabs button { font-size: 13px; padding: 0 2px; }
.mw-kiezer { display: flex; gap: 8px; margin-bottom: 12px; }
.mw-kiezer .select { flex: 1; min-width: 0; height: 46px; font-size: 16px; }
.mw-kiezer .btn.icon-only { height: 46px; width: 46px; flex: none; }
.mw-balk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.mw-knoppen { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.mw-pickbalk { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.mw-pers { cursor: pointer; }
.mw-pers input[type=checkbox] { width: 26px; height: 26px; flex: none; margin: 0; accent-color: var(--primary); cursor: pointer; }
.mw-pers.vast { opacity: .65; cursor: default; }
.mw-pers.vast input[type=checkbox] { cursor: default; }
@media (max-width: 560px) {
  .mw .input, .mw .select, .mw .textarea { font-size: 16px; }
}
/* Midweek: duidelijk onderscheid tussen een hele dag en een losse maaltijd */
.mw-toevoegen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.mw-tegel { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 2px solid; text-align: left; cursor: pointer; font: inherit; }
.mw-tegel strong { display: block; font-weight: 700; }
.mw-tegel small { display: block; font-size: 12.5px; line-height: 1.3; }
.mw-tegel.dag { background: var(--primary); border-color: var(--primary); color: #fff; }
.mw-tegel.dag small { color: rgba(255, 255, 255, .85); }
.mw-tegel.dag:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.mw-tegel.los { background: var(--bg); border-color: var(--warning); color: var(--ink); }
.mw-tegel.los small { color: var(--muted); }
.mw-tegel.los:hover { background: var(--warning-soft); }
.mw-tegel .icon { flex: none; }
.mw-groep { margin: 0 0 14px; padding: 10px 10px 2px; border-radius: 12px; border-left: 5px solid var(--primary); background: var(--primary-soft); }
.mw-groep.los { border-left-color: var(--warning); background: var(--warning-soft); }
.mw-groepkop { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px 2px; color: var(--primary); }
.mw-groep.los .mw-groepkop { color: #8a5a00; }
.mw-groepkop span { font-size: 13px; font-weight: 600; opacity: .85; }
.mw-groep .mw-rij { margin-bottom: 10px; }
@media (max-width: 560px) { .mw-toevoegen { grid-template-columns: 1fr; } }
/* Midweek: Excel controleren (namen aan Keeo koppelen) */
.mw-koppellijst { display: grid; gap: 8px; }
.mw-koppelrij { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.mw-koppelnaam strong { display: block; overflow-wrap: anywhere; }
.mw-koppelnaam small { display: block; color: var(--muted); }
.mw-koppelrij .select { font-size: 15px; }
@media (max-width: 560px) { .mw-koppelrij { grid-template-columns: 1fr; } }
/* Wachtlijst */
.wl-filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 4px; }
@media (max-width: 560px) { .wl-filters { grid-template-columns: 1fr 1fr; } .wl-filters .input { grid-column: 1 / -1; font-size: 16px; } }

.wl-twee { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-chips .pill { text-decoration: none; }

/* Midweek verdeling: stappen */
.mw-stappen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.mw-stap { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.mw-stap:hover { border-color: var(--primary-soft-2, var(--line)); }
.mw-stap.actief { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.mw-nr { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-3); color: var(--ink-2); font-weight: 700; font-size: 13px; }
.mw-stap.actief .mw-nr { background: var(--primary); color: #fff; }
.mw-stap.klaar .mw-nr { background: var(--success); color: #fff; }
.mw-stapt { min-width: 0; }
.mw-stapt strong { display: block; font-size: 13.5px; line-height: 1.2; }
.mw-stapt small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .mw-stappen { grid-template-columns: 1fr 1fr; } .mw-stapt small { white-space: normal; } }
.mw-uitleg { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--primary-soft); color: var(--ink); }
.mw-uitleg strong { font-size: 15px; }
.mw-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.mw-nav .btn.primary { margin-left: auto; }
.mw-meer { margin-top: 18px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.mw-meer > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.mw-snel { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-bottom: 14px; }
.mw-soorten { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.mw-maaltijdrij { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.mw-maaltijdrij.los { grid-template-columns: minmax(0, 1fr) 150px 130px auto; }
.mw-mnaam { font-weight: 600; }
@media (max-width: 560px) { .mw-maaltijdrij.los { grid-template-columns: minmax(0, 1fr) 120px auto; } .mw-maaltijdrij.los [data-m-naam] { grid-column: 1 / -1; } }
.mw-groep .mw-groepkop { justify-content: space-between; align-items: center; }
.mw-intro { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 14px; }
.mw-intro > div { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
