/* ============================================================================
   BITB Kostenbewaking – tool-eigen opmaak, bovenop bitb-basis.css.
   Geen nieuwe kleuren of lettertypes: alleen de variabelen uit de basis.
   ============================================================================ */
a.kaal { color: inherit; text-decoration: none; }
.uitleg { margin-top: 10px; }
.vinkje { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--grijs); white-space: nowrap; }

/* Schermvullend: de inhoud scrolt, kop/tabs/werkbalk blijven staan */
.inhoud { flex: 1; min-height: 0; overflow: auto; }
.lijstkaart { overflow: auto; }
body.vol .lijstkaart { max-height: 100%; }
.kaart > .tabel { border-radius: 14px; }
.tabel tfoot td { font-weight: 600; background: var(--paars-donker); color: #fff; border-top: 0; border-bottom: 0; position: sticky; bottom: 0; }
.tabel tfoot .pct { color: rgba(255,255,255,.75); }
.tabel tfoot .neg { color: #FFB3B3; }
.tabel tfoot a { color: #fff; }
/* Kolomkoppen BITB-paars met witte tekst (zoals de planning) */
.tabel th { background: var(--paars); color: #fff; border-bottom-color: var(--paars); }
.tabel th.sorteer { cursor: pointer; user-select: none; white-space: nowrap; }
.tabel th.sorteer:hover { background: var(--paars-donker); }
.tabel th .pijl { color: #fff; opacity: .45; font-size: 11px; }
.tabel th .pijl.aan { opacity: 1; }
.tabel th.sorteer:hover .pijl { opacity: 1; }

/* Bedragen rechts, cijfers even breed */
.bedrag, .tabel td.bedrag, .tabel th.bedrag { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.neg { color: var(--rood); }
.zacht { color: var(--grijs); }
.kb-lijst td.code { font-weight: 600; white-space: nowrap; }
.tabel tr.vervallen td { color: var(--grijs); }
.tabel tr.vervallen .oms { text-decoration: line-through; }
.oms { font-weight: 600; }
.tabel .sub { display: block; margin-top: 1px; }
.tabel .nr { width: auto; font-variant-numeric: tabular-nums; }
.label + .label { margin-left: 4px; }
button.label { border: 0; cursor: pointer; white-space: nowrap; }
button.label:hover { outline: 1px solid var(--paars); }

/* Voortgangsbalkje (gefactureerd / benut) */
.balkje { display: block; height: 5px; border-radius: 99px; background: var(--lijn2); margin-top: 4px; min-width: 70px; overflow: hidden; }
.balkje i { display: block; height: 100%; background: var(--paars); border-radius: 99px; }
.balkje.vol i { background: var(--klaar); }
.balkje.over i { background: var(--rood); }
.balkje.let-op i { background: var(--oranje); }
.pct { font-size: 11.5px; color: var(--grijs); }

/* Keuzemenu bij een knop (snelle statuswissel) */
.keuzemenu { position: fixed; z-index: 70; right: auto; top: 0; }
.keuzemenu .item.aan { background: var(--paars-licht); }

/* Formulier: bedragen rechts, kleine groepkopjes, secties per fase */
.formulier input.bedrag { text-align: right; }
.formulier .groep { grid-column: 1 / -1; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--paars); font-weight: 600; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--lijn2); }
.formulier .drie { display: grid; grid-template-columns: minmax(0, 1fr) 128px 120px; gap: 8px; }
.formulier .drie > *, .formulier .drie input { min-width: 0; }
.formulier .drie input[type=date] { padding-left: 8px; padding-right: 6px; }
.formulier .twee { display: grid; grid-template-columns: 1fr 150px; gap: 8px; }
.formulier .klein-label { display: block; font-size: 11px; color: var(--grijs); margin-bottom: 2px; font-weight: 400; }
.formulier .seg button { padding: 5px 9px; }
.formulier .heel { grid-column: 1 / -1; }
.formulier .sec.verborgen { display: none; }
.dl-sectie { margin-top: 12px; }
.dl-sectie h3 { margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.dl-sectie .tabel { font-size: 12.5px; }
.dl-sectie .tabel td, .dl-sectie .tabel th { padding: 5px 8px; }
.historie { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.historie li { display: grid; grid-template-columns: 92px 92px 1fr auto; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--lijn2); }
.historie li:last-child { border-bottom: 0; }

/* Budgetposten */
.tabel tr.onvoorzien td { font-style: italic; color: var(--grijs); }
.opbouw { display: block; font-size: 11px; color: var(--grijs); line-height: 1.5; }

/* Cashflow */
.cf { font-size: 12px; }
.cf th, .cf td { white-space: nowrap; }
.cf td.cel { text-align: right; min-width: 92px; font-variant-numeric: tabular-nums; }
.cf td.cel span { display: block; }
.c-goed { color: var(--klaar); }
.c-open { color: var(--oranje); }
.c-verw { color: var(--grijs); font-style: italic; }
.cf td.nu { background: var(--paars-licht); }
.cf th.nu { background: var(--paars-donker); }
.cf .eerste { position: sticky; left: 0; background: #fff; z-index: 1; max-width: 320px; white-space: normal; }
.cf thead .eerste { z-index: 2; background: var(--paars); }
.cf tfoot .eerste { z-index: 2; background: var(--paars-donker); }
.cf tfoot td.nu { background: var(--paars); }
.legenda { display: flex; gap: 14px; font-size: 12px; color: var(--grijs); margin: 0 0 8px; flex-wrap: wrap; }

/* Signalen */
.sig-groep { margin-bottom: 12px; }
.sig-groep h3 { color: var(--inkt); }
.sig-groep h3.fout { color: var(--rood); }
.sig-groep h3.let-op { color: var(--oranje); }

.leeg .knop { margin-top: 12px; }
@media (max-width: 900px) { .formulier .drie, .formulier .twee { grid-template-columns: 1fr; } }

/* Linkveld: invoer met knop "Openen" ernaast; links in de lijst */
.formulier .linkveld { flex-wrap: nowrap; }
.formulier .linkveld input { flex: 1; min-width: 0; }
.tabel .links a { font-size: 12px; text-decoration: none; }
.tabel .links a:hover { text-decoration: underline; }
.fact-oms { color: var(--inkt); }

/* Venster kostenregel: links de gegevens, rechts facturen en historie (geen scrollen nodig) */
.rv.met-zij { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.rv-zij { border-left: 1px solid var(--lijn2); padding-left: 20px; }
.rv-zij h3 { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; }
.rv-stand { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; background: var(--vlak); border-radius: 10px; padding: 9px 12px; }
.rv-stand small { display: block; color: var(--grijs); font-size: 11.5px; }
.rv-stand b { font-size: 14px; font-variant-numeric: tabular-nums; }
.rv-stand .pct { margin-left: 4px; }
.rv-stand .balkje { grid-column: 1 / -1; }
.rv-stand p { grid-column: 1 / -1; margin: 0; }
.rv-facturen { max-height: 290px; overflow: auto; border: 1px solid var(--lijn2); border-radius: 10px; }
.rv-facturen .tabel { font-size: 12.5px; }
.rv-facturen .tabel td { padding: 6px 8px; }
.rv-hist { margin-top: 10px; font-size: 13px; }
.rv-hist summary { cursor: pointer; font-weight: 600; color: var(--paars); }
.formulier.compact { gap: 8px 12px; }
.formulier .blok-velden { display: grid; gap: 6px; }
.formulier input.kort { max-width: 160px; }
.knop-link { border: 0; background: none; color: var(--paars); font-weight: 600; font-size: 12.5px; padding: 0; justify-self: start; }
@media (max-width: 1000px) { .rv.met-zij { grid-template-columns: 1fr; } .rv-zij { border-left: 0; padding-left: 0; } }
.rv-facturen .tabel { table-layout: fixed; }
.rv-facturen .tabel td:nth-child(2) { width: 104px; }
.rv-facturen .tabel td:nth-child(3) { width: 104px; }
.rv-facturen .tabel .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-hist .historie li { grid-template-columns: 86px 74px 1fr auto; }

/* Werkbalk op één regel: keuzelijsten met een vaste maximale breedte, lange tekst afgekapt met … */
.werkbalk select { max-width: 210px; text-overflow: ellipsis; }
.werkbalk input[type=search] { width: 220px; }
/* Knoppen in de laatste kolom (Mail, Akkoord, link) naast elkaar */
.tabel td.acties { white-space: nowrap; text-align: right; }
.tabel td.acties .knop + .knop { margin-left: 4px; }

/* Projectkleur uit het register (al_projecten.kleur) */
/* Maat in em en onderkant op de basislijn: het midden valt dan precies op de helft van de hoofdletters (Lexend). */
.pkleur { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .5em; vertical-align: 0; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.tabel td.code { white-space: nowrap; }
