:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5d6b7a;
  --line: #dde3ea;
  --primary: #1f4e79;
  --primary-text: #ffffff;
  --accent: #ffc72c;
  --danger: #b42318;
  --warn-bg: #fff4d6;
  --ok: #1e7b3c;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --card: #1b2128;
    --text: #e6ebf0;
    --muted: #9aa7b4;
    --line: #2e3742;
    --primary: #4a8cc9;
    --primary-text: #0b1118;
    --danger: #f07167;
    --warn-bg: #3a3014;
    --ok: #5cc27e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[hidden] { display: none !important; }
a { color: var(--primary); }

.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--primary); color: var(--primary-text);
}
.topbar h1 { font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }
.icon-btn { background: none; border: 0; color: inherit; font-size: 22px; padding: 4px 8px; cursor: pointer; }
.menu {
  position: fixed; right: 8px; top: calc(52px + env(safe-area-inset-top)); z-index: 20; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.18);
  display: flex; flex-direction: column; min-width: 180px; overflow: hidden;
}
.menu a, .menu .link { padding: 12px 16px; text-decoration: none; color: var(--text); text-align: left; font-size: 16px; }
.menu a:hover, .menu .link:hover { background: var(--bg); }

main { max-width: 900px; margin: 0 auto; padding: 12px 16px 96px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
h2 { font-size: 18px; margin: 4px 0 10px; }
h3 { font-size: 16px; margin: 0 0 8px; }

label { display: block; font-size: 14px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { min-height: 80px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

button, .btn {
  font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 8px; padding: 10px 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-small { padding: 6px 10px; font-size: 14px; }
button:disabled { opacity: .6; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; }

.fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 5;
  width: 58px; height: 58px; border-radius: 50%; font-size: 30px; line-height: 1;
  background: var(--primary); color: var(--primary-text); border: 0; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; }
.chip { white-space: nowrap; border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.chip.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }

.job { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.job img, .job .ph { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line); }
.job .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--text); }
.badge.offerte { background: #e8e2f8; color: #4b2c91; }
.badge.gepland { background: #dbeafe; color: #1e40af; }
.badge.bezig { background: #fef3c7; color: #92400e; }
.badge.afgerond { background: #dcfce7; color: #166534; }
.badge.gefactureerd { background: #d1d5db; color: #1f2937; }
.badge.vervallen { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 12px; overflow-x: auto; }
.tab { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 10px 12px; white-space: nowrap; }
.tab.active { border-bottom-color: var(--primary); font-weight: 600; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: pointer; display: block; background: var(--line); }
.photos figcaption { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); color: #fff;
  display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.lightbox .img-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .bar { padding: 10px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lightbox input { flex: 1; min-width: 160px; background: #222; color: #fff; border-color: #444; }
.lightbox button { background: #333; color: #fff; border-color: #555; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; white-space: nowrap; }
.low { background: var(--warn-bg); }
.neg { color: var(--danger); font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: #222; color: #fff; padding: 10px 16px; border-radius: 8px; max-width: 90vw; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.toast.error { background: var(--danger); color: #fff; }

.center-card { max-width: 380px; margin: 10vh auto 0; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: var(--primary); width: 0; transition: width .2s; }
.dl dt { color: var(--muted); font-size: 13px; margin-top: 8px; }
.dl dd { margin: 0; white-space: pre-wrap; }

/* --- artikelkiezer --- */
.picker { position: relative; }
.picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 30; max-height: 340px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.picker-opt { display: flex; gap: 10px; align-items: center; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.picker-opt:last-child { border-bottom: 0; }
.picker-opt.active, .picker-opt:hover { background: var(--bg); }
.picker-opt.free { color: var(--primary); }
.picker-empty { padding: 10px; color: var(--muted); font-size: 14px; }
.thumb { border-radius: 6px; object-fit: cover; flex: none; background: var(--line); }
.thumb.ph { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; }
.photo-slot {
  width: 96px; height: 96px; margin: 0 8px 0 0; border: 1px dashed var(--line); border-radius: 10px; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 13px; flex: none;
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }

label.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 15px; margin: 12px 0 4px; }
label.check input { width: auto; }
.sigpad { width: 100%; height: 170px; background: #fff; border: 1px solid var(--line); border-radius: 8px; touch-action: none; display: block; }
.editrow { background: var(--bg); padding: 8px; border-radius: 8px; }
code { font-size: 13px; background: var(--bg); padding: 1px 4px; border-radius: 4px; }

/* --- uitdraai en bestellijst --- */
.printout h3 { margin: 18px 0 6px; }
.printout table { font-size: 14px; }
.printout tfoot th { border-top: 2px solid var(--line); }
.totals { width: auto; min-width: 280px; margin: 16px 0 0 auto; }
.totals td, .totals th { border-bottom: 0; padding: 4px 6px; }
.totals .grand th { border-top: 2px solid var(--text); font-size: 16px; }
.totals .intern td, .totals .intern th { color: var(--ok); }
.sig { margin-top: 10px; }
.sig img { max-width: 280px; height: auto; border-bottom: 1px solid var(--text); background: #fff; }
td.fill { border-bottom: 1px solid var(--muted); min-width: 90px; }
.totals th { color: var(--text); }
@media (max-width: 600px) { .mat .thumb { display: none; } }
@media (max-width: 600px) {
  .printout table:not(.totals) { display: block; overflow-x: auto; font-size: 13px; }
  .printout header { flex-direction: column; }
  .printout header > div:last-child { text-align: left !important; }
  .printout .grid2 { grid-template-columns: 1fr; }
}

/* --- pc: menu als vaste balk, bredere inhoud --- */
@media (min-width: 900px) {
  #menu-btn { display: none; }
  .menu {
    position: sticky; top: calc(48px + env(safe-area-inset-top)); right: auto; z-index: 9; flex-direction: row; min-width: 0;
    border-radius: 0; border-width: 0 0 1px; box-shadow: none; padding: 0 12px; overflow: visible;
  }
  .menu a, .menu .link { padding: 10px 14px; font-size: 15px; border-bottom: 3px solid transparent; }
  .menu a.active { border-bottom-color: var(--primary); font-weight: 600; }
  .menu .link { margin-left: auto; }
  main { max-width: 1100px; padding-bottom: 40px; }
  .fab { right: max(18px, calc(50vw - 550px)); }
}

/* --- afdrukken --- */
@media print {
  .topbar, .menu, .no-print, .fab, .toast, .tabs { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  main { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; margin: 0; }
  .muted { color: #555; }
  a { color: inherit; text-decoration: none; }
  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
}

/* --- administratie --- */
.months .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; min-width: 60px; }
.months .bar span { display: block; height: 100%; background: var(--primary); }

.scroll-x { overflow-x: auto; }

/* --- scanner, tekenen, checklists --- */
.scanbtn { padding: 8px 12px; font-size: 20px; line-height: 1; flex: none; }
.scanner video { max-width: 100%; max-height: 100%; }
.scanner .img-wrap { position: relative; }
.scanframe { position: absolute; left: 12%; right: 12%; top: 38%; bottom: 38%; border: 3px solid rgba(255,255,255,.85); border-radius: 10px; pointer-events: none; }
.annotator canvas { touch-action: none; background: #111; }
.annotator { background: #000; z-index: 55; }
.annotator .img-wrap { overflow: hidden; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #555; padding: 0; }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 2px #000 inset; }
.annotator .chip { background: #333; color: #fff; border-color: #555; }
.annotator .chip.active { background: #fff; color: #000; }
ul.checklist { list-style: none; padding-left: 0; margin: 4px 0; }
ul.checklist li { padding: 2px 0; }
ul.checklist li.open { color: var(--danger); }
details > summary { cursor: pointer; }

/* --- planning --- */
.week { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(7, 1fr); gap: 8px; } .week .day { min-height: 180px; font-size: 14px; } }
.day.today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.day.weekend { opacity: .8; }
.plan-item { border-left: 3px solid var(--primary); padding: 4px 8px; margin: 6px 0; background: var(--bg); border-radius: 4px; }
.plan-item.unassigned { border-left-color: var(--danger); }

/* --- klantmodus (tekenen) --- */
body.customer-mode .topbar, body.customer-mode .menu, body.customer-mode .fab { display: none !important; }
body.customer-mode main { padding-top: 16px; }

/* --- factuur in eigen stijl (naar VF-26-0028) --- */
.invoice {
  background: #fff; color: #000; font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 13px; line-height: 1.35;
  width: 100%; max-width: 210mm; margin: 0 auto 16px; padding: 14mm 14mm 10mm; box-shadow: 0 2px 12px rgba(0,0,0,.15); position: relative;
  display: flex; flex-direction: column; font-variant-numeric: tabular-nums;
}
.invoice .inv-logo { width: 78mm; max-width: 60%; display: block; margin: 0 0 6mm; }
.invoice .inv-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; }
.invoice .inv-from div { min-height: 1.35em; }
.invoice .inv-meta { width: 48%; }
.invoice .inv-label { font-weight: 700; margin-bottom: 3px; }
.invoice .inv-meta .inv-label { font-size: 15px; }
.invoice table { border-collapse: collapse; width: 100%; font-size: 13px; }
.invoice td, .invoice th { border-bottom: 0; padding: 2px 5px; vertical-align: middle; color: #000; font-size: 13px; }
.invoice .inv-meta td { border: 1px solid transparent; }
.invoice .inv-meta td:first-child { width: 42%; padding-left: 0; }
.invoice td.box { background: #f2f2f2; border: 1px solid #999; }
.invoice .inv-billto { width: 59%; margin-top: 4mm; }
.invoice .inv-billto td.box { border-top: 0; }
.invoice .inv-billto tr:first-child td.box { border-top: 1px solid #999; }
.invoice .inv-lines { margin-top: 6mm; border: 1px solid #000; }
.invoice .inv-lines th { background: #808080; color: #fff; font-weight: 700; text-align: left; padding: 3px 5px; border: 1px solid #000; white-space: nowrap; }
.invoice .inv-lines td { border-left: 1px solid #000; border-right: 1px solid #000; border-bottom: 1px solid #d9d9d9; height: 21px; }
.invoice .inv-lines td.c { text-align: center; }
.invoice .inv-lines td.r, .invoice td.amt { white-space: nowrap; }
.invoice .r { text-align: right; }
.invoice .amt-in { display: flex; justify-content: space-between; gap: 6px; }
.invoice .red, .invoice .red td, .invoice .red th { color: #e00000 !important; }
.invoice .inv-sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 5mm; }
.invoice .inv-totals { width: 44.5%; flex: 0 0 44.5%; border: 1px solid #000; border-top: 0; }
.invoice .inv-totals th { text-align: left; font-weight: 700; border: 1px solid #000; width: 45%; }
.invoice .inv-totals td { border: 1px solid #000; font-weight: 700; }
.invoice .inv-totals .grand th, .invoice .inv-totals .grand td { background: #808080; color: #fff; font-size: 14px; }
.invoice .inv-remarks-label { margin-top: 5mm; }
.invoice .inv-remarks { background: #f2f2f2; border: 1px solid #000; border-bottom: 3px double #000; min-height: 12mm; padding: 4px 6px; font-weight: 700; white-space: pre-wrap; }
.invoice .inv-footer { text-align: center; margin-top: 6mm; }
.invoice .inv-footer p { margin: 0 0 5mm; }
.invoice .inv-footer .thanks { margin: 6mm 0 0; letter-spacing: .5px; }
.invoice .inv-bottom { display: flex; justify-content: space-between; font-weight: 700; margin-top: auto; padding-top: 8mm; flex-wrap: wrap; gap: 4px 12px; }
.invoice .inv-intern-banner { background: #e00000; color: #fff; font-weight: 700; text-align: center; padding: 4px; margin: -8mm -8mm 6mm; letter-spacing: 1px; }
.invoice .inv-concept { position: absolute; top: 40%; left: 0; right: 0; text-align: center; font-size: 90px; color: rgba(200,0,0,.12); transform: rotate(-25deg); pointer-events: none; font-weight: 700; }
.invoice .inv-internal { flex: 1 1 auto; border: 1.5px dashed #e00000; padding: 4px 6px; margin-top: 3mm; }
.invoice .inv-internal-title { font-weight: 700; color: #b00000; margin-bottom: 2px; }
.invoice .inv-internal td, .invoice .inv-internal th { font-size: 12px; padding: 1px 2px; border-bottom: 1px solid #eee; }
.invoice .inv-internal th { text-align: left; }
.invoice .inv-internal th.r { text-align: right; }
.invoice.intern .inv-logo { margin-bottom: 3mm; }
.invoice.intern .inv-footer p { margin-bottom: 3mm; }
.invoice.intern .inv-footer .thanks { margin-top: 3mm; }
.invoice.intern .inv-remarks { min-height: 8mm; }
.invoice.intern .inv-bottom { padding-top: 4mm; }
.invoice.intern .inv-billto { margin-top: 2mm; }
.invoice .inv-internal tr.sep th { border-top: 1px solid #999; }
.invoice .inv-warn { font-size: 11px; color: #b00000; margin-top: 2px; }
.invoice.intern .inv-lines th:nth-child(n+5) { background: #b00000; }
.invoice .inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; }
.invoice.style-klassiek .inv-title, .invoice.style-klassiek .inv-due { display: none; }

/* Modern: huiskleuren uit het logo (blauw #38b6ff, oranje #e26d25), geen grijze vakken */
.invoice.style-modern { --navy: #0d2b45; --blue: #1c8fd6; --orange: #e26d25; --tint: #eef6fc; font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.invoice.style-modern .inv-head { border-bottom: 3px solid var(--orange); padding-bottom: 4mm; margin-bottom: 6mm; align-items: center; }
.invoice.style-modern .inv-logo { width: 66mm; margin: 0; }
.invoice.style-modern .inv-title { font-size: 30px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 2px; text-align: right; line-height: 1.1; }
.invoice.style-modern .inv-title span { display: block; font-size: 14px; letter-spacing: 0; color: var(--blue); }
.invoice.style-modern .inv-top { align-items: flex-start; }
.invoice.style-modern .inv-from { color: #333; }
.invoice.style-modern .inv-meta .inv-label { display: none; }
.invoice.style-modern td.box { background: none; border: 0; text-align: right; font-weight: 600; }
.invoice.style-modern .inv-meta td { color: #333; }
.invoice.style-modern .inv-billto { background: var(--tint); border-left: 4px solid var(--blue); padding: 3mm 4mm; width: 55%; margin-top: 5mm; }
.invoice.style-modern .inv-billto .inv-label { color: var(--blue); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }
.invoice.style-modern .inv-billto td.box { text-align: left; font-weight: 400; padding: 0; }
.invoice.style-modern .inv-billto tr:first-child td.box { font-weight: 700; border: 0; }
.invoice.style-modern .inv-lines { border: 0; margin-top: 8mm; }
.invoice.style-modern .inv-lines th { background: var(--navy); border: 0; padding: 5px 6px; font-size: 12px; letter-spacing: .5px; }
.invoice.style-modern .inv-lines td { border: 0; border-bottom: 1px solid #e3e8ee; height: auto; padding: 5px 6px; }
.invoice.style-modern .inv-lines tbody tr:nth-child(even) td { background: #f7f9fb; }
.invoice.style-modern .inv-lines tr.empty { display: none; }
.invoice.style-modern .inv-sum { margin-top: 3mm; }
.invoice.style-modern .inv-totals { border: 0; }
.invoice.style-modern .inv-totals th, .invoice.style-modern .inv-totals td { border: 0; font-weight: 400; padding: 3px 6px; }
.invoice.style-modern .inv-totals .grand th, .invoice.style-modern .inv-totals .grand td { background: var(--orange); font-weight: 700; font-size: 16px; padding: 6px; }
.invoice.style-modern .inv-remarks-label { color: var(--blue); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; margin-top: 8mm; }
.invoice.style-modern .inv-remarks { background: none; border: 0; border-left: 4px solid #d0d7de; min-height: 0; font-weight: 400; padding: 2px 8px; }
.invoice.style-modern .inv-footer { text-align: left; background: var(--tint); padding: 4mm 5mm 1mm; border-radius: 3px; }
.invoice.style-modern .inv-footer .thanks { color: var(--navy); font-weight: 700; text-align: center; margin: 0 0 3mm; }
.invoice.style-modern .inv-bottom { font-weight: 400; font-size: 11px; color: #555; border-top: 1px solid #d0d7de; padding-top: 2mm; }
.invoice.style-modern .inv-lines th:nth-child(n+5) { background: #b00000; }
.invoice.style-modern.intern .inv-head { margin-bottom: 3mm; padding-bottom: 2mm; }
.invoice.style-modern.intern .inv-billto { margin-top: 3mm; padding: 2mm 4mm; }
.invoice.style-modern.intern .inv-lines { margin-top: 5mm; }
.invoice.style-modern.intern .inv-lines td { padding: 3px 6px; }
.invoice.style-modern.intern .inv-remarks-label { margin-top: 4mm; }
.invoice.style-modern.intern .inv-footer { padding: 3mm 5mm 0; }
.invoice.style-strak.intern .inv-head { margin-bottom: 4mm; }
.invoice.style-strak.intern .inv-billto, .invoice.style-strak.intern .inv-lines { margin-top: 5mm; }
.invoice.style-strak.intern .inv-remarks-label, .invoice.style-strak.intern .inv-footer { margin-top: 5mm; }

/* Strak: zwart-wit, veel witruimte, geen vlakken (zuinig printen) */
.invoice.style-strak { font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.invoice.style-strak td, .invoice.style-strak th, .invoice.style-strak table { font-size: 12px; }
.invoice.style-strak .inv-head { margin-bottom: 8mm; align-items: flex-end; }
.invoice.style-strak .inv-logo { width: 56mm; margin: 0; }
.invoice.style-strak .inv-title { font-size: 26px; font-weight: 300; text-transform: uppercase; letter-spacing: 6px; text-align: right; line-height: 1.1; }
.invoice.style-strak .inv-title span { display: block; font-size: 12px; letter-spacing: 1px; font-weight: 700; }
.invoice.style-strak .inv-top { align-items: flex-start; }
.invoice.style-strak .inv-meta .inv-label, .invoice.style-strak .inv-billto .inv-label { text-transform: uppercase; font-size: 10px; letter-spacing: 1.5px; color: #666; font-weight: 400; }
.invoice.style-strak .inv-meta .inv-label { display: none; }
.invoice.style-strak td.box { background: none; border: 0; text-align: right; }
.invoice.style-strak .inv-meta td:first-child { color: #666; }
.invoice.style-strak .inv-billto { margin-top: 8mm; width: 55%; }
.invoice.style-strak .inv-billto td.box { text-align: left; padding: 0; border: 0; }
.invoice.style-strak .inv-billto tr:first-child td.box { font-weight: 700; border: 0; }
.invoice.style-strak .inv-lines { border: 0; margin-top: 10mm; }
.invoice.style-strak .inv-lines th { background: none; color: #000; border: 0; border-bottom: 1.5px solid #000; text-transform: uppercase; font-size: 10px; letter-spacing: 1px; padding: 4px 6px; }
.invoice.style-strak .inv-lines td { border: 0; border-bottom: 1px solid #ddd; height: auto; padding: 6px; }
.invoice.style-strak .inv-lines tr.empty { display: none; }
.invoice.style-strak .inv-sum { margin-top: 4mm; }
.invoice.style-strak .inv-totals { border: 0; }
.invoice.style-strak .inv-totals th, .invoice.style-strak .inv-totals td { border: 0; font-weight: 400; padding: 3px 6px; }
.invoice.style-strak .inv-totals .grand th, .invoice.style-strak .inv-totals .grand td { background: none; color: #000; border-top: 1.5px solid #000; border-bottom: 3px double #000; font-weight: 700; font-size: 15px; padding: 6px; }
.invoice.style-strak .inv-remarks-label { margin-top: 10mm; text-transform: uppercase; font-size: 10px; letter-spacing: 1.5px; color: #666; font-weight: 400; }
.invoice.style-strak .inv-remarks { background: none; border: 0; min-height: 0; font-weight: 400; padding: 0; }
.invoice.style-strak .inv-footer { text-align: left; color: #333; margin-top: 10mm; }
.invoice.style-strak .inv-footer .thanks { text-transform: uppercase; letter-spacing: 3px; font-size: 11px; }
.invoice.style-strak .inv-bottom { font-weight: 400; font-size: 10px; color: #666; border-top: 1px solid #000; padding-top: 2mm; }
.invoice.style-strak.intern .inv-lines th:nth-child(n+5) { background: none; color: #b00000; }
@media (max-width: 600px) {
  .invoice { padding: 6mm 4mm; font-size: 11px; }
  .invoice table, .invoice td, .invoice th { font-size: 11px; }
  .invoice .inv-lines th { font-size: 10px; padding: 3px 3px; }
  .invoice .inv-lines td { padding: 2px 3px; }
  .invoice .inv-top { flex-direction: column; align-items: stretch; gap: 3mm; }
  .invoice .inv-meta, .invoice .inv-billto { width: 100%; }
  .invoice .inv-sum { flex-direction: column-reverse; align-items: stretch; }
  .invoice .inv-totals { width: 75%; flex-basis: auto; margin-left: auto; }
  .invoice .inv-intern-banner { margin: -2mm -0mm 4mm; }
  .invoice .inv-head { flex-direction: column; align-items: flex-start !important; }
  .invoice .inv-title { text-align: left !important; }
}
@media print {
  @page { size: A4; margin: 10mm; }
  /* één A4: voettekst onderaan de pagina, zoals in de eigen factuur */
  .invoice { box-shadow: none; max-width: none; padding: 0; margin: 0; min-height: 272mm; }
  .invoice .inv-intern-banner { margin: 0 0 5mm; }
  .invoice .inv-lines tr, .invoice .inv-sum { break-inside: avoid; }
  .invoice, .invoice * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .invoice .inv-lines th, .invoice .inv-totals .grand th, .invoice .inv-totals .grand td, .invoice td.box, .invoice .inv-remarks, .invoice .inv-intern-banner {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}
input.warn { border-color: var(--danger); background: var(--warn-bg); }
.invedit input { min-width: 0; }
