:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  /* Huisstijl Synora: middernachtblauw met een verloop van cyaan via indigo naar violet. */
  --nav: #10163a;
  --nav-2: #1b2357;
  --nav-text: #c7cdea;
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-ink: #312e81;
  --accent-2: #22d3ee;
  --accent-3: #a855f7;
  --accent-soft: #e0e7ff;
  --accent-wash: #eef2ff;
  --brand-gradient: linear-gradient(120deg, #22d3ee, #6366f1 55%, #a855f7);
  /* De vier pijlers */
  --p-inzicht: #0891b2;
  --p-overzicht: #4f46e5;
  --p-samenhang: #9333ea;
  --p-richting: #d97706;
  --danger: #b91c1c;
  --warn: #b45309;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .04);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .2rem 0 .3rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .4rem; }
.muted { color: var(--muted); }
.small, .muted-small { font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.boot { padding: 3rem; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- layout --- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--nav) 0%, var(--nav) 55%, var(--nav-2) 100%); color: var(--nav-text); display: flex; flex-direction: column; padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; font-weight: 700; font-size: 1.3rem; padding: .25rem .5rem 1.25rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-tag { font-size: .7rem; font-weight: 500; letter-spacing: .01em; white-space: nowrap; color: var(--nav-text); opacity: .8; margin-top: .2rem; }
.logo { width: 32px; height: 32px; color: #fff; flex: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link { color: var(--nav-text); padding: .55rem .7rem; border-radius: 8px; display: flex; gap: .65rem; align-items: center; font-weight: 500; }
.nav-link:hover { background: rgba(255, 255, 255, .07); text-decoration: none; color: #fff; }
.nav-link.active { background: rgba(129, 140, 248, .18); color: #fff; box-shadow: inset 3px 0 0 var(--accent-2); }
.nav-icon { width: 1.2rem; text-align: center; opacity: .85; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: .3rem; padding: .5rem; }
.muted-link { color: var(--nav-text); font-size: .82rem; opacity: .85; }
.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.75rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.global-search input { width: min(420px, 50vw); padding: .5rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.user-box { display: flex; align-items: center; gap: .5rem; }
.user-switch { border: 1px solid var(--border); border-radius: 8px; padding: .35rem .5rem; background: var(--surface); }
.account { position: relative; display: flex; align-items: center; }
.account-btn { border: 1px solid var(--border); border-radius: 8px; padding: .35rem .6rem; background: var(--surface); font: inherit; cursor: pointer; }
.account-btn:hover { border-color: var(--accent); }
.account-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .15); padding: .35rem; display: flex; flex-direction: column; }
.account-menu[hidden] { display: none; }
.account-head { display: flex; flex-direction: column; padding: .45rem .6rem .55rem; border-bottom: 1px solid var(--border); margin-bottom: .25rem; }
.account-menu button { text-align: left; border: 0; background: none; font: inherit; padding: .5rem .6rem; border-radius: 6px; cursor: pointer; }
.account-menu button:hover, .account-menu button:focus-visible { background: var(--surface-2); }
.account-sep { border-top: 1px solid var(--border); margin: .25rem 0; }
.account-label { padding: .35rem .6rem .15rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.account-menu [role=group] { display: flex; flex-direction: column; }
.account-menu .account-lang { display: flex; align-items: center; gap: .4rem; }
.account-check { display: inline-block; width: 1em; color: var(--accent); font-weight: 700; }
.account-lang.on { font-weight: 600; }
/* Taalschakelaar NL | EN op het aanmeldscherm en in de demomodus */
.lang-switch { align-self: flex-end; font-size: .8rem; font-weight: 600; }
.lang-switch .seg-btn { padding: .25rem .55rem; }
.login-card .lang-switch { margin-bottom: .6rem; }
.user-box .lang-switch { align-self: center; }
main { padding: 1.5rem 1.75rem 3rem; max-width: 1280px; width: 100%; }
main.page-wide { max-width: none; padding: 0; }

/* --- components --- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumb { font-size: .85rem; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .5rem .9rem; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #cbd5e1; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-ghost { color: var(--danger); }
.btn-small { padding: .3rem .6rem; font-size: .85rem; }
/* Pennetje in de view: Bewerken (accent) of Klaar (neutraal, in de bewerkmodus). */
.edit-toggle { background: var(--accent); border-color: var(--accent); color: #fff; margin-left: .35rem; }
.edit-toggle:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.edit-toggle.on { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.edit-toggle.on:hover { background: var(--surface-2); }
.icon-btn { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: .2rem .4rem; border-radius: 6px; font-size: .95rem; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; font-size: .82rem; }
.link-btn.danger { color: var(--danger); }
.pill { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); margin-left: .35rem; white-space: nowrap; }
.pill-ok { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.pill-warn { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.type-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; padding: .1rem .5rem; border-radius: 6px; background: color-mix(in srgb, var(--layer) 55%, white); border: 1px solid color-mix(in srgb, var(--layer) 80%, #64748b); color: #1e293b; white-space: nowrap; }
.status { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; font-weight: 500; }
.status-idea, .dot.status-idea, .seg.status-idea { background: #e0e7ff; color: #3730a3; }
.status-planned, .dot.status-planned, .seg.status-planned { background: #dbeafe; color: #1e40af; }
.status-development, .dot.status-development, .seg.status-development { background: #cffafe; color: #155e75; }
.status-production, .dot.status-production, .seg.status-production { background: #dcfce7; color: #166534; }
.status-phasing-out, .dot.status-phasing-out, .seg.status-phasing-out { background: #fef3c7; color: #92400e; }
.status-retired, .dot.status-retired, .seg.status-retired { background: #e5e7eb; color: #374151; }
.seg.status-idea { background: #818cf8; } .seg.status-planned { background: #60a5fa; } .seg.status-development { background: #22d3ee; }
.seg.status-production { background: #34d399; } .seg.status-phasing-out { background: #fbbf24; } .seg.status-retired { background: #9ca3af; }
.dot.status-idea { background: #818cf8; } .dot.status-planned { background: #60a5fa; } .dot.status-development { background: #22d3ee; }
.dot.status-production { background: #34d399; } .dot.status-phasing-out { background: #fbbf24; } .dot.status-retired { background: #9ca3af; }
.avatar { --hue: 180; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: hsl(var(--hue) 55% 88%); color: hsl(var(--hue) 50% 28%); font-size: .72rem; font-weight: 700; flex: none; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty.small { padding: 1.5rem; }

/* forms */
.form { display: flex; flex-direction: column; gap: .8rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field-label { font-weight: 600; font-size: .85rem; }
.field-hint { font-size: .78rem; color: var(--muted); }
input, select, textarea { font: inherit; border: 1px solid #cbd5e1; border-radius: 8px; padding: .5rem .65rem; background: var(--surface); color: var(--text); width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: #334155; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .8rem; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; margin-top: .4rem; }
.check { display: inline-flex; gap: .4rem; align-items: center; font-size: .9rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.listbox { margin-top: .4rem; min-height: 170px; }

/* dashboard */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .2rem; box-shadow: var(--shadow); color: var(--text); }
.kpi:hover { text-decoration: none; border-color: #94a3b8; }
.kpi-label { color: var(--muted); font-size: .82rem; }
.kpi-value { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.kpi-warn .kpi-value { color: var(--warn); }
/* de vier pijlers */
.pillar-inzicht { --pillar: var(--p-inzicht); }
.pillar-overzicht { --pillar: var(--p-overzicht); }
.pillar-samenhang { --pillar: var(--p-samenhang); }
.pillar-richting { --pillar: var(--p-richting); }
.pillar-icon { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 8px; flex: none; font-size: .95rem; color: var(--pillar); background: color-mix(in srgb, var(--pillar) 12%, white); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-bottom: 1rem; }
.pillar-card { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--pillar); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .35rem; }
.pillar-card header { display: flex; align-items: center; gap: .55rem; }
.pillar-label { font-weight: 700; font-size: 1rem; color: var(--pillar); }
.pillar-question { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.4; min-height: 2.25em; }
.pillar-value { margin: .2rem 0 0; color: var(--muted); }
.pillar-value strong { font-size: 1.75rem; color: var(--text); font-variant-numeric: tabular-nums; }
.pillar-facts { list-style: none; margin: 0; padding: 0; font-size: .84rem; display: grid; gap: .15rem; }
.pillar-link { margin-top: auto; padding-top: .35rem; font-size: .85rem; font-weight: 600; color: var(--pillar); }
.card > .eyebrow, .card-head .eyebrow { color: var(--pillar, var(--accent)); }
.coherence-card { border-top: 3px solid var(--pillar); }
.coherence-matrix { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: .85rem; }
.coherence-matrix th { font-weight: 600; text-align: left; white-space: nowrap; padding: .3rem .4rem; color: var(--muted); font-size: .78rem; }
.coherence-matrix thead th { text-align: center; }
.coherence-matrix th .layer-swatch { display: inline-block; vertical-align: -1px; margin-right: .35rem; }
.cm-cell { text-align: center; padding: .45rem .3rem; border-radius: 6px; font-variant-numeric: tabular-nums; font-weight: 600;
  background: color-mix(in srgb, var(--p-samenhang) calc(8% + var(--w) * 72%), white); color: var(--text); }
.cm-cell a { color: inherit; display: block; }
.cm-cell.cm-strong { color: #fff; }
.cm-zero { background: var(--surface-2); color: #cbd5e1; font-weight: 400; }
.layer-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.layer-tile { display: flex; align-items: center; gap: .55rem; padding: .6rem .7rem; border-radius: 8px; border: 1px solid var(--border); color: var(--text); background: color-mix(in srgb, var(--layer) 22%, white); }
.layer-tile:hover { text-decoration: none; border-color: color-mix(in srgb, var(--layer) 100%, #475569); }
.layer-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--layer); border: 1px solid rgba(0, 0, 0, .2); }
.layer-name { flex: 1; font-size: .88rem; }
.status-bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; gap: 2px; margin: .4rem 0 1rem; background: var(--surface-2); }
.seg { display: block; min-width: 6px; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem 1rem; font-size: .85rem; }
.legend li { display: flex; align-items: center; gap: .4rem; }
.legend strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.list li { display: flex; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.list li a { flex: 1; min-width: 40%; }
.list li:last-child { border-bottom: 0; }

/* activity */
.activity { list-style: none; padding: 0; margin: 0 0 .6rem; }
.activity li { display: flex; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.activity li:last-child { border-bottom: 0; }
.activity.compact li { padding: .35rem 0; font-size: .88rem; }
.act-details { margin: .25rem 0 .1rem; font-size: .88rem; }
.act-details > summary { cursor: pointer; color: var(--accent); width: fit-content; }
.act-details .act-group { margin: .3rem 0 0 .2rem; }
.act-details ul { list-style: disc; margin: .1rem 0 0; padding-left: 1.2rem; }
.act-details ul li { display: list-item; border: 0; padding: .05rem 0; }
.act-icon { width: 1.3rem; text-align: center; color: var(--muted); }

/* table */
.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .65rem .9rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--accent-wash); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* element detail */
.element-head { border-left: 6px solid var(--layer); padding-left: 1rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
/* Relatiediagram van een object (Samenhang) */
.rel-diagram-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .6rem; }
.rel-diagram-bar .spacer { flex: 1; }
.rel-diagram { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: auto; }
.rel-diagram-svg { display: block; width: 100%; height: auto; margin: 0 auto; }
.rel-diagram-bar select { width: auto; }
.rel-diagram-actions { display: inline-flex; gap: .5rem; margin-left: auto; }
.rel-diagram-card .rel-diagram-svg { max-height: 460px; }
.rel-diagram-page .rel-diagram-svg { max-height: calc(100vh - 230px); min-height: 320px; }
.rel-diagram .node.clickable { cursor: pointer; }
.rel-diagram .node.clickable:hover > :first-child { stroke: var(--accent); stroke-width: 2; }
.rel-diagram .node.focus > :first-child { stroke: var(--accent); stroke-width: 3; }
.kv-list { display: flex; flex-direction: column; gap: .4rem; }
.kv-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: .4rem; }
.rel-list { list-style: none; margin: 0; padding: 0; }
.rel-row { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.rel-row:last-child { border-bottom: 0; }
.rel-row .icon-btn { margin-left: auto; }
.rel-chip { font-size: .72rem; font-weight: 600; padding: .12rem .45rem; border-radius: 4px; background: #e2e8f0; color: #334155; }
.comments { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .6rem; }
.comment { border: 1px solid var(--border); border-radius: 8px; padding: .6rem .75rem; background: var(--surface-2); }
.comment.resolved { opacity: .65; }
.comment header { display: flex; align-items: center; gap: .45rem; }
.comment p { margin: .45rem 0; white-space: pre-wrap; }
.comment footer { display: flex; gap: .8rem; }
.comment-form textarea { margin-bottom: .2rem; }

/* views */
.view-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.view-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; color: var(--text); box-shadow: var(--shadow); }
.view-card:hover { text-decoration: none; border-color: var(--accent); }
.view-card h2 { margin: .6rem 0 .3rem; display: inline; }
.view-thumb { height: 84px; border-radius: 8px; background: radial-gradient(#cbd5e1 1px, transparent 1px) 0 0 / 14px 14px, var(--surface-2); position: relative; margin-bottom: .6rem; }
.view-thumb span { position: absolute; width: 56px; height: 22px; border-radius: 4px; border: 1px solid #94a3b8; }
.view-thumb span:nth-child(1) { left: 16px; top: 14px; background: #ffffb5; }
.view-thumb span:nth-child(2) { left: 100px; top: 48px; background: #b5ffff; }
.view-thumb span:nth-child(3) { left: 180px; top: 18px; background: #c9e7b7; }
.editor { display: flex; flex-direction: column; height: calc(100vh - 57px); }
.toolbar { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.view-title { font-size: 1.15rem; margin: 0 .5rem; }
.spacer { flex: 1; }
.save-state { font-size: .82rem; color: var(--muted); min-width: 6.5rem; text-align: right; }
.save-state.err { color: var(--danger, #b91c1c); font-weight: 600; }
/* Wie bewerkt deze view nu (bewerkvergrendeling), in de editor, de lijst en de kaarten. */
.pill.editing-badge { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, var(--surface)); font-weight: 600; white-space: nowrap; }
.editing-slot:empty { display: none; }
.zoom-label { min-width: 3rem; text-align: center; }
.editor-body { flex: 1; display: grid; grid-template-columns: var(--palette-w, 250px) 1fr var(--panel-w, 300px); min-height: 0; }
.palette, .inspector { background: var(--surface); padding: .8rem; overflow: auto; display: flex; flex-direction: column; gap: .5rem; }
.palette { border-right: 1px solid var(--border); }
.inspector { border-left: 1px solid var(--border); }
.inspector .card { box-shadow: none; padding: .8rem; margin-top: .5rem; }
.palette h2, .inspector h2 { margin: 0; }
.inspector > .pill, .inspector .meta-row { align-self: flex-start; margin-left: 0; }
.canvas:focus, .canvas:focus-visible { outline: none; }
.palette-list { display: flex; flex-direction: column; gap: 2px; }
.palette-item { display: flex; align-items: center; gap: .5rem; padding: .35rem .4rem; border-radius: 6px; cursor: grab; }
.palette-item:hover { background: var(--surface-2); }
.palette-item.in-view { opacity: .55; cursor: default; }
.palette-item .swatch { width: 10px; height: 26px; border-radius: 3px; flex: none; border: 1px solid rgba(0, 0, 0, .15); }
.palette-name { flex: 1; display: flex; flex-direction: column; font-size: .86rem; line-height: 1.2; min-width: 0; }
.palette-name small { color: var(--muted); font-size: .74rem; }
.palette-layer { margin-top: .6rem; padding: .25rem .4rem; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-left: 4px solid var(--layer); background: var(--surface-2); border-radius: 4px; }
.palette-layer:first-child { margin-top: 0; }
.palette-type { display: flex; justify-content: space-between; padding: .35rem .4rem .1rem; font-size: .76rem; font-weight: 600; color: var(--muted); }
.palette-type small { font-weight: 400; }
/* Gezichtspunt van de view: passende objecttypen bovenaan, de rest gedimd onder een eigen kop. */
.palette-vp { margin: .2rem .4rem .4rem; }
.palette-section { margin-top: 1rem; padding: .3rem .4rem; font-size: .74rem; font-weight: 700; color: var(--muted); border-top: 1px dashed var(--border); }
.palette-item.off-viewpoint { opacity: .6; }
.canvas-wrap { position: relative; min-width: 0; min-height: 0; background: #fbfcfd; }
.canvas { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; cursor: default; }
.canvas .node { cursor: move; }
.canvas .edge { cursor: pointer; }
.canvas.can-edit .edge-label { cursor: move; }
.canvas .resize-handle { cursor: nwse-resize; }
.canvas .connect-handle { cursor: crosshair; }
/* Selectiekader en pannen: slepen op leeg canvas selecteert; spatie of middelste muisknop verschuift. */
.canvas.pan-ready, .canvas.pan-ready .node, .canvas.pan-ready .edge, .canvas.pan-ready .note { cursor: grab; }
.canvas.panning, .canvas.panning .node, .canvas.panning .edge, .canvas.panning .note { cursor: grabbing; }
.inspector .bulk-style .swatches { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
.legend-box summary { cursor: pointer; font-weight: 600; font-size: .88rem; margin: .5rem 0; }
.legend-grid { display: flex; gap: .6rem; }
.legend-grid ul { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.legend-grid li { height: 20px; line-height: 12px; padding-top: 1px; }
.choice-list { display: flex; flex-direction: column; gap: .3rem; max-height: 320px; overflow: auto; }
.choice-list h3 { margin: .5rem 0 .2rem; }
.choice { display: flex; gap: .55rem; align-items: flex-start; padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.choice span { display: flex; flex-direction: column; }

/* questionnaires */
.type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.type-picker fieldset { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .7rem; display: flex; flex-direction: column; gap: .2rem; }
.type-picker legend { font-weight: 600; font-size: .85rem; padding: 0 .3rem; }
.q-list { display: flex; flex-direction: column; gap: .7rem; }
.q-item { border: 1px solid var(--border); border-radius: 8px; padding: .8rem; display: flex; flex-direction: column; gap: .6rem; background: var(--surface-2); }
.q-item-head { display: flex; align-items: center; gap: .2rem; }
.drag-num { font-weight: 600; flex: 1; }

/* modal & toasts */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { background: var(--surface); border-radius: 12px; width: min(560px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem .4rem; }
.modal-head h2 { margin: 0; }
.modal-body { padding: .6rem 1.2rem; overflow: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.2rem 1rem; }
#toasts { position: fixed; bottom: 1.2rem; right: 1.2rem; display: flex; flex-direction: column; gap: .5rem; z-index: 60; }
.toast { background: #0f172a; color: #fff; padding: .65rem 1rem; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); transition: opacity .4s, transform .4s; max-width: 420px; }
.toast-err { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* login: links merk en pijlers, rechts aanmelden */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(34, 211, 238, .18), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(168, 85, 247, .22), transparent 60%), var(--nav); }
.login-panel { display: grid; grid-template-columns: 1.1fr 1fr; width: min(980px, 100%); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); background: var(--surface); }
.login-intro { background: linear-gradient(160deg, var(--nav) 0%, var(--nav-2) 100%); color: #fff; padding: 2.4rem 2.4rem 2rem; position: relative; }
.login-intro::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--brand-gradient); }
.login-intro .brand { padding: 0 0 1.4rem; }
.brand-large { font-size: 2rem; }
.brand-large .logo { width: 48px; height: 48px; }
.brand-large .brand-tag { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.login-payoff { margin: 0 0 .6rem; font-weight: 700; font-size: 1.15rem; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-origin { margin: 0 0 .8rem; color: var(--nav-text); font-size: .86rem; line-height: 1.5; padding-left: .7rem; border-left: 2px solid var(--accent-2); }
.login-origin strong { color: #fff; }
/* Over Synora */
.about { max-width: 560px; }
.about-brand { color: var(--nav); padding: 0 0 .4rem; }
.about-brand .logo { color: var(--nav); }
.about-brand .brand-tag { color: var(--muted); opacity: 1; }
.about-etym { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem; font-size: 1.15rem; margin: .2rem 0 .6rem; color: var(--muted); }
.about-etym strong { color: var(--accent); }
.about-plus { color: var(--muted); font-weight: 300; }
.about-result { font-weight: 700; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-pillars { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.about-pillars li { display: flex; gap: .65rem; align-items: flex-start; }
.about-pillars strong { color: var(--pillar); }
.about-payoff { font-weight: 600; margin: 1rem 0 .4rem; }
.login-lead { margin: 0 0 1.4rem; color: var(--nav-text); line-height: 1.55; }
.pillar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.pillar-list li { display: flex; gap: .75rem; align-items: flex-start; }
.pillar-list strong { display: block; color: #fff; }
.pillar-list small { color: var(--nav-text); font-size: .82rem; line-height: 1.45; }
.login-intro .pillar-icon { background: rgba(255, 255, 255, .08); color: var(--pillar); border: 1px solid rgba(255, 255, 255, .12); }
.login-card { padding: 2.4rem 2.2rem; display: flex; flex-direction: column; justify-content: center; }
.login-title { margin: 0 0 .3rem; }
.lead { font-size: 1.05rem; }
.login-users { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.login-user { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: .7rem; cursor: pointer; text-align: left; font: inherit; }
.login-user:hover { border-color: var(--accent); background: var(--accent-wash); }
.login-user span { display: flex; flex-direction: column; }
.login-user small { color: var(--muted); }
.login-form { margin-top: 1.2rem; }
.login-form .btn { justify-self: start; align-self: flex-start; padding: .6rem 1.4rem; }
.login-error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: .9rem; }
.login-card .notice pre { background: var(--surface-2); padding: .5rem .6rem; border-radius: 6px; overflow-x: auto; font-size: .82rem; }

/* metamodel */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tab { border: 0; background: none; font: inherit; font-weight: 500; padding: .6rem .9rem; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-toolbar { display: flex; gap: .6rem; align-items: center; margin-bottom: .8rem; flex-wrap: wrap; }
.tab-toolbar input[type=search], .tab-toolbar select { width: auto; min-width: 220px; }
.layer-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.layer-head h2 { margin: 0; flex: 1; }
.table.compact td, .table.compact th { padding: .4rem .7rem; }
.table tr.inactive td { color: var(--muted); }
.table tr.inactive .inline-input { color: var(--muted); }
table.mm-types { table-layout: fixed; }
table.mm-types th:nth-child(1) { width: 70px; } table.mm-types th:nth-child(2) { width: 34%; }
table.mm-types th:nth-child(4) { width: 15%; } table.mm-types th:nth-child(5), table.mm-types th:nth-child(6) { width: 11%; }
table.mm-types th:nth-child(7) { width: 44px; }
table.mm-types .inline-input { width: 100%; min-width: 0; }
.inline-input { border: 1px solid transparent; background: transparent; padding: .25rem .4rem; width: auto; min-width: 12rem; }
.inline-input:hover { border-color: var(--border); }
.inline-input:focus { border-color: var(--accent); background: var(--surface); }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch input:disabled { cursor: default; }
.slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .15s; }
.slider::after { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::after { transform: translateX(14px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.rules-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.rules-types { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; display: flex; flex-direction: column; gap: .5rem; }
.type-nav { display: flex; flex-direction: column; }
.type-nav-layer { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .7rem 0 .2rem; }
.type-nav-item { display: flex; align-items: center; gap: .5rem; border: 0; background: none; font: inherit; text-align: left; padding: .35rem .45rem; border-radius: 6px; cursor: pointer; color: var(--text); }
.type-nav-item:hover { background: var(--surface-2); }
.type-nav-item.active { background: var(--accent-soft); font-weight: 600; }
.type-nav-item .swatch { width: 10px; height: 10px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .2); flex: none; }
.grow { flex: 1; }
.rules-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.rules-head h2 { margin-bottom: .2rem; }
.matrix-wrap { overflow: auto; max-height: 65vh; border: 1px solid var(--border); border-radius: 8px; }
.matrix { border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.matrix thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; border-bottom: 1px solid var(--border); font-weight: 600; padding: .4rem; vertical-align: bottom; }
.matrix th.rot { height: 110px; width: 44px; min-width: 44px; }
.matrix th.rot span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; display: inline-block; }
.matrix .sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; text-align: left; padding: .25rem .6rem; border-right: 1px solid var(--border); min-width: 220px; font-weight: normal; }
.matrix thead .sticky-col { z-index: 3; background: var(--surface-2); }
.matrix td.cell { text-align: center; border-bottom: 1px solid #f1f5f9; padding: .2rem; }
.matrix td.cell.changed { background: #fef9c3; }
.matrix tbody tr:hover td, .matrix tbody tr:hover th { background: var(--accent-wash); }
.matrix .layer-row th { background: var(--surface-2); text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .35rem .6rem; position: sticky; left: 0; }
.incoming { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.incoming li { padding: .2rem 0; break-inside: avoid; font-size: .88rem; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.preset { border: 1px solid var(--border); border-radius: 8px; padding: .8rem 1rem; }
.preset h3 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1rem; margin: 0 0 .3rem; }

.mm-diagram-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-height: 75vh; }
.mm-diagram { display: block; }
.mm-diagram-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.mm-diagram-side { position: sticky; top: 70px; margin: 0; }
.mm-diagram-side .card-head { flex-direction: column; align-items: flex-start; }
.mm-diagram-side h3 { margin-top: .4rem; }
.zoom-range { width: 140px; }
.mm-diagram .edge.hl path:nth-child(2) { stroke: var(--accent); }
.rel-filter { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.notice { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; padding: .6rem .8rem; border-radius: 8px; margin: 0; }
ul.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .25rem; }
ul.plain .pill { margin-left: 0; }

.usage { display: flex; flex-direction: column; gap: .6rem; }
.usage .notice { margin: 0; }
.usage-section h3 { margin: .2rem 0 .3rem; }
.usage-section ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
.usage-section .pill { margin-left: 0; }
.check.ack { align-items: flex-start; font-weight: 600; padding: .5rem .6rem; border: 1px solid #fecaca; background: #fef2f2; border-radius: 8px; }
.check.ack input { margin-top: .2rem; }

@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .editor-body { grid-template-columns: 220px 1fr; }
  .inspector { display: none; }
  .rules-layout, .mm-diagram-layout { grid-template-columns: 1fr; }
  .rules-types { position: static; max-height: 260px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { display: none; }
  .grid-2, .row-2, .row-3, .filters { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .pillars, .login-panel { grid-template-columns: 1fr; }
  main { padding: 1rem; }
  .topbar { padding: .6rem 1rem; flex-wrap: wrap; }
  .editor-body { grid-template-columns: 1fr; }
  .palette { max-height: 200px; }
}

/* Werkbalk boven het diagram */
.ribbon { display: flex; align-items: stretch; gap: 0; padding: .3rem .75rem .15rem; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tool-group { position: relative; display: flex; align-items: flex-start; gap: .2rem; padding: 0 .7rem 1.05rem; border-right: 1px solid var(--border); }
.tool-group:last-child { border-right: 0; }
.tool-group-label { position: absolute; left: 0; right: 0; bottom: .1rem; text-align: center; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tool-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .6rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: .84rem; cursor: pointer; }
.tool-btn:hover { background: #fff; border-color: var(--border); }
.tool-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tool-btn svg { color: #334155; flex: none; }
.tool-btn.toggle::before { content: ''; width: .8rem; height: .8rem; border: 1.5px solid #94a3b8; border-radius: 3px; background: #fff; flex: none; }
.tool-btn.toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: #c7d2fe; color: var(--accent-ink); }
.tool-btn.toggle[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px #fff; }
.canvas .note { cursor: move; }
.canvas .legend-block { cursor: move; }
.canvas .legend-toggle { cursor: pointer; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .4rem; max-height: 60vh; overflow: auto; }
.icon-choice { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .55rem .3rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #334155; font: inherit; font-size: .74rem; cursor: pointer; }
.icon-choice:hover, .icon-choice.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 760px) { .tool-group { padding: 0 .4rem 1.05rem; } .tool-btn { padding: .3rem .4rem; } }

/* Beheer in het menu */
.nav-admin { margin-top: 1.1rem; padding-top: .8rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.nav-heading { color: #8aa0b6; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 0 .7rem .35rem; }
.eyebrow { margin: 0 0 .1rem; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }

/* Beheer › Iconen */
.icon-sets { display: flex; flex-direction: column; gap: .8rem; }
.icon-set .card-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.icon-set.inactive { opacity: .7; }
.set-title { display: inline-flex; align-items: center; gap: .4rem; font-size: 1rem; color: var(--text); }
.set-title .chev { width: .8rem; color: var(--muted); }
.icon-admin-grid { max-height: none; margin-top: .6rem; }
.icon-admin-grid .icon-choice { cursor: default; }
.icon-admin-grid button.icon-choice { cursor: pointer; }
.icon-preview { display: flex; justify-content: center; padding: .8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.icon-picker { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.modal:has(.icon-picker) { width: min(780px, 100%); }
.small-tabs { margin: 0; flex-wrap: wrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Beheer › Gebruikers en rollen */
.users-table select.compact { width: auto; min-width: 9rem; padding: .3rem .5rem; }
.user-cell { display: inline-flex; align-items: center; gap: .55rem; }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.perm-matrix { min-width: 640px; }
.perm-matrix tbody th[scope=row] { text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--text); background: var(--surface); font-weight: 500; }
.perm-matrix tbody th[scope=row] small { display: block; font-weight: 400; font-size: .76rem; margin-top: .1rem; }
.perm-matrix .group-row th { background: var(--surface-2); color: var(--accent); }
.perm-matrix td.center { text-align: center; }
.perm-matrix input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.role-col { text-align: center !important; text-transform: none !important; letter-spacing: 0 !important; min-width: 8.5rem; }
.role-head { display: flex; flex-direction: column; align-items: center; gap: .2rem; color: var(--text); font-size: .88rem; }
.role-actions { display: flex; gap: .5rem; }

/* ---------- views-overzicht ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.list-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .75rem .9rem .5rem; }
.list-panel .table-wrap { box-shadow: none; border-radius: 8px; }
.chips { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .7rem; }
.chips-label { font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-right: .2rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .28rem .55rem .28rem .75rem; font: inherit; font-size: .82rem; cursor: pointer; }
.chip:hover { border-color: #cbd5e1; background: var(--surface-2); }
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.chip-count { background: var(--accent); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .4rem; line-height: 1.35rem; min-width: 1.35rem; text-align: center; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.filled { fill: currentColor; }
.popover { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .16); min-width: 220px; max-width: 320px; }
.pop-body { padding: .4rem; max-height: 360px; overflow: auto; }
.pop-search { width: 100%; margin: .1rem 0 .35rem; }
.pop-title { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .5rem .45rem .2rem; }
.pop-option { display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem; border-radius: 6px; cursor: pointer; font-size: .88rem; }
.pop-option:hover { background: var(--surface-2); }
.pop-option input { margin: 0; accent-color: var(--accent); }
.pop-empty { padding: .4rem .45rem; margin: 0; }
.menu { display: flex; flex-direction: column; padding: .3rem; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: .25rem 0; }
.menu-item { text-align: left; border: 0; background: none; font: inherit; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; color: var(--text); }
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--danger); }
/* Rechtermuismenu in de view-editor (js/view-editor/context-menu.js) */
.ctx-menu { position: fixed; z-index: 70; display: flex; flex-direction: column; min-width: 220px; max-width: 320px; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); font-size: .88rem; }
.ctx-menu:focus { outline: none; }
.ctx-menu hr { border: 0; border-top: 1px solid var(--border); margin: .25rem 0; }
.ctx-title { padding: .35rem .6rem .25rem; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.ctx-item { display: flex; align-items: center; gap: 1rem; text-align: left; border: 0; background: none; font: inherit; padding: .38rem .6rem; border-radius: 6px; cursor: pointer; color: var(--text); }
.ctx-item .ctx-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-item .ctx-hint { color: var(--muted); font-size: .76rem; }
.ctx-item:hover:not(:disabled), .ctx-item:focus-visible { background: var(--surface-2); outline: none; }
.ctx-item:disabled { color: var(--muted); opacity: .55; cursor: default; }
.ctx-item.danger { color: var(--danger); }
.ctx-row { display: flex; align-items: center; gap: .2rem; padding: .2rem .6rem; }
.ctx-row-label { flex: 1; color: var(--text); }
.ctx-mini { min-width: 1.9rem; height: 1.7rem; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; cursor: pointer; color: var(--text); font: inherit; }
.ctx-mini:hover:not(:disabled), .ctx-mini:focus-visible { background: var(--surface-2); border-color: var(--accent); outline: none; }
.ctx-mini:disabled { opacity: .45; cursor: default; }
.list-toolbar { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; flex-wrap: wrap; }
.search-box { position: relative; width: min(340px, 100%); }
.search-box input { width: 100%; padding-right: 2rem; }
.search-box .ico { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg-btn { border: 0; background: var(--surface); color: var(--muted); padding: .38rem .5rem; cursor: pointer; display: inline-grid; place-items: center; }
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn.on { background: var(--accent-soft); color: var(--accent-ink); }
.bulk-bar { display: flex; align-items: center; gap: .8rem; background: var(--accent-soft); border-radius: 8px; padding: .4rem .7rem; margin-bottom: .6rem; font-size: .88rem; }
.bulk-bar[hidden] { display: none; }
.views-table td { padding: .5rem .65rem; }
.views-table th { padding: .5rem .65rem; white-space: nowrap; }
.views-table tr.selected td { background: var(--accent-wash); }
.views-table .col-check { width: 36px; padding-right: 0; }
.views-table .col-check input { accent-color: var(--accent); }
.views-table .col-icon { width: 64px; text-align: center; }
.views-table .col-menu { width: 76px; text-align: right; }
.views-table .row-actions { display: inline-flex; gap: 2px; }
.views-table .col-name { min-width: 200px; max-width: 340px; }
.views-table .tag-list { max-width: 170px; }
.list-panel .table-wrap { position: relative; }
.views-table .col-name a { font-weight: 500; }
.nowrap { white-space: nowrap; }
.sort-btn { border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: .3rem; align-items: center; }
.sort-btn:hover, .sort-btn.on { color: var(--text); }
.sort-arrow { opacity: .45; font-size: .85em; }
.sort-btn.on .sort-arrow { opacity: 1; color: var(--accent); }
.person { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.person .avatar, .people .avatar { width: 24px; height: 24px; font-size: .64rem; }
.people { display: inline-flex; align-items: center; }
.people .avatar { box-shadow: 0 0 0 2px var(--surface); }
.people .avatar + .avatar { margin-left: -6px; }
.people > .muted { margin-left: .35rem; }
.tag-list { display: inline-flex; gap: .25rem; flex-wrap: wrap; }
.tag { font-size: .74rem; padding: .08rem .45rem; border-radius: 5px; background: #eef2ff; color: #3730a3; white-space: nowrap; }
.tag.more { background: var(--surface-2); color: var(--muted); }
/* Klikbare tag in het views-overzicht: filtert op die tag. */
.tag-btn { border: 1px solid transparent; font: inherit; font-size: .74rem; cursor: pointer; }
.tag-btn:hover { border-color: currentColor; }
.tag-btn.on { background: var(--accent); color: #fff; }
.pop-note { margin: .4rem .2rem 0; max-width: 16rem; }
.vstatus { font-size: .74rem; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.vstatus-concept { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.vstatus-in-review { background: #fef3c7; color: #92400e; }
.vstatus-vastgesteld { background: #dcfce7; color: #166534; }
.vstatus-gearchiveerd { background: #f1f5f9; color: #64748b; }
.icon-toggle { border: 0; background: none; color: #94a3b8; cursor: pointer; padding: .25rem; border-radius: 6px; display: inline-grid; place-items: center; }
.icon-toggle:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-toggle:disabled { cursor: default; }
.icon-toggle.fav.on { color: #e11d48; }
.icon-toggle.lock.on { color: var(--warn); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; padding: .6rem .2rem .2rem; }
.pager select { width: auto; padding: .2rem .4rem; margin-left: .3rem; }
.pager label { display: inline-flex; align-items: center; white-space: nowrap; }
.pager .icon-btn:disabled { opacity: .35; cursor: default; }
.view-card { cursor: pointer; }
.view-card-top { position: relative; }
.view-card-top .spacer { display: none; }
.view-card-top .icon-toggle { position: absolute; top: 6px; background: rgba(255,255,255,.9); }
.view-card-top .fav { right: 40px; }
.view-card-top .lock { right: 6px; }
.view-card-meta { display: flex; gap: .35rem; align-items: center; margin: .2rem 0 .3rem; }
.view-card-meta .pill { margin-left: 0; }
.check-field { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }
.check-field input { accent-color: var(--accent); }
@media (max-width: 760px) {
  .list-toolbar .spacer { display: none; }
  .search-box { width: 100%; }
  .pager { justify-content: space-between; flex-wrap: wrap; }
}
main:has(> .list-panel) { max-width: 1680px; }
.views-table { font-size: .92rem; }
.view-card-top .icon-toggle { background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.list-panel { min-width: 0; }

/* ---------- view-editor: relatiehendels en opmaakbalk ---------- */
.canvas .connect-handle-g { opacity: 0; transition: opacity .12s; }
.canvas .node:hover .connect-handle-g, .canvas .node.selected .connect-handle-g { opacity: 1; }
.canvas .connect-handle-g:hover .connect-handle { r: 10; }
.btn[hidden] { display: none; }
.canvas .node.connect-target > :first-child { stroke: var(--accent); stroke-width: 3; }
.canvas.linking, .canvas.linking .node { cursor: crosshair; }
.node-bar { position: absolute; z-index: 5; display: flex; align-items: center; gap: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 20px rgba(15, 23, 42, .14); padding: .3rem .45rem; white-space: nowrap; }
.node-bar[hidden] { display: none; }
.bar-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 .1rem; }
.bar-btn { border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 600; color: var(--accent); padding: .2rem .35rem; border-radius: 6px; cursor: pointer; }
.bar-btn:hover { background: var(--accent-soft); }
.bar-btn.muted { color: var(--muted); font-weight: 500; }
.swatches { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.swatch-btn { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(15, 23, 42, .25); background: var(--c); cursor: pointer; padding: 0; position: relative; display: inline-grid; place-items: center; font-size: .7rem; color: var(--muted); }
.swatch-btn.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.swatch-btn.default::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 1.5px dashed rgba(15, 23, 42, .45); }
.swatch-btn.custom { background: conic-gradient(#f87171, #fbbf24, #34d399, #60a5fa, #a78bfa, #f87171); color: #fff; overflow: hidden; }
.swatch-btn.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: 0; }
.font-step { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.font-step button { border: 0; background: var(--surface); font: inherit; font-size: .78rem; font-weight: 600; padding: .15rem .4rem; cursor: pointer; color: var(--text); }
.font-step button:hover { background: var(--surface-2); }
/* Vet, cursief en onderstreept voor tekstvakken */
.font-style { display: inline-flex; gap: .2rem; }
.font-style button { min-width: 1.9rem; font-family: Georgia, 'Times New Roman', serif; }
.font-style .fs-bold { font-weight: 800; }
.font-style .fs-italic { font-style: italic; }
.font-style .fs-underline { text-decoration: underline; }
.font-style .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.font-val { font-size: .78rem; min-width: 2.1rem; text-align: center; color: var(--muted); border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding: .15rem 0; }
.node-style h3 { margin-top: .4rem; }
.node-style .swatches { gap: 5px; }
.node-style .swatch-btn { width: 22px; height: 22px; }

/* Beheer › Import & export */
.file-pick { display: inline-block; position: relative; margin: .25rem 0 .75rem; }
.file-pick:focus-within .btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.exchange-result { display: grid; gap: .75rem; max-width: 640px; }
.exchange-result h3 { margin: .25rem 0 0; }
.exchange-table { max-width: 420px; border: 1px solid var(--border); border-radius: var(--radius); }
.exchange-table td { font-variant-numeric: tabular-nums; }
.exchange-details summary { cursor: pointer; font-weight: 600; }
.exchange-details ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.type-counts { columns: 2; }
.notice { margin: 0; padding: .6rem .8rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.notice.warn { border-color: #f5d08a; background: #fffbeb; color: #78350f; }
.notice.err { border-color: #fecaca; background: #fef2f2; color: var(--danger); }
.notice.ok { border-color: #c7d2fe; background: var(--accent-wash); color: var(--accent-ink); }

/* Conventiemodel › Controle: afwijkingen per combinatie van objecttypen */
.violations td { vertical-align: top; }
.violations td.num { text-align: left; white-space: nowrap; }
.violations .actions-cell { text-align: right; white-space: nowrap; }
.violations details.examples summary { cursor: pointer; }
.violations details.examples ul { margin: .3rem 0 0; padding-left: 1rem; white-space: normal; font-size: .85rem; }
.inspector .node-props { border-top: 1px solid var(--border); padding-top: .6rem; }
.inspector .node-props .kv-row { grid-template-columns: 1fr 1.4fr auto; }
.inspector .node-props .kv-row input { min-width: 0; }
.layer-ctl h3 { margin-top: .4rem; }
.layer-ctl .btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.layer-ctl .btn-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.canvas .bend-handle { cursor: move; }
.canvas .bend-add { cursor: copy; }
.layer-ctl .btn-grid .btn { justify-content: center; }
.inspector .node-attrs .btn-small { align-self: flex-start; }
.menu .menu-title { padding: .35rem .7rem .2rem; text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
.account .logout-btn { margin-left: .4rem; }

/* Vormen in views */
.swatch-btn.none { background: repeating-linear-gradient(45deg, #fff 0 3px, #e2e8f0 3px 6px); color: #64748b; font-size: .75rem; }
.shape-style .swatches { gap: 5px; flex-wrap: wrap; }
.shape-grid .icon-choice svg { color: #334155; }
.shape-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.shape-grid .icon-choice { min-width: 0; }
.shape-grid .icon-choice span { text-align: center; overflow-wrap: anywhere; }

/* Panelen in de view-editor in- en uitklappen */
.shell.nav-collapsed { grid-template-columns: 0 1fr; }
.shell.nav-collapsed > .sidebar { visibility: hidden; padding: 0; overflow: hidden; min-width: 0; }
.editor-body.palette-collapsed { grid-template-columns: 0 1fr var(--panel-w, 300px); }
.editor-body.panel-collapsed { grid-template-columns: var(--palette-w, 250px) 1fr 0; }
.editor-body.palette-collapsed.panel-collapsed { grid-template-columns: 0 1fr 0; }
.editor-body.palette-collapsed > .palette, .editor-body.panel-collapsed > .inspector { visibility: hidden; padding: 0; border: 0; overflow: hidden; min-width: 0; }
@media (max-width: 1100px) {
  .editor-body { grid-template-columns: var(--palette-w, 200px) 1fr var(--panel-w, 260px); }
  .editor-body.palette-collapsed { grid-template-columns: 0 1fr var(--panel-w, 260px); }
  .editor-body.panel-collapsed { grid-template-columns: var(--palette-w, 200px) 1fr 0; }
  .editor-body > .inspector { display: flex; } /* paneel blijft bruikbaar; in te klappen met het klepje */
}
/* Prullenbak */
.trash-table td:first-child { white-space: nowrap; }
.trash-actions { text-align: right; white-space: nowrap; }
.trash-actions .btn + .btn { margin-left: .4rem; }
.trash-rels { margin-top: .3rem; font-size: .85rem; }
.trash-rels summary { cursor: pointer; color: var(--accent); }
.trash-rels ul { margin: .3rem 0 .2rem; padding-left: 1.1rem; }
.trash-rels li { margin: .15rem 0; }
.trash-rels p { margin: .2rem 0 0; }
.trash-empty-icon { font-size: 2rem; opacity: .5; }
@media (max-width: 700px) { .trash-actions { white-space: normal; } .trash-actions .btn { margin: .2rem 0 0 0; } }

/* --- Help-link in de menubalk --- */
.nav-help { margin-top: 1.1rem; padding-top: .8rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.nav-help .nav-icon { font-weight: 700; }
.nav-kbd { margin-left: auto; font: 600 .68rem ui-monospace, SFMono-Regular, Menlo, monospace; color: #8aa0b6; border: 1px solid rgba(255, 255, 255, .18); border-radius: 4px; padding: 0 .3rem; }
.node-bar .bar-label { font-size: .72rem; font-weight: 600; color: var(--muted); margin-right: .15rem; }
.bar-btn:disabled { color: var(--muted); opacity: .5; cursor: default; background: none; }
.node-bar .swatches { flex-wrap: nowrap; gap: 4px; }
/* Klepjes om panelen in en uit te klappen */
.pane-tab { position: absolute; z-index: 6; top: 50%; transform: translateY(-50%); width: 16px; height: 48px; padding: 0; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 700 15px/1 system-ui, sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(15, 23, 42, .08); }
.pane-tab:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.pane-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pane-tab-palette { left: 0; border-left: 0; border-radius: 0 8px 8px 0; }
.pane-tab-panel { right: 0; border-right: 0; border-radius: 8px 0 0 8px; }
.pane-tab-nav { position: fixed; top: 96px; transform: none; left: 232px; border-left: 0; border-radius: 0 8px 8px 0; z-index: 20; }
.shell.nav-collapsed > .pane-tab-nav { left: 0; }
/* Sleeprand om de repositorylijst en het eigenschappenpaneel breder of smaller te maken */
.pane-resize { position: absolute; z-index: 5; top: 0; bottom: 0; width: 8px; cursor: col-resize; touch-action: none; }
.pane-resize[hidden] { display: none; }
.pane-resize-palette { left: 0; }
.pane-resize-panel { right: 0; }
.pane-resize::after { content: ''; position: absolute; top: 0; bottom: 0; width: 3px; background: transparent; transition: background .12s; }
.pane-resize-palette::after { left: 0; }
.pane-resize-panel::after { right: 0; }
.pane-resize:hover::after, .pane-resize.dragging::after, .pane-resize:focus-visible::after { background: var(--accent); }
.pane-resize:focus-visible { outline: none; }
body.pane-resizing { cursor: col-resize; user-select: none; }
@media (max-width: 760px) { .pane-tab, .pane-resize { display: none; } }
/* Tekst direct in een vorm typen */
.inline-editor { position: absolute; z-index: 7; box-sizing: border-box; margin: 0; resize: none; border: 2px solid var(--accent); border-radius: 4px; padding: 2px 6px; font-family: inherit; line-height: 1.3; text-align: center; overflow: hidden; outline: none; box-shadow: 0 4px 14px rgba(15, 23, 42, .15); }
/* Vormen: draaien, spiegelen en tekstuitlijning */
.seg-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.seg-row .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.rot-input { display: inline-flex; align-items: center; gap: 2px; }
.rot-input input { width: 4.5rem; }
.bar-btn.on { background: var(--accent-soft); }
.node-bar { flex-wrap: wrap; max-width: calc(100% - 8px); white-space: normal; row-gap: 4px; }
.import-history-table td { font-variant-numeric: tabular-nums; }
.import-history-table .import-file { word-break: break-all; }

/* Open view onder Views in het menu: blijft staan als je naar een ander scherm gaat */
.nav-open-view { padding: .35rem .5rem .35rem 1.4rem; font-size: .86rem; font-weight: 400; gap: .4rem; }
.nav-open-view .nav-icon { width: auto; opacity: .6; }
.nav-open-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-open-close { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .25rem; border-radius: 4px; }
.nav-open-close:hover, .nav-open-close:focus-visible { opacity: 1; background: rgba(255, 255, 255, .12); }
.import-history-actions { text-align: right; white-space: nowrap; }
.import-history-actions .btn + .btn { margin-left: .35rem; }
.import-reverted { margin-top: .25rem; }
.revert-plan ul { margin: .4rem 0; padding-left: 1.2rem; }
.revert-plan .notice { margin-top: .6rem; }
.revert-items { max-height: 14rem; overflow: auto; font-size: .9rem; }
.revert-choices { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .75rem; margin: .6rem 0 0; display: grid; gap: .5rem; }
.revert-choice { display: flex; gap: .5rem; align-items: flex-start; cursor: pointer; }
.revert-choice > span { display: grid; gap: .1rem; }

/* Beeldmerk 'Knooppunt': pijlerkleuren (zie brand.js) */
.mk-fill-inzicht { fill: var(--p-inzicht); } .mk-fill-overzicht { fill: var(--p-overzicht); }
.mk-fill-samenhang { fill: var(--p-samenhang); } .mk-fill-richting { fill: var(--p-richting); }
.mk-stroke-inzicht { stroke: var(--p-inzicht); } .mk-stroke-overzicht { stroke: var(--p-overzicht); } .mk-stroke-richting { stroke: var(--p-richting); }

/* Over deze view: omschrijving direct in het paneel */
.view-desc-field { margin: .4rem 0 .2rem; }
.view-desc { width: 100%; min-height: 4.5rem; resize: vertical; line-height: 1.4; }
.icon-picker h3.shape-group { margin: .2rem 0 .5rem; }
.icon-picker h3.shape-group:not(:first-child) { margin-top: 1rem; }

/* Conventiemodel › Levenscyclus: kleur per status */
.status-colors .swatches { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.status-colors .swatch-btn:disabled { cursor: default; opacity: .7; }
.status-previews { display: flex; gap: .5rem; }
