/* Dilemma Tree Editor – Creatieve Maan */

:root {
  --color-primary: #7c3aed;
  --color-primary-dark: #6d28d9;
  --color-bg: #faf9f7;
  --color-card: #fff;
  --color-text: #1e1b4b;
  --color-text-muted: #5b5b7a;
  --color-border: #e9e5f0;
  --color-danger: #dc2626;
  --color-success: #059669;
  --color-warning: #d97706;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  /* Typography scale – Major Third 1.25 */
  --text-xs: 0.64rem;
  --text-sm: 0.8rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5625rem;
  --text-3xl: 1.95rem;
  --text-flowchart: 0.44rem;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  /* Flowchart – achtergrondkleuren blokken */
  --flowchart-intro: #BFDBFE;       /* Storyblok – licht blauw */
  --flowchart-dilemma: #E9D5FF;    /* Dilemma – licht paars */
  --flowchart-end: #FEF9C3;        /* Einde – licht geel */
  --flowchart-kpi: #E2E8F0;        /* KPI bol – licht grijs */
  --flowchart-collab: #FFEDD5;     /* Samenwerking – licht oranje */
  --flowchart-line: #c4b5fd;
  --flowchart-text: #4338ca;
  --flowchart-rx: 6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0.5rem 1rem;
  padding-bottom: 3rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography – semantische elementen */
h1, .text-h1 { font-size: var(--text-3xl); font-weight: 600; line-height: var(--line-height-tight); }
h2, .text-h2 { font-size: var(--text-2xl); font-weight: 600; line-height: var(--line-height-tight); }
h3, .text-h3 { font-size: var(--text-xl); font-weight: 600; line-height: var(--line-height-tight); }
h4, .text-h4 { font-size: var(--text-lg); font-weight: 600; line-height: var(--line-height-normal); }
h5, .text-h5 { font-size: var(--text-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
p, .text-body { font-size: var(--text-base); font-weight: 400; line-height: var(--line-height-normal); }
.text-label { font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); }
.text-subtle { font-size: var(--text-xs); font-weight: 400; color: var(--color-text-muted); }
input, textarea, select { font-size: var(--text-base); font-family: inherit; }

.back {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--text-base);
}

.back:hover {
  text-decoration: underline;
}

.header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.header h1 {
  margin: 0;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar-left label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

#scenario-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-width: 220px;
}

.mode-toggle {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mode-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  cursor: pointer;
}

.mode-btn:hover {
  background: #e2e8f0;
  color: var(--color-text);
}

.mode-btn.active {
  background: var(--color-primary);
  color: white;
}

.toolbar-right .btn {
  max-width: none;
}

/* Welcome modal */
.welcome-modal {
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-modal-content {
  max-width: 420px;
}

.welcome-modal-body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.welcome-modal-intro {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-text);
}

.welcome-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.welcome-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  text-align: left;
}

.welcome-btn-icon {
  font-size: var(--text-xl);
}

.welcome-btn-label {
  font-weight: 600;
  font-size: var(--text-base);
}

.welcome-btn-desc {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 400;
}

.welcome-modal-secondary {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.welcome-autosaved-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--text-xs);
  color: var(--color-text);
}

/* Flowchart meta badge */
.flowchart-meta-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  z-index: 8;
}

