/* 195k: alle kleuren van het portaal als variabelen. Dit is het lichte thema (= de kleuren van voor 195k);
   de andere thema's zetten dezelfde namen op een andere waarde (huisstijl.css). */
:root {
  --bg:#f4f5f7; --card:#fff; --sub:#f1f3f5; --soft:#f9fafb; --hover:#f3f4f6; --ctl:#fff; --ink:#1f2328;
  --ink2:#374151; --muted:#6b7280; --faint:#9ca3af; --fainter:#c0c4cc; --on-accent:#fff; --line:#e5e7eb;
  --line-soft:#f1f2f4; --line-mid:#d1d5db; --line-strong:#9ca3af; --accent:#2563eb; --chip:#eef2ff; --chip-line:#c7d2fe;
  --chip-ink:#3730a3; --sel:#f5f8ff; --sel2:#eef3fb; --sel3:#dbe6fd; --sel-line:#c9d6ee; --total-bg:#1f2937;
  --total-ink:#fff; --total-pos:#86efac; --total-neg:#fca5a5; --ok:#15803d; --ok-bg:#ecfdf3; --ok-line:#bbf7d0;
  --bad:#b91c1c; --bad-bg:#fef2f2; --bad-line:#fecaca; --neg:#b42318; --warn:#92400e; --warn-bg:#fffbeb;
  --warn-line:#fde68a; --or:#9a3412; --or-bg:#fff7ed; --or-line:#fed7aa; --info:#1e3a8a; --info-bg:#eff6ff;
  --info-line:#bfdbfe; --vi:#5b21b6; --vi-bg:#f5f3ff; --vi-line:#ddd6fe; --neg-soft:#d97757; --bad-dark:#7f1d1d;
  --bad2:#dc2626; --warn2:#b45309; --gold:#8a6d1d; --or2:#c2410c; --info2:#1e40af; --ok2:#16a34a; --ok-dark:#166534;
  --ok-bg2:#dcfce7; --ink3:#4b5563; --grid:#eef0f3; --axis:#9ca3af; --tip-bg:#1f2937; --plot:#c9ced6;
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
.top { display:flex; align-items:center; gap:16px; padding:14px 24px 4px; }
.top h1 { font-size:18px; margin:0; }
.back { color:var(--accent); text-decoration:none; font-size:12px; }
.status { color:var(--muted); font-size:12px; margin-left:auto; }
.filters { display:flex; flex-wrap:wrap; gap:18px; align-items:center; padding:10px 24px 12px; }
.filters label { display:flex; gap:6px; align-items:center; color:var(--muted); }
select { font:inherit; padding:5px 8px; border:1px solid var(--line); border-radius:6px; background:var(--card); color:var(--ink); }
.grp { display:flex; gap:8px; align-items:center; }
.lbl { color:var(--muted); }
.seg { display:flex; border:1px solid var(--line); border-radius:6px; overflow:hidden; background:var(--card); }
.seg button { font:inherit; font-size:12px; border:0; border-right:1px solid var(--line); background:var(--card); padding:5px 8px; cursor:pointer; color:var(--ink); }
.seg button:last-child { border-right:0; }
.seg button.on { background:var(--accent); color:var(--on-accent); }
.seg button.in { background:var(--sel3); }
.seg button:disabled { color:var(--fainter); cursor:default; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { font:inherit; font-size:12px; border:1px solid var(--line); background:var(--card); border-radius:999px; padding:4px 10px; cursor:pointer; }
.chip.on { background:var(--chip); border-color:var(--chip-line); color:var(--chip-ink); font-weight:600; }
.card { background:var(--card); margin:0 24px 24px; border:1px solid var(--line); border-radius:8px; padding:14px 16px; }
.bar { display:flex; gap:8px; align-items:center; margin-bottom:10px; flex-wrap:wrap; }
.btn { font:inherit; font-size:12px; border:1px solid var(--line); background:var(--card); border-radius:6px; padding:5px 10px; cursor:pointer; }
.btn:hover { border-color:var(--accent); color:var(--accent); }
.hint { color:var(--muted); margin-left:8px; }
.scroll { overflow-x:auto; }
table { border-collapse:collapse; width:100%; font-variant-numeric:tabular-nums; }
th, td { padding:5px 10px; text-align:right; white-space:nowrap; border-bottom:1px solid var(--line); }
th { color:var(--muted); font-weight:600; font-size:12px; position:sticky; top:0; background:var(--card); }
th:first-child, td:first-child { text-align:left; min-width:320px; }
td.tot, th.tot { border-left:1px solid var(--line); font-weight:600; }
/* --- hiërarchie --- */
tr.can { cursor:pointer; }
tr.can:hover td { filter: brightness(0.97); }
tr.can:hover td:first-child { text-decoration: underline; text-decoration-color:var(--chip-line); }
.tog { display:inline-block; width:18px; color:var(--accent); font-size:14px; line-height:1; }
/* staffelregels */
tr.lvl0 td { font-weight:600; }
tr.lvl0.open td { background:var(--sel2); border-top:1px solid var(--sel-line); }
tr.lvl0.open td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
/* niveau 2 */
tr.lvl1 td { font-size:12.5px; font-weight:600; color:var(--info); background:var(--sel); }
tr.lvl1 td:first-child { padding-left:30px; box-shadow: inset 4px 0 0 #93b4f5; }
tr.lvl1.open td { background:var(--sel2); }
/* niveau 3 */
tr.lvl2 td { font-size:12.5px; color:var(--ink2); background:var(--soft); }
tr.lvl2 td:first-child { padding-left:50px; box-shadow: inset 4px 0 0 #c7d7f8; }
/* rekeningen */
tr.acc td { font-size:12px; color:var(--muted); background:var(--card); border-bottom-color:var(--line-soft); font-weight:400; }
tr.acc td:first-child { box-shadow: inset 4px 0 0 #e3eafb; }
tr.acc1 td:first-child { padding-left:30px; }
tr.acc2 td:first-child { padding-left:50px; }
tr.acc3 td:first-child { padding-left:70px; }
tr.child .neg { color:var(--or2); }
tr.acc .neg { color:var(--neg-soft); }
/* subtotalen en resultaat */
tr.subtotal td { font-weight:700; background:var(--line); border-top:1px solid var(--line-strong); border-bottom:1px solid var(--line-strong); }
tr.subtotal.result td { background:var(--total-bg); color:var(--on-accent); font-size:13.5px; }
tr.subtotal.result .neg { color:var(--total-neg); }
tr.control td { color:var(--muted); font-style:italic; font-weight:400; }
tr.memo td { color:var(--muted); font-style:italic; font-weight:400; }
tr.memo.lvl0 td { border-top:1px dashed var(--line-mid); }
.adm { display:inline-block; font-size:10.5px; background:var(--hover); border:1px solid var(--line); border-radius:4px; padding:0 5px; margin-right:6px; color:var(--ink2); }
.neg { color:var(--neg); }
.empty { color:var(--muted); padding:20px; text-align:center; }

/* --- doorklikken naar boekingen --- */
tr.drill td.amt:not(:empty) { cursor:pointer; }
tr.drill td.amt:hover span { text-decoration: underline; }
.modal { position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:flex-start; justify-content:center; padding:3vh 16px; z-index:10; }
.modal[hidden] { display:none; }
.dialog { background:var(--card); border-radius:10px; width:min(1500px, 100%); max-height:94vh; display:flex; flex-direction:column; box-shadow:0 20px 50px rgba(0,0,0,.25); }
.dhead { display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid var(--line); }
.dhead h2 { font-size:15px; margin:0; flex:1; }
.dscroll { overflow:auto; padding:6px 18px 16px; }
table.bookings th, table.bookings td { text-align:left; font-size:12.5px; }
table.bookings th:first-child, table.bookings td:first-child { min-width:0; width:60px; }
table.bookings .num { text-align:right; }
table.bookings td.desc { white-space:normal; min-width:280px; }
table.bookings tr.sum td { font-weight:700; border-top:1px solid var(--line-strong); }
/* afsluitkolom (periode 55) */
th.closing { color:var(--warn); }

/* vergelijken */
.pos { color:var(--ok); }
tr.child .pos { color:var(--ok2); }
tr.subtotal.result .pos { color:var(--total-pos); }
tr.hgrp th { text-align:center; color:var(--ink); border-bottom:0; }
th.g, td.g { border-left:1px solid var(--line); }
tr.hgrp th.g { border-left:1px solid var(--line); }
#mode button:disabled { color:var(--fainter); }
/* actualiteit */
.fresh { font-size:12px; color:var(--ok); background:var(--ok-bg); border:1px solid var(--ok-line); border-radius:999px; padding:3px 10px; }
.fresh:empty { display:none; }
.fresh.warn { color:var(--warn); background:var(--warn-bg); border-color:var(--warn-line); }
table.bookings td.accn { white-space:normal; min-width:220px; }
/* navigatie tussen portaalpagina's */
.pages { display:flex; gap:4px; }
.pages a { color:var(--muted); text-decoration:none; font-size:14px; font-weight:600; padding:4px 10px; border-radius:6px; }
.pages a:hover { color:var(--accent); }
.pages a.on { color:var(--ink); background:var(--line); }

/* testomgeving */
.envbar { background:#f97316; color:var(--on-accent); font-weight:600; text-align:center; padding:6px 12px; font-size:13px; letter-spacing:.2px; }

/* 190w: acties van een venster rechtsboven, naast Sluiten (overal gelijk) */
.dhead .mact { display:flex; gap:8px; align-items:center; } .dhead .mact:empty { display:none; }
.dhead .mact .btn { text-decoration:none; }
