/* =====================================================================
   Catering & Zalen – stijlblad
   ===================================================================== */
:root {
  --brand: #1f4e79;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #6b7686;
  --line: #e3e7ee;
  --soft: #f7f9fc;
  --ok: #15803d;   --ok-bg: #e7f6ec;
  --warn: #b45309; --warn-bg: #fdf3e2;
  --bad: #b91c1c;  --bad-bg: #fdecec;
  --info: #1d4ed8; --info-bg: #e8effd;
  --purple: #6d28d9; --purple-bg: #f1ebfd;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
code { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; word-break: break-all; }
pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 10px; overflow: auto; font-size: 12.5px; }
.ico { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pad { padding: 0 18px 16px; }
.yes { color: var(--ok); font-weight: 600; }
.warn-text { color: var(--warn); }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
body.with-sidebar { padding-left: 248px; }
.main { padding: 24px 32px 48px; max-width: 1500px; }
body.embed .main { padding: 16px 20px 32px; max-width: none; }
body.bare .main { padding: 0; max-width: none; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column;
  background: var(--brand); color: #fff; z-index: 20;
  background-image: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.18));
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; color: #fff; font-weight: 650; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 400; opacity: .7; font-size: 11.5px; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-section { text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; opacity: .55; margin: 16px 10px 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: rgba(255,255,255,.86); font-size: 13.5px; }
.sidebar nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.count { margin-left: auto; background: #f59e0b; color: #111; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; line-height: 18px; }
h2 .count, h3 .count { margin-left: 6px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; }
.me small { display: block; opacity: .7; }
.me a { margin-left: auto; color: #fff; opacity: .7; }
.me a:hover { opacity: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-weight: 700; }
.menu-toggle { display: none; }

.tabs { display: flex; gap: 2px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 0 12px; position: sticky; top: 0; z-index: 10; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 11px 12px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs .ico { width: 16px; height: 16px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.intro { margin: -6px 0 14px; }

/* ---------- Kaarten & lijsten ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 10px; }
.card > h2 { padding: 16px 18px 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols > .card { margin-bottom: 18px; }
.items { display: flex; flex-direction: column; padding: 0 8px 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.item:hover { background: var(--soft); text-decoration: none; }
.item-date { width: 44px; text-align: center; font-size: 11px; text-transform: uppercase; color: var(--muted); line-height: 1.1; flex: none; }
.item-date b { display: block; font-size: 19px; color: var(--text); }
.item-main { flex: 1; min-width: 0; }
.item-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-main small { color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(0,0,0,.1); }
.tag { display: inline-block; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; font-size: 11.5px; padding: 0 6px; color: var(--muted); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h2 { color: var(--text); margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--text); }
a.stat:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.stat b { display: block; font-size: 22px; line-height: 1.1; }
.stat small { color: var(--muted); }
.stat-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, white); }

.room-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 0 18px 18px; }
.room-chip { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.room-chip small { color: var(--muted); }
.room-chip span { margin-top: 4px; font-weight: 600; font-size: 12.5px; }
.room-chip.free span { color: var(--ok); }
.room-chip.busy span { color: var(--bad); }

/* ---------- Badges & meldingen ---------- */
.badge { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-muted { background: #eef1f5; color: var(--muted); }
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-ok { background: var(--ok-bg); color: #14532d; border-color: #bfe5cb; }
.alert-warn { background: var(--warn-bg); color: #7c3d06; border-color: #f4d9a8; }
.alert-bad { background: var(--bad-bg); color: #7f1d1d; border-color: #f5c2c2; }
.alert-info { background: var(--info-bg); color: #1e3a8a; border-color: #c6d6fa; }
.meta-bar { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 12px 18px; }
.status-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 18px; }
.note { background: #fffbea; border: 1px solid #f6e7a6; border-radius: 8px; padding: 6px 10px; margin: 8px 0 0; font-size: 12.5px; }

/* ---------- Knoppen ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 9px; font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { background: var(--soft); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 85%, black); }
.btn-danger { color: var(--bad); border-color: #f1c4c4; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.danger-zone { margin: 4px 0 18px; display: flex; gap: 12px; align-items: center; }

/* ---------- Formulieren ---------- */
.form { padding: 20px; }
.form h2 { margin-bottom: 14px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.wide { grid-column: 1 / -1; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field.two > div { display: flex; flex-direction: column; gap: 5px; }
label { font-weight: 550; font-size: 13px; }
.help { color: var(--muted); }
input, select, textarea { font: inherit; color: inherit; border: 1px solid #d3d9e2; border-radius: 9px; padding: 8px 10px; background: #fff; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=color] { padding: 2px; height: 38px; }
input[type=checkbox], input[type=radio] { width: auto; }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { background: var(--soft); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; padding: 6px 10px; }
.toolbar label { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; color: var(--muted); }
.copy { display: flex; gap: 8px; margin: 8px 0 12px; }
.copy input { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* Zaalkeuze */
.room-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.room-opt { position: relative; display: block; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px 10px 16px; cursor: pointer; font-weight: 400; background: #fff; transition: border-color .15s, box-shadow .15s; }
.room-opt::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.room-opt input { position: absolute; opacity: 0; pointer-events: none; }
.room-opt b { display: block; }
.room-opt small { display: block; color: var(--muted); }
.room-opt .fac { font-size: 11.5px; }
.room-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.room-opt .ro-state { font-style: normal; font-size: 12px; font-weight: 600; }
.room-opt.is-free .ro-state { color: var(--ok); }
.room-opt.is-busy { opacity: .55; }
.room-opt.is-busy .ro-state { color: var(--bad); }
.room-opt.is-small { opacity: .55; }

.catering-toggle { margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { display: none; }
.switch span { width: 40px; height: 22px; border-radius: 999px; background: #cfd6e0; position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { left: 21px; }
.catering-box { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }

/* Productkiezer */
.picker { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.picker-tabs { display: flex; gap: 4px; padding: 8px; background: var(--soft); border-bottom: 1px solid var(--line); overflow-x: auto; }
.picker-tabs button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font: inherit; cursor: pointer; color: var(--muted); white-space: nowrap; }
.picker-tabs button.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.picker-panel { display: none; padding: 6px; }
.picker-panel.active { display: block; }
.product { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 10px; }
.product + .product { border-top: 1px solid var(--line); border-radius: 0; }
.product.selected { background: color-mix(in srgb, var(--brand) 6%, white); }
.p-info { flex: 1; min-width: 0; }
.p-info b { display: block; }
.p-info small { display: block; color: var(--muted); }
.p-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.allergen { background: #fff4e5; color: #9a5b00; border-radius: 5px; padding: 0 5px; font-size: 11px; }
.qty { display: flex; align-items: center; border: 1px solid #d3d9e2; border-radius: 9px; overflow: hidden; flex: none; }
.qty button { width: 32px; height: 34px; border: 0; background: var(--soft); font-size: 17px; cursor: pointer; color: var(--text); }
.qty button:hover { background: #e9edf3; }
.qty input { width: 52px; border: 0; border-radius: 0; text-align: center; padding: 6px 2px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.picker-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--soft); }
.picker-foot b { font-size: 16px; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--soft); }
.table tfoot th { text-transform: none; font-size: 13px; color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fafbfd; }
tr.inactive td { opacity: .5; }
.decide { display: inline-flex; gap: 6px; }

/* ---------- Planbord zalen ---------- */
.board-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.date-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.date-nav input { width: auto; padding: 5px 8px; }
.date-label { margin-left: 8px; font-size: 15px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg a { padding: 6px 14px; color: var(--muted); font-weight: 550; }
.seg a.active { background: var(--brand); color: #fff; }
.seg a:hover { text-decoration: none; }
.board { position: relative; overflow-x: auto; padding: 4px 0 8px; }
.board-row { display: flex; min-width: 900px; border-bottom: 1px solid var(--line); }
.board-row:last-of-type { border-bottom: 0; }
.board-label { width: 190px; flex: none; padding: 10px 14px; border-left: 4px solid var(--c, transparent); }
.board-label b { display: block; font-size: 13px; }
.board-label small { color: var(--muted); }
.board-track { position: relative; flex: 1; min-height: 58px; }
.board-hours .board-track { min-height: 28px; }
.board-hours span { position: absolute; top: 6px; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.board-hours span:first-child { transform: none; padding-left: 3px; }
.board-track .hl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.board-track[data-room] { cursor: copy; }
.board-track[data-room]:hover { background: #fafcff; }
.block { position: absolute; top: 6px; bottom: 6px; border-radius: 8px; padding: 4px 8px; overflow: hidden; color: #fff; background: var(--c);
  box-shadow: 0 1px 2px rgba(0,0,0,.15); font-size: 12px; line-height: 1.3; cursor: pointer; z-index: 2; }
.block:hover { text-decoration: none; filter: brightness(1.08); z-index: 3; }
.block b, .block small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block small { opacity: .9; font-size: 11px; }
.block.pending, .chip.pending { background: repeating-linear-gradient(45deg, var(--c), var(--c) 6px, color-mix(in srgb, var(--c) 70%, white) 6px, color-mix(in srgb, var(--c) 70%, white) 12px); }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; top: -3px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.table.week td { min-width: 150px; height: 64px; position: relative; padding: 6px; }
.table.week th.is-today, .table.week td.is-today { background: color-mix(in srgb, var(--brand) 5%, white); }
.week-room { border-left: 4px solid var(--c); text-transform: none !important; letter-spacing: 0 !important; background: #fff !important; color: var(--text) !important; min-width: 150px; }
.week-room small { display: block; color: var(--muted); font-weight: 400; }
.chip { display: block; background: var(--c); color: #fff; border-radius: 6px; padding: 2px 7px; font-size: 11.5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip:hover { text-decoration: none; filter: brightness(1.08); }
.table.week .add { position: absolute; right: 6px; bottom: 4px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); opacity: 0; }
.table.week td:hover .add { opacity: 1; background: var(--soft); }
.tv-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; background: var(--brand); color: #fff; }
.tv-clock { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
body.bare .board-toolbar, body.bare .board, body.bare .table-wrap { margin-left: 16px; margin-right: 16px; }

/* ---------- Keukenplanbord ---------- */
.cols-kitchen { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; overflow-x: auto; }
.kanban-col { background: #eaeef4; border-radius: 12px; padding: 10px; min-height: 200px; }
.kanban-col h3 { padding: 2px 4px 10px; display: flex; align-items: center; }
.kc-te_keuren { background: #fbf2e3; }
.kc-geleverd { background: #e6f3ea; }
.kcard { background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--shadow); border-left: 4px solid var(--brand); }
.kcard.urgent { border-left-color: #ef4444; }
.kcard-top { display: flex; justify-content: space-between; align-items: center; }
.kcard .time { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kcard > b { display: block; }
.kcard small { color: var(--muted); display: block; }
.kcard ul { margin: 8px 0; padding-left: 16px; font-size: 13px; }
.kcard form { margin-top: 8px; }
.production { position: sticky; top: 16px; }
.production .table td { padding: 6px 12px; }

/* ---------- Rapporten ---------- */
.bars { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 170px; gap: 12px; align-items: center; font-size: 13px; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 10px; background: #edf0f5; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar-val { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Integraties ---------- */
.int-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.int-grid .card { margin: 0; }
.int-body { padding: 0 18px 18px; }
.int-body p { margin: 0 0 10px; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--brand) 25%, transparent), transparent), var(--bg); }
.login { width: 100%; max-width: 380px; padding: 28px; }
.login h1 { margin: 10px 0 2px; }
.login .field { margin: 14px 0; }
.login-logo { width: 48px; height: 48px; border-radius: 13px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.login-logo .ico { width: 24px; height: 24px; }

/* ---------- Outlook add-in ---------- */
body.addin { background: #fff; font-size: 13px; }
.addin-wrap { padding: 12px 14px 80px; }
.addin-wrap h2 { font-size: 15px; margin: 14px 0 8px; }
.addin-meta { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.addin-meta b { display: block; font-size: 14px; }
.addin-rooms { display: flex; flex-direction: column; gap: 6px; }
.addin-rooms .room-opt { padding: 8px 10px 8px 14px; }
.addin-foot { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
body.addin .product { flex-wrap: wrap; }
body.addin .grid-form { grid-template-columns: 1fr; gap: 10px; }

/* ---------- Responsief ---------- */
@media (max-width: 1100px) {
  .cols, .cols-kitchen { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .production { position: static; }
}
@media (max-width: 800px) {
  body.with-sidebar { padding-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  body.menu-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-toggle { display: block; position: fixed; top: 12px; left: 12px; z-index: 30; border: 1px solid var(--line); background: #fff; border-radius: 9px; width: 38px; height: 38px; font-size: 18px; }
  .main { padding: 64px 14px 40px; }
  .kanban { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; gap: 4px; }
  .bar-val { text-align: left; }
}

/* ---------- Afdrukken ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; padding: 0 !important; }
  .sidebar, .tabs, .menu-toggle, .actions, .toolbar, .status-bar, .no-print, .danger-zone, .form-actions, .date-nav .btn, .seg, form.inline { display: none !important; }
  .main { padding: 0; }
  .card { box-shadow: none; border: 0; }
  .cols-kitchen { display: none; }
  .print-only { display: block; }
  .print-order { break-inside: avoid; border-bottom: 1px solid #ccc; padding: 8px 0; }
  .block, .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =====================================================================
   v2 – boekingen, soorten, facturatie, widgets, grafieken
   ===================================================================== */
.center { text-align: center; }
.mini { width: 110px !important; padding: 5px 8px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--soft); color: var(--text); }
.stat em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }
.sec-title { margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.sec-title:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

/* Boekingsscherm */
.bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.bk-main .card { margin-bottom: 18px; }
.bk-side { position: sticky; top: 16px; }
.summary { padding: 18px; }
.summary h2 { margin-bottom: 10px; }
.sum-lines { max-height: 260px; overflow: auto; margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.sum-row span:first-child { color: var(--muted); }
.sum-row.total { font-size: 17px; border-top: 1px solid var(--line); margin: 6px 0 10px; padding-top: 10px; }
.sum-row.total span { color: var(--text); font-weight: 600; }
.summary .btn-block { margin-top: 8px; }
details.more { padding: 0; }
details.more > summary { padding: 14px 18px; cursor: pointer; font-weight: 600; color: var(--brand); }
details.more > .card { box-shadow: none; border: 0; border-top: 1px solid var(--line); margin: 0; border-radius: 0; }

.lines { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.line { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.line-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, white); font-size: 17px; flex: none; }
.line-main { flex: 1; min-width: 0; }
.line-main b { display: block; }
.line-main small { color: var(--muted); }
.line-price { font-weight: 600; white-space: nowrap; min-width: 80px; text-align: right; }

.add-panel { margin-top: 14px; border: 1px dashed #c9d2de; border-radius: 12px; padding: 14px; background: var(--soft); }
.type-tabs, .type-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.type-tabs button, .type-switch a { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font: inherit; cursor: pointer; color: var(--text); font-weight: 500; }
.type-tabs button.active, .type-switch a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.type-switch a:hover { text-decoration: none; }
.add-fields { margin-bottom: 8px; }
.extra-fields { margin: 4px 0 8px; padding: 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.rule-hint { margin: 4px 0 10px; }
.avail { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.avail .alert { grid-column: 1 / -1; }
.avail-card { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; position: relative; }
.avail-card::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.avail-card b { display: block; }
.avail-card small { display: block; color: var(--muted); font-size: 11.5px; }
.avail-card .state { font-style: normal; font-size: 12px; font-weight: 600; }
.avail-card.ok .state { color: var(--ok); }
.avail-card.no { opacity: .62; }
.avail-card.no .state { color: var(--bad); }
.avail-act { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; text-align: right; }
.avail-act .price { font-weight: 600; white-space: nowrap; }
.avail-act .price small { font-weight: 400; }

.picker-when { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.picker-when label { display: inline-flex; gap: 8px; align-items: center; }
.picker-when input { width: auto; padding: 5px 8px; }
.deadline { font-size: 12.5px; color: var(--muted); }
.deadline::before { content: "⏱ "; }
.deadline.passed { color: var(--bad); font-weight: 600; }
.tab-count { display: inline-block; margin-left: 6px; background: var(--brand); color: #fff; border-radius: 999px; font-size: 10.5px; padding: 0 6px; line-height: 16px; }
.product.unavailable { opacity: .45; }

/* Planbord v2 */
.board-track .dl { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.board-track .dl.is-today { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.board-hours .day-head { position: absolute; top: 6px; text-align: center; font-size: 11.5px; color: var(--muted); transform: none !important; font-weight: 600; }
.board-hours .day-head.is-today { color: var(--brand); }
.board-track[data-res] { cursor: copy; }
.board-track[data-res]:hover { background: #fafcff; }
.block { height: 40px; bottom: auto; }
.block.out { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.blackout { position: absolute; top: 2px; bottom: 2px; z-index: 1; border-radius: 6px; font-size: 11px; color: #555; padding: 3px 6px; overflow: hidden; white-space: nowrap;
  background: repeating-linear-gradient(135deg, #eceff3, #eceff3 6px, #f7f8fa 6px, #f7f8fa 12px); pointer-events: none; }

/* Uitvoering / goedkeuring */
.kcard-act { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
tr.late td { background: #fff5f5; }
.approval .card-head { align-items: flex-start; }
.approval .table td { vertical-align: middle; }

/* Dashboard widgets */
.widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; align-items: start; }
.widgets .card { margin: 0; }
.widget.wide { grid-column: span 2; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 0 18px 18px; }
.quick { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 11px; border: 1px solid var(--line); color: var(--text); font-weight: 600;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, white), #fff); }
.quick:hover { text-decoration: none; border-color: var(--c); }
.quick span { font-size: 20px; }
.avail-row { display: grid; grid-template-columns: 1fr 120px 60px; gap: 10px; align-items: center; padding: 7px 0; color: var(--text); border-bottom: 1px solid var(--line); }
.avail-row:last-child { border-bottom: 0; }
.avail-row:hover { text-decoration: none; }
.avail-row b { text-align: right; font-variant-numeric: tabular-nums; }
.big-num { color: var(--muted); margin-bottom: 8px; }
.big-num b { font-size: 24px; color: var(--text); margin-right: 6px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-stats div { background: var(--soft); border-radius: 10px; padding: 12px; }
.mini-stats b { display: block; font-size: 20px; }
.mini-stats small { color: var(--muted); }
.w-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }

/* Grafieken */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart-tip { position: absolute; z-index: 5; background: #111827; color: #fff; padding: 6px 9px; border-radius: 7px; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.chart-table { margin-top: 6px; font-size: 12px; }
.chart-table summary { color: var(--muted); cursor: pointer; }
.chart-table .table td { padding: 4px 8px; }
.wide-card { grid-column: 1 / -1; }
.filters .quick-ranges { display: inline-flex; gap: 10px; margin-left: 8px; font-size: 13px; }

/* Rechten */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 18px; margin: 8px 0 4px; }
.perm-grid .check { align-items: flex-start; }
.perm-admin { color: var(--purple); }
.matrix td, .matrix th { padding: 7px 12px; }

/* Factuur */
.invoice-doc { padding: 28px 32px; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.inv-title { text-align: right; }
.inv-title h1 { font-size: 26px; color: var(--brand); }
.inv-to { margin: 0 0 20px; padding: 12px 14px; background: var(--soft); border-radius: 10px; max-width: 360px; }
.invoice-doc .table th { background: transparent; }
.invoice-doc tr.grand th { font-size: 16px; color: var(--text); border-top: 2px solid var(--text); }

@media (max-width: 1100px) {
  .bk-layout { grid-template-columns: 1fr; }
  .bk-side { position: static; }
  .widget.wide { grid-column: auto; }
}
@media print {
  .bk-side, .add-panel, .type-switch, .picker-foot { display: none !important; }
  .bk-layout { display: block; }
  .invoice-doc { border: 0; padding: 0; }
  .chart-table { display: none; }
}
