/* StaffKennisGerben — viewer styles
   Dragon1-conventie: rustige basis, kleur draagt betekenis (laag/type),
   geen decoratieve effecten. Print-vriendelijk.
*/

* { box-sizing: border-box; }

:root {
  --bg: #f6f7f9;
  --fg: #1a1f2b;
  --muted: #5b6473;
  --line: #d6dae0;
  --line-strong: #98a0ab;
  --accent: #2b4a82;
  --fase1: #4a7bd1;
  --fase2: #b87333;
  --fase3: #7c5fa8;
  --highlight: #d32f2f;
  --nieuw: #2e7d32;
  --warn-bg: #fff4e0;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.45;
}

header.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
header.top h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
header.top .sub {
  color: var(--muted);
  font-size: 13px;
}
header.top .badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--warn-bg);
  border: 1px solid #d9b87a;
  color: #6b4a14;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

nav.fase-tabs {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  display: flex;
  gap: 4px;
}
nav.fase-tabs button {
  border: none;
  background: transparent;
  padding: 14px 22px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
nav.fase-tabs button:hover {
  color: var(--fg);
}
nav.fase-tabs button.active[data-fase="1"] { color: var(--fase1); border-bottom-color: var(--fase1); }
nav.fase-tabs button.active[data-fase="2"] { color: var(--fase2); border-bottom-color: var(--fase2); }
nav.fase-tabs button.active[data-fase="3"] { color: var(--fase3); border-bottom-color: var(--fase3); }
nav.fase-tabs button .pitch-snip {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

nav.view-tabs {
  background: #f0f2f5;
  border-bottom: 1px solid var(--line);
  padding: 8px 20px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
nav.view-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--fg);
}
nav.view-tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  height: calc(100vh - 130px);
  overflow: hidden;
}
@media (max-width: 980px) {
  main { grid-template-columns: 1fr; height: auto; }
}

#canvas-wrap {
  overflow: auto;
  padding: 18px;
  background: #fff;
  border-right: 1px solid var(--line);
}
#canvas-wrap .fase-header {
  margin: 0 0 14px 0;
}
#canvas-wrap .fase-header h2 {
  margin: 0 0 4px 0;
  font-size: 18px;
}
#canvas-wrap .fase-header .pitch {
  color: var(--muted);
  font-size: 13px;
  max-width: 900px;
}

svg.diagram {
  display: block;
  width: 100%;
  height: auto;
  max-width: 1280px;
  background: #fff;
  border: 1px solid var(--line);
}

/* SVG element-stijlen */
svg .el-rect {
  cursor: pointer;
  transition: stroke-width 0.1s;
}
svg .el-rect:hover {
  stroke-width: 3;
}
svg .el-label {
  pointer-events: none;
  user-select: none;
  text-anchor: middle;
}
svg .el-sub {
  pointer-events: none;
  user-select: none;
  text-anchor: middle;
  font-size: 10px;
  fill: #555;
}
svg .pijl {
  fill: none;
  stroke: #444;
  stroke-width: 1.6;
  marker-end: url(#arrow);
}
svg .pijl.dashed {
  stroke-dasharray: 5 4;
  stroke: #777;
}
svg .pijl-label {
  font-size: 10px;
  fill: #333;
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
}
svg .pijl-label-bg {
  fill: #fff;
  pointer-events: none;
}
svg .swimlane {
  fill: none;
  stroke: var(--line);
  stroke-dasharray: 2 4;
}
svg .laag-bg {
  fill: #fafbfc;
  stroke: var(--line);
}
svg .laag-label {
  font-size: 11px;
  fill: var(--muted);
  text-anchor: start;
  text-transform: uppercase;
  letter-spacing: 1px;
  pointer-events: none;
}
svg .nieuw-marker {
  fill: var(--nieuw);
  font-size: 9px;
  font-weight: bold;
  pointer-events: none;
}
svg .highlight-marker {
  stroke: var(--highlight);
  stroke-width: 3;
  stroke-dasharray: 4 2;
  fill: none;
}

/* Detail-paneel rechts */
#detail {
  background: #fafbfc;
  padding: 18px;
  overflow: auto;
  border-left: 1px solid var(--line);
}
#detail h3 {
  margin: 0 0 6px 0;
  font-size: 14px;
}
#detail .id {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
}
#detail .meta-row {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0;
}
#detail .meta-row strong { color: var(--fg); font-weight: 600; }
#detail .empty {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

/* Tabellen voor journeys */
table.journey {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
table.journey th, table.journey td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
table.journey th {
  background: #f0f2f5;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
table.journey td.actor { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
table.journey tr:nth-child(even) td { background: #fafbfc; }

.emotie-positief, .emotie-zeer_positief { color: #2e7d32; font-weight: 600; }
.emotie-negatief, .emotie-licht_negatief { color: #c62828; font-weight: 600; }
.emotie-neutraal { color: var(--muted); }

/* Lijsten (beperkingen, risico's, voorwaarden) */
.section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.section h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
}
.section ul, .section ol {
  margin: 4px 0;
  padding-left: 22px;
}
.section li {
  margin: 4px 0;
  font-size: 13px;
}

/* Bronnen-footer */
footer.bronnen {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  font-size: 12px;
}
footer.bronnen h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
footer.bronnen ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
footer.bronnen li {
  padding: 4px 10px;
  background: #f0f2f5;
  border-radius: 3px;
}
footer.bronnen a {
  color: var(--accent);
  text-decoration: none;
}
footer.bronnen a:hover { text-decoration: underline; }

/* Legenda */
.legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 14px 0;
}
.legenda .item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legenda .swatch {
  width: 14px;
  height: 14px;
  border: 1.5px solid #888;
  border-radius: 3px;
}