/* Editor layout */
.editor-layout {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.editor-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.editor-main {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.editor-main-collapsed .editor-main-body {
  display: none;
}

.editor-main-header {
  padding: 0.5rem 1rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.btn-toggle-editor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border: none;
  background: none;
  color: var(--color-primary);
  font-size: var(--text-base);
  cursor: pointer;
}

.btn-toggle-editor:hover {
  text-decoration: underline;
}

.editor-main.expanded .btn-toggle-icon {
  transform: rotate(90deg);
}

.editor-main-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dilemma-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dilemma-selector label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.dilemma-selector select {
  flex: 1;
  max-width: 280px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  background: var(--color-card);
}

/* Play toggle – verticale knop rechts */
.play-toggle-btn {
  position: fixed;
  right: 0;
  top: 50%;
  margin-top: -60px;
  width: 36px;
  min-height: 80px;
  padding: 1rem 0.25rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  z-index: 200;
  box-shadow: -2px 0 8px rgba(0,0,0,0.15);
  transition: right 0.3s ease, background 0.2s;
}

.play-toggle-btn:hover {
  background: var(--color-primary-dark);
}

body.play-slide-out-open .play-toggle-btn {
  right: max(25vw, 500px);
}

/* Play slide-out panel – ca. 25% van viewport */
.play-slide-out {
  position: fixed;
  top: 0;
  right: 0;
  width: 25vw;
  min-width: 500px;
  max-width: 95vw;
  height: 100vh;
  background: var(--color-card);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.play-slide-out-open .play-slide-out {
  transform: translateX(0);
}

.play-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.play-panel .play-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.btn-close-play {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #94a3b8;
  font-size: var(--text-2xl);
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.btn-close-play:hover {
  background: rgba(255,255,255,0.2);
  color: #e2e8f0;
}

/* Flowchart panel – bovenaan */
.flowchart-panel {
  position: relative;
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.flowchart-panel.flowchart-top {
  width: 100%;
}

.flowchart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.flowchart-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.flowchart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.flowchart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.flowchart-legend-icon {
  display: inline-block;
  width: 20px;
  height: 12px;
  border-radius: 4px;
  border-width: 2px;
  border-style: solid;
}

.flowchart-legend-complete {
  background: transparent;
  border-color: var(--color-success);
}

.flowchart-legend-incomplete {
  background: transparent;
  border-color: #94A3B8;
}

.flowchart-panel h3 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

.flowchart-container {
  position: relative;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  background: linear-gradient(180deg, #faf9f7 0%, #f5f3ff 100%);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.flowchart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.flowchart-scenario-btn-wrap {
  overflow: visible;
}

.btn-flowchart-scenario {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 1.5px solid #94A3B8;
  border-radius: 0;
  background: #E0E7FF;
  color: #1E293B;
  font-size: var(--text-flowchart);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-flowchart-scenario.btn-flowchart-scenario-complete {
  border-color: #059669;
}

.btn-flowchart-scenario:hover {
  filter: brightness(1.08);
}

/* Flowchart blocks – unified base design, consistent hover */
.flowchart-block rect {
  transition: fill 0.15s, stroke 0.15s;
}

/* Algemeen hover-effect voor alle klikbare blokken (geen opacity: lijnen lopen
   alleen achter Keuze 1, niet achter Keuze 2, waardoor opacity inconsistent zou zijn) */
.flowchart-block {
  cursor: pointer;
  transition: filter 0.15s;
}

.flowchart-block:hover {
  filter: brightness(1.08);
}

/* Brug tussen blok en delete-knop: voorkomt dat hover verloren gaat bij bewegen naar knop */
.flowchart-intro-delete-bridge {
  pointer-events: all;
}

/* Hover-reveal delete button op storyblokken */
.flowchart-intro-delete {
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.flowchart-intro-block:hover .flowchart-intro-delete {
  opacity: 1;
  pointer-events: auto;
}

.flowchart-intro-delete rect {
  transition: fill 0.15s, stroke 0.15s;
}

.flowchart-intro-delete:hover rect {
  fill: #fee2e2;
  stroke: var(--color-danger);
}

.flowchart-intro-delete text {
  transition: fill 0.15s;
}

.flowchart-intro-delete:hover text {
  fill: var(--color-danger);
}

.flowchart-node text {
  stroke: none;
}

/* Detail panel */
.detail-panel {
  flex: 1;
  min-width: 0;
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  overflow: auto;
}

.breadcrumb {
  margin-bottom: 1rem;
  font-size: var(--text-base);
  color: var(--color-text);
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 0.35rem;
  color: var(--color-border);
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-section {
  margin-bottom: 0.5rem;
}

.detail-section label {
  display: block;
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.detail-section input,
.detail-section select,
.detail-section textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
}

.detail-section textarea {
  min-height: 60px;
  resize: vertical;
}

/* Opties – design tokens */
.options-section label {
  display: block;
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.options-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.options-row .option-card {
  flex: 1;
  min-width: 200px;
}

/* Scenario-instellingen – professionele layout */
.scenario-form {
  max-width: 560px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.scenario-form-title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.scenario-form-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.scenario-form-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scenario-form-section label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.scenario-form-section > input,
.scenario-form-section > textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: var(--text-base);
  transition: border-color 0.15s;
}

.scenario-form-section > input:focus,
.scenario-form-section > textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.scenario-form-section > textarea {
  min-height: 72px;
  resize: vertical;
}

.scenario-form-section-group h5 {
  margin: 0 0 0.5rem;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-field-with-limit {
  position: relative;
}

.kpi-char-count {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.kpi-field-with-limit input.char-limit-over + .kpi-char-count,
.kpi-field-with-limit input.char-limit-over + .char-limit-count {
  color: var(--color-danger);
}

/* Gedeelde character-limit styling (intro, situatie, keuze, KPI) */
.char-limit-count,
.kpi-char-count {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

input.char-limit-over + .char-limit-count,
textarea.char-limit-over + .char-limit-count {
  color: var(--color-danger);
}

.char-limit-warning {
  font-size: var(--text-base);
  color: var(--color-danger);
  margin-top: 0.25rem;
}

.char-limit-warning-hidden {
  display: none;
}

input.char-limit-over,
textarea.char-limit-over {
  border-color: var(--color-danger);
}

input.char-limit-over:focus,
textarea.char-limit-over:focus {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-danger) 25%, transparent);
}

.scenario-form-row-3,
.scenario-form-row-2,
.scenario-form-row-inline {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.scenario-form-row-3 .scenario-form-field,
.scenario-form-row-3 .form-section {
  flex: 1;
  min-width: 140px;
}

.scenario-form-row-2 .scenario-form-field {
  flex: 1;
  min-width: 160px;
}

.scenario-form-row-inline .scenario-form-field,
.scenario-form-row-inline .form-section {
  flex: 0 0 auto;
}

.scenario-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.scenario-form-field label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.scenario-form-field input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: var(--text-base);
  transition: border-color 0.15s;
}

.scenario-form-field input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.scenario-form-field-narrow input {
  width: 80px;
}

.colleague-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.colleague-kpi-label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.scenario-form-field select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: var(--text-base);
  background: var(--color-card);
  cursor: pointer;
}

.scenario-form-field select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.scenario-form-hint {
  margin: 1rem 0 0;
  font-size: var(--text-base);
  color: var(--color-text);
}

/* Scenario verbergen bij dilemma */
.scenario-section.hidden-when-dilemma {
  display: none;
}

/* Form-card – professionele layout voor alle inputschermen (scenario, dilemma, eindnode) */
.form-card {
  max-width: 560px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.form-card-full {
  max-width: none;
  width: 100%;
}

.form-card-title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.form-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-card-help {
  font-size: var(--text-base);
  color: var(--color-text);
  margin: -0.5rem 0 0;
  line-height: 1.4;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-section label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.form-section > input,
.form-section > textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: var(--text-base);
  transition: border-color 0.15s;
}

.form-section > input:focus,
.form-section > textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-section > textarea {
  min-height: 72px;
  resize: vertical;
}

.form-section-group h5 {
  margin: 0 0 0.5rem;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-readonly {
  padding: 0.5rem 0.75rem;
  font-size: var(--text-base);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 2.25rem;
  display: flex;
  align-items: center;
}

.form-row-2,
.form-row-3 {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row-2 .form-field {
  flex: 1;
  min-width: 160px;
}

.form-row-3 .form-field {
  flex: 1;
  min-width: 140px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.form-field input,
.form-field textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: var(--text-base);
  transition: border-color 0.15s;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-field textarea {
  min-height: 72px;
  resize: vertical;
}

/* Intro links, locatie/situatie rechts – binnen form-card */
.form-card-body .intro-locatie-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.intro-column {
  flex: 1;
  min-width: 0;
}

.intro-column > label {
  display: block;
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.intro-column input,
.intro-column textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  background: var(--color-card);
}

.intro-column textarea {
  min-height: 60px;
  resize: vertical;
}

.locatie-column {
  flex: 1;
  min-width: 200px;
}

.intro-column > label,
.locatie-column > label {
  display: block;
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.intro-block {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.intro-block-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.intro-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.intro-text-col {
  flex: 1;
  min-width: 0;
}

.intro-text-col textarea {
  width: 100%;
}

.intro-image-desc-row {
  margin-top: 0.5rem;
}

.intro-image-desc-row label {
  display: block;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.intro-image-desc-row input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-card);
}

.intro-row textarea {
  flex: 1;
  min-height: 60px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  background: var(--color-card);
  resize: vertical;
}

.intro-row .btn-remove-intro {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: var(--text-lg);
  line-height: 1;
}

.next-key {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: 0.25rem 0;
}

.detail-section .kpi-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.detail-section .kpi-row label {
  flex: 0 0 120px;
  margin-bottom: 0;
}

.detail-section .kpi-row input {
  flex: 0 0 60px;
  width: auto;
}

/* KPI: label links, slider rechts, horizontale layout */
.kpi-modal-intro {
  font-size: var(--text-base);
  margin-bottom: 0.5rem;
  line-height: var(--line-height-normal);
}

.kpi-modal-choice-desc,
.kpi-modal-situatie-desc {
  font-size: var(--text-base);
  margin-bottom: 1rem;
  line-height: var(--line-height-normal);
}

.kpi-modal-placeholder {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.kpi-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.kpi-stack-hint {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.kpi-stack-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

/* Vaste breedte voor label: altijd dezelfde ruimte, ellipsis bij lange tekst */
.kpi-stack .kpi-label {
  flex: 0 0 180px;
  min-width: 180px;
  font-size: var(--text-base);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Waarde: vaste breedte, rechts uitgelijnd, altijd zichtbaar */
.kpi-stack .kpi-value-display {
  flex: 0 0 36px;
  min-width: 36px;
  text-align: right;
  font-weight: 600;
  color: var(--color-primary);
  font-size: var(--text-base);
}

.kpi-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 200px;
  max-width: 260px;
}

.kpi-slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-base);
  color: var(--color-text-muted);
  padding: 0 2px;
}

.kpi-slider-scale span {
  flex: 1;
  text-align: center;
}

.kpi-value-display {
  font-weight: 600;
  color: var(--color-primary);
}

.kpi-slider-wrap input[type="range"],
.kpi-stack input[type="range"] {
  width: 100%;
  padding: 0;
  margin: 0;
  accent-color: var(--color-primary);
}

/* Grotere sliders voor betere zichtbaarheid */
.kpi-slider-wrap input[type="range"]::-webkit-slider-runnable-track,
.kpi-stack input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  background-image: repeating-linear-gradient(to right, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 1px, transparent 1px, transparent calc(100% / 6));
}

.kpi-slider-wrap input[type="range"]::-webkit-slider-thumb,
.kpi-stack input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  margin-top: -6px;
}

.kpi-slider-wrap input[type="range"]::-moz-range-track,
.kpi-stack input[type="range"]::-moz-range-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  background-image: repeating-linear-gradient(to right, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 1px, transparent 1px, transparent calc(100% / 6));
}

.kpi-slider-wrap input[type="range"]::-moz-range-thumb,
.kpi-stack input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: none;
}

/* Opties en samenwerkopties binnen form-card */
.keuzes-situatie-locatie {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.situatie-block {
  padding: 0.75rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.situatie-block label {
  display: block;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.situatie-block textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  background: var(--color-card);
  resize: vertical;
}

.situatie-locatie-desc {
  margin-top: 0.5rem;
}

.situatie-locatie-desc label {
  display: block;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.situatie-locatie-desc input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-card);
}

.form-card-body .options-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-card-body .options-row .option-card {
  flex: 1;
  min-width: 200px;
}

.form-card-body .collab-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-card-body .collab-row .collab-card {
  flex: 1;
  min-width: 200px;
}

.option-card-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.collab-colleague {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.collab-kpi-focus {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  cursor: pointer;
  font-weight: 500;
  font-size: var(--text-base);
}

.collapsible-header:hover {
  color: var(--color-primary);
}

.collapsible-content {
  padding-left: 1rem;
  border-left: 2px solid var(--color-border);
  margin-left: 0.5rem;
}

.form-card-body .option-card,
.form-card-body .collab-card {
  padding: 1rem;
  background: var(--color-bg);
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.form-card-body .option-card .form-section label,
.form-card-body .collab-card .form-section label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

.form-card-body .option-card input,
.form-card-body .option-card textarea,
.form-card-body .collab-card input,
.form-card-body .collab-card textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: var(--text-base);
  transition: border-color 0.15s;
}

.form-card-body .option-card input:focus,
.form-card-body .option-card textarea:focus,
.form-card-body .collab-card input:focus,
.form-card-body .collab-card textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.btn-add {
  padding: 0.35rem 0.75rem;
  border: none;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-add:hover {
  background: var(--color-primary-dark);
}

.btn-remove {
  padding: 0.2rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
}

.btn-remove:hover {
  color: var(--color-danger);
}

.btn-danger-outline {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-danger);
  background: transparent;
  color: var(--color-danger);
  font-size: var(--text-sm);
  cursor: pointer;
  border-radius: var(--radius);
}

.btn-danger-outline:hover {
  background: #fee2e2;
}

/* Play panel – rechts, door scenario klikken + KPI's (game-achtige preview) */
.play-panel {
  background: var(--color-card);
  padding: 1rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.play-panel-game {
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-subtle: #64748b;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #334155;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.05);
  color: var(--color-text);
}

.play-panel-game .play-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.play-panel-game .play-panel-header h3 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.play-panel-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  background: #22c55e;
  color: #fff;
  border-radius: 4px;
}

.play-gate {
  padding: 1.25rem 0;
  text-align: center;
}

.play-panel-game .play-gate-text {
  margin: 0 0 1.25rem;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text-muted);
}

.btn-play {
  padding: 0.6rem 1.5rem;
  font-size: var(--text-base);
  font-weight: 600;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-play:hover {
  background: #16a34a;
  transform: scale(1.02);
}

.play-panel-game .kpi-title {
  margin: 1rem 0 0.5rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.play-panel-game .kpi-value {
  color: var(--color-text);
  font-weight: 600;
  font-size: var(--text-base);
}

.play-log-section {
  margin-top: 1rem;
}

.play-panel-game .play-log-title {
  margin: 1.25rem 0 0.5rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.play-log {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.play-panel-game .play-log-empty {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  font-style: italic;
  padding: 0.5rem 0;
}

.play-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.play-log-entry {
  padding: 0.6rem 0.75rem;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 6px;
  border-left: 3px solid #475569;
}

.play-log-entry-colleague {
  border-left-color: #3b82f6;
}

.play-log-entry-keuze {
  border-left-color: #94a3b8;
}

.play-log-entry-situatie {
  border-left-color: #94a3b8;
}

.play-log-entry-start {
  border-left-color: #64748b;
}

.play-log-entry-header {
  margin-bottom: 0.25rem;
}

.play-panel-game .play-log-type {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.play-panel-game .play-log-entry-label {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.4;
}

.play-panel-game .play-log-entry-message,
.play-panel-game .play-log-entry-reply {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.play-panel-game .play-log-entry-reply {
  color: #93c5fd;
}

.play-panel-game .play-log-entry-kpi {
  font-size: var(--text-xs);
  color: #93c5fd;
  margin-top: 0.35rem;
}

.play-panel-game .kpi-bar-label {
  color: var(--color-text-muted);
}

.play-panel-game .kpi-bar-value {
  color: #93c5fd;
}

.play-panel-game .kpi-bar-track-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}

.play-panel-game .kpi-bars-modal-style .kpi-bar-track-wrap {
  margin-bottom: 0;
}

.play-panel-game .kpi-bar-track {
  background: #334155;
  position: relative;
}

.play-panel-game .kpi-bar-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.play-panel-game .kpi-bar-tick {
  position: absolute;
  top: -2px;
  width: 1px;
  height: 12px;
  background: #64748b;
  transform: translateX(-50%);
}

.play-panel-game .kpi-bar-zero-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: #94a3b8;
  transform: translateX(-50%);
  z-index: 1;
}

.play-panel-game .kpi-bar-scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  color: var(--color-text-muted);
  padding: 0 1px;
}

.play-panel-game .kpi-bar-scale-zero {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  color: #94a3b8;
}

.play-panel-game .play-intro {
  color: var(--color-text);
}

.play-panel-game .play-situatie {
  color: #93c5fd;
}

.play-panel-game .play-options .btn-option {
  background: #334155;
  border-color: #475569;
  color: var(--color-text);
}

.play-panel-game .play-options .btn-option:hover {
  background: #475569;
  border-color: #3b82f6;
}

.play-tabs-container {
  margin-top: 1rem;
}

.play-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #334155;
}

.play-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: var(--text-base);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, background 0.15s;
}

.play-tab:hover {
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.5);
}

.play-tab-active {
  color: #f1f5f9;
  background: #334155;
  font-weight: 500;
}

.play-tab-panel {
  min-height: 2rem;
}

.play-colleagues {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0;
}

.play-colleagues .btn-colleague {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border: 1px solid #475569;
  background: #334155;
  color: #93c5fd;
  border-radius: 6px;
  font-size: var(--text-base);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.play-colleagues .btn-colleague:hover:not(:disabled) {
  background: #475569;
  border-color: #64748b;
}

.play-colleagues .btn-colleague-consulted {
  opacity: 0.7;
  color: #94a3b8;
  cursor: default;
}

.play-colleague-reply {
  padding: 0.75rem 1rem;
  background: rgba(51, 65, 85, 0.6);
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
  margin-top: 0.25rem;
}

.play-colleague-reply-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 0.35rem;
}

.play-colleague-reply p {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.5;
  color: #e2e8f0;
}

.play-content-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.btn-restart {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #475569;
  background: #334155;
  color: #94a3b8;
  border-radius: 6px;
  font-size: var(--text-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-restart:hover {
  background: #475569;
  color: #f1f5f9;
  border-color: #64748b;
}

.btn-restart-done {
  background: #16a34a;
  border-color: #22c55e;
  color: #fff;
}

.btn-restart-done:hover {
  background: #15803d;
  border-color: #16a34a;
  color: #fff;
}

.play-panel-game .play-end {
  margin-top: 1rem;
  padding: 0;
  background: none;
}

.play-end-text {
  color: #f1f5f9;
  font-size: var(--text-base);
  line-height: 1.65;
  padding: 1rem 1.25rem;
  background: rgba(51, 65, 85, 0.7);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.play-end-final {
  border-left: 4px solid #3b82f6;
  margin-bottom: 0;
}

.play-panel-game .btn-secondary {
  background: #475569;
  color: #f1f5f9;
  border-color: #64748b;
}

.play-panel-game .btn-secondary:hover {
  background: #64748b;
}

.play-panel h3 {
  margin: 0 0 0.75rem;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.play-panel .kpi-title {
  margin: 1rem 0 0.5rem;
}

.play-content-inline {
  margin-bottom: 0.5rem;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: var(--text-sm);
  margin-top: 0.5rem;
}

.kpi-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Modal-style layout: label | value | bar in één rij, netjes uitgelijnd */
.kpi-bars-modal-style .kpi-bar-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.kpi-bars-modal-style .kpi-bar-label {
  flex: 0 0 120px;
  min-width: 120px;
  font-size: var(--text-base);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-bars-modal-style .kpi-bar-value {
  flex: 0 0 36px;
  min-width: 36px;
  text-align: right;
  font-weight: 600;
  color: var(--color-primary);
  font-size: var(--text-base);
}

.kpi-bars-modal-style .kpi-bar-track-wrap {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}

.kpi-bar-item {
  font-size: var(--text-sm);
}

.kpi-bar-item label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-bar-track {
  height: 8px;
  background: var(--color-bg);
  border-radius: 4px;
  overflow: hidden;
}

.kpi-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.2s;
}

.kpi-bar-fill.positive,
.kpi-bar-fill.negative,
.kpi-bar-fill.neutral {
  background: #3b82f6;
}

.kpi-value {
  font-size: var(--text-base);
  margin-top: 0.15rem;
  color: var(--color-text-muted);
}

/* Play content (in play-panel) */
.play-intro {
  margin-bottom: 1rem;
  font-size: var(--text-base);
  line-height: 1.5;
  white-space: pre-wrap;
}

.play-situatie {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.play-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.play-options .btn-option {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  font-size: var(--text-base);
  cursor: pointer;
  transition: background 0.15s;
}

.play-options .btn-option:hover {
  background: #e2e8f0;
  border-color: var(--color-primary);
}

.play-end {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: 1.5;
}

/* Buttons */
.btn {
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* End node editor – pad overzicht + eindboodschap */
.form-card .path-step {
  margin-top: 0.5rem;
}

.path-step {
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.path-step-clickable {
  cursor: pointer;
}

.path-step-clickable:hover {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
}

.path-step-header {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.path-intro {
  font-size: var(--text-base);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.path-situatie {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.path-option {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--color-border);
}

/* Empty state */
.empty-state {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  padding: 2rem;
  text-align: center;
}

/* Save status bar – fixed onderaan, altijd zichtbaar */
.save-status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  min-height: 2rem;
  display: flex;
  align-items: center;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.06);
  z-index: 100;
}

.save-status-bar.save-status-dirty {
  color: var(--color-warning);
}

.save-status-bar.save-status-saving {
  color: var(--color-text-muted);
  font-style: italic;
}

.save-status-bar.save-status-saved {
  color: var(--color-success);
}

.save-status-bar[hidden] {
  display: none;
}

/* Block edit modal overlay */
.block-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  backdrop-filter: blur(2px);
}

.block-modal-overlay[hidden] {
  display: none;
}

.block-modal {
  background: #e8e6eb;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 20px 40px rgba(0,0,0,0.15);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.block-modal--scenario {
  max-width: 840px;
}

.block-modal--metadata {
  max-width: 480px;
}

.block-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: #e8e6eb;
}

.block-modal-title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}

.block-modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-2xl);
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.block-modal-close:hover {
  background: rgba(255,255,255,0.6);
  color: var(--color-text);
}

.block-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.block-modal-body .form-section {
  margin-bottom: 1.25rem;
}

.block-modal-body .form-section:last-child {
  margin-bottom: 0;
}

.block-modal-body .collab-modal-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #f0eef3;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.block-modal-body .collab-modal-card input,
.block-modal-body .collab-modal-card textarea,
.block-modal-body .collab-modal-card select {
  background: #fff !important;
}

.block-modal-body .collab-modal-card:last-child {
  margin-bottom: 0;
}

.block-modal-body .collab-modal-colleague {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

/* Invoervelden en sliders wit in modal – duidelijk waar invullen */
.block-modal-body input,
.block-modal-body textarea,
.block-modal-body select {
  background: #fff !important;
  border-color: var(--color-border);
}

.block-modal-body .kpi-slider-wrap input[type="range"]::-webkit-slider-runnable-track,
.block-modal-body .kpi-stack input[type="range"]::-webkit-slider-runnable-track {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background-image: repeating-linear-gradient(to right, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 1px, transparent 1px, transparent calc(100% / 6));
}

.block-modal-body .kpi-slider-wrap input[type="range"]::-moz-range-track,
.block-modal-body .kpi-stack input[type="range"]::-moz-range-track {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background-image: repeating-linear-gradient(to right, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 1px, transparent 1px, transparent calc(100% / 6));
}

.block-modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: #e8e6eb;
}

