/* SEMANU dashboard — Offer/Invoice/Articles module
   Loads after dashboard.css. Scoped under .dash-offers-* classes. */

/* ---------- Tabs binnen offer/invoice/articles screens ---------- */
.dash-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  margin: 0 0 18px;
}
.dash-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Articles catalog (Beheer-tab) ---------- */
.art-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.art-toolbar input[type=search],
.art-toolbar select {
  padding: 8px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  font-size: 14px;
  background: white;
}
.art-toolbar input[type=search] { flex: 1; min-width: 220px; }

.art-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
}
.art-table th, .art-table td {
  text-align: left;
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.art-table th { font-weight: 600; background: var(--bg-elev); color: var(--text-soft); }
.art-table tr:last-child td { border-bottom: none; }
.art-table tr:hover td { background: rgba(255,90,31,.03); }
.art-table .art-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-soft); }
.art-table .art-price { text-align: right; font-weight: 600; }
.art-table .art-margin { text-align: right; color: var(--text-soft); font-size: 12px; }
.art-table .art-margin.pos { color: #16A34A; }
.art-table .art-margin.neg { color: #DC2626; }
.art-table .art-bundle-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,90,31,.12);
  color: var(--accent);
  margin-left: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.art-table .art-inactive { opacity: .4; }

/* ---------- Editor modal (article, quote, invoice) ---------- */
.doc-editor {
  background: white;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 1100px;
  margin: 0 auto;
}
.doc-editor h2 { margin-bottom: 4px; }
.doc-editor h2 .doc-num { color: var(--text-soft); font-weight: 500; font-size: 14px; margin-left: 8px; }

.doc-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin: 18px 0;
}
.doc-editor-grid label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 4px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.doc-editor-grid input,
.doc-editor-grid select,
.doc-editor-grid textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #D3D1C7;
  border-radius: 6px;
  font-size: 14px;
  background: #FCFCFB;
  color: #0A0A0A;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}
.doc-editor-grid input:focus,
.doc-editor-grid select:focus,
.doc-editor-grid textarea:focus {
  outline: none;
  border-color: #FF5A1F;
  background: white;
  box-shadow: 0 0 0 3px rgba(255,90,31,.10);
}
.doc-editor-grid input:hover,
.doc-editor-grid select:hover,
.doc-editor-grid textarea:hover {
  border-color: #B4B2A9;
}
.doc-editor-grid textarea { min-height: 64px; resize: vertical; line-height: 1.4; }
.doc-editor-grid .full { grid-column: 1 / -1; }
.doc-editor-grid label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #5C5C5E;
  margin-bottom: 5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---------- Inklapbare tekstvelden (intro/outro/notities) ---------- */
.doc-collapse {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}
.doc-collapse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elev);
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.doc-collapse-head:hover { background: #efece3; }
.doc-collapse-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: .04em;
}
.doc-collapse-chevron {
  color: var(--text-soft);
  font-size: 12px;
  transition: transform .2s ease;
}
.doc-collapse.is-open .doc-collapse-chevron { transform: rotate(180deg); }
.doc-collapse-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.doc-collapse.is-open .doc-collapse-body { max-height: 600px; }
.doc-collapse-body textarea {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border-soft);
  border-radius: 0;
}

/* ---------- Multi-language input ---------- */
.ml-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-top: 6px;
}
.ml-inputs > div {
  display: flex;
  align-items: stretch;
  min-width: 0;
}
.ml-inputs .ml-flag {
  width: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F5F7;
  border: 1px solid #E5E5E7;
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: #5C5C5E;
  letter-spacing: .04em;
}
.ml-inputs input,
.ml-inputs textarea {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 0 6px 6px 0 !important;
  padding: 8px 12px !important;
  border: 1px solid #E5E5E7 !important;
  background: white !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: #0A0A0A !important;
}
.ml-inputs textarea {
  min-height: 60px;
  resize: vertical;
}

/* ---------- Editor sections ---------- */
.doc-editor-section {
  margin: 0 0 24px;
}
.doc-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #FF5A1F;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #F0F0F2;
}
.doc-section-hint {
  font-size: 12px;
  color: #5C5C5E;
  margin: -4px 0 12px;
  font-style: italic;
}
.doc-field-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: #8E8E93;
  font-style: italic;
}
.doc-section-advanced {
  background: #FAFAFA;
  border: 1px dashed #E5E5E7;
  border-radius: 8px;
  padding: 8px 14px;
  margin-top: 16px;
}

