/* De Pelikaan – vriendelijk, rustig, grote duidelijke knoppen */
:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --line: #e2e8f1;
  --line-2: #eef2f8;
  --text: #1c2a44;
  --navy: #13305c;
  --muted: #5d6b82;
  --faint: #8a96aa;
  --blue: #1a6ce8;
  --blue-d: #1458c2;
  --blue-50: #eaf2fe;
  --blue-100: #d6e6fd;
  --green: #16a34a; --green-50: #e8f7ee; --green-100: #c9ecd6;
  --red: #dc2626; --red-50: #fdecec; --red-100: #f8caca;
  --amber: #d97706; --amber-50: #fff6e5; --amber-100: #fde3b3;
  --purple: #7c3aed; --purple-50: #f2ecfe;
  --vast: #dbe9fd; --vast-b: #a9c9f8; --vast-t: #12346a;
  --inc: #fde4ea; --inc-b: #f4b3c3; --inc-t: #6b1630;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(19, 48, 92, .05), 0 2px 8px rgba(19, 48, 92, .04);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; color: var(--navy); line-height: 1.2; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.muted-p { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.stack { display: grid; gap: 16px; }

/* ---------- knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 9px; border: 1.5px solid transparent;
  font: 600 15px var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; text-decoration: none !important; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-d); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover:not(:disabled) { background: var(--blue-50); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--line-2); }
.btn-danger { background: #fff; color: var(--red); border-color: #f2b4b4; }
.btn-danger:hover:not(:disabled) { background: var(--red-50); }
.btn-green { background: var(--green); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn-lg { min-height: 50px; font-size: 16px; padding: 0 22px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.icon-btn.bordered { border-color: var(--line); background: #fff; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- formulieren ---------- */
input, select, textarea { font: 15px var(--font); color: var(--text); background: #fff; border: 1.5px solid #d5ddea; border-radius: 9px; padding: 9px 12px; min-height: 42px; width: 100%; outline: none; }
textarea { min-height: 64px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 108, 232, .15); }
input[readonly], input:disabled, select:disabled { background: #f4f6fa; color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--blue); margin: 0; flex: none; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235d6b82' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; color: var(--text); }
.field-hint { font-size: 12.5px; color: var(--muted); }
.req { color: var(--red); font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; min-height: 32px; }
.seg { display: inline-flex; border: 1.5px solid #d5ddea; border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 0 16px; min-height: 38px; font: 600 14px var(--font); color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1.5px solid #d5ddea; }
.seg button.on { background: var(--blue-50); color: var(--blue); }
.form-error { display: flex; gap: 10px; align-items: flex-start; background: var(--red-50); border: 1px solid var(--red-100); color: #8f1d1d; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.form-error .ic { color: var(--red); margin-top: 1px; }
.switch { position: relative; display: inline-block; vertical-align: middle; width: 44px; height: 24px; flex: none; }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cdd5e1; border-radius: 99px; cursor: pointer; transition: .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; line-height: 1.3; }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-gray { background: #eef1f5; color: #586579; }
.badge-blue { background: var(--blue-50); color: var(--blue); }
.badge-navy { background: #e6ecf5; color: var(--navy); }
.badge-green { background: var(--green-50); color: #13803c; }
.badge-red { background: var(--red-50); color: #c42020; }
.badge-amber { background: var(--amber-50); color: #b45f05; }
.badge-purple { background: var(--purple-50); color: var(--purple); }

/* ---------- kop ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; height: 76px; padding: 0 22px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none !important; min-width: 0; }
.brand img { height: 52px; max-width: 160px; object-fit: contain; }
.brand-name { white-space: nowrap; font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.brand-sub { font-size: 13.5px; color: var(--blue); font-weight: 500; margin-top: 3px; }
.nav { display: flex; gap: 6px; }
.nav a { padding: 10px 18px; border-radius: 10px; color: var(--text); font-weight: 550; font-size: 15.5px; text-decoration: none; position: relative; }
.nav a:hover { background: var(--line-2); }
.nav a.on { background: var(--blue-50); color: var(--blue); }
.nav a.on::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 3px; height: 3px; border-radius: 2px; background: var(--blue); }
.search { position: relative; width: 300px; }
.search input { padding-left: 40px; background: #f7f9fc; border-color: var(--line); }
.search > .ic { position: absolute; left: 13px; top: 11px; color: var(--faint); }
.search-results { position: absolute; top: 48px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(19,48,92,.14); padding: 6px; max-height: 420px; overflow: auto; z-index: 40; }
.search-results .sr-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); padding: 8px 10px 4px; }
.search-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--blue-50); }
.search-results small { color: var(--muted); display: block; }
.userbtn { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 12px; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; position: relative; }
.userbtn:hover { background: var(--line-2); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #8b6fd6; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.userbtn b { white-space: nowrap; display: block; font-weight: 600; font-size: 14.5px; }
.userbtn small { color: var(--muted); font-size: 12.5px; text-transform: capitalize; }
.menu { position: absolute; right: 0; top: 54px; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(19,48,92,.14); padding: 6px; z-index: 50; }
.menu button, .menu a { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: none; border-radius: 8px; font: 500 14.5px var(--font); color: var(--text); cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--line-2); }

main { padding: 20px 22px 40px; max-width: 1680px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 12px; }
.page-head h1 .ic { color: var(--navy); }
.crumbs { font-size: 14px; color: var(--muted); margin: -8px 0 14px; }
.crumbs a { color: var(--blue); }

/* ---------- kaarten ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.card-tight { padding: 14px 16px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head > .ic { color: var(--blue); margin-top: 1px; }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 10px; }
.card-head p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.card-head .spacer + * { flex: none; }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title .ic { color: var(--blue); }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--blue-50); color: #1d4f9a; border-radius: 10px; padding: 11px 14px; font-size: 14px; }
.note .ic { color: var(--blue); flex: none; margin-top: 1px; }
.note-amber { background: var(--amber-50); color: #7a4204; } .note-amber .ic { color: var(--amber); }
.note-green { background: var(--green-50); color: #11592b; } .note-green .ic { color: var(--green); }
.note-red { background: var(--red-50); color: #8f1d1d; } .note-red .ic { color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; display: grid; justify-items: center; gap: 8px; }
.empty .ic { color: var(--faint); }

/* ---------- tabellen ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 650; color: var(--navy); background: #f4f7fb; padding: 10px 12px; font-size: 13.5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #f7faff; }
.table tr.sel td { background: var(--blue-50); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.inactive td { color: var(--faint); }
.table-wrap { overflow-x: auto; border-radius: 10px; }
.kv { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; }
.kv > * { padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.kv > dt { color: var(--muted); }
.kv > dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button, .tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border: 0; background: none; font: 550 15px var(--font); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs .on { color: var(--blue); border-bottom-color: var(--blue); }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.card .tabs { margin: -4px -2px 16px; }
.pilltabs { display: flex; gap: 6px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin-bottom: 16px; }
.pilltabs a { display: inline-flex; gap: 9px; align-items: center; padding: 10px 16px; border-radius: 9px; color: var(--text); font-weight: 550; text-decoration: none; }
.pilltabs a .ic { color: var(--muted); }
.pilltabs a.on { background: var(--blue-50); color: var(--blue); }
.pilltabs a.on .ic { color: var(--blue); }

/* ---------- planning ---------- */
.plan-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.plan-layout.with-panel { grid-template-columns: minmax(0, 1fr) 330px; }
.plan-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.plan-date { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--navy); margin-left: 8px; position: relative; cursor: pointer; }
.plan-date input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cal-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-chip { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 99px; font-size: 13.5px; font-weight: 600; background: var(--amber-50); color: #9a5304; border: 1px solid var(--amber-100); }
.cal-chip.feest { background: var(--purple-50); color: var(--purple); border-color: #dccdfb; }
.grid-card { padding: 0; overflow: hidden; }
.plan-scroll { overflow-x: auto; overflow-y: hidden; position: relative; }
.plan { position: relative; display: grid; grid-template-columns: 190px var(--tlw); min-width: calc(190px + var(--tlw)); user-select: none; }
.plan-corner, .plan-room { position: sticky; left: 0; z-index: 6; background: #fff; border-right: 1px solid var(--line); }
.plan-corner { display: flex; align-items: center; padding: 0 16px; font-weight: 650; color: var(--navy); height: 44px; border-bottom: 1px solid var(--line); z-index: 8; }
.plan-hours { position: relative; height: 44px; border-bottom: 1px solid var(--line); background: #fff; }
.plan-hours span { position: absolute; top: 13px; font-size: 13px; color: var(--muted); padding-left: 5px; border-left: 1px solid #d5ddea; line-height: 18px; font-variant-numeric: tabular-nums; }
.plan-room { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: var(--rowh); border-bottom: 1px solid var(--line-2); font-weight: 600; font-size: 15px; color: var(--text); }
.plan-room .ic { color: var(--muted); }
.plan-room.half { padding-left: 22px; font-weight: 550; }
.plan-room.inactive { color: var(--faint); }
.plan-row { position: relative; height: var(--rowh); border-bottom: 1px solid var(--line-2); cursor: crosshair;
  background-image: linear-gradient(90deg, #e8edf5 1px, transparent 1px), linear-gradient(90deg, #f3f5f9 1px, transparent 1px);
  background-size: var(--hourw) 100%, calc(var(--hourw) / 4) 100%; }
.plan-row.ro { cursor: default; }
.plan-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 4; pointer-events: none; }
.plan-now::before { content: ""; position: absolute; top: -1px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.blk { position: absolute; top: 5px; bottom: 5px; border-radius: 8px; padding: 5px 10px; overflow: hidden; font-size: 13.5px; line-height: 1.25; cursor: pointer; z-index: 3; border: 1.5px solid; }
.blk b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.blk.vast { background: var(--vast); border-color: var(--vast-b); color: var(--vast-t); }
.blk.inc { background: var(--inc); border-color: var(--inc-b); color: var(--inc-t); }
.blk.optie { border-style: dashed; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 6px, transparent 6px 12px); }
.blk.optie b::after { content: " · optie"; font-weight: 500; }
.blk.cancel { background: #f3f4f6; border-color: #d1d5db; color: #9ca3af; text-decoration: line-through; }
.blk.aanvraag { border-style: dotted; }
.blk.sel { box-shadow: 0 0 0 3px var(--blue); }
.blk:hover { filter: brightness(.97); }
.blk.narrow { padding: 5px 6px; }
.blocked { position: absolute; top: 5px; bottom: 5px; border-radius: 8px; z-index: 2; display: grid; place-items: center; text-align: center; font-size: 12.5px; color: #7b8494; line-height: 1.2; padding: 2px 6px; overflow: hidden;
  background: repeating-linear-gradient(135deg, #eceff4 0 7px, #f6f7fa 7px 14px); border: 1px solid #dfe3ea; pointer-events: none; }
.drag-sel { position: absolute; top: 5px; bottom: 5px; border-radius: 8px; background: rgba(26,108,232,.14); border: 2px dashed var(--blue); z-index: 5; pointer-events: none; display: grid; place-items: center; font-size: 13px; font-weight: 650; color: var(--blue); white-space: nowrap; }
.legend { display: flex; align-items: center; gap: 22px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.legend i { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; margin-right: 7px; border: 1.5px solid; }
.legend i.l-vast { background: var(--vast); border-color: var(--vast-b); }
.legend i.l-inc { background: var(--inc); border-color: var(--inc-b); }
.legend i.l-opt { background: repeating-linear-gradient(135deg, #fff 0 3px, var(--vast) 3px 6px); border: 1.5px dashed var(--vast-b); border-radius: 4px; }
.legend i.l-blk { background: repeating-linear-gradient(135deg, #e5e8ee 0 3px, #f6f7fa 3px 6px); border-color: #dfe3ea; border-radius: 4px; }
.panel { position: sticky; top: 92px; }
.panel .card { padding: 18px; }
.panel-cust { display: flex; gap: 12px; align-items: center; background: var(--blue-50); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.panel-cust .ic { color: var(--blue); }
.panel-cust b { font-size: 16.5px; color: var(--navy); display: block; }
.info-list { display: grid; gap: 14px; margin-bottom: 18px; }
.info-list > div { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.info-list .ic { color: var(--muted); margin-top: 1px; }
.info-list b { display: block; font-size: 14px; color: var(--text); font-weight: 650; }
.info-list span { color: var(--text); font-size: 14.5px; }
.panel-actions { display: grid; gap: 10px; }

/* ---------- reserveringsformulier ---------- */
.res-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.res-main { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.res-main > .full { grid-column: 1 / -1; }
.res-sec { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; }
.res-sec > .section-title { padding-top: 6px; }
.res-sec.stacked { grid-template-columns: 1fr; gap: 14px; }
.avail { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 42px; border-radius: 9px; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.avail.ok { background: var(--green-50); color: #13803c; }
.avail.bad { background: var(--red-50); color: #c42020; }
.avail.wait { background: #f1f4f8; color: var(--muted); }
.extras-table { width: 100%; border-collapse: collapse; }
.extras-table th { font-size: 13px; color: var(--muted); font-weight: 600; text-align: left; padding: 0 6px 8px; }
.extras-table td { padding: 5px 6px; border-top: 1px solid var(--line-2); }
.extras-table td.qty { width: 90px; }
.extras-table td.qty input { min-height: 36px; padding: 6px 10px; text-align: right; }
.extras-table td.unit { color: var(--muted); font-size: 14px; width: 60px; }
.extras-table td.tot { text-align: right; width: 90px; font-variant-numeric: tabular-nums; font-weight: 600; }
.extras-table tr.off td { color: var(--faint); }
.extras-table tr.off td.tot { font-weight: 400; }
.extras-table label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.summary { position: sticky; top: 92px; display: grid; gap: 16px; }
.sum-list { display: grid; gap: 14px; }
.sum-list > div { display: grid; grid-template-columns: 22px 92px 1fr; gap: 10px; font-size: 14.5px; }
.sum-list .ic { color: var(--muted); }
.sum-list dt { color: var(--muted); }
.sum-list dd { margin: 0; font-weight: 600; color: var(--navy); }
.sum-list dd small { display: block; color: var(--muted); font-weight: 450; font-size: 13px; }
.total-box { background: var(--blue-50); border-radius: 12px; padding: 16px 18px; }
.total-box .t { display: flex; justify-content: space-between; align-items: baseline; font-size: 20px; font-weight: 700; color: var(--navy); }
.total-box .t b { font-size: 26px; }
.total-box .s { display: flex; justify-content: space-between; color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.footer-bar { position: sticky; bottom: 0; z-index: 20; margin: 20px -22px -40px; padding: 14px 22px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; backdrop-filter: blur(6px); }
.repeat-box { border: 1.5px dashed #c7d6ee; border-radius: 12px; padding: 16px; display: grid; gap: 14px; background: #fafcff; }
.day-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.day-picks label { display: inline-flex; }
.day-picks input { display: none; }
.day-picks span { display: inline-grid; place-items: center; min-width: 44px; height: 38px; padding: 0 10px; border-radius: 9px; border: 1.5px solid #d5ddea; font-weight: 600; cursor: pointer; color: var(--muted); background: #fff; }
.day-picks input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.preview-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.preview-list div { display: flex; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.preview-list div:last-child { border-bottom: 0; }
.preview-list .bad { color: #b91c1c; }
.preview-list .skip { color: var(--faint); text-decoration: line-through; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-50); color: var(--blue); border-radius: 7px; padding: 3px 4px 3px 10px; font-size: 13.5px; font-weight: 600; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 4px; display: grid; }

/* ---------- klantkaart ---------- */
.cust-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.cust-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.cust-icon { width: 88px; height: 88px; border-radius: 16px; background: var(--blue-50); display: grid; place-items: center; color: var(--blue); flex: none; }
.cust-hero h2 { font-size: 26px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cust-hero .meta { color: var(--muted); margin-top: 6px; }
.cust-hero .meta b { color: var(--text); }
.cust-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-left: auto; min-width: 340px; }
.cust-actions .btn:last-child:nth-child(odd) { grid-column: span 2; }
.overview > div { display: grid; grid-template-columns: 26px 1fr 1fr; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.overview .ic { color: var(--muted); }
.overview b { font-weight: 650; }
.handy { background: var(--green-50); border: 1px solid var(--green-100); }
.handy h3 { display: flex; gap: 10px; align-items: center; color: #11592b; margin-bottom: 10px; }
.handy li { list-style: none; display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.handy ul { margin: 0; padding: 0; }
.handy .ic { color: var(--green); }
.memo-box { background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; min-height: 60px; }
.notes-list { display: grid; gap: 10px; }
.notes-list .n { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.notes-list .n small { color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* ---------- facturen ---------- */
.inv-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.fchip { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: 600 15px var(--font); color: var(--text); cursor: pointer; }
.fchip i { font-style: normal; background: rgba(0,0,0,.06); border-radius: 99px; padding: 1px 9px; font-size: 13.5px; }
.fchip.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; }
.fchip.c-blue { background: var(--blue-50); } .fchip.c-red { background: var(--red-50); color: #b91c1c; } .fchip.c-green { background: var(--green-50); color: #13803c; } .fchip.c-purple { background: var(--purple-50); color: var(--purple); }
.inv-layout { display: grid; grid-template-columns: minmax(400px, 1fr) minmax(0, 1.3fr) 320px; gap: 16px; align-items: start; }
.inv-list { padding: 14px; }
.inv-list .table td { padding: 10px 8px; }
.inv-list .table th { padding: 9px 8px; }
.inv-list-scroll { max-height: calc(100vh - 290px); overflow: auto; }
.lines-table { width: 100%; border-collapse: collapse; }
.lines-table th { text-align: left; font-size: 13.5px; color: var(--navy); background: #f4f7fb; padding: 9px 6px; font-weight: 650; }
.lines-table td { padding: 5px 4px; border-bottom: 1px solid var(--line-2); }
.lines-table input, .lines-table select { min-height: 36px; padding: 6px 9px; font-size: 14.5px; }
.lines-table .q { width: 72px; } .lines-table .p { width: 100px; } .lines-table .c { width: 130px; } .lines-table .t { width: 100px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; } .lines-table .d { width: 38px; }
.lines-table .q input, .lines-table .p input { text-align: right; }
.inv-total { display: flex; justify-content: space-between; align-items: center; background: #eef2f8; border-radius: 10px; padding: 14px 18px; font-size: 19px; font-weight: 700; color: var(--navy); }
.inv-total b { font-size: 24px; }
.inv-actions { display: grid; gap: 10px; }
.inv-actions .btn { justify-content: flex-start; padding-left: 20px; }

/* ---------- rapportage ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; gap: 16px; align-items: center; }
.kpi-ic { width: 58px; height: 58px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; }
.kpi small { color: var(--muted); font-size: 14.5px; }
.kpi b { display: block; font-size: 26px; color: var(--navy); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 13.5px; font-weight: 600; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); } .delta.flat { color: var(--muted); }
.rep-grid { display: grid; grid-template-columns: 1.25fr 1fr 0.9fr; gap: 16px; margin-bottom: 16px; }
.rep-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.bars text { font: 12.5px var(--font); fill: var(--muted); }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.donut-legend { display: grid; gap: 8px; font-size: 14px; flex: 1; min-width: 160px; }
.donut-legend div { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.donut-legend i { width: 11px; height: 11px; border-radius: 50%; }
.hbar { display: grid; grid-template-columns: 1fr 1.3fr 50px; gap: 12px; align-items: center; padding: 8px 0; font-size: 14.5px; }
.hbar .track { height: 14px; background: #edf1f7; border-radius: 4px; overflow: hidden; }
.hbar .fill { height: 100%; background: #4a8ef0; border-radius: 4px; }
.hbar .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.export-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.export-grid .btn { justify-content: flex-start; font-weight: 550; white-space: normal; text-align: left; padding: 8px 12px; line-height: 1.25; }

/* ---------- instellingen ---------- */
.set-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.form-rows { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.form-row > span { font-size: 14.5px; color: var(--text); }
.logo-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; place-items: center; min-height: 130px; background: #fff; }
.logo-box img { max-width: 100%; max-height: 120px; object-fit: contain; }
.admin-only { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; background: var(--red-50); color: #b42318; padding: 4px 10px; border-radius: 7px; }
.tpl-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tpl-list button { display: flex; align-items: center; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line-2); padding: 12px 14px; cursor: pointer; font: inherit; gap: 10px; }
.tpl-list button:last-child { border-bottom: 0; }
.tpl-list button:hover, .tpl-list button.on { background: var(--blue-50); }
.tpl-list b { display: block; font-size: 14.5px; color: var(--navy); }
.tpl-list small { color: var(--muted); }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chips button { border: 1px solid var(--blue-100); background: var(--blue-50); color: var(--blue); border-radius: 6px; padding: 3px 8px; font: 600 12.5px ui-monospace, Consolas, monospace; cursor: pointer; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #f4f6fa; border-radius: 6px; padding: 2px 6px; }
pre.log { background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12.5px; max-height: 360px; overflow: auto; white-space: pre-wrap; }

/* ---------- dialogen, meldingen ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(15, 30, 55, .42); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .12s; }
.modal { background: #fff; border-radius: 16px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(15,30,55,.3); }
.modal-wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 10px; }
.modal-body { padding: 8px 22px 16px; overflow: auto; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: center; background: #fff; border-left: 5px solid var(--green); border-radius: 10px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(15,30,55,.18); font-weight: 550; max-width: 440px; transition: opacity .3s, transform .3s; }
.toast .ic { color: var(--green); }
.toast-err { border-left-color: var(--red); } .toast-err .ic { color: var(--red); }
.toast-warn { border-left-color: var(--amber); } .toast-warn .ic { color: var(--amber); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- inloggen ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% 0%, #e3eefe, transparent), var(--bg); }
.login { width: min(420px, 100%); padding: 32px; }
.login .brand { justify-content: center; margin-bottom: 22px; }
.login h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.login .sub { text-align: center; color: var(--muted); margin-bottom: 20px; }
.login form { display: grid; gap: 14px; }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); }

/* ---------- responsief ---------- */
@media (max-width: 1380px) {
  .inv-layout { grid-template-columns: minmax(340px, 1fr) minmax(0, 1.3fr); }
  .inv-layout > .inv-side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .rep-grid { grid-template-columns: 1fr 1fr; }
  .rep-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .search { width: 220px; }
  .res-layout, .cust-layout, .set-grid, .rep-grid-2 { grid-template-columns: 1fr; }
  .summary, .panel { position: static; }
  .plan-layout.with-panel { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .search { order: 2; flex: 1; width: auto; }
  main { padding: 14px 12px 40px; }
  .res-main, .grid-2, .grid-3, .grid-4, .inv-layout, .inv-layout > .inv-side, .rep-grid, .kpis, .export-grid { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .res-sec, .form-row { grid-template-columns: 1fr; gap: 8px; }
  .cust-actions { min-width: 0; width: 100%; margin: 0; }
  .footer-bar { margin: 20px -12px -40px; flex-wrap: wrap; }
  .brand-name { font-size: 21px; }
  .plan { grid-template-columns: 130px var(--tlw); min-width: calc(130px + var(--tlw)); }
}
@media print {
  .topbar, .footer-bar, .plan-bar button, .legend, .panel { display: none !important; }
  body { background: #fff; }
}

/* ---------- v2: extra ruimtes, kalender, week ---------- */
.xroom { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1.5px dashed #c7d6ee; border-radius: 10px; background: #fafcff; }
.xroom-n { width: 26px; height: 26px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font-weight: 700; flex: none; }
.xroom select { min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.xroom .avail { min-height: 36px; }
.cal-anchor { position: relative; }
button.plan-date { background: none; border: 0; font: inherit; font-size: 22px; font-weight: 700; color: var(--navy); padding: 6px 10px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
button.plan-date:hover { background: var(--line-2); }
.calpop { position: absolute; top: 52px; left: 0; z-index: 60; width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(19,48,92,.18); padding: 12px; }
.calpop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.calpop-head b { font-size: 17px; color: var(--navy); }
.calpop-grid { display: grid; grid-template-columns: 34px repeat(7, 1fr); gap: 3px; }
.calpop-grid .dh { text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.calpop-grid span.wn { text-align: center; font-size: 11.5px; color: var(--faint); padding: 4px 0; }
.calpop-grid button.wn { border: 0; background: none; color: var(--blue); font: 600 12px var(--font); cursor: pointer; border-radius: 7px; }
.calpop-grid button.wn:hover { background: var(--blue-50); }
.cd { position: relative; height: 40px; border: 0; border-radius: 9px; background: none; font: 550 14.5px var(--font); color: var(--text); cursor: pointer; }
.cd:hover { background: var(--line-2); }
.cd.we { color: #4b5b75; }
.cd.out { color: #b6bfcc; }
.cd.vak { background: var(--amber-50); }
.cd.feest { background: var(--purple-50); color: var(--purple); }
.cd.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cd.sel { background: var(--blue); color: #fff; }
.cd i { position: absolute; right: 3px; top: 2px; font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--blue); }
.cd.sel i { color: #fff; }
.calpop-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.blk .grp { display: inline-flex; vertical-align: -1px; margin-right: 4px; opacity: .75; }
.cur-room { font-weight: 700; }
.week { display: grid; grid-template-columns: 170px repeat(7, minmax(150px, 1fr)); min-width: 1220px; }
.wk-corner, .wk-room { position: sticky; left: 0; z-index: 3; background: #fff; border-right: 1px solid var(--line); }
.wk-corner { padding: 0 16px; display: flex; align-items: center; font-weight: 650; color: var(--navy); border-bottom: 1px solid var(--line); }
.wk-day { display: grid; padding: 8px 10px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-2); color: var(--text); text-decoration: none !important; line-height: 1.25; }
.wk-day:hover { background: var(--blue-50); }
.wk-day b { font-size: 14.5px; color: var(--navy); }
.wk-day span { font-size: 13px; color: var(--muted); }
.wk-day small { font-size: 11.5px; font-weight: 600; margin-top: 2px; }
.wk-day small.vak { color: #9a5304; } .wk-day small.feest { color: var(--purple); }
.wk-day.today { background: var(--blue-50); }
.wk-day.we, .wk-cell.we { background: #fbfcfe; }
.wk-room { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line-2); font-weight: 600; font-size: 14px; min-height: 46px; }
.wk-room .ic { color: var(--muted); }
.wk-room.half { padding-left: 20px; font-weight: 550; }
.wk-cell { border-bottom: 1px solid var(--line-2); border-left: 1px solid var(--line-2); padding: 4px; display: grid; gap: 3px; align-content: start; cursor: pointer; min-height: 46px; }
.wk-cell:hover { background: #f7faff; }
.wk-cell.today { background: #f5f9ff; }
.wk-chip { display: block; font-size: 12.5px; padding: 3px 7px; border-radius: 6px; border: 1px solid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; }
.wk-chip.vast { background: var(--vast); border-color: var(--vast-b); color: var(--vast-t); }
.wk-chip.inc { background: var(--inc); border-color: var(--inc-b); color: var(--inc-t); }
.wk-chip.optie { border-style: dashed; }
