/* Leadzloop · eenheid (v50/v51) */
.ez-team, .ez-agtabs { margin: 0 0 14px }
#ezpay { margin-top: 14px }

/* v53: centrale gegevens */
.cz-card { margin: -2px 0 12px; padding: 10px 12px; border: 1px solid var(--line2, #e5e7eb); border-radius: 10px; background: color-mix(in srgb, var(--sig, #1F5BFF) 5%, transparent); font-size: 13.5px }
.cz-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center }
.cz-row > * { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none }
.cz-row a { color: var(--sig, #1F5BFF); font-weight: 600 }
.cz-row svg, .cz-dup svg { width: 15px; height: 15px; flex: none }
.cz-miss { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line2, #e5e7eb) }
.cz-miss input { flex: 1 1 160px; min-height: 38px; font: inherit }
.cz-hint { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--mute, #6b7280) }
.cz-hint.ok { color: var(--ok, #16A34A) }
.cz-dup { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin: 0 0 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn, #C98A0C) 14%, transparent); font-size: 13.5px }
.cz-dup a { font-weight: 700 }

/* v52: CSV-import */
.imp-pts { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; font-size: 14px }
.imp-pts li { display: flex; gap: 8px; align-items: flex-start }
.imp-pts svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ok, #16A34A) }
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; max-height: 42vh; overflow: auto; margin-bottom: 12px }
.imp-sum { display: flex; flex-wrap: wrap; gap: 6px }
.imp-tbl { max-height: 46vh; overflow: auto; border: 1px solid var(--line2, #e5e7eb); border-radius: 10px; margin-bottom: 12px }
.imp-tbl .tbl { margin: 0; border: 0 }
.imp-tbl td small { display: block }

/* v51: beschrijving per offerte- en factuurregel */
.lines-ed .lninfo { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 4px 2px; background: none; border: 0; color: var(--sig, #1F5BFF); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer }
.lines-ed .lninfo svg { width: 14px; height: 14px }
.lines-ed textarea.lninfo-t { display: block; width: 100%; margin-top: 6px; min-height: 64px; font: inherit; font-size: 14px; line-height: 1.45; resize: vertical }
.doc .li-info { font-size: .86em; opacity: .78; margin-top: 3px; line-height: 1.45; white-space: normal }
.qprev { max-height: 70vh; overflow: auto; border: 1px solid var(--line2, #e5e7eb); border-radius: 12px; padding: 12px; margin: 0 0 14px; background: var(--paper, #fff) }

/* offerte- en factuurregels op de telefoon: elke regel als een kaartje in plaats van een brede tabel */
@media (max-width: 640px) {
  .lines-ed table.lines thead { display: none }
  .lines-ed table.lines, .lines-ed table.lines tbody { display: block; width: 100% }
  .lines-ed table.lines tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line2, #e5e7eb) }
  .lines-ed table.lines td { display: block; padding: 0 !important; border: 0 !important; min-width: 0 }
  .lines-ed table.lines td:nth-child(1) { grid-column: 1 / -1 }
  .lines-ed table.lines td input, .lines-ed table.lines td select, .lines-ed table.lines td textarea { width: 100% !important; min-width: 0; font-size: 16px }
  .lines-ed table.lines td input, .lines-ed table.lines td select { min-height: 44px }
  .lines-ed table.lines td:nth-child(2)::before { content: 'Aantal' }
  .lines-ed table.lines td:nth-child(3)::before { content: 'Eenheid' }
  .lines-ed table.lines td:nth-child(4)::before { content: 'Prijs excl.' }
  .lines-ed table.lines td:nth-child(5)::before { content: 'Btw' }
  .lines-ed table.lines td:nth-child(2)::before, .lines-ed table.lines td:nth-child(3)::before, .lines-ed table.lines td:nth-child(4)::before, .lines-ed table.lines td:nth-child(5)::before { display: block; font-size: 11px; color: var(--mute, #6b7280); margin: 0 0 3px }
  .lines-ed table.lines td:nth-child(6) { align-self: end; text-align: left !important; font-weight: 700; padding-bottom: 12px !important }
  .lines-ed table.lines td:nth-child(7) { align-self: end; justify-self: end }
  .lines-ed table.lines td:nth-child(7) .del { min-width: 44px; min-height: 44px }
  .qprev { max-height: 62vh; padding: 6px }
}

/* v60: productfoto's */
.pthumb { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line2, #e5e7eb); background: #fff; float: left; margin: 0 10px 0 0 }
.pf-photo { margin: 4px 0 12px }
.pf-ph { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 6px }
.pf-prev { width: 96px; height: 96px; flex: none; display: grid; place-items: center; border: 1px dashed var(--line, rgba(0,0,0,.2)); border-radius: 10px; background: #fff; overflow: hidden; font-size: 12px; color: var(--mute, #6b7280); text-align: center }
.pf-prev img { width: 100%; height: 100%; object-fit: contain }
.pf-prev.busy { opacity: .5 }
.pf-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1 1 200px }
.pf-acts small { flex-basis: 100% }
.pf-acts label.btn { cursor: pointer }
.pf-acts .dis { pointer-events: none; opacity: .5 }
.lines-ed .ln-img { position: relative; display: inline-block; margin: 6px 0 0 6px; vertical-align: top }
.lines-ed .ln-img img { display: block; width: 48px; height: 48px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line2, #e5e7eb); background: #fff }
.lines-ed .ln-img button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink, #0B1220); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center }
.doc .li-wi { display: flex; gap: 12px; align-items: flex-start }
.doc .li-wi img { width: 72px; height: 72px; object-fit: contain; flex: none; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); background: #fff }
.doc .li-wi .li-wt { min-width: 0 }
@media (max-width: 640px) { .doc .li-wi img { width: 56px; height: 56px } .pthumb { width: 32px; height: 32px } }

/* v59: volgorde van producten */
.po-list { display: grid; gap: 6px; max-height: 60vh; overflow: auto; margin: 0 0 12px; padding: 2px }
.po-row { display: grid; grid-template-columns: 18px 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line2, #e5e7eb); border-radius: 10px; background: var(--paper, #fff); cursor: grab }
.po-row.off { opacity: .55 }
.po-row.drag { opacity: .4 }
.po-row.over { border-color: var(--sig, #1F5BFF); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sig, #1F5BFF) 25%, transparent) }
.po-row.moved { animation: pomv .8s ease }
@keyframes pomv { from { background: color-mix(in srgb, var(--sig, #1F5BFF) 14%, transparent) } }
.po-h { color: var(--mute, #6b7280); letter-spacing: -2px; user-select: none }
.po-n { font-variant-numeric: tabular-nums; color: var(--mute, #6b7280); font-size: 13px; text-align: right }
.po-t { min-width: 0 }
.po-t b, .po-t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.po-t small { color: var(--mute, #6b7280); font-size: 12.5px }
.po-b { display: flex; gap: 6px }
.po-b .btn { min-width: 40px; min-height: 40px; justify-content: center }
/* v59b: slepen met vinger of muis */
.po-row { grid-template-columns: 36px 26px minmax(0, 1fr) auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none }
.po-h { display: flex; align-items: center; justify-content: center; align-self: stretch; min-height: 40px; margin: -8px 0 -8px -10px; padding-left: 10px; font-size: 18px; cursor: grab; touch-action: none; color: var(--mute, #6b7280) }
.po-list.dragging { cursor: grabbing }
.po-list.dragging .po-row:not(.lift) { transition: transform .15s ease }
.po-row.lift { position: relative; z-index: 3; cursor: grabbing; box-shadow: 0 10px 28px rgba(15, 23, 42, .18); border-color: var(--sig, #1F5BFF); transition: none }
@media (max-width: 640px) { .po-row { grid-template-columns: 36px minmax(0, 1fr) auto } .po-n { display: none } .po-b [data-top] { display: none } }

/* v58: totalen netjes uitgelijnd: bedrag altijd op één regel achter het euroteken, alleen de omschrijving mag afbreken */
.totals { max-width: 380px }
.totals > div { gap: 16px; align-items: baseline }
.totals > div > span:first-child { flex: 1 1 auto; min-width: 0 }
.totals > div > span:last-child { flex: none; white-space: nowrap; text-align: right }

/* v56: regels altijd volledig in beeld (ook op iPad), duidelijke verwijderknop, korting als % of bedrag */
.lines-ed .del { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--bad, #E11D48); border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; min-width: 40px; min-height: 40px }
.lines-ed .del:hover, .lines-ed .del:focus-visible { background: color-mix(in srgb, var(--bad, #E11D48) 10%, transparent) }
.lines-ed .del svg { width: 18px; height: 18px }
.lines-ed .ln-adds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px }
.lines-ed .ln-empty td { padding: 16px 6px; color: var(--mute, #6b7280); font-size: 14px }
.lines-ed .ln-dh { display: block; margin-top: 4px; font-size: 12px; color: var(--mute, #6b7280) }
.lines-ed tr.ln-disc td:first-child input { font-weight: 600 }
.lines-ed tr.ln-disc td:nth-child(6), .lines-ed .totals .ln-dtot span:last-child { color: var(--ok, #16A34A); font-weight: 600 }
.lines-ed .totals .ln-warn span { color: var(--bad, #E11D48); font-size: 13px }
.lines-ed .ln-subs { margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--line, rgba(0,0,0,.18)); border-radius: 12px }
.lines-ed .ln-sub { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, .8fr) auto; gap: 8px; align-items: center; margin-top: 8px }
.lines-ed .ln-sub input, .lines-ed .ln-sub select { width: 100%; min-width: 0; min-height: 40px; box-sizing: border-box }
.lines-ed .ln-subh { margin-top: 4px }
.lines-ed .ln-subh small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute, #6b7280) }
@media (max-width: 640px) { .lines-ed .ln-subh { display: none } .lines-ed .ln-sub select { grid-column: 1 / -1; font-size: 16px; min-height: 44px } }
.lines-ed .ln-sub .del-t { display: none }
.lines-ed .totals .ln-sbt span:last-child { color: var(--ok, #16A34A); font-weight: 600 }
.lines-ed .totals .ln-net { font-weight: 700 }
@media (max-width: 640px) {
  .lines-ed .ln-sub { grid-template-columns: 1fr 1fr; padding-bottom: 10px; border-bottom: 1px solid var(--line2, #e5e7eb) }
  .lines-ed .ln-sub input[data-sk=descr] { grid-column: 1 / -1 }
  .lines-ed .ln-sub input { font-size: 16px; min-height: 44px }
  .lines-ed .ln-sub .del-t { display: inline }
}
@media (min-width: 641px) {
  .lines-ed table.lines { table-layout: fixed; width: 100% }
  .lines-ed table.lines th:nth-child(1) { width: auto !important }
  .lines-ed table.lines th:nth-child(2) { width: 9% }
  .lines-ed table.lines th:nth-child(3) { width: 11% }
  .lines-ed table.lines th:nth-child(4) { width: 15% }
  .lines-ed table.lines th:nth-child(5) { width: 11% }
  .lines-ed table.lines th:nth-child(6) { width: 13% }
  .lines-ed table.lines th:nth-child(7) { width: 52px }
  .lines-ed table.lines td input, .lines-ed table.lines td select { width: 100% !important; min-width: 0; box-sizing: border-box }
  .lines-ed table.lines td:nth-child(6) { overflow: hidden; text-overflow: ellipsis }
  .lines-ed .del-t { display: none }
}
@media (max-width: 640px) {
  .lines-ed table.lines tr.ln-disc td:nth-child(2)::before { content: 'Soort' }
  .lines-ed table.lines tr.ln-disc td:nth-child(3)::before { content: 'Korting' }
  .lines-ed table.lines tr.ln-disc td:nth-child(4) { display: none }
}
