* { box-sizing: border-box; }
  html, body { margin: 0; }
  body { background: var(--wood-100); font-family: var(--font-body); color: var(--text-body); }
  .wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px 80px; }
  .mast { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 0 14px; border-bottom: 2.5px solid var(--leaf-600); }
  .mast .lhs { display: flex; align-items: center; gap: 14px; }
  .mast img { height: 42px; }
  .mast h1 { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--wood-900); margin: 0; white-space: nowrap; }
  .mast .intern { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ladybug-500); }
  .note { background: #F7E6C9; border: 1.5px solid #E9CF9E; border-radius: var(--radius-md); padding: 10px 14px; font-size: 12.5px; color: var(--wood-800); margin: 14px 0; }
  .controls { position: sticky; top: 0; z-index: 20; background: rgba(251,246,234,.95); backdrop-filter: blur(8px); padding: 12px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-bottom: 1.5px solid var(--border-subtle); }
  .search { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; background: var(--sand-0); border: 1.5px solid var(--border-default); border-radius: var(--radius-md); padding: 0 14px; min-height: 42px; }
  .search input { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; }
  select.brandsel { font-family: var(--font-body); font-size: 13px; border: 1.5px solid var(--border-default); border-radius: var(--radius-pill); padding: 9px 12px; background: var(--sand-0); cursor: pointer; }
  .btn { font-family: var(--font-display); font-weight: 500; font-size: 13.5px; padding: 10px 18px; border-radius: var(--radius-pill); border: none; cursor: pointer; background: var(--brand-secondary); color: var(--wood-50); }
  .btn.ghost { background: transparent; color: var(--text-body); border: 1.5px solid var(--border-default); }
  .btn[disabled] { opacity: .38; cursor: default; }
  span.hist { display: inline-flex; gap: 6px; padding: 4px; background: var(--wood-100); border-radius: var(--radius-pill); }
  .btn.hist { background: var(--sand-0); color: var(--wood-800); border: 1.5px solid var(--border-default); font-size: 13px; padding: 8px 14px; }
  .btn.hist:hover:not([disabled]) { border-color: var(--brand-primary); color: var(--leaf-700); }
  .btn.hist[disabled] { opacity: .55; }
  .actiebalk { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 40; width: max-content; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); padding: 9px 12px; background: rgba(245,234,212,.96); backdrop-filter: blur(10px); border: 1.5px solid var(--border-default); border-radius: var(--radius-pill); box-shadow: var(--shadow-lg); }
  .actiebalk .btn { font-size: 12.5px; padding: 8px 13px; }
  .actiebalk .scheiding { width: 1px; height: 22px; background: var(--border-default); }
  .actiebalk .balkweg { padding: 6px 11px; font-size: 15px; line-height: 1; }
  .actiebalk.in > *:not(.balkweg) { display: none; }
  .actiebalk.in { padding: 6px; }
  body { padding-bottom: calc(var(--balkhoogte, 60px) + 24px); }
  .rate { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
  .rate input { width: 62px; padding: 7px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); text-align: right; font-size: 13px; }
  table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 12px; font-size: 13px; background: var(--sand-0); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
  th { background: var(--leaf-600); color: var(--wood-50); font-family: var(--font-display); font-weight: 600; font-size: 12px; text-align: left; padding: 10px; position: sticky; top: var(--sticktop, 66px); z-index: 15; box-shadow: 0 1px 0 var(--leaf-700); }
  th.num, td.num { text-align: right; }
  td { padding: 6px 10px; border-bottom: 1px solid var(--border-subtle); }
  tr:nth-child(even) td { background: var(--sand-50); }
  td .art { font-size: 10.5px; color: var(--leaf-600); font-weight: 800; text-transform: uppercase; }
  td input.edit { width: 66px; padding: 5px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); text-align: right; font-size: 13px; }
  td input.edit.prijs { width: 92px; }
  td input.edit.prijs.eigen { border-color: var(--leaf-500); background: var(--leaf-50); color: var(--leaf-700); font-weight: 700; }
  img.kapot { display: none; }
  .meerbalk { margin-top: 10px; padding: 12px 14px; background: var(--sand-0); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-md); font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  /* ⚠️ Geen tekst meer die van het scherm valt (klantopgave 20 aug 2026): de tabel van LUIK 2 heeft
     elf kolommen — op een laptop past dat niet in de breedte, en dan verdween "Subtotaal post btw excl."
     buiten beeld. De tabel schuift nu horizontaal binnen haar eigen kader, met de eerste kolom
     (het toestel) vastgezet zodat je bij het scrollen blijft zien over welke post het gaat. */
  #results { overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  #results table { width: 100%; min-width: 1180px; }
  #results th, #results td { white-space: normal; }
  #results th.num, #results td.num { white-space: nowrap; }
  #results tbody td:nth-child(2) { min-width: 220px; }
  #results::-webkit-scrollbar { height: 10px; }
  #results::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 6px; }
  @media print { #results { overflow: visible; } #results table { min-width: 0; } }
  @media (max-width: 1040px) { #results th, #results td { padding: 6px 6px; } #results table { font-size: 12px; } td input.edit { width: 52px; } td input.edit.prijs { width: 74px; } td.kortcel input.edit.kort { width: 46px; } }
  .meerbalk b { color: var(--wood-800); }
  .geenfoto { display: inline-flex; width: 44px; height: 44px; border-radius: 6px; background: var(--wood-100); align-items: center; justify-content: center; color: var(--wood-600); font-size: 9px; font-weight: 800; }
  td.aank { color: var(--wood-700); font-family: var(--font-display); font-weight: 600; }
  .mrg { font-family: var(--font-display); font-weight: 600; color: var(--leaf-700); }
  .mrgsub, .kortsub { font-size: 10px; color: var(--text-muted); }
  .kortsub { color: var(--ladybug-600); font-weight: 700; }
  td.kortcel input.edit.kort { width: 58px; }
  input.edit.kort.actief { border-color: var(--ladybug-500); background: #FBEDEA; color: var(--ladybug-600); font-weight: 700; }
  .stlijn { display: grid; grid-template-columns: 1fr 150px; gap: 10px 16px; align-items: center; padding: 7px 10px; border-radius: var(--radius-sm); }
  .stlijn:nth-child(odd) { background: var(--sand-50); }
  .stlijn label.chk { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-body); cursor: pointer; }
  .stlijn label.chk span.sub { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
  .stlijn input[type=number] { width: 100%; padding: 6px 9px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); text-align: right; font-size: 13.5px; font-family: var(--font-body); }
  .stlijn input[type=number]:focus { border-color: var(--brand-primary); outline: none; }
  .kortbox { margin-top: 10px; background: var(--sand-50); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12.5px; line-height: 1.6; color: var(--text-body); }
  .kortbox b { font-family: var(--font-display); font-weight: 600; color: var(--wood-800); }
  .budget { margin-top: 10px; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; line-height: 1.5; border: 1.5px solid; font-family: var(--font-body); }
  .budget.ok { background: var(--leaf-50); border-color: var(--leaf-500); color: var(--leaf-700); }
  .budget.krap { background: #F7E6C9; border-color: #E9CF9E; color: var(--wood-800); }
  .budget.over { background: #F6D8D4; border-color: var(--ladybug-500); color: var(--ladybug-600); }
  .budget b { font-family: var(--font-display); font-weight: 600; }
  body.klant .intern-col, body.klant #prijscontrole, body.klant #aiKopPaneel, body.klant #aiBetonPaneel, body.klant .note, body.klant #werf .wnote, body.klant .aimarkt, body.klant .airegels, body.klant .aileer { display: none !important; }
  body.klant .btn.klantknop { background: var(--brand-primary); color: var(--wood-50); border-color: transparent; }
  .modusbalk { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
  td input.edit:focus { border-color: var(--brand-primary); outline: none; }
  .place { font-family: var(--font-display); font-weight: 600; color: var(--wood-800); }
  tfoot td { background: var(--leaf-50); font-family: var(--font-display); font-weight: 600; color: var(--wood-900); border-top: 2px solid var(--leaf-500); }
  .save { font-size: 12px; color: var(--text-muted); }
  tr.det td { background: var(--leaf-50); border-bottom: 2px solid var(--leaf-300); padding: 0; }
  tr:nth-child(even) td.detcell { background: var(--leaf-50); }
  .detin { display: grid; gap: 6px; padding: 10px 12px 12px 62px; animation: uitschuif .18s var(--ease-natural); }
  @keyframes uitschuif { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  .dline { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-body); }
  .dline .dlab { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; color: var(--wood-800); }
  .dline .dcalc { color: var(--text-muted); font-size: 12px; }
  .dline .dsum { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--wood-800); text-align: right; min-width: 96px; }
  .dline input.edit { width: 72px; }
  .dline.tot { border-top: 1.5px solid var(--leaf-300); padding-top: 7px; margin-top: 2px; }
  .dline.tot .dsum { color: var(--leaf-700); font-size: 15px; }
  .werf { background: var(--sand-0); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 18px; margin: 12px 0; box-shadow: var(--shadow-sm); }
  .werf h2 { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--wood-800); margin: 0 0 12px; }
  .wgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; }
  .wgrid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--sand-600); }
  .wgrid label.chk { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--text-body); }
  .wgrid input[type=number] { padding: 7px 10px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); font-size: 14px; }
  .wgrid output { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--wood-800); padding: 6px 0; }
  .wtotal { margin-top: 14px; font-family: var(--font-display); font-size: 17px; color: var(--wood-900); }
  .wtotal strong { color: var(--leaf-700); }
  .wnote { margin-top: 8px; font-size: 11.5px; color: var(--ladybug-600); background: #F6D8D4; border-radius: var(--radius-sm); padding: 8px 12px; }
  .pcline { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: baseline; font-size: 12.5px; padding: 7px 10px; border-radius: var(--radius-sm); margin-bottom: 5px; line-height: 1.4; }
  .pcline .ico { font-weight: 800; }
  .pcline b { font-family: var(--font-display); font-weight: 600; }
  .pcline .bedrag { font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
  .pcline.ok { background: var(--leaf-50); color: var(--leaf-700); }
  .pcline.warn { background: #F7E6C9; color: var(--wood-800); }
  .pcline.bad { background: #F6D8D4; color: var(--ladybug-600); }
  .pcsum { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
  .aihint { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
  .aidrop { border: 2px dashed var(--border-default); border-radius: var(--radius-md); background: var(--sand-50); padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
  .aidrop.over { border-color: var(--brand-primary); background: var(--leaf-50); }
  .aidrop b { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--wood-800); }
  .aidocs { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
  .aidoc { font-size: 11.5px; background: var(--leaf-50); border: 1.5px solid var(--leaf-300); color: var(--leaf-700); border-radius: var(--radius-pill); padding: 4px 10px; display: inline-flex; align-items: center; gap: 7px; }
  .aidoc button { border: none; background: none; color: inherit; cursor: pointer; font-size: 13px; padding: 0; }
  .aibtns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
  .aimeld { font-size: 12.5px; border-radius: var(--radius-sm); padding: 9px 12px; margin: 8px 0; border: 1.5px solid; line-height: 1.45; }
  .aimeld.info { background: var(--sand-50); border-color: var(--border-subtle); color: var(--text-body); }
  .aimeld.ok { background: var(--leaf-50); border-color: var(--leaf-500); color: var(--leaf-700); }
  .aimeld.warn { background: #F7E6C9; border-color: #E9CF9E; color: var(--wood-800); }
  .aimeld.bad { background: #F6D8D4; border-color: var(--ladybug-500); color: var(--ladybug-600); }
  .spin { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--leaf-300); border-top-color: var(--leaf-700); border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -1px; }
  @keyframes sp { to { transform: rotate(360deg); } }
  #aiAnalyse h3, #aiBetonPaneel h3 { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--wood-800); margin: 16px 0 7px; }
  .aicri { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; font-size: 12.5px; line-height: 1.4; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--sand-50); margin-bottom: 5px; }
  .aicri .pt { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--leaf-700); text-align: right; }
  .aistrat { background: var(--leaf-50); border: 1.5px solid var(--leaf-500); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12.5px; line-height: 1.5; color: var(--wood-800); margin-top: 10px; }
  .aieis { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.5; }
  .aipost { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; line-height: 1.4; padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); }
  .aisug { border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 11px 13px; margin-bottom: 8px; background: var(--sand-0); }
  .aisug.mw { border-color: var(--leaf-500); background: var(--leaf-50); }
  .aisug .kop { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-muted); }
  .aisug .kop .prijs { font-family: var(--font-display); font-weight: 600; color: var(--wood-800); }
  .aisug .nm { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--wood-900); margin: 4px 0 5px; }
  .aisug .tag { font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--leaf-600); color: var(--wood-50); border-radius: var(--radius-pill); padding: 2px 8px; vertical-align: 2px; }
  .aisug .tag.cat { background: var(--wood-700); }
  .aisug .mot { font-size: 12.5px; line-height: 1.5; color: var(--text-body); }
  .aisug .mot em { color: var(--leaf-700); }
  .aisug .cijfers { font-size: 11.5px; color: var(--text-muted); margin: 6px 0 8px; }
  .aisug .waarsch { font-size: 12px; color: var(--ladybug-600); background: #F6D8D4; border-radius: var(--radius-sm); padding: 6px 10px; margin-bottom: 8px; }
  .aicheck { border-left: 4px solid; border-radius: var(--radius-sm); padding: 9px 12px; margin-bottom: 7px; background: var(--sand-50); font-size: 12.5px; }
  .aicheck.ok { border-color: var(--leaf-500); }
  .aicheck.warn { border-color: #E9CF9E; }
  .aicheck.bad { border-color: var(--ladybug-500); }
  .aicheck .kop { display: flex; justify-content: space-between; font-size: 13px; color: var(--wood-800); }
  .aicheck .kop span { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
  .aicheck .cij { margin: 4px 0; }
  .aicheck .uit { color: var(--text-muted); line-height: 1.5; margin-bottom: 7px; }
  .airegels { list-style: none; margin: 0; padding: 0; }
  .airegels li { display: flex; gap: 10px; justify-content: space-between; font-size: 12.5px; line-height: 1.45; padding: 7px 10px; background: var(--sand-50); border-radius: var(--radius-sm); margin-bottom: 5px; }
  .airegels button { border: none; background: none; color: var(--text-muted); cursor: pointer; }
  .aileer { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 4px; }
  .aileer textarea { flex: 1; font-family: var(--font-body); font-size: 12.5px; line-height: 1.5; padding: 8px 10px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); resize: vertical; outline: none; }
  .aileer textarea:focus { border-color: var(--brand-primary); }
  table.aimarkt { margin-top: 0; font-size: 12px; }
  table.aimarkt th { position: static; font-size: 10.5px; }
  table.aimarkt input { width: 100%; border: none; background: transparent; font-family: var(--font-body); font-size: 12px; padding: 4px 2px; outline: none; }
  table.aimarkt input:focus { background: var(--leaf-50); }
  .kop { background: var(--sand-0); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 18px; margin: 14px 0 12px; box-shadow: var(--shadow-sm); }
  .kop h2 { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--wood-800); margin: 0 0 12px; }
  .kgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 18px; }
  .kgrid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--sand-600); }
  .kgrid label.w2 { grid-column: span 2; }
  .kgrid input[type=text], .kgrid input[type=date], .kgrid input[type=email], .kgrid input[type=tel], .kgrid input[type=url], .kgrid input[type=number], .kgrid input:not([type]) { padding: 8px 10px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font-body); color: var(--text-strong); background: var(--sand-0); }
  .kgrid input:focus, .kgrid select:focus { border-color: var(--brand-primary); outline: none; }
  /* De keuzelijst (btw-regime) en de knop "Adres opzoeken" volgen exact het invulveld erboven:
     dezelfde beige rand, dezelfde hoek en dezelfde hoogte — zodat het blok één geheel is. */
  .kgrid select, .kop select, .kgrid button.add, .kop button.add {
    padding: 8px 10px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm);
    font-size: 14px; font-family: var(--font-body); color: var(--text-body); background: var(--sand-0);
    line-height: 1.35; width: 100%; box-sizing: border-box; }
  .kgrid select, .kop select {
    appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%238C8570' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; }
  /* De knop is géén invulveld: hij houdt de vorm van het veld maar leest als knop — kleiner, in de
     merkkleur en met een duidelijke aanwijsstand. Zo verwart hij niet met iets wat ingevuld moet worden. */
  .kgrid button.add, .kop button.add {
    margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
    color: var(--leaf-700, #3C5D1E); text-align: center; }
  .kgrid button.add:hover, .kop button.add:hover { border-color: var(--brand-primary); background: var(--leaf-50, #F1F5E9); }
  .kgrid input[readonly] { background: var(--sand-50); color: var(--text-muted); }
  .btwrow { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
  .btwrow label { flex: 1; min-width: 190px; }
  .vstat { display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.35; border-radius: var(--radius-sm); padding: 9px 12px; margin-top: 10px; border: 1.5px solid; }
  .vstat.ok { background: var(--leaf-50); border-color: var(--leaf-500); color: var(--leaf-700); }
  .vstat.warn { background: #F7E6C9; border-color: #E9CF9E; color: var(--wood-800); }
  .vstat.bad { background: #F6D8D4; border-color: var(--ladybug-500); color: var(--ladybug-600); }
  .vstat.idle { background: var(--sand-50); border-color: var(--border-subtle); color: var(--text-muted); }
  .vstat b { font-family: var(--font-display); font-weight: 600; }
  .vstat .add { margin-left: auto; font-family: var(--font-display); font-size: 12.5px; padding: 6px 14px; border-radius: var(--radius-pill); border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; white-space: nowrap; }
  .knota { font-size: 11.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.45; }
  .intro { margin-top: 14px; }
  .intro > label { display: block; font-size: 12px; font-weight: 700; color: var(--sand-600); margin-bottom: 4px; }
  .intro textarea { width: 100%; min-height: 120px; resize: vertical; padding: 12px 14px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 13.5px; line-height: 1.6; color: var(--text-strong); background: var(--sand-0); }
  .intro textarea:focus { border-color: var(--brand-primary); outline: none; }
  .introbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
  .introbtns button { font-family: var(--font-body); font-size: 12px; padding: 6px 12px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-default); background: var(--sand-0); color: var(--text-body); cursor: pointer; }
  .introbtns button:hover { border-color: var(--brand-primary); color: var(--leaf-700); }
  @media print {
    /* De grote blokken MOGEN splitsen; anders schuift een blok dat niet past in z'n geheel door en blijft
       er een halfleeg blad achter. Wat níet mag splitsen is de kleinste eenheid: één veld, één rij. */
    .kop, .werf, #results, #studie, #eindtotaal, #verbruik, #levering, #nieuwePost { break-inside: auto; }
    .kgrid > label, .wgrid > label, .stline, .stlijn, .dline, .kv { break-inside: avoid; }
    /* Een kop hoort nooit onderaan een blad los van wat eronder komt. */
    .mast, h1, h2, h3, .fkop { break-after: avoid; }
    .mast { padding-bottom: 8px; border-bottom: 2px solid var(--leaf-600, #7FA34A); }
    /* Kolomkoppen van de grote tabel herhalen op elk blad — anders staat er op blad 3 een kolom cijfers
       zonder te weten waar ze voor staat. */
    #results thead { display: table-header-group; }
    #results tfoot { display: table-footer-group; }
    #results tr, .fiche, .mwrij, tr.mwdet, tr.det { break-inside: avoid; }
    /* Lege panelen laten anders een gat van een half blad achter. */
    #prijscontrole:empty, #aiKopPaneel:empty, #pbPaneel:empty, .lpBox:empty, #toestelBox:empty { display: none !important; }
    /* Weduwen en wezen: nooit één regel alleen boven- of onderaan een blad. */
    p, li, td, .fnota, .omsblok { orphans: 3; widows: 3; }
    body { background:#fff; padding-bottom:0; } .controls, .btn, .note, .introbtns, .vstat .add, .aidrop, .aibtns, .aileer, #aiMelding, .meerbalk, span.hist, .actiebalk { display:none; }
    #results tbody tr:not(.gekozen) { display: none; }
    #aiKopPaneel, #aiBetonPaneel, .airegels, .aimarkt, #aiAnalyse { display: none; }
    body.klant #prijscontrole, body.klant .intern-col { display: none !important; } th { position: static; } .kop { box-shadow:none; }   /* ⚠️ GÉÉN break-inside:avoid — dit blok is groter dan één blad en schoof dan in z'n geheel naar blad 2 (27 aug 2026) */ .kgrid input { border:none; border-bottom:1px solid var(--border-default); padding-left:0; } .intro textarea { border:1px solid var(--border-subtle); min-height:0; height:auto; } }
  @page { size: A4 landscape; margin: 10mm; }

  td.tdfoto { cursor: zoom-in; }
  a.tnaam { color: var(--text-body); text-decoration: none; border-bottom: 1px dotted var(--border-strong); }
  a.tnaam:hover { color: var(--leaf-700); border-bottom-color: var(--leaf-500); }
  #toestelBox { display: none; position: fixed; inset: 0; z-index: 60; background: rgba(47,42,32,.62); backdrop-filter: blur(3px); align-items: flex-start; justify-content: center; padding: 24px 16px; overflow: auto; }
  .tvIn { position: relative; width: min(880px, 100%); background: var(--sand-0); border-radius: var(--radius-lg, 16px); box-shadow: var(--shadow-lg); padding: 22px 26px 20px; }
  .tvX { position: absolute; top: 12px; right: 14px; border: 1.5px solid var(--border-default); background: var(--sand-0); color: var(--text-muted); border-radius: var(--radius-pill); width: 32px; height: 32px; font-size: 15px; cursor: pointer; }
  .tvX:hover { border-color: var(--ladybug-500); color: var(--ladybug-500); }
  .tvIn h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--wood-900); margin: 0 40px 12px 0; }
  .tvBeeld { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: var(--radius-md); padding: 10px; text-align: center; }
  .tvBeeld img { max-width: 100%; max-height: 52vh; object-fit: contain; }
  .tvBeeld.leeg { padding: 40px; color: var(--text-muted); font-size: 13px; }
  .tvRij { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
  .tvRij img { width: 76px; height: 60px; object-fit: cover; border-radius: 6px; border: 1.5px solid var(--border-subtle); background: #fff; cursor: pointer; }
  .tvRij img.aan { border-color: var(--leaf-600); }
  table.tvTab { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 13px; }
  table.tvTab th { position: static; background: transparent; color: var(--sand-600); font-family: var(--font-body); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-align: left; padding: 6px 10px 6px 0; width: 210px; vertical-align: top; }
  table.tvTab td { padding: 6px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-strong); }
  .tvTxt { font-size: 13px; line-height: 1.6; color: var(--text-body); margin: 12px 0 0; }
  .tvSpec { font-size: 12.5px; line-height: 1.55; color: var(--text-body); margin: 8px 0 0; padding-left: 18px; }
  .tvBtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
  .tvBtns .btn { text-decoration: none; }
  .tvNota { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; margin: 10px 0 0; }
  @media print { #toestelBox { display: none !important; } }

  .postnr { color: var(--leaf-700); font-weight: 800; }
  .eisblok { margin-top: 10px; padding: 11px 13px; background: var(--sand-0); border: 1.5px solid var(--leaf-300, var(--border-subtle)); border-radius: var(--radius-sm); }
  .eiskop { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; color: var(--wood-800); margin-bottom: 8px; }
  .eiskop span { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--text-muted); }
  .eisvel { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 8px 12px; }
  .eisvel label { display: flex; flex-direction: column; gap: 3px; font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--sand-600); }
  .eisvel input { font-family: var(--font-body); font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-strong); padding: 5px 8px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); outline: none; }
  .eisvel input:focus { border-color: var(--brand-primary); }
  .eisuit { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
  .eisr { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: 12px; line-height: 1.45; padding: 6px 9px; border-radius: var(--radius-sm); }
  .eisr span:first-child { font-weight: 800; }
  .eisr.ok { background: var(--leaf-50); color: var(--leaf-700); }
  .eisr.warn { background: #F7E6C9; color: var(--wood-800); }
  .eisr.bad { background: #F6D8D4; color: var(--ladybug-600); }
  .eisleeg { font-size: 11.5px; color: var(--text-muted); margin: 8px 0 0; line-height: 1.5; }
  @media print { .eisvel { display: none; } }

  .omsblok { margin-top: 10px; padding: 10px 12px; background: var(--leaf-50); border-radius: var(--radius-sm); }
  .omsblok p { font-size: 12px; line-height: 1.55; color: var(--text-body); margin: 0 0 6px; }
  .omsblok p:last-child { margin-bottom: 0; }
  .omsblok b { font-family: var(--font-display); font-weight: 600; color: var(--wood-800); }

  #fichesPaneel { display: none; }
  #fichesPaneel h2 { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--wood-900); margin: 0 0 4px; }
  .fnota { font-size: 12px; color: var(--text-muted); line-height: 1.55; margin: 0 0 16px; }
  .fiche { background: var(--sand-0); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 14px; break-inside: avoid; }
  .fkop { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 1.5px solid var(--leaf-600); padding-bottom: 8px; margin-bottom: 12px; }
  .fkop h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--wood-900); margin: 0; }
  .fpost { color: var(--leaf-700); }
  .fprijs { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--wood-800); white-space: nowrap; }
  .fprijs em { font-family: var(--font-body); font-style: normal; font-size: 10.5px; font-weight: 400; color: var(--text-muted); }
  .fgrid { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
  @media (max-width: 760px) { .fgrid { grid-template-columns: 1fr; } }
  .fbeeld { background: #fff; border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 8px; text-align: center; min-height: 120px; display: flex; align-items: center; justify-content: center; }
  .fbeeld img { max-width: 100%; max-height: 220px; object-fit: contain; }
  .fleeg { font-size: 11.5px; color: var(--text-muted); }
  table.ftab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  table.ftab th { position: static; background: transparent; text-align: left; font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--sand-600); padding: 5px 10px 5px 0; width: 185px; vertical-align: top; }
  table.ftab td { padding: 5px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-strong); }
  table.ftab em { font-size: 11px; color: var(--text-muted); }
  .fsw { margin-top: 14px; }
  .fsw h4, .fond h4 { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--wood-800); margin: 0 0 7px; }
  .fchips { display: flex; flex-wrap: wrap; gap: 7px; }
  .fchips svg { width: 22px; height: 22px; }
  .fchip, .fchips > span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--leaf-700); background: var(--leaf-50); border-radius: var(--radius-pill); padding: 5px 11px; }
  .ftxt { font-size: 12.5px; line-height: 1.6; color: var(--text-body); margin: 12px 0 0; }
  .fond { margin-top: 12px; }
  .fond ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; color: var(--text-body); columns: 2; }
  @media (max-width: 760px) { .fond ul { columns: 1; } }
  .fafw { margin-top: 12px; background: #F7E6C9; border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12px; line-height: 1.55; color: var(--wood-800); }
  .fafw b { font-family: var(--font-display); font-weight: 600; }
  .fafw ul { margin: 6px 0 0; padding-left: 18px; }
  @media print { #fichesPaneel { display: block !important; break-before: page; } .fiche { border-color: #DCCFAE; } }

  .fmis { background: #F7E6C9; border: 1.5px solid #E9CF9E; border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12.5px; line-height: 1.55; color: var(--wood-800); margin-bottom: 14px; }
  .fmis b { font-family: var(--font-display); font-weight: 600; }
  #vragenPaneel { display: none; }
  #vragenPaneel h2 { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--wood-900); margin: 0 0 4px; }
  ol.vlijst { margin: 0 0 14px; padding-left: 22px; }
  ol.vlijst li { font-size: 12.5px; line-height: 1.55; color: var(--text-body); padding: 7px 0; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: flex-start; gap: 10px; }
  ol.vlijst li.af { opacity: .5; text-decoration: line-through; }
  ol.vlijst label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; flex: 1; }
  ol.vlijst input { margin-top: 3px; flex-shrink: 0; }
  ol.vlijst b { font-family: var(--font-display); font-weight: 600; color: var(--wood-800); }
  .vdel { border: none; background: none; color: var(--text-muted); cursor: pointer; font-size: 13px; flex-shrink: 0; }
  .vdel:hover { color: var(--ladybug-500); }
  .vnieuw { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
  .vnieuw input { font-family: var(--font-body); font-size: 12.5px; padding: 7px 10px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); outline: none; }
  .vnieuw #vPost { width: 210px; }
  .vnieuw #vTekst { flex: 1; min-width: 240px; }
  .vnieuw input:focus { border-color: var(--brand-primary); }
  .openpost { background: #F6D8D4; border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; line-height: 1.55; color: var(--ladybug-600); margin-bottom: 10px; }
  .openpost b { font-family: var(--font-display); font-weight: 600; }
  tr.opengelaten td { background: #FBEDEA !important; }
  tr.opengelaten .tnaam::after { content: " — prijs nog niet mogelijk"; color: var(--ladybug-600); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
  body.klant #vragenPaneel { display: none !important; }
  @media print { #vragenPaneel { display: none !important; } }

  .fiche.mwfiche { border-color: var(--leaf-600); background: var(--leaf-50); }
  .mwstat { font-family: var(--font-body); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--leaf-700); background: var(--sand-0); border-radius: var(--radius-pill); padding: 4px 11px; }

  textarea.vantw { width: 100%; margin-top: 6px; font-family: var(--font-body); font-size: 12px; line-height: 1.5; padding: 6px 9px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); resize: vertical; outline: none; background: var(--sand-50); }
  textarea.vantw:focus { border-color: var(--brand-primary); background: var(--sand-0); }
  ol.vlijst li { flex-wrap: wrap; }
  ol.vlijst li.af textarea.vantw { text-decoration: none; background: var(--leaf-50); border-color: var(--leaf-500); color: var(--leaf-700); }
  .antwblok, .fantw { margin-top: 10px; background: var(--leaf-50); border-left: 4px solid var(--leaf-600); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12px; line-height: 1.55; color: var(--text-body); }
  .antwblok b, .fantw b { font-family: var(--font-display); font-weight: 600; color: var(--leaf-700); }
  .antwblok ul, .fantw ul { margin: 5px 0 0; padding-left: 17px; }
  .antwblok em, .fantw em { color: var(--wood-800); font-style: normal; font-weight: 600; }
  .fsw-rij { margin-bottom: 10px; }
  .fsw-lab { display: block; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--sand-600); margin-bottom: 6px; }
  .fsw-rij.extra { background: var(--leaf-50); border-radius: var(--radius-sm); padding: 10px 12px; }
  .fsw-rij.extra .fsw-lab { color: var(--leaf-700); }
  .fchips .bonus { background: var(--leaf-600); color: var(--wood-50); font-weight: 700; }
  .fsw-txt { font-size: 12px; line-height: 1.55; color: var(--leaf-700); margin: 8px 0 0; }
  .fsw-txt b { font-family: var(--font-display); font-weight: 600; }

  #critPaneel { display: none; }
  #critPaneel h2 { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--wood-900); margin: 0 0 4px; }
  table.ctab { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
  table.ctab th { position: static; background: var(--leaf-600); color: var(--wood-50); font-family: var(--font-display); font-weight: 600; font-size: 11px; text-align: left; padding: 7px 9px; }
  table.ctab td { padding: 4px 6px; border-bottom: 1px solid var(--border-subtle); }
  table.ctab input, table.ctab select { width: 100%; font-family: var(--font-body); font-size: 12.5px; padding: 6px 8px; border: 1.5px solid var(--border-default); border-radius: var(--radius-sm); outline: none; background: var(--sand-0); }
  table.ctab input:focus, table.ctab select:focus { border-color: var(--brand-primary); }
  table.ctab tr.c-klaar td { background: var(--leaf-50); }
  table.ctab tr.c-open td { background: #FBEDEA; }
  .cbal { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); background: var(--sand-50); border-radius: var(--radius-sm); padding: 10px 14px; }
  .cbal b { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--wood-800); }
  .cbal .open b { color: var(--ladybug-600); }
  body.klant #critPaneel { display: none !important; }
  @media print { #critPaneel { display: none !important; } }

  #balans { position: fixed; left: 0; right: 0; bottom: calc(var(--balkhoogte, 60px) + 14px); z-index: 25; display: flex; gap: 0; overflow-x: auto; background: var(--wood-800); box-shadow: 0 -2px 12px rgba(47,42,32,.18); }
  #balans:empty { display: none; }
  .bcel { display: flex; flex-direction: column; gap: 2px; padding: 7px 16px; border-right: 1px solid rgba(251,246,234,.14); white-space: nowrap; flex-shrink: 0; }
  .bcel em { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: rgba(251,246,234,.62); }
  .bcel b { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--wood-50); }
  .bcel.eind { background: var(--leaf-600); }
  .bcel.eind b { font-size: 16px; }
  .bcel.kort b { color: #F0B8AC; }
  .bcel.over { background: var(--ladybug-500); }
  .bcel.onder { background: var(--leaf-700); }
  .bcel.stil { margin-left: auto; }
  .bcel.stil b { font-size: 12.5px; color: rgba(251,246,234,.8); }
  body { padding-bottom: calc(var(--balkhoogte, 60px) + var(--balanshoogte, 50px) + 26px); }
  body.klant .bcel.kort, body.klant .bcel.over, body.klant .bcel.onder { display: none; }
  @media print { #balans { display: none !important; } body { padding-bottom: 0; } }

  .wsug { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.55; border-radius: var(--radius-sm); padding: 9px 12px; margin: 6px 0 2px; }
  .wsug:empty { display: none; }
  .wsug.ok { background: var(--leaf-50); color: var(--leaf-700); }
  .wsug.let { background: #F7E6C9; color: var(--wood-800); }
  .wsug b { font-family: var(--font-display); font-weight: 600; }
  .wsug .add { margin-left: 4px; padding: 3px 10px; font-size: 11px; }

  .exnaast { font-family: var(--font-body); font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 8px; }
  .betaalnota { margin-top: 12px; background: var(--sand-50); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 12.5px; line-height: 1.6; color: var(--text-body); }
  .betaalnota b { font-family: var(--font-display); font-weight: 600; color: var(--wood-800); }
  .bschijf { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
  .bschijf span { display: flex; flex-direction: column; gap: 2px; background: var(--sand-0); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 7px 13px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--sand-600); }
  .bschijf b { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--wood-800); letter-spacing: 0; text-transform: none; }
  .bnota { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; margin: 9px 0 0; }

  .raming { color: var(--wood-600); font-style: italic; font-weight: 400; }
  .mrgsub.raming { text-transform: uppercase; font-size: 9px; font-weight: 800; letter-spacing: .05em; font-style: normal; color: #9A6B12; }

  .tvTek { margin-top: 16px; }
  .tvTek h4, .tvOnd h4 { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--wood-800); margin: 0 0 8px; }
  .tvTekRij { display: flex; gap: 12px; flex-wrap: wrap; }
  .tvTekRij figure { margin: 0; width: 190px; }
  .tvTekRij img { width: 100%; background: #fff; border: 1.5px solid var(--border-subtle); border-radius: var(--radius-sm); display: block; }
  .tvTekRij a:hover img { border-color: var(--brand-primary); }
  .tvTekRij figcaption { font-size: 11px; color: var(--text-muted); line-height: 1.4; margin-top: 5px; }
  .tvOnd { margin-top: 14px; }
  .tvOnd ul { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; color: var(--text-body); columns: 2; }
  @media (max-width: 640px) { .tvOnd ul { columns: 1; } }
  .tvLet { margin-top: 14px; background: #F7E6C9; border: 1.5px solid #E9CF9E; border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12.5px; line-height: 1.55; color: var(--wood-800); }
  .tvLet b { font-family: var(--font-display); font-weight: 600; }


  /* == breedte-vangnet 20 aug 2026 == */
  /* ⚠️ Er viel nog tekst weg (klantopgave 20 aug 2026). Oorzaak: niet één tabel, maar élke brede tabel
     in de fiche — LUIK 2, de onderdelen van een maatwerkpost (.mwreg) en de detailregels — kon breder
     worden dan het blad. Vangnet: elke brede tabel schuift binnen haar eigen kader, koppen mogen
     afbreken, en niets steekt nog buiten de pagina. Bij het afdrukken valt dit vangnet weg. */
  .wrap, .kop, #results, #prijscontrole, .fiche { max-width: 100%; }
  #results { overflow-x: auto; }
  #results table { min-width: 1120px; }
  #results th { white-space: normal; word-break: break-word; hyphens: auto; }
  /* De onderdelen van een maatwerkpost: de cel eromheen wordt zelf de schuifzone. */
  tr.mwdet > td, tr.det > td { max-width: 100%; }
  table.mwreg { display: block; overflow-x: auto; width: 100%; min-width: 0; }
  table.mwreg thead, table.mwreg tbody, table.mwreg tfoot { display: table; width: 100%; min-width: 640px; }
  table.mwreg th, table.mwreg td { white-space: normal; word-break: break-word; }
  table.mwreg td:first-child, table.mwreg th:first-child { min-width: 190px; }
  .fiche { overflow-x: hidden; }
  .fiche .ftab { table-layout: fixed; width: 100%; }
  .fiche .ftab td, .fiche .ftab th { word-break: break-word; }
  .dline { flex-wrap: wrap; }
  .dline .dcalc, .dline span { min-width: 0; overflow-wrap: anywhere; }
  input.edit, input.kortin { max-width: 100%; }
  @media print {
    #results, table.mwreg { overflow: visible !important; }
    #results table { min-width: 0 !important; }
    table.mwreg { display: table !important; }
    table.mwreg thead, table.mwreg tbody, table.mwreg tfoot { display: revert !important; min-width: 0 !important; }
  }


  /* == uitlijning eenheden in maatwerkregels 20 aug 2026 == */
  /* ⚠️ In post 6.6.3 stonden de invulvakken van "set", "stuk", "keer" en "manuur" niet onder elkaar:
     de eenheid staat als losse tekst NÁ het invulvak, en een korte eenheid ("st") tegenover een lange
     ("manuur") schoof elke rij een paar pixels op. Nu heeft de aantalkolom een vaste opbouw: het vakje
     links op een vaste breedte, de eenheid rechts in een eigen kolom met een vaste breedte. Zo staat
     alles kaarsrecht onder elkaar en blijft elk cijfer op dezelfde plaats staan bij het nalezen. */
  table.mwreg td.num { text-align: right; }
  table.mwreg td.num:nth-child(2) {
    display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap;
  }
  table.mwreg td.num:nth-child(2) input.edit { width: 76px; flex: 0 0 76px; text-align: right; }
  table.mwreg td.num:nth-child(2)::after { content: ''; }
  table.mwreg td.num input.edit, table.mwreg td.num input.kortin { text-align: right; }
  table.mwreg td.num:nth-child(3) input.edit { width: 92px; }
  table.mwreg td.num:nth-child(4) input.kortin,
  table.mwreg td.num:nth-child(5) input.kortin { width: 78px; }
  table.mwreg th:nth-child(2), table.mwreg td:nth-child(2) { min-width: 132px; }
  table.mwreg th:nth-child(3), table.mwreg td:nth-child(3) { min-width: 104px; }
  /* De eenheid als eigen blokje met vaste breedte, zodat "st", "m", "keer" en "manuur" links uitlijnen. */
  table.mwreg td.num:nth-child(2) > span.eh,
  table.mwreg td.num:nth-child(2) { font-variant-numeric: tabular-nums; }

  /* ⚠️ De vaste balken onderaan dekten de actiebalk af, dus de knop "Maak nu de offerte op voor de
     klant" was onbereikbaar (klantopgave 20 aug 2026). Daarom staat dezelfde balk nu OOK bovenaan het
     document, boven het AI-paneel — daar kan niets ervoor schuiven. */
  /* ⚠️ De knoppen vielen langs de linkerkant uit het scherm omdat de balk onderaan met negatieve marges
     buiten de bladbreedte staat (klantopgave 20 aug 2026). De bovenbalk zet die marges terug op nul,
     laat de knoppen doorlopen op meerdere regels, en houdt ze binnen het blad. */
  .actiebalk.boven { position: static; inset: auto; left: auto; right: auto; bottom: auto; transform: none;
    width: 100%; max-width: 100%; margin: 0 0 16px; padding: 12px 14px; box-sizing: border-box;
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start;
    border: 1.5px dashed var(--border-default); border-radius: var(--radius-md); background: var(--sand-50);
    box-shadow: none; overflow: visible; }
  .actiebalk.boven > * { flex: 0 0 auto; max-width: 100%; }
  .actiebalk.boven .btn { white-space: normal; }
  @media print { .actiebalk.boven { display: none; } }

  /* KLANTWEERGAVE — HARDE GRENS (klantopgave 21 aug 2026): in de klantversie stond nog "marge zakt van
     ×2 naar ×1,6 (38 % marge blijft over)". Zoiets in een offerte is een onderhandelingswapen dat wij
     zelf weggeven. Alles wat over aankoop, marge of kortingsruimte gaat, verdwijnt nu hard. */
  body.klant .intern-col, body.klant .mrg, body.klant .mrgsub, body.klant .kortsub,
  body.klant .aank, body.klant .raming, body.klant .kortruim, body.klant input.kort,
  body.klant .prijscontrole, body.klant #prijscontrole, body.klant .marge, body.klant .margeblok
    { display: none !important; }
  body.klant .dline.intern-col { display: none !important; }
