/* ============================================================================
 * WORKSHOP V2 — complete UI-vervanging Procesmodel Herijken
 * Class-namen 1-op-1 op workshop-v2.js. Modern, kleurrijk, kaarten.
 * Activeer via .mv-overlay.mv-overlay-v2; legacy-UI via ?legacy=1.
 * ============================================================================ */

/* Legacy-topbar verbergen */
.mv-overlay.mv-overlay-v2 .mv-topbar { display: none !important; }
.mv-overlay.mv-overlay-v2 .mv-overlay-body {
  padding: 0 !important;
  background: #f6f7fb !important;
  overflow: hidden !important;
}

/* ============================================================================
 * ROOT + TOPBAR
 * ============================================================================ */
.v2-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  font-family: 'Outfit', system-ui, sans-serif;
  color: #1c1f29;
  background: #f6f7fb;
}
.v2-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid #e6e8ef;
  box-shadow: 0 1px 0 rgba(20, 24, 40, 0.04);
  flex-shrink: 0;
  gap: 16px;
}
.v2-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.v2-terug-btn {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  margin-right: 4px;
  transition: all 0.12s ease;
}
.v2-terug-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #f8faff;
}
.v2-brand-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.v2-brand b {
  font-size: 15px; font-weight: 700; color: #1c1f29;
}
.v2-brand-sub {
  font-size: 12px; color: #6b7280; margin-left: 8px;
}
.v2-top-acties {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.v2-spacer { flex: 1; min-width: 8px; }

.v2-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e6e8ef;
  background: #fff;
  font-size: 13px; font-weight: 600;
  color: #374151; cursor: pointer;
  font-family: inherit;
  transition: all 0.12s ease;
}
.v2-nav-btn:hover { border-color: #3b82f6; color: #3b82f6; background: #f8faff; }

.v2-output {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 13px; font-weight: 600; color: #374151;
  cursor: pointer; font-family: inherit;
  transition: all 0.12s ease;
}
.v2-output:hover { border-color: #3b82f6; color: #3b82f6; }

.v2-output.v2-primary, .v2-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 1px 2px rgba(59, 130, 246, 0.35);
}
.v2-output.v2-primary:hover, .v2-primary:hover {
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

/* ============================================================================
 * BODY (scrollable canvas voor dashboard / item / boom)
 * ============================================================================ */
.v2-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  background: #f6f7fb;
}

.v2-empty {
  padding: 60px 30px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  font-style: italic;
}
.v2-empty-small {
  padding: 18px;
  color: #9ca3af;
  font-size: 13px;
  font-style: italic;
}

/* ============================================================================
 * DASHBOARD
 * ============================================================================ */
.v2-dash {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.v2-dash-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v2-dash-title {
  font-size: 22px; font-weight: 700; color: #1c1f29; margin: 0;
}
.v2-dash-sub {
  font-size: 14px; color: #6b7280; margin: 0;
}

.v2-dash-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.v2-dash-stat {
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative;
  overflow: hidden;
}
.v2-dash-stat::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #d1d5db;
}
.v2-dash-stat-totaal::before { background: #6366f1; }
.v2-dash-stat-done::before   { background: #10b981; }
.v2-dash-stat-afw::before    { background: #dc2626; }
.v2-dash-stat-pauze::before  { background: #f59e0b; }
.v2-dash-stat-open::before   { background: #94a3b8; }
.v2-dash-stat-pct::before    { background: #6366f1; }
.v2-dash-stat-pct .v2-dash-stat-num { color: #6366f1; }

.v2-dash-stat-num {
  font-size: 26px; font-weight: 700; color: #1c1f29; line-height: 1.1;
}
.v2-dash-stat-lbl {
  font-size: 11px; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 600;
}

.v2-dash-bands {
  display: flex; flex-direction: column; gap: 24px;
}

/* Bands */
.v2-band { display: flex; flex-direction: column; gap: 12px; }
.v2-band-titel {
  font-size: 16px; font-weight: 700; color: #1c1f29;
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 6px;
}
.v2-band-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef0f6;
  color: #6b7280;
  font-weight: 600;
  text-transform: lowercase;
}
.v2-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* Tiles (cluster cards) */
.v2-tile {
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
}
.v2-tile::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius: 14px 14px 0 0;
}
.v2-tile:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

/* Band-kleur per tile via nesting in .v2-band */
.v2-band:nth-child(1) .v2-tile::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.v2-band:nth-child(2) .v2-tile::before { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.v2-band:nth-child(3) .v2-tile::before { background: linear-gradient(90deg, #10b981, #14b8a6); }

.v2-tile-status {
  position: absolute; top: 12px; right: 14px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d1d5db;
}
.v2-tile.v2-tile-done   .v2-tile-status { background: #10b981; }
.v2-tile.v2-tile-pauze  .v2-tile-status { background: #f59e0b; }
.v2-tile.v2-tile-open   .v2-tile-status { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

.v2-tile-naam {
  font-size: 15px; font-weight: 700; color: #1c1f29;
  line-height: 1.25; padding-right: 18px;
  margin-top: 4px;
}
.v2-tile-meta {
  font-size: 12px; color: #6b7280;
}
.v2-tile-pct-row {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 4px;
}
.v2-tile-pct {
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  letter-spacing: 0.02em;
}
.v2-tile-bar {
  height: 8px;
  background: #d8dde7;
  border: 1px solid #c5cbd8;
  border-radius: 5px;
  overflow: hidden;
}
.v2-tile-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.v2-tile-counts {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  font-size: 12px; color: #6b7280;
}
.v2-tile-count {
  display: inline-flex; align-items: center; gap: 5px;
}
.v2-tile-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.v2-tile-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.v2-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: lowercase;
}
.v2-tag-laag   { background: #ffedd5; color: #9a3412; }
.v2-tag-naam   { background: #fef3c7; color: #92400e; }
.v2-tag-nieuw  { background: #dbeafe; color: #1d4ed8; }
.v2-tag-zelfde { background: #d1fae5; color: #047857; }

.v2-tile-cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: #3b82f6;
}

/* ============================================================================
 * ITEM-MODUS
 * ============================================================================ */
.v2-progress {
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.v2-prog-back {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
}
.v2-prog-back:hover { border-color: #3b82f6; color: #3b82f6; }
.v2-prog-label { font-weight: 700; color: #1c1f29; font-size: 14px; }
.v2-prog-meta { font-size: 12px; color: #6b7280; }
.v2-prog-bar {
  grid-column: 1 / -1;
  height: 8px;
  background: #d8dde7;
  border: 1px solid #c5cbd8;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 6px;
}
.v2-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.v2-chips {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.v2-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.12s ease;
}
.v2-chip:hover { background: #e5e7eb; }
.v2-chip.active {
  background: #3b82f6;
  color: #fff;
}

/* Item-main = grid met sidebar + content */
.v2-item-main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  height: calc(100% - 90px);
  min-height: 600px;
}

.v2-item-side {
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 75vh;
}
.v2-item-side-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #6b7280;
  padding: 4px 8px 10px;
  border-bottom: 1px solid #eef0f6;
  margin-bottom: 4px;
}
.v2-item-side-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px; color: #374151;
  border: 1px solid transparent;
  transition: all 0.1s ease;
}
.v2-item-side-item:hover { background: #f6f7fb; }
.v2-item-side-item.current {
  background: #eef4ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 600;
}
.v2-item-side-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #eef0f6;
  font-size: 11px; font-weight: 700;
  color: #6b7280;
  flex-shrink: 0;
}
.v2-item-side-item.current .v2-item-side-num { background: #3b82f6; color: #fff; }
.v2-side-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.v2-item-side-naam {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Item content */
.v2-item-content {
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 14px;
  padding: 20px 24px;
  overflow-y: auto;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.v2-item-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.v2-item-num {
  font-size: 11px; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.5px;
  font-weight: 600;
}
.v2-status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eef0f6;
  color: #6b7280;
}
.v2-status-pill.laag    { background: #ffedd5; color: #9a3412; }
.v2-status-pill.nieuw   { background: #dbeafe; color: #1d4ed8; }
.v2-status-pill.zelfde  { background: #d1fae5; color: #047857; }

.v2-decision-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.v2-decision-pill.v2-dec-accepted { background: #10b981; color: #fff; }
.v2-decision-pill.v2-dec-parked   { background: #f59e0b; color: #fff; }
.v2-decision-pill.v2-dec-rejected { background: #ef4444; color: #fff; }

.v2-item-title {
  font-size: 22px;
  font-weight: 700;
  color: #1c1f29;
  margin: 0;
  line-height: 1.2;
}

.v2-item-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.v2-item-col {
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fafbfc;
}
.v2-item-col-mavim { border-left: 4px solid #b91c1c; }
.v2-item-col-ft    { border-left: 4px solid #047857; }
.v2-item-col-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b7280;
}
.v2-item-col-mavim .v2-item-col-label { color: #b91c1c; }
.v2-item-col-ft    .v2-item-col-label { color: #047857; }
.v2-item-col-naam {
  font-size: 15px;
  font-weight: 700;
  color: #1c1f29;
}
.v2-item-col-pad {
  font-size: 12px;
  color: #6b7280;
  font-family: 'SF Mono', Consolas, monospace;
  word-break: break-word;
}

/* Context (AI-onderbouwing) */
.v2-context {
  background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 14px 16px;
}
.v2-context-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}
.v2-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 16px;
}
.v2-context-veld-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #92400e;
  margin-bottom: 3px;
}
.v2-context-veld-tekst {
  font-size: 13px;
  color: #1c1f29;
  line-height: 1.45;
}

/* Acties */
.v2-acties {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.v2-actie {
  flex: 1;
  min-width: 130px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.v2-actie-ok    { background: #d1fae5; color: #047857; }
.v2-actie-ok:hover, .v2-actie-ok.active    { background: #10b981; color: #fff; border-color: #047857; }
.v2-actie-pauze { background: #fef3c7; color: #b45309; }
.v2-actie-pauze:hover, .v2-actie-pauze.active { background: #f59e0b; color: #fff; border-color: #b45309; }
.v2-actie-afw   { background: #fee2e2; color: #b91c1c; }
.v2-actie-afw:hover, .v2-actie-afw.active   { background: #ef4444; color: #fff; border-color: #b91c1c; }

.v2-toelichting {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  box-sizing: border-box;
}
.v2-toelichting:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Vorige / volgende */
.v2-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #eef0f6;
}
.v2-navbtn {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
}
.v2-navbtn:hover:not(:disabled) { border-color: #3b82f6; color: #3b82f6; }
.v2-navbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.v2-navbtn.v2-navbtn-next {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #fff; border-color: transparent;
  margin-left: auto;
}
.v2-nav-shortcuts {
  flex: 1;
  font-size: 11px; color: #6b7280;
  text-align: center;
}
.v2-nav-shortcuts kbd {
  display: inline-block;
  padding: 1px 5px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 10px;
  color: #374151;
  margin: 0 1px;
}

/* ============================================================================
 * BOOMWEERGAVE
 * ============================================================================ */
.v2-boom-top {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Mini-stats-strook onder de legenda — zelfde cijfers als dashboard,
   compact. Toegevoegd 19-5-2026. */
.v2-boom-ministats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  padding: 8px 14px;
}
.v2-boom-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #475569;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f8fafc;
}
.v2-boom-mini strong {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.v2-boom-mini-akk     { background: #dcfce7; color: #15803d; }
.v2-boom-mini-akk strong   { color: #14532d; }
.v2-boom-mini-afw     { background: #fee2e2; color: #b91c1c; }
.v2-boom-mini-afw strong   { color: #7f1d1d; }
.v2-boom-mini-pauze   { background: #fed7aa; color: #c2410c; }
.v2-boom-mini-pauze strong { color: #7c2d12; }
.v2-boom-mini-open    { background: #e2e8f0; color: #475569; }
.v2-boom-mini-pct     { background: #ede9fe; color: #6366f1; }
.v2-boom-mini-pct strong   { color: #4338ca; }
.v2-boom-toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  padding: 10px 14px;
}
.v2-boom-toolbar-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}
.v2-boom-leg-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #374151;
}
.v2-boom-leg-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
}

.v2-boom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 320px;
  gap: 14px;
  height: calc(100vh - 250px);
  min-height: 500px;
}

.v2-boom-pane {
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.v2-boom-pane-head {
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f6;
  background: #fafbfc;
}
.v2-boom-pane-eyebrow {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: #6b7280;
}
.v2-boom-pane-title {
  font-size: 15px; font-weight: 700; color: #1c1f29;
  margin: 3px 0 0;
}
.v2-boom-pane-meta {
  font-size: 11px; color: #6b7280;
  margin-top: 3px;
}
.v2-boom-tree {
  flex: 1;
  overflow-y: auto;
  padding: 8px 6px;
}
.v2-boom-row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #1c1f29;
  cursor: pointer;
  border: 1px solid transparent;
}
.v2-boom-row:hover { background: #f6f7fb; }
.v2-boom-row.selected {
  background: #eef4ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 600;
}
.v2-boom-row.mate { background: #fef9c3; }
.v2-boom-row.groep { font-weight: 700; }

/* Rij heeft een beslissing (Goedgekeurd/Gepauzeerd/Afgewezen) → kleur de hele
   regel zodat 't direct opvalt in de boom. FlowTopper-rijen blauw, Mavim-rijen
   geel — net als de bestaande selected/mate-stijl, zodat 't visueel consistent
   is. Toegevoegd 19-5-2026. */
.v2-boom-tree[data-v2-pane="flowtopper"] .v2-boom-row.has-decision { background: #eef4ff; }
.v2-boom-tree[data-v2-pane="mavim"]      .v2-boom-row.has-decision { background: #fef9c3; }
.v2-boom-node { display: block; }
.v2-boom-naam {
  flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.v2-boom-twisty {
  display: inline-block;
  width: 14px;
  text-align: center;
  font-size: 9px;
  color: #9ca3af;
  user-select: none;
  cursor: pointer;
  flex-shrink: 0;
}
.v2-boom-children {
  margin-left: 16px;
  border-left: 1px dashed #e6e8ef;
  padding-left: 4px;
}
.v2-boom-status {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #d1d5db;
}
.v2-boom-status.v2-status-gewijzigd    { background: #f59e0b; }
.v2-boom-status.v2-status-toegevoegd   { background: #3b82f6; }
.v2-boom-status.v2-status-ongewijzigd  { background: #10b981; }
.v2-boom-status.v2-status-onbekend     { background: #a8a29e; }

/* Beslissings-pill achter elke node-naam (akkoord/parked/afgewezen).
   Toegevoegd 19-5-2026 — toont status van workshop-beslissing in beide bomen. */
.v2-boom-decision-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.v2-boom-decision-pill.is-akkoord    { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.v2-boom-decision-pill.is-parked     { background: #fed7aa; color: #c2410c; border: 1px solid #fdba74; }
.v2-boom-decision-pill.is-afgewezen  { background: #fecaca; color: #b91c1c; border: 1px solid #fca5a5; }

/* Edit-velden voor naam + beschrijving in Item-mode en Bomen-detail.
   Toegevoegd 19-5-2026 — relationele edit van FT-procesmodel. */
.v2-edit-veld {
  margin: 12px 0;
}
.v2-edit-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin: 0 0 4px;
}
.v2-edit-hint {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #94a3b8;
  font-style: italic;
}

.v2-item-title-edit {
  width: 100%;
  font-size: 20px;
  font-weight: 700;
  /* Altijd zichtbare border zodat duidelijk is dat 't editable is */
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: inherit;
  color: var(--text, #0f172a);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.v2-item-title-edit:hover  { border-color: #94a3b8; }
.v2-item-title-edit:focus  { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.v2-item-desc-edit {
  width: 100%;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: inherit;
  color: var(--text, #0f172a);
  resize: vertical;
  min-height: 50px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.v2-item-desc-edit:hover  { border-color: #94a3b8; }
.v2-item-desc-edit:focus  { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.v2-boom-detail-naam-edit {
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 5px;
  font-family: inherit;
  color: var(--text, #0f172a);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.v2-boom-detail-naam-edit:hover { border-color: #94a3b8; }
.v2-boom-detail-naam-edit:focus { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.v2-boom-detail-desc-edit {
  width: 100%;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 5px;
  font-family: inherit;
  color: var(--text, #0f172a);
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.v2-boom-detail-desc-edit:hover { border-color: #94a3b8; }
.v2-boom-detail-desc-edit:focus { border-color: #6366f1; outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.v2-boom-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef0f6;
  color: #6b7280;
  font-weight: 600;
  flex-shrink: 0;
}
.v2-boom-count {
  font-size: 11px; color: #6b7280; font-weight: 500;
}

/* Detail pane (rechts) */
.v2-boom-detail {
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  padding: 16px;
  overflow-y: auto;
}
.v2-boom-detail-empty {
  padding: 40px 12px;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  font-size: 13px;
}
.v2-boom-detail-naam {
  font-size: 16px;
  font-weight: 700;
  color: #1c1f29;
  margin: 0 0 4px;
  line-height: 1.2;
}
.v2-boom-detail-pad {
  font-size: 11px;
  color: #6b7280;
  font-family: 'SF Mono', Consolas, monospace;
  word-break: break-word;
  margin-bottom: 12px;
}
.v2-boom-detail-content {
  display: flex; flex-direction: column; gap: 12px;
}
.v2-boom-detail-veld { display: flex; flex-direction: column; gap: 2px; }
.v2-boom-detail-veld-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #6b7280;
}
.v2-boom-detail-veld-tekst {
  font-size: 13px; color: #1c1f29; line-height: 1.45;
}
.v2-boom-detail-match {
  background: #fafbfc;
  border: 1px solid #e6e8ef;
  border-radius: 10px;
  padding: 10px 12px;
}
.v2-boom-detail-match-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #6b7280;
  margin-bottom: 3px;
}
.v2-boom-detail-match-naam {
  font-size: 13px; font-weight: 700; color: #1c1f29;
}
.v2-boom-detail-match-pad {
  font-size: 11px; color: #6b7280;
  font-family: 'SF Mono', Consolas, monospace;
}
.v2-boom-detail-onderbouwing {
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: #1c1f29;
  line-height: 1.45;
}
.v2-boom-detail-acties {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 4px;
}
.v2-boom-detail-acties .v2-actie {
  flex: 1;
  min-width: 80px;
  padding: 8px 10px;
  font-size: 12px;
}

/* ============================================================================
 * PRINT A4 (één blad per item)
 * ============================================================================ */
.a4 { font-family: 'Outfit', system-ui, sans-serif; color: #1c1f29; }
.a4-box {
  width: 210mm;
  min-height: 297mm;
  padding: 20mm 18mm;
  margin: 0 auto 20px;
  background: #fff;
  box-sizing: border-box;
  page-break-after: always;
}
.a4-top {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid #1c1f29;
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.a4-brand { font-size: 12px; font-weight: 700; color: #3b82f6; }
.a4-meta { font-size: 10px; color: #6b7280; }
.a4-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
}
.a4-title {
  font-size: 18px; font-weight: 700; margin: 4px 0 14px;
}
.a4-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.a4-col {
  border: 1px solid #e6e8ef;
  border-radius: 6px;
  padding: 10px 12px;
}
.a4-col-mavim { border-left: 3px solid #b91c1c; }
.a4-col-ft    { border-left: 3px solid #047857; }
.a4-col-lab {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #6b7280; margin-bottom: 3px;
}
.a4-col-naam { font-size: 13px; font-weight: 700; color: #1c1f29; margin-bottom: 3px; }
.a4-col-pad { font-size: 10px; color: #6b7280; font-family: 'SF Mono', Consolas, monospace; }
.a4-context {
  border: 1px solid #fde68a;
  background: #fef9c3;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.a4-context-lab {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: #92400e; margin-bottom: 4px;
}
.a4-context-veld { font-size: 11px; margin: 2px 0; }
.a4-toel { margin-bottom: 14px; }
.a4-toel-lab {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: #6b7280; margin-bottom: 3px;
}
.a4-lijnen {
  display: flex; flex-direction: column; gap: 14px;
  padding: 8px 0;
}
.a4-lijnen::before {
  content: '__________________________________________________';
  color: #d1d5db; font-size: 12px; letter-spacing: 2px;
}
.a4-checks {
  display: flex; gap: 12px;
  margin-top: 6px;
}
.a4-check {
  font-size: 11px;
  display: inline-flex; align-items: center; gap: 4px;
}
.a4-check::before {
  content: '☐'; font-size: 16px;
}

/* ============================================================================
 * PRINT A3 (cluster-poster)
 * ============================================================================ */
.a3 { font-family: 'Outfit', system-ui, sans-serif; color: #1c1f29; }
.a3 .a4-box {
  width: 420mm;
  min-height: 297mm;
}
.a3-top {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 3px solid #1c1f29;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.a3-title { font-size: 24px; font-weight: 800; margin: 0; }
.a3-sub { font-size: 12px; color: #6b7280; }
.a3-legenda {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: #fafbfc;
  border-radius: 6px;
  font-size: 11px;
}
.a3-leg-dot {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; margin-right: 5px; vertical-align: middle;
}
.a3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.a3-item {
  border: 1px solid #e6e8ef;
  border-radius: 8px;
  padding: 10px 12px;
  page-break-inside: avoid;
}
.a3-item-num {
  font-size: 10px; color: #6b7280; font-weight: 700;
}
.a3-item-naam {
  font-size: 13px; font-weight: 700; color: #1c1f29;
  margin: 2px 0 6px;
}
.a3-item-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px; font-weight: 700;
}
.a3-item-cmp {
  font-size: 10px; color: #374151; margin: 4px 0;
}
.a3-item-toel {
  font-size: 10px; color: #6b7280;
  border-top: 1px dashed #e6e8ef;
  padding-top: 4px; margin-top: 4px;
  min-height: 30px;
}
.a3-item-acties {
  display: flex; gap: 6px;
  margin-top: 6px;
}
.a3-mini {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fff;
}
.a3-mini.ok { background: #d1fae5; border-color: #047857; color: #047857; }
.a3-mini.pa { background: #fef3c7; border-color: #b45309; color: #b45309; }
.a3-mini.af { background: #fee2e2; border-color: #b91c1c; color: #b91c1c; }

/* ============================================================================
 * DROPDOWN-MENU (Actielijst-knop)
 * ============================================================================ */
.v2-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.v2-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(20, 24, 40, 0.12);
  z-index: 100;
  min-width: 200px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.v2-dropdown-menu[hidden] { display: none; }
.v2-dropdown-item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  color: #374151;
  border-radius: 7px;
  cursor: pointer;
}
.v2-dropdown-item:hover {
  background: #eef4ff;
  color: #1d4ed8;
}

/* ============================================================================
 * ACTIE-BLOK — verschijnt onder de toelichting wanneer item op pauze staat
 * ============================================================================ */
.v2-actie-blok {
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -4px;
}
.v2-actie-blok-titel {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
}
.v2-actie-veld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.v2-actie-veld-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #92400e;
}
.v2-actie-veld textarea,
.v2-actie-veld input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #fcd34d;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #1c1f29;
}
.v2-actie-veld textarea {
  resize: vertical;
  min-height: 52px;
}
.v2-actie-veld textarea:focus,
.v2-actie-veld input[type="text"]:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}
.v2-actie-rij {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 700px) {
  .v2-actie-rij { grid-template-columns: 1fr; }
}

/* ============================================================================
 * LOADING-SCHERM (AI-matching bezig)
 * ============================================================================ */
.v2-loading {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.v2-loading-card {
  max-width: 560px;
  width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 40px 36px;
  text-align: center;
  border: 1px solid #e6e8ef;
  box-shadow: 0 10px 30px rgba(20, 24, 40, 0.06);
}
.v2-loading-spinner {
  font-size: 52px;
  margin-bottom: 12px;
  display: inline-block;
  animation: v2-spin 2.4s linear infinite;
}
@keyframes v2-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.v2-loading-title {
  font-size: 20px;
  font-weight: 700;
  color: #1c1f29;
  margin: 6px 0 8px;
}
.v2-loading-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 18px;
  min-height: 22px;
}
.v2-loading-bar {
  height: 10px;
  background: #eef0f6;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 0 6px;
}
.v2-loading-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6);
  background-size: 200% 100%;
  animation: v2-shimmer 2s linear infinite;
  border-radius: 6px;
  transition: width 0.4s ease;
}
@keyframes v2-shimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.v2-loading-pct {
  font-size: 14px;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 14px;
}
.v2-loading-hint {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.5;
}

/* ============================================================================
 * RESPONSIVE
 * ============================================================================ */
@media (max-width: 1100px) {
  .v2-boom-grid { grid-template-columns: 1fr 1fr; }
  .v2-boom-detail { grid-column: 1 / -1; max-height: 300px; }
}
@media (max-width: 900px) {
  .v2-item-main { grid-template-columns: 1fr; }
  .v2-item-cols { grid-template-columns: 1fr; }
  .v2-boom-grid { grid-template-columns: 1fr; }
  .v2-dash-progress { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================================
 * PRINT
 * ============================================================================ */
@media print {
  body { background: #fff; }
  .a4-box { box-shadow: none; margin: 0; }
}
