:root {
  --zwart: #0f1410;
  --zwart-2: #182019;
  --zwart-3: #243026;
  --groen: #649a28;
  --groen-2: #7fb93a;
  --groen-licht: #eef5e5;
  --grijs: #e8ebe7;
  --grijs-2: #f5f6f4;
  --lijn: #dfe3dd;
  --tekst: #141a15;
  --tekst-2: #5c665d;
  --oranje: #d9822b;
  --oranje-licht: #fdf1e4;
  --rood: #c0392b;
  --rood-licht: #fbeae8;
  --blauw: #2f6fb3;
  --blauw-licht: #e8f0fa;
  --radius: 12px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--tekst); background: var(--grijs-2); font-size: 14px; line-height: 1.45; }
a { color: var(--groen); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.muted { color: var(--tekst-2); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 232px; background: var(--zwart); color: #dfe6df; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; border-right: 3px solid var(--groen); }
.brand { padding: 22px 20px 18px; display: flex; align-items: center; gap: 10px; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--groen); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }
.brand .t1 { font-weight: 700; color: #fff; font-size: 15px; line-height: 1.1; }
.brand .t2 { font-size: 11px; color: #9aa79b; letter-spacing: .08em; text-transform: uppercase; }
.nav { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav a { color: #cfd8cf; padding: 9px 12px; border-radius: 9px; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.nav a:hover { background: var(--zwart-2); text-decoration: none; color: #fff; }
.nav a.actief { background: var(--zwart-3); color: #fff; box-shadow: inset 3px 0 0 var(--groen-2); }
.nav svg { width: 17px; height: 17px; opacity: .85; }
.side .taken { margin: 12px 12px 0; }
.side .taak { background: var(--zwart-2); border-radius: 9px; padding: 9px 10px; margin-bottom: 6px; font-size: 12px; color: #cfd8cf; display: block; }
.side .taak:hover { text-decoration: none; background: var(--zwart-3); }
.side .taak .bar { height: 4px; background: #2f3b31; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.side .taak .bar i { display: block; height: 100%; background: var(--groen-2); transition: width .4s; }
.side .taak.fout { color: #f3b9b2; }
.side .user { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--zwart-3); font-size: 12px; color: #9aa79b; }
.side .user b { color: #fff; display: block; font-size: 13px; }
.side .user a { color: #9aa79b; }
.main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--tekst-2); margin-bottom: 4px; }

/* ---------- Componenten ---------- */
.card { background: #fff; border: 1px solid var(--lijn); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card.flat { padding: 0; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--zwart); background: var(--zwart); color: #fff; padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #000; text-decoration: none; }
.btn.groen { background: var(--groen); border-color: var(--groen); }
.btn.groen:hover { background: #567f23; }
.btn.licht { background: #fff; color: var(--tekst); border-color: var(--lijn); }
.btn.licht:hover { background: var(--grijs-2); }
.btn.rood { background: #fff; color: var(--rood); border-color: #efc7c2; }
.btn.klein { padding: 5px 11px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; padding: 8px 11px; border: 1px solid var(--lijn); border-radius: 9px; background: #fff; color: var(--tekst);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--groen-licht); border-color: var(--groen); }
textarea { min-height: 70px; resize: vertical; }
.field { margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--tekst-2); margin-top: 3px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 160px; }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--tekst-2); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--lijn); background: var(--grijs-2); white-space: nowrap; }
table.t td { padding: 8px 12px; border-bottom: 1px solid #eef0ed; vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.klik { cursor: pointer; }
table.t tr.klik:hover td { background: #fafbf9; }
table.t tfoot td { font-weight: 700; border-top: 2px solid var(--lijn); background: var(--grijs-2); }
table.t td input[type=text] { padding: 5px 8px; border-radius: 7px; }

.pil { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pil.groen { background: var(--groen-licht); color: #456d16; }
.pil.oranje { background: var(--oranje-licht); color: #9a5413; }
.pil.rood { background: var(--rood-licht); color: var(--rood); }
.pil.blauw { background: var(--blauw-licht); color: var(--blauw); }
.pil.grijs { background: var(--grijs); color: var(--tekst-2); }
.pil.zwart { background: var(--zwart); color: #fff; }

.melding { padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; border: 1px solid; }
.melding.ok { background: var(--groen-licht); border-color: #cfe3b7; color: #355611; }
.melding.fout { background: var(--rood-licht); border-color: #efc7c2; color: #8a2a20; }
.melding.let { background: var(--oranje-licht); border-color: #f2d3b0; color: #7d4510; }
.melding ul { margin: 6px 0 0; padding-left: 18px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--lijn); margin-bottom: 16px; }
.tabs a { padding: 10px 14px; color: var(--tekst-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--tekst); }
.tabs a.actief { color: var(--tekst); border-bottom-color: var(--groen); }
.tabs a .n { background: var(--grijs); border-radius: 999px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.tabs a .n.oranje { background: var(--oranje-licht); color: #9a5413; }

.tegels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tegel { background: #fff; border: 1px solid var(--lijn); border-radius: var(--radius); padding: 14px 16px; }
.tegel .w { font-size: 22px; font-weight: 700; }
.tegel .l { font-size: 12px; color: var(--tekst-2); }
@media (max-width: 1000px) { .tegels { grid-template-columns: repeat(2, 1fr); } }

.voortgang { background: #fff; border: 1px solid var(--lijn); border-left: 4px solid var(--groen); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.voortgang .bar { height: 7px; background: var(--grijs); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.voortgang .bar i { display: block; height: 100%; background: var(--groen); width: 0; transition: width .5s; }
.voortgang.fout { border-left-color: var(--rood); }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--groen-licht); border-top-color: var(--groen); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Dossier ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; align-items: start; }
.split .pdf { position: sticky; top: 16px; height: calc(100vh - 40px); background: #fff; border: 1px solid var(--lijn); border-radius: var(--radius); overflow: hidden; }
.split .pdf iframe { width: 100%; height: 100%; border: 0; }
.split .pdf .pdfkop { padding: 8px 12px; border-bottom: 1px solid var(--lijn); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
@media (max-width: 1250px) { .split { grid-template-columns: 1fr; } .split .pdf { position: static; height: 70vh; } }

.memo { background: #fff; border: 1px solid var(--lijn); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.memo.uit { opacity: .62; }
.memo .kop { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--lijn); background: var(--grijs-2); }
.memo .kop .nr { background: var(--zwart); color: #fff; border-radius: 7px; padding: 1px 8px; font-weight: 700; font-size: 12px; }
.memo .kop .oms { font-weight: 600; flex: 1; }
.memo .kop input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--groen); }
.memo .tech { padding: 7px 14px; background: var(--oranje-licht); color: #7d4510; font-size: 12.5px; border-bottom: 1px solid #f2d3b0; }
.memo table.t td, .memo table.t th { padding: 6px 12px; }
.memo .exact { font-size: 12.5px; }
.memo .exact .pijl { color: var(--tekst-2); margin: 0 4px; }
.memo .niet { color: var(--rood); font-weight: 600; }
.memo .voor { color: #9a5413; }

.koppel td.src { white-space: nowrap; }
.koppel input.zoek { min-width: 260px; }
.koppel tr.open td { background: #fffaf3; }
.koppel tr.voorstel td { background: #fffdf8; }

.stap { display: flex; gap: 12px; align-items: flex-start; }
.stap .bol { width: 26px; height: 26px; border-radius: 50%; background: var(--zwart); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }

.leeg { text-align: center; padding: 40px 20px; color: var(--tekst-2); }
.leeg .groot { font-size: 16px; font-weight: 600; color: var(--tekst); margin-bottom: 6px; }

.dropzone { border: 2px dashed var(--lijn); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--grijs-2); cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--groen); background: var(--groen-licht); }
.dropzone .naam { font-weight: 600; margin-top: 6px; color: var(--tekst); }
.dropzone input { display: none; }

.verschil-nul { color: var(--groen); }
.verschil { color: var(--rood); font-weight: 700; }

/* ---------- Inlogscherm (zelfde opzet als RaBePro Jaarrekening) ---------- */
body.login { background: #d9ddd8; min-height: 100vh; }
.lg-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 14px 0 14px 14px; }
.lg-paneel { background: var(--zwart); border-radius: 18px; border: 2px solid var(--groen); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; }
.lg-paneel .lg-merk { position: absolute; top: 34px; left: 56px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.lg-paneel .lg-merk .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--groen); display: grid; place-items: center; font-weight: 800; }
.lg-paneel h1 { font-size: 42px; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 16px; max-width: 520px; }
.lg-paneel h1 em { font-style: normal; color: var(--groen-2); }
.lg-paneel p { color: #b9c4ba; font-size: 15px; max-width: 470px; margin: 0; }
.lg-paneel svg.lg-grafiek { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 38%; opacity: .9; }
.lg-paneel .lg-voet { position: absolute; bottom: 26px; left: 56px; font-size: 12px; color: #7f8c80; }
.lg-rechts { display: grid; place-items: center; padding: 30px; }
.lg-kaart { background: #fff; border-radius: 18px; padding: 38px 36px; width: 100%; max-width: 400px; box-shadow: 0 10px 40px rgba(15, 20, 16, .08); }
.lg-kaart h2 { font-size: 22px; margin: 0 0 4px; }
.lg-kaart .sub { color: var(--tekst-2); margin-bottom: 22px; }
.lg-kaart .btn { width: 100%; justify-content: center; padding: 11px 16px; margin-top: 6px; }
@media (max-width: 900px) { .lg-wrap { grid-template-columns: 1fr; padding: 10px; } .lg-paneel { min-height: 320px; padding: 80px 28px 40px; } .lg-paneel .lg-merk, .lg-paneel .lg-voet { left: 28px; } .lg-paneel h1 { font-size: 32px; } }
table.t th.num { text-align: right; }
.memo table.t { table-layout: fixed; }
.memo table.t th:nth-child(1), .memo table.t td:nth-child(1) { width: 38%; }
.memo table.t th:nth-child(2), .memo table.t td:nth-child(2) { width: 36%; }
.memo table.t th:nth-child(3), .memo table.t td:nth-child(3), .memo table.t th:nth-child(4), .memo table.t td:nth-child(4) { width: 13%; }
.memo form.memo-edit table.t th, .memo form.memo-edit table.t td { width: auto; }
.koppel td.small { min-width: 180px; }
