:root {
  --bg: #F5F6F8; --surface: #FFFFFF; --line: #E2E5EA; --line-soft: #EEF0F3; --field: #D5D9E0;
  --ink: #171A21; --muted: #5A6170; --accent: #1F4FD1; --accent-hover: #163BA0; --accent-soft: #E8EEFC; --accent-ink: #1A44B8;
  --ok: #0A5E50; --ok-soft: #E1F3EE; --warn: #8F3F07; --warn-soft: #FDEEE2; --error: #B42318;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 1040px; }
.stack { display: flex; flex-direction: column; gap: 20px; padding-top: 24px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--error); }

.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.titles h1 { font-size: 24px; font-weight: 700; }
.eyebrow { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.backlink { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; text-decoration: none; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.local { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; font: 600 14px "Segoe UI", system-ui, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; border: 1px solid var(--field); background: var(--surface); color: var(--ink); }
.btn:hover { background: #F0F2F5; color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn:disabled, .btn[aria-disabled="true"] { background: #F2F3F5; border-color: var(--line); color: #6A707C; cursor: default; pointer-events: none; }
.btn-full { width: 100%; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--field); background: var(--surface); color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: #F0F2F5; }

.notice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.notice svg { flex: none; color: var(--ok); }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed #C9CED6; border-radius: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--field); background: var(--surface); color: #2A2F3A; font: 500 13px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.chip:hover { background: #F0F2F5; }
.chip-on, .chip-on:hover { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi strong { font-size: 28px; font-weight: 700; }
.kpi-accent { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.kpi-accent span { color: #FFFFFF; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.card h2 { font-size: 16px; font-weight: 700; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.filters { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search { position: relative; flex: 1 1 280px; max-width: 420px; }
.search svg { position: absolute; left: 13px; top: 13px; color: var(--muted); }
.search input { padding-left: 40px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.push { margin-left: auto; }

.lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.fld { height: 44px; width: 100%; border: 1px solid var(--field); border-radius: 8px; padding: 0 12px; font: 14px "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--surface); }
.area { width: 100%; border: 1px solid var(--field); border-radius: 8px; padding: 12px; font: 14px/1.5 "Segoe UI", system-ui, sans-serif; color: var(--ink); resize: vertical; min-height: 96px; background: var(--surface); }
.fld:focus, .area:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.fld:disabled, .area:disabled { background: #F2F3F5; color: #6A707C; }
.field { display: flex; flex-direction: column; gap: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.span-all { grid-column: 1 / -1; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; cursor: pointer; }

.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.scroll-x { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-weight: 600; font-size: 12px; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; background: #FAFBFC; }
td { padding: 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:hover td { background: #FAFBFC; }
.wide { min-width: 1240px; }
.strong { font-weight: 600; }
.sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.nowrap { white-space: nowrap; }
.reason { color: var(--warn); font-weight: 600; font-size: 13px; }
.table-foot { padding: 14px 16px; font-size: 13px; color: var(--muted); }

.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-nieuw { background: var(--line-soft); color: #454B57; }
.st-gecontacteerd { background: var(--accent-soft); color: var(--accent-ink); }
.st-interesse { background: var(--ok-soft); color: var(--ok); }
.st-afspraak { background: var(--accent); color: #FFFFFF; }
.st-geweigerd { background: var(--warn-soft); color: var(--warn); }

.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.camp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 13px; }
.camp-stats div { display: flex; flex-direction: column; gap: 2px; }
.camp-stats span { color: var(--muted); }
.camp-stats strong { font-size: 18px; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 12px; background: var(--line-soft); color: #454B57; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress div { height: 6px; background: var(--accent); }

.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.profile-head { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--ink); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }
.profile-name { font-size: 26px; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 2px 6px; margin-left: -7px; font-family: inherit; color: inherit; background: transparent; width: 100%; }
.profile-name:hover { border-color: var(--line); }
.profile-name:focus { outline: 2px solid var(--accent); }
.person { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.person .field { flex: 1 1 140px; }
.hist { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.hist-date { flex: none; width: 92px; color: var(--muted); }
.add-row { display: flex; gap: 10px; }
.add-row .fld { flex: 1; }

.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 64px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--field); background: var(--surface); cursor: pointer; font: 600 15px "Segoe UI", system-ui, sans-serif; color: var(--ink); text-align: left; }
.sw-row.on { border-color: var(--accent); background: var(--accent-soft); }
.sw-text { display: flex; flex-direction: column; gap: 4px; }
.sw-text small { font-size: 13px; font-weight: 400; color: #4A505C; }
.sw { position: relative; flex: none; width: 52px; height: 30px; border-radius: 15px; background: #9AA1AD; }
.sw-row.on .sw { background: var(--accent); }
.knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; transition: left .15s; }
.sw-row.on .knob { left: 25px; }

.day { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 13px; }
.slot { display: flex; gap: 12px; padding: 8px 12px; background: #F2F3F5; color: #4A505C; }
.slot-free { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.slot span:first-child { width: 110px; }

.footer-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; }

.overlay { position: fixed; inset: 0; background: rgba(23, 26, 33, .45); display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; z-index: 10; }
.dialog { width: 100%; max-width: 680px; background: var(--surface); border-radius: 16px; box-shadow: 0 12px 40px rgba(23, 26, 33, .2); display: flex; flex-direction: column; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 16px 24px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 20px; }
.dialog-body { padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); }
.drop { border: 2px dashed #C3CAD6; border-radius: 12px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: #FAFBFC; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.file-ok { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--field); border-radius: 10px; cursor: pointer; }
.opt-on { border-color: var(--accent); background: #F3F6FE; }
.opt-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.opt-body strong { font-size: 14px; }
.opt-body span { font-size: 13px; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-size: 15px; font-weight: 700; margin-bottom: 10px; padding: 0; }
.map-table td, .map-table th { padding: 8px 12px; }
.map-table .fld { height: 40px; }
.stat-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.code { font-family: Consolas, ui-monospace, monospace; font-size: 13px; background: #F2F3F5; padding: 8px 10px; border-radius: 8px; word-break: break-all; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #FFFFFF; padding: 12px 18px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
#toast.show { opacity: 1; }
#toast.bad { background: var(--error); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .stat-pair { grid-template-columns: 1fr; }
}

/* v2: sign-in and folder gates, language picker */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.gate-card { width: 100%; max-width: 460px; }
.gate-card h1 { font-size: 22px; }
.gate-card p { margin: 0; }
.linkbtn { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--accent); font: 600 14px "Segoe UI", system-ui, sans-serif; cursor: pointer; text-align: left; }
.linkbtn:hover { color: var(--accent-hover); text-decoration: underline; }
.lang { display: inline-flex; }
.fld-sm { height: 44px; width: auto; padding: 0 10px; }
.pillbtn { height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 22px; text-decoration: none; }
.badge-lg { height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 8px; font-size: 14px; }
.st-new { background: var(--line-soft); color: #454B57; }
.st-contacted { background: var(--accent-soft); color: var(--accent-ink); }
.st-interested { background: var(--ok-soft); color: var(--ok); }
.st-meeting { background: var(--accent); color: #FFFFFF; }
.st-refused { background: var(--warn-soft); color: var(--warn); }
.hist-edit { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.hist-date-in { width: 130px; }
.area-sm { min-height: 44px; }
.card-late { border-color: #E8A06A; }
.follow-line { font-size: 15px; }
.ext { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; vertical-align: middle; color: var(--accent); }
.multi { position: relative; }
.multi summary { display: flex; align-items: center; cursor: pointer; list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi summary::-webkit-details-marker { display: none; }
.multi summary::after { content: ""; margin-left: auto; border: 5px solid transparent; border-top-color: var(--muted); transform: translateY(3px); }
.multi-list { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 100%; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--field); border-radius: 10px; box-shadow: 0 8px 24px rgba(23, 26, 33, .12); padding: 8px 12px; display: flex; flex-direction: column; }
.multi-item { white-space: nowrap; font-size: 14px; }
.rules { display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.mail-check { min-height: 32px; font-size: 13px; }
.mail-row { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line-soft); word-break: break-all; }
.person > .icon-btn { margin-top: 23px; }
.person .mail-check { min-height: 28px; margin-top: 2px; }
.person .field .field { flex: none; }
.row-link { cursor: pointer; }
.role-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 8px; }
.role-row .icon-btn { width: 36px; height: 36px; }
.field-def { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