/* ---------- Invoice-historiek + uit-offerte-link (Sprint 3 Pad A) ---------- */
.doc-from-quote {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFF7F0;
  border: 1px solid #FFE0CC;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.doc-from-quote-meta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  font-size: 13px;
  color: #3C3C3E;
  line-height: 1.4;
}
.doc-from-quote-icon { font-size: 16px; flex: none; }
.doc-from-quote-sub { color: #8E8E93; font-size: 12px; }
.doc-from-quote-btn { white-space: nowrap; }

.doc-invoice-timeline {
  background: #FAFAFA;
  border: 1px solid #EDEDEF;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-timeline-row {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  align-items: flex-start;
}
.doc-timeline-bullet {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 6px;
  flex: none;
}
.doc-timeline-body { font-size: 13px; color: #0A0A0A; line-height: 1.45; }
.doc-timeline-meta { color: #8E8E93; font-size: 12px; }
.doc-timeline-sub  { color: #5C5C5E; font-size: 12px; margin-top: 2px; }

/* ---------- Installment-badge + termijn-kolom (Sprint 2 Fase D) ---------- */
.doc-badge-installment {
  background: #EAF4FF;
  color: #1D4ED8;
  border: 1px solid #C7DDFB;
}
/* Nieuwe status: ready_to_seal (concept-factuur uit gevalideerde offerte) */
.doc-badge.ready_to_seal {
  background: #FFF3E0;
  color: #B45309;
  border: 1px solid #FFD7A6;
}
.col-installment {
  font-variant-numeric: tabular-nums;
  color: #5C5C5E;
  font-size: 13px;
}

/* ---------- Betaalschema (Sprint 2 invoice-flow) ---------- */
.doc-schedule-preset {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.doc-schedule-preset label {
  font-size: 12px;
  color: #5C5C5E;
}
.doc-schedule-preset select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #E5E5E7;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}
.doc-schedule-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-schedule-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 80px 220px 36px;
  gap: 10px;
  align-items: end;
  background: #FAFAFA;
  border: 1px solid #EDEDEF;
  border-radius: 8px;
  padding: 10px 12px;
}
.doc-schedule-cell { display: flex; flex-direction: column; gap: 4px; }
.doc-schedule-cell label {
  font-size: 11px;
  color: #8E8E93;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.doc-schedule-cell input {
  padding: 6px 8px;
  border: 1px solid #E5E5E7;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}
.doc-schedule-cell-remove { align-items: flex-start; }
.doc-schedule-sum {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 12px;
  background: #F5F5F7;
  border-radius: 8px;
}
.doc-schedule-sum-label {
  font-size: 12px;
  color: #5C5C5E;
  letter-spacing: .04em;
}
.doc-schedule-sum-value {
  font-weight: 600;
  color: #0A0A0A;
  font-variant-numeric: tabular-nums;
}
.doc-schedule-sum.is-error .doc-schedule-sum-value { color: #D70015; }
.doc-schedule-sum.is-error { background: #FFF1F0; }
.doc-schedule-add { margin-left: auto; }
@media (max-width: 720px) {
  .doc-schedule-row {
    grid-template-columns: 1fr 80px 36px;
  }
  .doc-schedule-cell-due { grid-column: 1 / -1; }
}
.doc-section-toggle {
  background: transparent;
  border: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #5C5C5E;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 0;
  width: 100%;
  text-align: left;
}
.doc-section-toggle:hover { color: #FF5A1F; }
.doc-section-body { padding: 8px 0 4px; }

/* ---------- Checkbox row (e.g. Peppol-verzending) ---------- */
.doc-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #D3D1C7;
  border-radius: 6px;
  background: #FCFCFB;
  font-size: 13px;
  color: #0A0A0A;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  user-select: none;
}
.doc-checkbox-row:hover { border-color: #B4B2A9; }
.doc-checkbox-row input[type=checkbox] {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex: 0 0 auto;
}

/* ---------- Lines editor (quote/invoice/subscription) ---------- */
.doc-lines {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: white;
  /* overflow: visible zodat de artikel-picker dropdown (absolute, opent naar
     beneden) niet wordt afgekapt onder de tabel. Afronding behouden we via
     hoek-radii op de kop- en knoppenrij hieronder. */
  overflow: visible;
  margin-top: 18px;
}
.doc-lines-head {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.doc-lines-add {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}
.doc-lines-head, .doc-lines-row {
  display: grid;
  grid-template-columns: 28px minmax(180px, 1fr) 72px 116px 76px 72px 110px 48px 40px;
  gap: 0;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.doc-lines-head {
  background: var(--bg-elev);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: .04em;
}
.doc-lines-head > div, .doc-lines-row > div {
  padding: 8px 6px;
}
.doc-lines-head > div {
  white-space: nowrap;
}
.doc-lines-row:last-child { border-bottom: none; }
.doc-lines-row input,
.doc-lines-row select {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
  padding: 4px 0;
}
.doc-lines-row input:focus, .doc-lines-row select:focus {
  outline: none;
  background: rgba(255,90,31,.04);
  border-radius: 4px;
}
.doc-lines-row .ln-total { text-align: right; font-weight: 600; }
.doc-lines-row .ln-drag { cursor: grab; color: var(--text-soft); text-align: center; }

/* Nettere uitlijning: numerieke kolommen gecentreerd, totaal rechts, tekst links. */
.doc-lines-head > div:nth-child(4), .doc-lines-row > div:nth-child(4),
.doc-lines-head > div:nth-child(5), .doc-lines-row > div:nth-child(5),
.doc-lines-head > div:nth-child(6), .doc-lines-row > div:nth-child(6),
.doc-lines-head > div:nth-child(8), .doc-lines-row > div:nth-child(8),
.doc-lines-head > div:nth-child(9), .doc-lines-row > div:nth-child(9) { text-align: center; }
.doc-lines-head > div:nth-child(7), .doc-lines-row > div:nth-child(7) { text-align: right; }
.doc-lines-row > div input[type=number] { text-align: center; }
/* Pijltjes (spinners) weg bij Korting/BTW en Aantal — het veld volstaat. */
.doc-lines-row input[type=number]::-webkit-outer-spin-button,
.doc-lines-row input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.doc-lines-row input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* Opt-checkbox netjes gecentreerd onder zijn titel. */
.doc-lines-row .ln-opt { display: flex; align-items: center; justify-content: center; }
.doc-lines-row .ln-opt input { width: auto; }

/* Aparte verwijder-cel (×) als compacte knop. */
.doc-lines-row .ln-del-cell { display: flex; align-items: center; justify-content: center; }
.doc-lines-row .ln-del { border: none; background: transparent; color: var(--text-soft); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.doc-lines-row .ln-del:hover { color: #DC2626; background: rgba(220,38,38,.08); }
.doc-lines-row.bundle-child { background: rgba(255,90,31,.02); }
.doc-lines-row.bundle-child .ln-drag::before { content: "└"; color: var(--accent); }

.doc-lines-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--bg-elev);
  border-top: 1px solid var(--border-soft);
}
.doc-lines-add select { flex: 1; min-width: 200px; }

/* ---------- Pakket-snelkeuze (vóórgedefinieerde tier/level-pakketten) ---------- */
.doc-pkg {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--bg-elev);
  border-top: 1px solid var(--border-soft);
}
/* Bovenaan de regels (tussen REGELS-titel en kolomkoppen): scheidingslijn onder i.p.v. boven. */
.doc-pkg-top { border-top: none; border-bottom: 1px solid var(--border-soft); border-radius: 8px 8px 0 0; }
.doc-pkg-bar, .doc-pkg-tiers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doc-pkg-tiers:empty { display: none; }
.doc-pkg-label { font-size: 12px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.doc-pkg-topic, .doc-pkg-tier {
  font-size: 13px; padding: 6px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border-soft); background: white; color: #0A0A0A; font-weight: 600;
}
.doc-pkg-topic:hover, .doc-pkg-tier:hover { border-color: #FF5A1F; color: #FF5A1F; }
.doc-pkg-topic.is-active { background: var(--accent-solid, #CC4516); border-color: #FF5A1F; color: white; }
.doc-pkg-tier { background: #FFF4EF; border-color: #FFD3C2; }
.doc-pkg-tier:disabled { opacity: .5; cursor: default; }
.doc-pkg-status { font-size: 12px; color: #15803D; min-height: 16px; }

/* ---------- Searchable article picker ---------- */
.article-picker {
  position: relative;
  flex: 1;
  min-width: 240px;
}
.article-picker input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #D3D1C7;
  border-radius: 6px;
  background: white;
  font-size: 14px;
  color: var(--text);
}
.article-picker input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 90, 31, .15);
}
.article-picker-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: white;
  border: 1px solid #D3D1C7;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  z-index: 100;
  display: none;
}
.article-picker.is-open .article-picker-list { display: block; }
.article-picker-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.article-picker-item:last-child { border-bottom: none; }
.article-picker-item:hover,
.article-picker-item.is-highlighted { background: rgba(255, 90, 31, .06); }
.article-picker-item .ap-code {
  font-family: ui-monospace, monospace;
  color: var(--text-soft);
  font-size: 11px;
  min-width: 110px;
  flex-shrink: 0;
}
.article-picker-item .ap-name { flex: 1; color: var(--text); }
.article-picker-item .ap-bundle {
  background: var(--accent-solid, #CC4516);
  color: white;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
}
.article-picker-empty {
  padding: 14px 12px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
}

/* ---------- Free line wizard ---------- */
/* Gecentreerde modal-popup op body-niveau (zoals 'lead toevoegen'). Stapelt
   bovenop de offerte-editor, dus geen clipping door overflow van de tabel. */
.free-line-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
}
.free-line-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 24px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.free-line-wizard-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
}
.free-line-wizard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.free-line-wizard-grid .full { grid-column: 1 / -1; }
.free-line-wizard-grid label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.free-line-wizard-grid input,
.free-line-wizard-grid select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #D3D1C7;
  border-radius: 5px;
  background: #FCFCFB;
  font-size: 13px;
  color: var(--text);
}
.free-line-wizard-grid input:focus,
.free-line-wizard-grid select:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px var(--accent-glow, rgba(255, 90, 31, 0.12));
}
.free-line-wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.free-line-wizard-hint {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 6px;
  font-style: italic;
}

/* ---------- Planning-modal (verzending plannen) ---------- */
.sched-modal { max-width: 460px; }
.sched-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.sched-head-icon {
  display: inline-flex; width: 38px; height: 38px; flex: 0 0 auto;
  align-items: center; justify-content: center;
  border-radius: 10px; background: #FEF3C7; color: #B45309;
}
.sched-head-icon svg { width: 19px; height: 19px; }
.sched-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0; }
.sched-hint { font-size: 13px; color: var(--text-soft); line-height: 1.55; margin: 0 0 18px; }
.sched-field { margin-bottom: 4px; }
.sched-field label {
  display: block; font-size: 11px; text-transform: uppercase;
  color: var(--text-soft); font-weight: 600; letter-spacing: .04em; margin-bottom: 6px;
}
.sched-field input {
  width: 100%; padding: 10px 12px; border: 1px solid #D3D1C7;
  border-radius: 8px; background: #FCFCFB; font-size: 14px; color: var(--text);
}
.sched-field input:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow, rgba(255,90,31,.12));
}
.sched-actions { margin-top: 20px; }

/* Need add-row to be a positioning context so picker dropdown / wizard
   can absolute-anchor inside it. */
.doc-lines-add { position: relative; }

/* ---------- Totals block ---------- */
.doc-totals {
  margin-top: 16px;
  margin-left: auto;
  max-width: 360px;
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 14px 18px;
}
.doc-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
}
.doc-totals-row.total {
  border-top: 1px solid var(--border-soft);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 16px;
  font-weight: 700;
}
.doc-totals-row .lbl { color: var(--text-soft); }

/* ---------- Status badges ---------- */
.doc-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.doc-badge.draft     { background: #E5E5E7; color: #5C5C5E; }  /* Concept     — grijs   */
.doc-badge.scheduled { background: #FEF3C7; color: #B45309; }  /* Gepland     — amber   */
.doc-badge.pushed    { background: #DBEAFE; color: #1D4ED8; }
.doc-badge.sent      { background: #DBEAFE; color: #1D4ED8; }  /* Verzonden   — blauw   */
.doc-badge.viewed    { background: #E0E7FF; color: #4338CA; }  /* Bekeken     — indigo  */
.doc-badge.accepted  { background: #D1FAE5; color: #047857; }  /* Gevalideerd — groen   */
.doc-badge.declined  { background: #FEE2E2; color: #B91C1C; }  /* Afgewezen   — rood    */
.doc-badge.expired   { background: #FFEDD5; color: #C2410C; }  /* Verlopen    — oranje  */
.doc-badge.converted { background: #EDE9FE; color: #6D28D9; }  /* Omgezet     — paars   */
.doc-badge.cancelled { background: #F3F4F6; color: #6B7280; }  /* Ingetrokken — d.grijs */
.doc-badge.paid      { background: #D1FAE5; color: #047857; }
.doc-badge.partial   { background: #FEF3C7; color: #B45309; }
.doc-badge.overdue   { background: #FEE2E2; color: #B91C1C; }

/* ---------- Offerte-overzicht: rij-iconen, uitklap & versies ---------- */
.doc-list-quotes .col-exp     { width: 28px; }
.doc-list-quotes .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.doc-vtag { color: var(--text-soft); font-weight: 600; font-size: 12px; }

.doc-row-actions { display: inline-flex; gap: 2px; justify-content: flex-end; }
.doc-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 6px;
  background: transparent; color: var(--text-soft); cursor: pointer;
  transition: background .15s, color .15s;
}
/* Ghost-stijl over heel het platform (Tom juni 2026): geen kader, oranje
   hover voor de standaard-actie. Danger-variant gaat naar rood. */
.doc-icon-btn:hover,
.doc-icon-btn:focus-visible { background: var(--accent-bg, rgba(255,90,31,0.08)); color: var(--accent); outline: none; }
.doc-icon-btn.is-danger:hover,
.doc-icon-btn.is-danger:focus-visible { color: #d9534f; background: rgba(217,83,79,0.08); }
.doc-chevron { transition: transform .15s; }
.doc-chevron.is-open { transform: rotate(90deg); color: var(--text); }
.doc-sched-note { font-size: 12px; color: #B45309; white-space: nowrap; }

.doc-detail-row > .doc-detail-cell { background: var(--surface-2, #FAFAFB); padding: 0; }
.doc-detail-loading { padding: 14px 18px; color: var(--text-soft); font-size: 13px; }
.doc-detail { display: flex; gap: 28px; padding: 16px 18px 20px; flex-wrap: wrap; }
.doc-detail-col { flex: 1; min-width: 260px; }
.doc-detail-col h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); }
.doc-detail-empty { font-size: 13px; color: var(--text-soft); margin: 0; }

.doc-version-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.doc-vno { font-weight: 700; min-width: 30px; }
.doc-vreason { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #E5E5E7; color: #5C5C5E; }
.doc-vreason-published { background: #DBEAFE; color: #1D4ED8; }
.doc-vreason-validated { background: #D1FAE5; color: #047857; }
.doc-vreason-pre_edit  { background: #F3F4F6; color: #6B7280; }
.doc-vdate { color: var(--text-soft); }
.doc-vamt { margin-left: auto; font-variant-numeric: tabular-nums; }
.doc-pdf-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-soft); background: #fff; border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; color: var(--text); }
.doc-pdf-btn:hover { border-color: #BFDBFE; color: #1D4ED8; }
.doc-pdf-btn svg { vertical-align: middle; }

.doc-timeline { display: flex; flex-direction: column; gap: 2px; }
.doc-tl-item { display: flex; gap: 10px; padding: 5px 0; }
.doc-tl-dot { width: 8px; height: 8px; border-radius: 50%; background: #C7C7CC; margin-top: 5px; flex: 0 0 auto; }
.doc-tl-client .doc-tl-dot { background: #047857; }
.doc-tl-staff  .doc-tl-dot { background: #1D4ED8; }
.doc-tl-system .doc-tl-dot { background: #C7C7CC; }
.doc-tl-body { display: flex; flex-direction: column; }
.doc-tl-label { font-size: 13px; color: var(--text); }
.doc-tl-meta { font-size: 11px; color: var(--text-soft); }

/* ---------- Margin tab (admin only) ---------- */
.margin-callout {
  background: rgba(255,90,31,.07);
  border: 1px dashed rgba(255,90,31,.3);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 14px;
}

/* ---------- Lists ---------- */
.doc-list {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
}
.doc-list th, .doc-list td {
  text-align: left;
  padding: 11px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.doc-list th { background: var(--bg-elev); color: var(--text-soft); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.doc-list tr:last-child td { border-bottom: none; }
.doc-list tr:hover td { background: rgba(255,90,31,.03); cursor: pointer; }
.doc-list .col-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.doc-list .col-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-soft); }

/* ---------- Empty state ---------- */
.doc-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
  font-size: 14px;
}

/* ---------- Buttons row ---------- */
.doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}
.doc-actions .spacer { flex: 1; }

/* Greyed-out actie-icoon (bv. verzenden bij een reeds gevalideerde offerte) */
.doc-icon-btn.is-disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
