/*
  Huisstijl-tokens — afgeleid van thebridgeavgroup.com:
  - Accentkleur: #7CFE42 (neon-groen, uit het logo)
  - Basis: zwart / antraciet, met witte tekst
  - Typografie: Poppins (koppen, gewicht 600/500), systeem-sans voor body-tekst
*/

:root {
  --brand-green: #7cfe42;
  --brand-green-dim: #4f9e2a;
  --bg-0: #0b0b0c;
  --bg-1: #141416;
  --bg-2: #1c1c1f;
  --border: #2a2a2e;
  --text-0: #f5f6f5;
  --text-1: #b7b9b8;
  --text-2: #7d7f7e;
  --danger: #ff5c5c;
}

* { box-sizing: border-box; }

/* `all: unset` op knoppen zet ook `display` terug en overschrijft daarmee het
   `hidden`-attribuut; dit herstelt verbergen voor alle elementen. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

h1, h2, h3, .brand-font {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

a { color: var(--brand-green); }

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #000;
}

.brand-name {
  font-size: 15px;
  line-height: 1.2;
}

.brand-name strong {
  display: block;
  color: var(--text-0);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

.brand-name span {
  color: var(--text-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

nav.tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

nav.tabs button {
  all: unset;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-1);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

nav.tabs button:hover { background: var(--bg-2); color: var(--text-0); }

nav.tabs button.active {
  background: rgba(124, 254, 66, 0.12);
  color: var(--brand-green);
  font-weight: 600;
}

nav.tabs button .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

main {
  padding: 32px 40px;
  overflow-y: auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}

.page-header h1 { font-size: 22px; margin: 0; }
.page-header p { color: var(--text-2); margin: 4px 0 0; font-size: 13px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.green { background: rgba(124, 254, 66, 0.14); color: var(--brand-green); }
.badge.grey { background: var(--bg-2); color: var(--text-2); border: 1px solid var(--border); }

.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 { font-size: 14px; margin: 0; color: var(--text-0); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
  text-align: left;
  padding: 10px 18px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
}

tr:last-child td { border-bottom: none; }

td.mono, .mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12px; color: var(--text-0); }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
}

.link-btn {
  all: unset;
  cursor: pointer;
  color: var(--brand-green);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--brand-green-dim);
  border-radius: 6px;
}

.link-btn:hover { background: rgba(124, 254, 66, 0.1); }

.link-btn.secondary { color: var(--text-1); border-color: var(--border); }
.link-btn.secondary:hover { background: var(--bg-2); }

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-2);
  border: 1px solid var(--brand-green-dim);
  color: var(--text-0);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: none;
}

.toast.show { display: block; }
.toast.error { border-color: var(--danger); }

dialog {
  background: var(--bg-1);
  color: var(--text-0);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  width: 380px;
}

dialog::backdrop { background: rgba(0, 0, 0, 0.6); }

.dialog-body { padding: 20px; }
.dialog-body h3 { margin: 0 0 4px; font-size: 15px; }
.dialog-body p { margin: 0 0 16px; color: var(--text-2); font-size: 12px; }

.dialog-body label {
  display: block;
  font-size: 12px;
  color: var(--text-1);
  margin-bottom: 6px;
}

.dialog-body input {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text-0);
  font-size: 13px;
  margin-bottom: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ---- Projectpaneel in de zijbalk (opslaan/openen, autosave-status) ---- */
.project-panel {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-panel-label {
  color: var(--text-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 4px;
}

.project-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.project-actions .link-btn { font-size: 11px; padding: 4px 8px; }

.save-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-1);
  padding: 0 4px;
}

.save-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-green); }
.save-status.saving .save-dot { background: var(--text-2); }
.save-status.error .save-dot { background: var(--danger); }

.file-path {
  font-size: 10px;
  color: var(--text-2);
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-body p { line-height: 1.5; }

/* ---- Formulieren: select, rijen, hints ---- */
.dialog-body select {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text-0);
  font-size: 13px;
  margin-bottom: 14px;
}
.dialog-body select[size] { padding: 4px; }
.dialog-body select option { padding: 4px 6px; border-radius: 4px; }
.dialog-body select option:checked { background: rgba(124, 254, 66, 0.18); color: var(--brand-green); }
.dialog-body select option.manual { color: var(--text-2); font-style: italic; }

dialog.wide { width: 520px; }
.dialog-body .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-body .row.three { grid-template-columns: 0.7fr 1fr 1fr; }
.dialog-body .hint { margin: -8px 0 12px; font-size: 12px; color: var(--text-2); }
.dialog-body .hint.warn { color: #ffb347; }
.dialog-body .hint.ok { color: var(--brand-green); }
.dialog-body label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 10px; }
.dialog-body label.check input { width: auto; margin: 0; accent-color: var(--brand-green); }
.dialog-body input:disabled { opacity: 0.45; }
.dialog-body input:focus, .dialog-body select:focus, input.search:focus {
  outline: none;
  border-color: var(--brand-green-dim);
}

input.search {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-0);
  font-size: 12px;
  width: 240px;
}
.dialog-body input.search { width: 100%; margin-bottom: 6px; }

.header-actions { display: flex; gap: 8px; }

/* ---- Adresoverlap ---- */
.badge.danger { background: rgba(255, 92, 92, 0.14); color: var(--danger); }
.conflict-card { border-color: rgba(255, 92, 92, 0.45); }
.conflict-list { margin: 0; padding: 10px 18px 14px 36px; font-size: 13px; color: var(--text-1); line-height: 1.7; }
tr.conflict td { background: rgba(255, 92, 92, 0.06); }
tr.conflict td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.range { color: var(--text-2); font-size: 11px; margin-left: 4px; }

/* ---- Bibliotheek ---- */
.mode-chip {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  white-space: nowrap;
}
.mode-chip b { color: var(--brand-green); font-weight: 600; }
.source { color: var(--text-2); font-size: 11px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-report { padding: 14px 18px; font-size: 13px; color: var(--text-1); line-height: 1.6; }
.import-report ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 12px; }
.link-btn:disabled { opacity: 0.4; cursor: default; }

/* ---- RDM: patch vs. rig ---- */
:root {
  --warn: #ffb347;
  --info: #8fd3ff;
}
.sim-banner {
  border: 1px dashed var(--border);
  background: var(--bg-1);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-1);
  margin-bottom: 18px;
}
.sim-banner b { color: var(--warn); }

.summary-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  font-size: 12px;
  color: var(--text-1);
}
.chip b { font-size: 14px; color: var(--text-0); }
.chip.active { border-color: var(--brand-green); background: rgba(124, 254, 66, 0.08); }
.chip.zero { opacity: 0.45; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.st { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-ok { color: var(--brand-green); }
.st-mismatch { color: var(--warn); }
.st-suggested { color: var(--info); }
.st-missing { color: var(--danger); }
.st-noDevice { color: var(--text-2); }
.st-unpatched { color: var(--warn); }

#rdm-table td { vertical-align: top; }
#rdm-table .issues { margin: 0; padding-left: 16px; font-size: 12px; color: var(--text-1); line-height: 1.5; }
#rdm-table .issues li::marker { color: var(--text-2); }
#rdm-table .sub, #rdm-nodes-table .sub { display: block; color: var(--text-2); font-size: 11px; margin-top: 2px; }
#rdm-table .diff { color: var(--warn); font-weight: 600; }
#rdm-table .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 280px; margin-left: auto; white-space: nowrap; }
.link-btn.identify-on { color: #000; background: var(--brand-green); border-color: var(--brand-green); animation: blink 0.8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.55; } }

/* ---- DMX-adreskaart ---- */
.map-universes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.map-stats { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 14px; font-size: 12px; color: var(--text-2); }
.map-stats b { color: var(--text-0); font-size: 15px; margin-right: 4px; }
.map-stats .bad b { color: var(--danger); }
.map-stats .warn b { color: var(--warn); }
.usage-bar { width: 160px; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px; }
.usage-bar span { display: block; height: 100%; background: var(--brand-green); }

.map-grid {
  display: grid;
  grid-template-columns: repeat(32, minmax(0, 1fr));
  gap: 2px;
  padding: 14px;
  user-select: none;
}
.map-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 22px;
  border-radius: 3px;
  background: var(--bg-2);
  font-size: 9px;
  color: var(--text-2);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2px 3px;
  cursor: pointer;
  overflow: hidden;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.map-cell:hover { outline: 1px solid var(--text-2); }
.map-cell.free:hover { outline-color: var(--brand-green); color: var(--brand-green); }
.map-cell.used { color: rgba(255, 255, 255, 0.55); }
.map-cell.start { color: #fff; font-weight: 700; font-size: 10px; box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.75); }
.map-cell.conflict {
  background: repeating-linear-gradient(45deg, rgba(255, 92, 92, 0.85) 0 4px, rgba(120, 30, 30, 0.9) 4px 8px) !important;
  color: #fff;
}
.map-cell.selected { outline: 2px solid var(--brand-green); outline-offset: -1px; z-index: 1; }
.map-cell .rigbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--info); }
.map-cell .rigbar.only-rig { background: var(--warn); height: 5px; }
.map-cell .rigbar.rig-start { left: 2px; border-top-left-radius: 2px; }
.map-cell.only-patch-rig::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--danger) 0 3px, transparent 3px 6px);
}

.map-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 0 14px 14px; font-size: 11px; color: var(--text-1); }
.map-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }
.map-detail-body { padding: 14px 18px; font-size: 13px; color: var(--text-1); line-height: 1.7; }
.map-detail-body .actions-row { display: flex; gap: 8px; margin-top: 10px; }
label.check.toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-1); cursor: pointer; }
label.check.toggle input { accent-color: var(--brand-green); }
label.check.toggle:has(input:disabled) { opacity: 0.45; cursor: default; }

/* ---- RDM-bron / netwerk ---- */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented button {
  all: unset; cursor: pointer; padding: 6px 12px; font-size: 12px; color: var(--text-1); background: var(--bg-0);
}
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button.active { background: rgba(124, 254, 66, 0.12); color: var(--brand-green); font-weight: 600; }
.rdm-settings-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; font-size: 12px; color: var(--text-1); }
.hint-text { margin: 0; color: var(--text-2); line-height: 1.5; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-grid label { display: flex; flex-direction: column; gap: 6px; }
.settings-grid .inline { display: flex; gap: 6px; }
.settings-grid select {
  flex: 1; background: var(--bg-0); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px;
  color: var(--text-0); font-size: 12px;
}
.port-warning {
  border: 1px solid rgba(255, 92, 92, 0.5); background: rgba(255, 92, 92, 0.08); color: var(--text-0);
  border-radius: 8px; padding: 10px 12px; line-height: 1.5;
}
.port-warning b { color: var(--danger); }
.rdm-notes { margin: 0; padding: 10px 18px 14px 36px; font-size: 12px; color: var(--warn); line-height: 1.6; }
.rdm-notes:empty { display: none; }
.port-chip { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 8px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border); font-size: 11px; white-space: nowrap; }
.port-chip b { color: var(--brand-green); }
#confirm-dialog .dialog-body p { color: var(--text-1); font-size: 13px; white-space: pre-line; }

/* ---- MVR ---- */
.mvr-file { margin: -2px 0 12px !important; color: var(--text-1) !important; word-break: break-all; }
.mvr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mvr-stats .stat { background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.mvr-stats .stat b { display: block; font-size: 17px; color: var(--text-0); }
.mvr-stats .stat span { font-size: 11px; color: var(--text-2); }
.mvr-stats .stat.warn b { color: var(--warn); }
.mvr-stats .stat.bad b { color: var(--danger); }
.mvr-stats .stat.ok b { color: var(--brand-green); }
.mvr-warnings { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--warn); line-height: 1.55; max-height: 160px; overflow: auto; }
.mvr-warnings:empty { display: none; }
#mvr-dialog .segmented { margin-bottom: 4px; }
#mvr-dialog label.check { margin-bottom: 6px; }
#mvr-dialog label.check input[type="number"] { padding: 4px 6px; }
.conflict-shared { padding: 0 18px 14px; font-size: 12px; color: var(--text-2); }

.map-cell.shared { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); }
.map-cell.shared.start { box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.75), inset 0 0 0 2px rgba(255, 255, 255, 0.7); }

/* ---- Softpatch: selectie in de patchlijst ---- */
th.chk, td.chk { width: 34px; padding-right: 0; }
td.chk input, th.chk input { accent-color: var(--brand-green); cursor: pointer; }
tr.selected td { background: rgba(124, 254, 66, 0.06); }
.sel-count { font-size: 11px; color: var(--brand-green); font-weight: 500; margin-left: 6px; }
.map-cell.dragging { opacity: 0.35; }
.map-cell.drop-ok { outline: 2px solid var(--brand-green) !important; outline-offset: -1px; }
.map-cell.drop-bad { outline: 2px solid var(--danger) !important; outline-offset: -1px; }

/* ---- Bediening ---- */
.out-pill { margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 6px; border-radius: 4px; background: var(--danger); color: #fff; animation: blink 1.2s steps(2) infinite; }
.output-bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px;
  font-size: 12px; color: var(--text-1);
}
.output-bar.live { border-color: var(--danger); background: rgba(255, 92, 92, 0.07); }
.output-bar label { display: flex; align-items: center; gap: 8px; }
.output-bar select { background: var(--bg-0); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; color: var(--text-0); font-size: 12px; }
.out-toggle {
  all: unset; cursor: pointer; font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text-1);
}
.out-toggle.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.out-status { color: var(--text-2); }
.output-bar.live .out-status { color: var(--text-0); }

.control-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.control-fixtures .search { width: calc(100% - 28px); margin: 10px 14px; }
.ctl-list { max-height: calc(100vh - 330px); overflow: auto; padding: 0 6px 10px; }
.ctl-type { margin-top: 8px; }
.ctl-type-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; border-radius: 6px; }
.ctl-type-head:hover { background: var(--bg-2); color: var(--text-0); }
.ctl-type-head .sw { width: 10px; height: 10px; border-radius: 3px; }
.ctl-fx { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 26px; border-radius: 6px; font-size: 12px; color: var(--text-1); cursor: pointer; user-select: none; }
.ctl-fx:hover { background: var(--bg-2); }
.ctl-fx.selected { background: rgba(124, 254, 66, 0.12); color: var(--text-0); }
.ctl-fx .num { font-family: 'SFMono-Regular', Consolas, monospace; color: var(--text-0); min-width: 44px; }
.ctl-fx .addr { margin-left: auto; font-family: 'SFMono-Regular', Consolas, monospace; font-size: 11px; color: var(--text-2); }
.ctl-fx .prog { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

.ctl-attrs { padding: 6px 18px 18px; }
.ctl-group { margin-top: 14px; }
.ctl-group h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin: 0 0 8px; font-weight: 600; }
.ctl-attr { display: grid; grid-template-columns: 150px 1fr 74px 22px; align-items: center; gap: 12px; padding: 5px 0; font-size: 12px; }
.ctl-attr .name { color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl-attr .name small { color: var(--text-2); margin-left: 4px; }
.ctl-attr.active .name { color: var(--brand-green); font-weight: 600; }
.ctl-attr input[type="range"] { width: 100%; accent-color: var(--brand-green); }
.ctl-attr.mixed input[type="range"] { opacity: 0.45; }
.ctl-attr .val { font-family: 'SFMono-Regular', Consolas, monospace; text-align: right; color: var(--text-0); font-size: 11px; }
.ctl-attr .rel { all: unset; cursor: pointer; color: var(--text-2); text-align: center; border-radius: 4px; }
.ctl-attr .rel:hover { color: var(--danger); background: var(--bg-2); }
.ctl-warn { margin: 12px 0 0; font-size: 12px; color: var(--warn); }

.xy-wrap { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 6px; }
.xy-pad {
  position: relative; width: 170px; height: 170px; flex: none; border-radius: 10px; cursor: crosshair;
  background: radial-gradient(circle at center, rgba(124, 254, 66, 0.08), transparent 70%), var(--bg-0);
  border: 1px solid var(--border);
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50% 50%; background-position: center;
}
.xy-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--brand-green); box-shadow: 0 0 12px rgba(124, 254, 66, 0.6); pointer-events: none; }
.xy-wrap .xy-sliders { flex: 1; }

/* ================= Testers, locks, statistieken, live view, chat, IP-monitor ================= */
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-1); cursor: pointer; }
label.check input { accent-color: var(--brand-green); margin: 0; }
.hint { font-size: 12px; color: var(--text-2); }
.hint.pad { padding: 0 18px; margin: 6px 0 4px; }
.muted { color: var(--text-2); }
.danger-text { color: var(--danger) !important; }

/* Zijbalk-statistieken */
.side-stats { margin: 14px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-1); cursor: default; }
.side-stats-row { display: flex; align-items: baseline; gap: 5px; font-size: 13px; color: var(--text-0); font-weight: 600; }
.side-stats-row small { color: var(--text-2); font-weight: 500; font-size: 11px; margin-right: 6px; }
.side-stats-row.big span { font-size: 22px; color: var(--brand-green); }
.side-stats-unis { margin-top: 8px; display: grid; gap: 3px; max-height: 190px; overflow: auto; }
.ss-uni { display: grid; grid-template-columns: 34px 1fr 28px 74px; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-1); cursor: pointer; padding: 1px 2px; border-radius: 4px; }
.ss-uni:hover { background: var(--bg-2); }
.ss-uni .n { font-weight: 600; color: var(--text-0); }
.ss-uni .f { text-align: right; font-variant-numeric: tabular-nums; }
.ss-uni .ff { color: var(--text-2); white-space: nowrap; }
.ss-uni.bad .n { color: var(--danger); }
.usage { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.usage-bar { display: inline-block; width: 60px; height: 5px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.ss-uni .usage-bar { width: 100%; }
.usage-bar span { display: block; height: 100%; background: var(--brand-green); }

/* Bediening: lock/limiet-knoppen */
.ctl-attr { grid-template-columns: 140px 1fr 78px 22px 22px 22px; }
.rule-btn { all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 5px; text-align: center; line-height: 22px; font-size: 11px; color: var(--text-2); opacity: 0.45; }
.rule-btn:hover { opacity: 1; background: var(--bg-2); }
.rule-btn.on { opacity: 1; color: var(--warn); background: rgba(255, 179, 71, 0.14); }
.ctl-attr:has(.rule-btn.lock.on) input[type="range"] { accent-color: var(--warn); }
.control-lower { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
.tester-body { padding: 6px 18px 16px; display: grid; gap: 10px; }
.tester-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--text-1); }
.tester-row label { display: inline-flex; align-items: center; gap: 6px; }
.tester-row input[type="number"] { width: 64px; }
.tester-row select, .tester-row input { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 6px; padding: 5px 7px; font: inherit; }
.test-range { display: inline-flex; flex-wrap: wrap; gap: 12px; }
.test-status { font-size: 12px; color: var(--text-1); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-green); margin-right: 6px; animation: blink 1s steps(2) infinite; }
.rules-list { padding: 4px 12px 14px; display: grid; gap: 6px; }
.rule-row { display: grid; grid-template-columns: 110px 140px 1fr auto; gap: 10px; align-items: center; font-size: 12px; padding: 6px 8px; border-radius: 6px; background: var(--bg-2); }
.rule-row .attr { font-weight: 600; color: var(--text-0); }
.rule-row .what { color: var(--warn); }
.rule-row .fx { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Live view */
.live-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 12px; }
.live-layout { display: grid; grid-template-columns: 1fr 400px; gap: 16px; align-items: start; margin-bottom: 18px; }
.live-canvas { position: relative; height: calc(100vh - 330px); min-height: 420px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #050505; }
.live-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.live-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 13px; pointer-events: none; text-align: center; padding: 20px; }
.live-side { display: grid; gap: 14px; max-height: calc(100vh - 330px); overflow: auto; min-height: 420px; }
.live-side .card { margin: 0; }
.live-side .control-attrs .card-header { flex-wrap: wrap; gap: 6px; }
.live-side .ctl-attr { grid-template-columns: 96px 1fr 70px 20px 20px 20px; gap: 6px; }
.live-side .ctl-attrs { max-height: none; }
#live-output-slot .output-bar { margin-bottom: 12px; }
.out-toggle.small { padding: 6px 12px; font-size: 12px; }
.out-toggle.on-green { background: var(--brand-green); border-color: var(--brand-green); color: #071; }
.out-pill.in { background: var(--brand-green); color: #062; animation: none; }
.live-sources { padding: 6px 14px 12px; display: grid; gap: 8px; }
.src-row { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; }
.src-row small { display: block; color: var(--text-2); }
.src-row.stale { opacity: 0.5; }
.src-unis { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.src-unis span { font-size: 10.5px; padding: 2px 6px; border-radius: 4px; background: var(--bg-2); color: var(--text-1); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--text-2); flex: none; margin-top: 3px; }
.status-dot.ok { background: var(--brand-green); box-shadow: 0 0 6px rgba(124, 254, 66, 0.6); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 6px rgba(255, 92, 92, 0.6); animation: blink 1s steps(2) infinite; }
.live-detail { padding: 4px 14px 12px; font-size: 12px; }
.kv { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.kv b { color: var(--text-0); font-weight: 600; }
.kv-note { color: var(--text-2); font-weight: 400; font-size: 11.5px; margin-left: 4px; }
.swatch { display: inline-block; width: 28px; height: 12px; border-radius: 3px; vertical-align: middle; border: 1px solid var(--border); }
.live-detail-actions { display: flex; gap: 8px; margin-top: 10px; }
.dmx-monitor { display: grid; grid-template-columns: repeat(32, 1fr); gap: 2px; padding: 8px 14px 14px; }
.dmx-monitor .mc { position: relative; height: 30px; border-radius: 3px; background: var(--bg-2); overflow: hidden; font-size: 9px; display: flex; flex-direction: column; justify-content: space-between; padding: 1px 3px; }
.dmx-monitor .mc::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--lvl, 0) * 100%); background: rgba(124, 254, 66, 0.35); }
.dmx-monitor .mc.patched { box-shadow: inset 0 2px 0 rgba(143, 211, 255, 0.5); }
.dmx-monitor .mc i { position: relative; font-style: normal; color: var(--text-2); }
.dmx-monitor .mc b { position: relative; color: var(--text-0); font-weight: 600; text-align: right; }

/* Chat & shitlist */
.nav-badge { margin-left: auto; font-size: 10px; font-weight: 700; min-width: 16px; text-align: center; padding: 1px 5px; border-radius: 9px; background: var(--brand-green); color: #062; }
.nav-badge.danger { background: var(--danger); color: #fff; }
.chat-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: start; }
.chat-card, .issues-card { margin: 0; }
.chat-log { height: calc(100vh - 330px); min-height: 300px; overflow: auto; padding: 10px 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 7px 10px; border-radius: 10px; background: var(--bg-2); font-size: 13px; align-self: flex-start; }
.msg.mine { align-self: flex-end; background: rgba(124, 254, 66, 0.12); }
.msg.system { align-self: center; background: transparent; border: 1px dashed var(--border); color: var(--text-1); font-size: 12px; }
.msg.issue { border-left: 3px solid var(--warn); }
.msg .meta { font-size: 10.5px; color: var(--text-2); margin-bottom: 2px; }
.msg .meta b { color: var(--text-1); }
.msg .text { color: var(--text-0); white-space: pre-wrap; word-break: break-word; }
.chat-input { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 8px; padding: 8px 10px; font: inherit; }
.chat-settings { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 8px 16px 14px; font-size: 12px; color: var(--text-1); }
.chat-settings input:not([type]) { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 6px; padding: 4px 7px; font: inherit; width: 150px; margin-left: 6px; }
.issues-list { padding: 8px 14px 14px; display: grid; gap: 8px; max-height: calc(100vh - 250px); overflow: auto; }
.issue { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--bg-2); border-left: 3px solid var(--border); }
.issue.prio-hoog { border-left-color: var(--danger); }
.issue.prio-normaal { border-left-color: var(--warn); }
.issue.st-bezig { border-left-color: var(--info); }
.issue.st-opgelost { opacity: 0.6; border-left-color: var(--brand-green); }
.issue-main { flex: 1; cursor: pointer; min-width: 0; }
.issue-title { font-weight: 600; color: var(--text-0); font-size: 13px; }
.issue.st-opgelost .issue-title { text-decoration: line-through; }
.issue-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; color: var(--text-2); margin-top: 4px; }
.issue-detail { font-size: 12px; color: var(--text-1); margin-top: 5px; white-space: pre-wrap; }
.issue-actions { display: flex; gap: 6px; flex: none; }
.fx-link { cursor: pointer; }
.fx-link:hover { color: var(--brand-green); }
.dialog-body textarea { width: 100%; box-sizing: border-box; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 8px; padding: 8px; font: inherit; resize: vertical; }

/* IP-monitor */
.net-summary { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.stat-pill { font-size: 12px; padding: 4px 10px; border-radius: 12px; background: var(--bg-1); border: 1px solid var(--border); color: var(--text-1); }
.stat-pill.ok { color: var(--brand-green); border-color: rgba(124, 254, 66, 0.4); }
.stat-pill.bad { color: var(--danger); border-color: rgba(255, 92, 92, 0.5); }
tr.net-offline td { background: rgba(255, 92, 92, 0.06); }
.spark { display: block; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .link-btn { margin-left: 4px; }

@media (max-width: 1300px) {
  .live-layout { grid-template-columns: 1fr 340px; }
  .control-lower, .chat-layout { grid-template-columns: 1fr; }
}
.live-side, .live-side > *, #live-control-slot > * { min-width: 0; }
#live-control-slot .control-attrs { width: auto; overflow: hidden; }
.live-side .xy-wrap { grid-template-columns: 1fr; display: grid; }
.live-side .xy-pad { width: 100%; max-width: 240px; }
.live-side .ctl-attr .val { font-size: 10.5px; }
.live-side .header-actions { flex-wrap: wrap; }
#tab-control .ctl-attrs { max-height: calc(100vh - 300px); overflow: auto; }

/* Rondgang */
.walk-body { padding: 4px 16px 16px; display: grid; gap: 10px; font-size: 13px; }
.walk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.walk-stats div { background: var(--bg-2); border-radius: 8px; padding: 8px; text-align: center; color: var(--text-1); }
.walk-stats b { font-size: 18px; color: var(--brand-green); }
.walk-stats b.warn { color: var(--warn); }
.walk-stats small { display: block; font-size: 10.5px; color: var(--text-2); }
.walk-form { display: grid; gap: 6px; }
.walk-form select { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 6px; padding: 5px; margin-left: 6px; }
.walk-actions, .walk-marks { display: flex; flex-wrap: wrap; gap: 8px; }
.walk-plan, .walk-corr { border: 1px solid var(--warn); background: rgba(255, 179, 71, 0.08); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.walk-corr p { margin: 0; }
.walk-nav { display: flex; align-items: center; gap: 8px; }
.walk-nav span { flex: 1; text-align: center; color: var(--text-1); }
.walk-current { background: var(--bg-2); border-radius: 10px; padding: 12px; }
.walk-current b { font-size: 16px; color: var(--text-0); }
.walk-current small { display: block; color: var(--text-2); margin-top: 4px; }
.walk-cands { display: flex; flex-wrap: wrap; gap: 6px; }
.walk-cands .linked { opacity: 0.45; }
.walk-pick { color: var(--brand-green); }
.walk-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--text-2); }
.walk-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--c); margin-right: 5px; vertical-align: -1px; }
.phone-box { border-top: 1px solid var(--border); padding-top: 10px; display: grid; gap: 8px; }
.phone-box select { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-1); border-radius: 6px; padding: 5px; font-size: 11px; }
.qr { width: 170px; height: 170px; background: #fff; border-radius: 8px; padding: 6px; }
.qr svg { width: 100%; height: 100%; display: block; }

/* Wire view */
.wire { padding: 6px 14px 16px; overflow-x: auto; }
.wire svg { font-family: Poppins, sans-serif; }
.wire .wh { fill: #7d7f7e; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; }
.wire .wn { fill: #f5f6f5; font-size: 12.5px; font-weight: 600; }
.wire .ws { fill: #7d7f7e; font-size: 10.5px; }
.wire .wp { fill: #b7b9b8; font-size: 10.5px; font-family: ui-monospace, Menlo, monospace; }
.wire .wl { cursor: pointer; }
.wire .wl:hover rect:first-of-type { fill: #1c1c1f; }

/* GDTF Share */
.share-login { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 18px 16px; }
.share-login p { flex-basis: 100%; margin: 0 0 4px; }
.share-login input { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 8px; padding: 8px 10px; font: inherit; min-width: 220px; }
.share-search { padding: 0 18px 6px; }
.share-search .search { width: 100%; box-sizing: border-box; }
.share-results { max-height: 520px; overflow: auto; }
.share-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 18px; }
.share-modes { font-size: 11.5px; color: var(--text-1); max-width: 340px; }

/* Alles bijwerken vanaf GDTF Share */
.sync-head { position: sticky; top: 0; z-index: 2; background: var(--bg-1); border-bottom: 1px solid var(--border); gap: 12px; }
.sync-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.sync-actions .check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.sync-table td { vertical-align: top; }
.sync-table td:first-child { width: 26px; padding-right: 0; }
.sync-table tr.in-patch td { background: rgba(124, 254, 66, 0.04); }
.sync-table .share-modes { max-width: 300px; overflow-wrap: anywhere; }
.sync-bijwerken, .sync-vervangen { color: var(--brand-green); }
.sync-keuze { color: var(--warn, #ffb347); }
.sync-actueel, .sync-geen { color: var(--text-2); font-weight: 500; }
.sync-modes { margin-top: 3px; font-size: 11.5px; color: var(--text-1); }
.sync-alt { margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--border); }
.sync-alt .check { display: inline-flex; align-items: baseline; gap: 6px; font-size: 11.5px; }
.sync-state { font-size: 12px; }
.sync-state.ok { color: var(--brand-green); }
.sync-state.bad { color: var(--danger); }
.sync-state.busy { color: var(--text-2); }

/* MVR-xchange */
dialog.wide-dialog { width: min(820px, 92vw); }
.mvrx-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 8px 0; }
.mvrx-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); flex: 1; min-width: 220px; }
.mvrx-row input { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 8px; padding: 8px 10px; font: inherit; }
.mvrx-share input { flex: 1; }
.mvrx-status { font-size: 13px; color: var(--text-1); margin: 6px 0 10px; display: flex; gap: 8px; align-items: center; }
.dialog-body h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin: 14px 0 6px; }
.mvrx-commits table { width: 100%; }
.mvrx-stations { display: grid; gap: 6px; }
.mvrx-log { margin-top: 12px; font-size: 11.5px; color: var(--text-2); }
.mvrx-log div { padding: 2px 0; }
#mvrx-btn .nav-badge { margin-left: 6px; }

/* MVR bijwerken (verschillen) */
.mvr-diff { margin-top: 12px; display: grid; gap: 8px; }
.mvr-diff details { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.mvr-diff summary { cursor: pointer; font-size: 13px; color: var(--text-0); }
.mvr-diff summary a { color: var(--brand-green); font-size: 11.5px; margin-left: 6px; }
.diff-list { max-height: 240px; overflow: auto; margin-top: 6px; display: grid; gap: 2px; }
.diff-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 12px; color: var(--text-1); padding: 3px 0; border-bottom: 1px solid var(--bg-2); cursor: pointer; }
.diff-row input { accent-color: var(--brand-green); }
.diff-row b { min-width: 46px; color: var(--text-0); }
.diff-row .dl { min-width: 140px; }
.diff-row .dc { flex-basis: 100%; padding-left: 26px; color: var(--text-2); font-size: 11.5px; }
.diff-row s { color: var(--danger); opacity: 0.8; }
.dialog-body label.diff-row { display: flex; margin: 0; text-transform: none; letter-spacing: 0; }
.dialog-body .diff-row input { width: auto; margin: 0; padding: 0; flex: none; }
.diff-list { overflow-x: hidden; }

/* Showmodus */
.show-lock { all: unset; cursor: pointer; display: block; text-align: center; margin: 14px 0 0; padding: 9px; border-radius: 10px; border: 1px solid var(--border); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-1); background: var(--bg-1); }
.show-lock:hover { border-color: var(--text-2); }
.show-lock.on { background: var(--danger); border-color: var(--danger); color: #fff; animation: none; }
.show-banner { position: sticky; top: 0; z-index: 20; margin: -8px 0 14px; padding: 8px 14px; border-radius: 8px; background: rgba(255, 92, 92, 0.12); border: 1px solid var(--danger); color: var(--text-0); font-size: 12.5px; font-weight: 600; }
body.show-locked #test-start, body.show-locked #walk-link, body.show-locked #walk-verify, body.show-locked .rule-btn, body.show-locked #rediscover-btn { opacity: 0.35; }

/* Plattegrond */
.plan-layout { display: grid; grid-template-columns: 240px 1fr 280px; gap: 14px; align-items: start; }
.plan-side { margin: 0; }
.plan-side .search { width: calc(100% - 28px); margin: 8px 14px; }
.plan-unplaced { max-height: calc(100vh - 360px); overflow: auto; padding: 0 6px 8px; }
.plan-canvas { position: relative; height: calc(100vh - 200px); min-height: 460px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #070708; }
.plan-canvas svg { width: 100%; height: 100%; display: block; cursor: crosshair; user-select: none; }
.plan-hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--brand-green); pointer-events: none; }
.plan-canvas .pg { stroke: #18181b; stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan-canvas .pg5 { stroke: #26262b; }
.plan-canvas .porigin { stroke: #4f9e2a; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.plan-canvas .plabel { fill: #7d7f7e; font-family: Poppins, sans-serif; }
.plan-canvas .ptruss line { stroke: #3a3a40; stroke-linecap: round; cursor: pointer; }
.plan-canvas .ptruss.sel line { stroke: #4f9e2a; }
.plan-canvas .pnew { stroke: rgba(124, 254, 66, 0.5); stroke-linecap: round; }
.plan-canvas .pfx { cursor: grab; }
.plan-canvas .pfx circle { fill: #2a2a2e; stroke: #b7b9b8; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.plan-canvas .pfx circle.standing { stroke-dasharray: 3 2; }
.plan-canvas .pfx.sel circle { fill: #7cfe42; stroke: #7cfe42; }
.plan-canvas .pnum { fill: #f5f6f5; font-family: Poppins, sans-serif; font-weight: 600; pointer-events: none; }
.plan-panel { padding: 6px 16px 16px; font-size: 13px; color: var(--text-1); display: grid; gap: 8px; }
.plan-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.plan-panel input { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 6px; padding: 6px 8px; font: inherit; }
.plan-panel h4 { margin: 6px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.plan-btns { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1300px) { .plan-layout { grid-template-columns: 200px 1fr 240px; } }

/* Stroom & data */
.pw-stats { margin-bottom: 14px; }
.pw-in { width: 80px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 6px; padding: 4px 6px; font: inherit; }
.pw-cable-sum { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 18px; }
#pw-cables details { padding: 4px 18px; border-top: 1px solid var(--bg-2); }
#pw-cables summary { cursor: pointer; font-size: 13px; padding: 4px 0; }
.pw-chain { margin: 6px 0 10px; padding-left: 28px; font-size: 12px; color: var(--text-1); display: grid; gap: 2px; }
.pw-cable { display: inline-block; min-width: 44px; font-size: 11px; font-weight: 700; color: var(--brand-green); }
.pw-cable.bad { color: var(--danger); }
.collab-pin { font-size: 18px; letter-spacing: 0.15em; color: var(--brand-green); }
.collab-code { width: 64px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 6px; padding: 6px; font: inherit; text-align: center; letter-spacing: 0.15em; }

/* Rigging + nodes op de plattegrond */
.plan-canvas .phoist { fill: #ffb347; stroke: #0b0b0c; stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan-canvas .phoist.bad { fill: #ff5c5c; }
.plan-canvas .pload { fill: #ffb347; font-family: Poppins, sans-serif; font-weight: 700; pointer-events: none; }
.plan-canvas .pload.bad { fill: #ff5c5c; }
.plan-canvas .pnode { cursor: grab; }
.plan-canvas .pnode rect { fill: #13324a; stroke: #8fd3ff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.plan-canvas .pnode.sel rect { fill: #8fd3ff; }
.plan-panel select { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-0); border-radius: 6px; padding: 5px; font: inherit; margin-bottom: 4px; }
.rig-sum { font-size: 12px; color: var(--text-1); display: grid; gap: 4px; padding: 8px; border-radius: 8px; background: var(--bg-2); }
.rig-sum .bad, .rig-bad { color: var(--danger); }
tr.rig-warn td { border-bottom: none; }
.plan-panel select { width: 100%; box-sizing: border-box; }

/* Overzicht */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ov-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; cursor: pointer; border-left: 4px solid var(--border); }
.ov-card:hover { border-color: var(--text-2); }
.ov-card.ok { border-left-color: var(--brand-green); }
.ov-card.warn { border-left-color: var(--warn); }
.ov-card.bad { border-left-color: var(--danger); }
.ov-card.live { border-left-color: var(--danger); background: rgba(255, 92, 92, 0.07); }
.ov-t { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.ov-big { font-size: 22px; font-weight: 700; color: var(--text-0); margin: 4px 0; }
.ov-sub { font-size: 12px; color: var(--text-1); }
.ov-bar { width: 100%; margin-top: 10px; }
.ov-attention { margin: 0; padding: 6px 18px 16px 36px; display: grid; gap: 6px; font-size: 13px; color: var(--text-1); }
.ov-attention li[data-go] { cursor: pointer; }
.ov-attention li[data-go]:hover { color: var(--brand-green); }
.ov-attention li.ok { color: var(--brand-green); list-style: none; margin-left: -18px; }

/* Zijbalk blijft staan en scrollt zelf (kleine laptopschermen) */
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; box-sizing: border-box; gap: 16px; }
.sidebar .tabs button { padding-top: 7px; padding-bottom: 7px; }
.side-stats-unis { max-height: 110px; }

/* Kleinere vensters (laptop): tabellen scrollen binnen de kaart, plattegrond stapelt */
.card { overflow-x: auto; }
@media (max-width: 1250px) {
  .plan-layout { grid-template-columns: 200px 1fr; }
  .plan-layout > .plan-side:last-child { grid-column: 1 / -1; }
  .live-layout { grid-template-columns: 1fr 320px; }
}

/* Lijndiagnose */
.rdm-lines { padding: 6px 18px 14px; display: grid; gap: 10px; }
.line-row { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; border-left: 4px solid var(--brand-green); }
.line-row.line-breuk, .line-row.line-niets { border-left-color: var(--danger); }
.line-row.line-losse { border-left-color: var(--warn); }
.line-row.line-geen-rdm { border-left-color: var(--border); }
.line-head { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.line-chain { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.lc { font-size: 10.5px; font-family: ui-monospace, Menlo, monospace; padding: 2px 5px; border-radius: 4px; background: var(--bg-2); color: var(--text-2); }
.lc.on { background: rgba(124, 254, 66, 0.15); color: var(--brand-green); }
.lc.off { background: rgba(255, 92, 92, 0.15); color: var(--danger); }
.lc.brk { outline: 2px solid var(--danger); }
.lc.nordm { opacity: 0.5; }
.line-text { font-size: 12px; color: var(--text-1); margin-top: 6px; }
.ctl-warn.pad { margin: 6px 18px; }
.inv-details { padding: 4px 18px 12px; } .inv-details summary { cursor: pointer; font-size: 13px; padding: 4px 0; }
.line-allok { color: var(--brand-green); font-size: 13px; margin: 0; } .inv-details .line-row { margin-top: 6px; }

/* Netwerkkaarten & VLANs */
.netifs-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 4px 0 12px; }
.netifs-bar select { margin-left: 6px; }
#netifs-table tr.inactive td { opacity: 0.5; }
.role-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid var(--line, #333); }
.role-pill.licht, .role-pill.artnet { border-color: var(--brand-green); color: var(--brand-green); }
.role-pill.dante { border-color: #5aa9ff; color: #5aa9ff; }
.role-pill.control { border-color: #f0c040; color: #f0c040; }
.net-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 8px; background: rgba(124,254,66,0.12); color: var(--brand-green); margin-left: 4px; white-space: nowrap; }

/* Switches & VLANs */
.sw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.sw-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.sw-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted, #9a9a9a); }
.sw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sw-card { background: var(--card, #161618); border: 1px solid var(--line, #2a2a2e); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.sw-card.active { border-color: var(--brand-green); }
.sw-card .ports { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.sw-card .ports span { width: 14px; height: 14px; border-radius: 3px; background: #2a2a2e; font-size: 8px; text-align: center; line-height: 14px; color: #000; }
.sw-card .ports span.trunk { background: repeating-linear-gradient(45deg, #fff, #fff 2px, #888 2px, #888 4px); }
.sw-warnings div { color: #f0c040; font-size: 13px; margin: 2px 0; }
.sw-changes { margin-top: 16px; border-top: 1px solid var(--line, #2a2a2e); padding-top: 12px; }
.sw-changes label { display: block; margin: 4px 0; }
.sw-changes .blocked { opacity: 0.55; }
.vlan-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
#vlan-table input { width: 100%; min-width: 60px; }
#vlan-table input[type=color] { width: 40px; padding: 0; }
#sw-ports-table select, #sw-ports-table input { width: 100%; }
.mismatch { color: #f0c040; }
#sw-ports { width: 80px; }
#sw-ip { width: 160px; }

/* ---------------------------------------------------------------- navigatie (gegroepeerd) */
.sidebar { gap: 18px; }
nav.tabs { gap: 1px; }
nav.tabs .nav-section {
  font-family: 'Poppins', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-2); padding: 14px 12px 6px; min-height: 4px;
}
nav.tabs .nav-section:empty { padding: 6px 12px; border-top: 1px solid var(--border); margin: 10px 8px 4px; }
nav.tabs button { padding: 8px 12px !important; font-size: 13.5px; gap: 11px; border-radius: 9px; position: relative; }
nav.tabs button .ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
nav.tabs button.active .ico { opacity: 1; }
nav.tabs button.active::before { content: ''; position: absolute; left: -16px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-green); }
nav.tabs button .nav-label { flex: 1; }

/* ---------------------------------------------------------------- nodes */
.node-add { display: flex; gap: 6px; align-items: center; }
.node-add input { width: 140px; }
.node-checks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.node-checks .nc { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-1); background: rgba(240,192,64,0.08); border: 1px solid rgba(240,192,64,0.25); border-radius: 10px; padding: 8px 12px; }
.node-checks .nc::before { content: '!'; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #f0c040; color: #000; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.node-checks .nc.ok { background: rgba(124,254,66,0.07); border-color: rgba(124,254,66,0.25); }
.node-checks .nc.ok::before { content: '✓'; background: var(--brand-green); }

.node-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px 16px; margin-bottom: 18px; }
.node-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.node-head .nh-led { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-green); box-shadow: 0 0 10px rgba(124,254,66,.7); margin-top: 8px; flex: none; }
.node-head .nh-led.bad { background: var(--danger); box-shadow: 0 0 10px rgba(255,92,92,.6); }
.node-head .nh-main { flex: 1; min-width: 240px; }
.node-head h2 { margin: 0; font-size: 19px; }
.node-head .nh-sub { color: var(--text-2); font-size: 12.5px; margin-top: 3px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
.node-head .nh-sub b { color: var(--text-1); font-weight: 600; }
.node-head .nh-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.nh-actions .icon-btn { all: unset; cursor: pointer; font-size: 12px; color: var(--text-1); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.nh-actions .icon-btn:hover { border-color: var(--brand-green); color: var(--brand-green); }

/* Frontpaneel: de node zoals hij in de rack hangt. */
.node-panel { margin-top: 16px; background: linear-gradient(180deg, #232327, #18181b); border: 1px solid #333338; border-radius: 12px; padding: 16px 18px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.node-port { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 9px; border-radius: 10px; border: 1px solid transparent; transition: background .12s, border-color .12s; }
.node-port:hover { background: rgba(255,255,255,0.04); border-color: #3a3a40; }
.node-port.pending { border: 1px dashed var(--brand-green); background: rgba(124,254,66,0.06); }
.node-port .np-num { font-family: 'Poppins', sans-serif; font-size: 11px; color: var(--text-2); letter-spacing: .05em; }
.xlr { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #0e0e10 55%, #2c2c31 57%, #4a4a50 70%, #2a2a2e 72%); position: relative; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.xlr::before, .xlr::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #8a8a90; top: 15px; }
.xlr::before { left: 14px; box-shadow: 13px 0 0 #8a8a90, 6.5px 10px 0 #8a8a90; }
.xlr::after { display: none; }
.xlr .ring { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--ring, #3a3a40); }
.xlr .led { position: absolute; right: -6px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: #333; border: 2px solid #18181b; }
.xlr .led.on { background: var(--brand-green); box-shadow: 0 0 8px var(--brand-green); }
.node-port .np-proto { font-size: 11.5px; font-weight: 600; color: var(--text-0); text-align: center; line-height: 1.25; }
.node-port .np-proto.artnet { color: #5ad1ff; }
.node-port .np-proto.sacn { color: var(--brand-green); }
.node-port .np-proto.none { color: var(--text-2); font-weight: 500; }
.node-port .np-patch { font-size: 10.5px; color: var(--text-2); text-align: center; line-height: 1.25; min-height: 13px; }
.node-port .np-patch.miss { color: #f0c040; }
.node-port .np-tags { display: flex; gap: 4px; min-height: 14px; }
.node-port .np-tags span { font-size: 9px; font-weight: 700; letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; background: #2c2c31; color: var(--text-1); }
.node-port .np-tags span.rdm { background: rgba(240,192,64,.18); color: #f0c040; }

.node-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); margin-top: 10px; }
.node-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.node-pending { margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: rgba(124,254,66,0.07); border: 1px solid rgba(124,254,66,0.3); border-radius: 12px; padding: 10px 14px; }
.node-pending .np-count { flex: 1; font-size: 13px; }
.node-pending .np-count b { color: var(--brand-green); }
.node-foot { margin-top: 10px; font-size: 12px; color: var(--text-2); display: flex; gap: 6px 18px; flex-wrap: wrap; }
.node-error { color: var(--danger); font-size: 13px; }
.node-empty { text-align: center; padding: 60px 20px; color: var(--text-2); border: 1px dashed var(--border); border-radius: 16px; }
.node-empty svg { width: 54px; height: 54px; fill: none; stroke: var(--text-2); stroke-width: 1.4; }
.node-empty h3 { color: var(--text-1); margin: 10px 0 6px; }
.node-empty p { max-width: 460px; margin: 0 auto; font-size: 13px; line-height: 1.5; }
.node-others { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.node-others .no { display: inline-flex; align-items: center; gap: 8px; margin: 4px 10px 4px 0; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; }

/* Poortdialoog */
.port-dialog { background: var(--bg-1); color: var(--text-0); border: 1px solid #333338; border-radius: 18px; padding: 0; width: 420px; max-width: 92vw; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.port-dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.port-dialog form { padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 8px; }
.pd-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.pd-head h2 { margin: 2px 0 0; font-size: 20px; }
.pd-node { font-size: 12px; color: var(--text-2); }
.pd-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); margin-top: 8px; }
.pd-proto { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-proto button { all: unset; cursor: pointer; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--bg-2); }
.pd-proto button b { font-family: 'Poppins', sans-serif; font-size: 15px; }
.pd-proto button small { font-size: 11px; color: var(--text-2); }
.pd-proto button.active[data-proto="artnet"] { border-color: #5ad1ff; background: rgba(90,209,255,.08); color: #5ad1ff; }
.pd-proto button.active[data-proto="sacn"] { border-color: var(--brand-green); background: rgba(124,254,66,.08); color: var(--brand-green); }
.pd-universe { display: flex; gap: 6px; }
.pd-universe input { flex: 1; font-size: 22px; font-family: 'Poppins', sans-serif; text-align: center; padding: 8px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; color: var(--text-0); }
.pd-step { all: unset; cursor: pointer; width: 44px; display: grid; place-items: center; font-size: 22px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.pd-step:hover { border-color: var(--brand-green); color: var(--brand-green); }
.pd-patch { font-size: 13px; color: var(--text-1); min-height: 18px; }
.pd-patch .warn { color: #f0c040; }
.pd-suggest { display: flex; flex-wrap: wrap; gap: 5px; }
.pd-suggest button { all: unset; cursor: pointer; font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-1); }
.pd-suggest button:hover { border-color: var(--brand-green); color: var(--brand-green); }
.pd-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-1); margin-top: 8px; cursor: pointer; }
.pd-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

#confirm-text { white-space: pre-line; max-height: 50vh; overflow-y: auto; }

.tester-quick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 4px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.tester-quick .hint { flex: 1; min-width: 240px; }

/* Telefoon-app */
.phone-page { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .phone-page { grid-template-columns: 1fr; } }
.phone-pair { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.phone-pair .qr { background: #fff; border-radius: 14px; padding: 12px; width: 100%; aspect-ratio: 1; }
.phone-pair .qr svg { width: 100%; height: 100%; }
.phone-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.phone-features .pf { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.phone-features .pf b { font-family: 'Poppins', sans-serif; color: var(--brand-green); }
.phone-features .pf span { font-size: 13px; color: var(--text-1); line-height: 1.45; }
.phone-features .hint { grid-column: 1 / -1; }

.row-btns { display: flex; gap: 8px; }

/* Melding in de 3D-weergave: klein in de hoek, niet over de rig heen. */
.live-empty { inset: auto auto 12px 12px !important; display: inline-flex !important; align-items: center; justify-content: flex-start !important; background: rgba(20,20,22,.85); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px !important; font-size: 12px !important; }
.live-empty[hidden] { display: none !important; }

.rdm-toggle { display: inline-flex; align-items: center; gap: 6px; }
.rdm-legend { display: inline-flex; gap: 3px; margin-left: 2px; }
.rdm-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rdm-legend i.ok { background: #2f8cff; box-shadow: 0 0 6px rgba(47,140,255,.8); }
.rdm-legend i.mm { background: #ffa31a; }
.rdm-legend i.nd { background: #ff5c5c; }

/* ---------------------------------------------------------------- RDM-controle */
.rdm-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1000px) { .rdm-steps { grid-template-columns: 1fr; } }
.rdm-step { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.rdm-step .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13px; background: var(--bg-2); color: var(--text-1); border: 1px solid var(--border); }
.rdm-step.ok .n { background: var(--brand-green); color: #062; border-color: var(--brand-green); }
.rdm-step.bad .n { background: var(--danger); color: #fff; border-color: var(--danger); }
.rdm-step.warn .n { background: #f0c040; color: #000; border-color: #f0c040; }
.rdm-step b { display: block; font-family: 'Poppins', sans-serif; font-size: 14px; }
.rdm-step .big { font-size: 20px; font-family: 'Poppins', sans-serif; font-weight: 600; margin: 2px 0; }
.rdm-step small { color: var(--text-2); font-size: 12px; line-height: 1.4; display: block; }
.rdm-blocker { border: 1px solid var(--danger); background: rgba(255,92,92,.08); border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.rdm-blocker .txt { flex: 1; min-width: 280px; font-size: 13.5px; line-height: 1.5; }
.rdm-blocker .txt b { color: var(--danger); font-size: 14.5px; display: block; margin-bottom: 2px; }
.pad-chips { padding: 0 0 10px; }
details.fold { padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: '›'; font-size: 20px; color: var(--text-2); transition: transform .15s; width: 10px; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary h2 { margin: 0; font-size: 16px; }
details.fold > summary .hint { flex: 1; }
details.fold > :not(summary) { margin: 0 18px 16px; }
.inv-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 10px !important; }
.rdm-settings-row { display: flex; gap: 14px; align-items: center; }
.settings-label { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
.sub-h { font-size: 13px; margin: 16px 0 8px; color: var(--text-1); }
.line-compact { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.line-compact .chain { display: flex; flex-wrap: wrap; gap: 3px; }
.line-none { font-size: 13px; color: var(--text-1); background: var(--bg-2); border-radius: 10px; padding: 10px 14px; }

.rdm-step small b { display: inline; font-size: inherit; font-family: inherit; color: var(--text-0); }

.rdm-proto { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 14px; }
.rdm-proto > div { background: var(--bg-2, #141416); border: 1px solid var(--border, #26262a); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.rdm-proto b { color: var(--text-0); font-size: 14px; }
.rdm-proto small { color: var(--text-2, #9a9aa0); line-height: 1.4; }
.port-chip small { color: #7cc0ff; font-size: 10px; margin-left: 2px; }

/* =====================================================================================
   Patch-pagina en RDM-controle (herontwerp): groepen per universe/type, selectiebalk,
   typegroepen, RDM per DMX-lijn, apparaatvenster.
   ===================================================================================== */
.link-btn.solid { background: var(--brand-green); color: #06210a; border-color: var(--brand-green); }
.link-btn.solid:hover { background: #93ff63; }
.link-btn[disabled] { opacity: 0.4; cursor: default; pointer-events: none; }
.spacer { flex: 1; }
.hint.warn { color: var(--warn); }
.hint.ok { color: var(--brand-green); }
td .sub, .rl-table .sub, .pg-table .sub { display: block; color: var(--text-2); font-size: 11px; margin-top: 2px; }
.row-actions .icon-btn { all: unset; cursor: pointer; font-size: 11.5px; color: var(--text-2); border: 1px solid transparent; border-radius: 6px; padding: 3px 8px; }
tr:hover .row-actions .icon-btn { color: var(--text-1); border-color: var(--border); }
.row-actions .icon-btn:hover { color: var(--brand-green) !important; border-color: var(--brand-green-dim) !important; }
.st-linked { color: #7cc0ff; }

/* ---- Universes in één oogopslag ---- */
.uni-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 16px; }
.uni-tile { all: unset; box-sizing: border-box; cursor: pointer; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; grid-template-columns: 1fr auto; gap: 3px 6px; align-items: baseline; }
.uni-tile:hover { border-color: var(--brand-green-dim); background: var(--bg-2); }
.uni-tile b { font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--text-0); }
.uni-tile .ut-n { font-size: 11px; color: var(--text-2); text-align: right; }
.uni-tile .ut-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--bg-2); overflow: hidden; }
.uni-tile:hover .ut-bar { background: var(--bg-0); }
.uni-tile .ut-bar span { display: block; height: 100%; background: var(--brand-green); }
.uni-tile .ut-used { grid-column: 1 / -1; font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.uni-tile.empty b { color: var(--text-2); }
.uni-tile.bad { border-color: rgba(255, 92, 92, 0.6); }
.uni-tile.bad .ut-bar span { background: var(--danger); }
.uni-tile.full .ut-bar span { background: var(--warn); }

/* ---- Typen: automatische groepen (merk + model) ---- */
.type-strip { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.ts-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ts-head h2 { font-size: 14px; margin: 0; }
.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.type-tile { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.type-tile.selected { border-color: var(--brand-green); background: rgba(124, 254, 66, 0.06); }
.tt-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tt-head b { font-size: 13.5px; color: var(--text-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-count { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--brand-green); font-size: 14px; }
.tt-man { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-modes { display: flex; flex-wrap: wrap; gap: 4px; }
.pill.mixed { border-color: rgba(255, 179, 71, 0.6); color: var(--warn); }
.tt-actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.ts-more { margin-top: 10px; display: inline-block; }

/* ---- Fixturelijst in groepen ---- */
.patch-card { overflow: visible; }
.patch-toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.patch-toolbar input.search { flex: 1; min-width: 240px; margin: 0; }
.chk-all { display: inline-flex; padding: 0 2px; }
.chk-all input { accent-color: var(--brand-green); cursor: pointer; }
.segmented button span:not(:empty) { margin-left: 4px; font-size: 10.5px; padding: 1px 6px; border-radius: 8px; background: var(--bg-2); color: var(--text-1); }
.sel-bar { position: sticky; top: -32px; z-index: 4; display: flex; gap: 8px; align-items: center; padding: 10px 16px; background: #14210f; border-bottom: 1px solid var(--brand-green-dim); flex-wrap: wrap; }
.sel-bar b { color: var(--brand-green); font-size: 13px; margin-right: 6px; }
.pg { border-bottom: 1px solid var(--border); }
.pg:last-child { border-bottom: none; }
.pg:last-child .pg-head { border-radius: 0 0 12px 12px; }
.pg:last-child:not(.collapsed) .pg-head { border-radius: 0; }
.pg-head { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; background: var(--bg-2); font-size: 12.5px; color: var(--text-1); flex-wrap: wrap; user-select: none; }
.pg-head:hover { background: #222226; }
.pg-caret { color: var(--text-2); font-size: 11px; width: 10px; display: inline-block; transition: transform 0.12s; }
.pg.collapsed .pg-caret, .rl.collapsed .pg-caret { transform: rotate(-90deg); }
.pg-check { accent-color: var(--brand-green); cursor: pointer; width: 14px; display: inline-block; }
.pg-title { font-family: 'Poppins', sans-serif; font-size: 13.5px; color: var(--text-0); }
.pg-meta { color: var(--text-2); font-size: 12px; }
.pg-table td, .pg-table th { padding: 7px 16px; }
.pg-table th { font-size: 10.5px; padding-top: 8px; padding-bottom: 6px; }
.pg-table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.pg-table tr.selected:hover td { background: rgba(124, 254, 66, 0.09); }
.pg-table .fx-num, .rl-table .fx-num { font-size: 13px; font-weight: 600; }
.pg-table td.fx-num { width: 76px; }
.pg-table td.chk { width: 30px; }
.pg-table td.row-actions { width: 90px; }
.pg-empty { margin: 0; padding: 10px 16px 12px 44px; color: var(--text-2); font-size: 12.5px; }

/* ---- Meerdere fixtures bewerken ---- */
.bulk-types { display: grid; gap: 10px; margin-bottom: 14px; }
.bulk-type { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.bt-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bt-name b { font-size: 13.5px; }
.bt-name .muted, .bt-name .hint { font-size: 11.5px; }
.bt-mode label { margin-bottom: 4px; }
.bt-mode select { margin-bottom: 0; }
.dialog-actions .spacer { flex: 1; }

/* ---- RDM-controle ---- */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.subtabs button { all: unset; cursor: pointer; padding: 8px 14px; font-size: 13px; color: var(--text-1); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs button:hover { color: var(--text-0); }
.subtabs button.active { color: var(--brand-green); border-bottom-color: var(--brand-green); font-weight: 600; }
.subtabs small { color: var(--text-2); font-weight: 400; }
.rdm-step { padding: 10px 14px; border-radius: 12px; }
.rdm-step .big { font-size: 16px; margin: 0; }
.rdm-step b { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); font-family: inherit; font-weight: 600; }
.rdm-step small b { text-transform: none; letter-spacing: 0; font-size: inherit; }
.rdm-progress { background: var(--bg-1); border: 1px solid var(--brand-green-dim); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.rdm-progress .bar { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.rdm-progress .bar span { display: block; height: 100%; width: 0; background: var(--brand-green); transition: width 0.25s; }
.rdm-progress.busy .bar span { animation: rdm-busy 1.1s ease-in-out infinite; }
@keyframes rdm-busy { 0% { opacity: 0.25; } 50% { opacity: 0.9; } 100% { opacity: 0.25; } }
.rdm-progress .txt { font-size: 12.5px; color: var(--text-1); margin-top: 8px; }

.rdm-advice { display: grid; gap: 10px; margin-bottom: 16px; }
.rdm-advice:empty { display: none; }
.adv { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border: 1px solid var(--border); border-left: 4px solid var(--warn); border-radius: 12px; background: var(--bg-1); padding: 12px 16px; }
.adv.info { border-left-color: var(--info); }
.adv-txt { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-1); line-height: 1.5; }
.adv-txt b { font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--text-0); }
.adv-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.rdm-card { overflow: visible; }
.rdm-toolbar { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.rdm-toolbar .summary-chips { margin: 0; }
.rl { border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
.rl:last-child { border-bottom: none; }
.rl.todo { border-left-color: var(--warn); }
.rl.ok { border-left-color: var(--brand-green); }
.rl-head { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; background: var(--bg-2); font-size: 12.5px; color: var(--text-1); flex-wrap: wrap; user-select: none; }
.rl-head:hover { background: #222226; }
.rl-title { font-family: 'Poppins', sans-serif; font-size: 13.5px; color: var(--text-0); min-width: 96px; }
.rl-v { color: var(--text-1); }
.rl-v.ok { color: var(--brand-green); }
.rl-v b.warn { color: var(--warn); } .rl-v b.info { color: var(--info); } .rl-v b.bad { color: var(--danger); }
.rl.silent .rl-title, .rl.silent .rl-v { color: var(--text-2); }
.rl-ports { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lp { font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-1); white-space: nowrap; }
.lp small { color: var(--text-2); margin-left: 4px; }
.lp.on { border-color: rgba(124, 254, 66, 0.4); } .lp.on small { color: var(--brand-green); }
.lp.off { border-color: rgba(255, 179, 71, 0.5); } .lp.off small { color: var(--warn); }
.rl-note { padding: 8px 16px 8px 36px; font-size: 12.5px; color: var(--text-1); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rl-note.warn { color: var(--warn); }
.rl-chain { padding: 6px 16px 8px 36px; display: flex; gap: 3px; flex-wrap: wrap; align-items: center; font-size: 11.5px; }
.rl-chain .muted { margin-right: 4px; }
.rl-diag { margin-left: 8px; color: var(--warn); font-size: 12px; }
.rl-table td, .rl-table th { padding: 8px 16px; vertical-align: top; }
.rl-table th { font-size: 10.5px; padding-top: 8px; padding-bottom: 6px; }
.rl-table tr.rs-noDevice td { opacity: 0.6; }
.rl-table .diff { color: var(--warn); font-weight: 600; }
.rl-table .uid { opacity: 0.8; }
.rl-table .issues { margin: 0; padding-left: 16px; font-size: 12px; color: var(--text-1); line-height: 1.5; max-width: 380px; }
.rl-table .issues li::marker { color: var(--text-2); }
.rl-table .actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; white-space: nowrap; }
.rl-rest { padding: 10px 16px 14px; display: grid; gap: 6px; }
.rr { display: flex; gap: 12px; align-items: center; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.rr b { color: var(--text-1); min-width: 150px; font-weight: 600; }
.rr.warn span { color: var(--warn); }
.rr.ok span { color: var(--brand-green); }
#rdm-show-all { justify-self: start; margin-top: 4px; }
.empty-state b { color: var(--text-0); }
.port-chip.off { border-color: rgba(255, 179, 71, 0.5); }
.port-chip.off small { color: var(--warn); }
#rdm-nodes-table td { vertical-align: top; }

/* ---- Eén RDM-apparaat ---- */
#rdmdev-dialog h3 .muted { font-weight: 400; font-size: 13px; margin-left: 6px; }
.rd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 4px 0 16px; }
.rd-facts > div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; }
.rd-facts span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.rd-facts b { font-size: 12.5px; color: var(--text-0); font-weight: 600; }
.rd-patch { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--text-1); }
.rd-patch .settings-label { display: block; margin-bottom: 2px; }
.rd-patch b { color: var(--text-0); }

/* ---- afwerking herontwerp ---- */
.page-header { gap: 16px; flex-wrap: wrap; }
.header-actions { flex-wrap: wrap; }
.header-actions .link-btn { white-space: nowrap; }
.pg-head .usage-bar, .rl-head .usage-bar { background: var(--bg-0); width: 80px; }
.pg-caret { font-size: 0; width: 0; height: 0; border-left: 4.5px solid transparent; border-right: 4.5px solid transparent; border-top: 6px solid var(--text-2); flex: none; }
.pg-head:hover .pg-caret, .rl-head:hover .pg-caret { border-top-color: var(--text-0); }
.page-header > div:first-child { flex: 1; min-width: 280px; }
.bt-name .hint, .bt-name .muted, .bt-mode .hint { margin: 0; display: block; }
.dialog-body .bulk-type select { margin-bottom: 0; }

/* ---- RDM-tabel: kolommen ---- */
.nowrap { white-space: nowrap; }
.rl-table { table-layout: fixed; }
.rl-table th:nth-child(1) { width: 140px; }
.rl-table th:nth-child(2) { width: 20%; }
.rl-table th:nth-child(3) { width: 17%; }
.rl-table th:nth-child(4) { width: 20%; }
.rl-table td { overflow: hidden; text-overflow: ellipsis; }
.rl-table tr.rs-noDevice td { padding-top: 5px; padding-bottom: 5px; }
.rl-table tr.rs-noDevice .sub { display: inline; margin-left: 8px; }
.rl-table tr.has-note td { border-bottom: none; padding-bottom: 3px; }
.rl-table tr.rl-noterow td { padding-top: 0; padding-bottom: 9px; font-size: 12px; line-height: 1.45; color: var(--text-1); white-space: normal; }
.rl-table tr.rl-noterow.rs-mismatch td, .rl-table tr.rl-noterow.rs-unpatched td { color: var(--warn); }
.rl-table tr.rl-noterow.rs-missing td { color: var(--danger); }
.rl-table tbody tr:not(.rl-noterow):not(.rs-noDevice):hover td, .rl-table tbody tr:not(.rl-noterow):not(.rs-noDevice):hover + tr.rl-noterow td { background: rgba(255, 255, 255, 0.02); }

/* ---- RDM-tabel: afwerking ---- */
.rl-table th:nth-child(1) { width: 158px; }
.rl-table th:nth-child(2) { width: 18%; }
.rl-table th:nth-child(3) { width: 16%; }
.rl-table th:nth-child(4) { width: 19%; }
.rl-table tr.rs-noDevice td { white-space: nowrap; }
.rl-table td.rig-cell { cursor: pointer; }
.rl-table td.rig-cell:hover .uid { color: var(--brand-green); opacity: 1; }
.rl-table .link-btn { padding: 3px 9px; }

/* ---- selectiebalk: zwevend ---- */
.sel-bar { position: fixed; top: auto; bottom: 18px; left: 280px; right: auto; max-width: calc(100vw - 320px); z-index: 20; border: 1px solid var(--brand-green-dim); border-radius: 12px; padding: 10px 14px; background: #14210f; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); }
.sel-bar .spacer { flex: none; width: 8px; }
#tab-patch { padding-bottom: 64px; }
body.has-selection .toast { bottom: 84px; }

/* ---- Telefoon-app: netwerken ---- */
.phone-page { grid-template-columns: minmax(320px, 420px) 1fr; }
.phone-pair .qr { max-width: 300px; align-self: center; }
.pp-url { font-size: 11.5px; color: var(--text-1); word-break: break-all; text-align: center; user-select: all; }
.pp-nets { display: grid; gap: 6px; }
.pp-nets .settings-label { margin-bottom: 2px; }
.pp-net { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); cursor: pointer; }
.pp-net:hover { border-color: var(--brand-green-dim); }
.pp-net:has(input:checked) { border-color: var(--brand-green); background: rgba(124, 254, 66, 0.07); }
.pp-net input { accent-color: var(--brand-green); margin: 0; }
.pp-net span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pp-net b { font-size: 13px; color: var(--text-0); }
.pp-net small { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-net.bonjour b::after { content: "aanbevolen"; margin-left: 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-green); }
.pp-more summary { cursor: pointer; font-size: 12px; color: var(--text-2); padding: 4px 2px; }
.pp-more[open] summary { margin-bottom: 6px; }
.pp-more .pp-net { margin-bottom: 6px; }
.pp-tips { margin: 0; padding-left: 18px; font-size: 12px; color: var(--text-2); line-height: 1.55; }
.pp-status { font-size: 12.5px; color: var(--text-1); }
.pp-status.on { color: var(--brand-green); }
.phone-pair .qr { width: 230px; height: 230px; max-width: none; aspect-ratio: auto; align-self: center; box-sizing: border-box; }

/* ---- RDM: discovery per lijn, identify per rij ---- */
.rl-head .rl-scan { padding: 3px 9px; font-size: 11.5px; }
.rl.silent .rl-head .rl-scan { opacity: 0.85; }
#rdm-ident-off { white-space: nowrap; }

/* ---- RDM: identify-kolom ---- */
.rl-table td, .rl-table th { padding-left: 10px; padding-right: 10px; }
.rl-table td:first-child, .rl-table th:first-child { padding-left: 16px; }
.rl-table td:last-child, .rl-table th:last-child { padding-right: 16px; }
.rl-table th:nth-child(1) { width: 148px; }
.rl-table th:nth-child(6) { width: 92px; }
.rl-table .ident-cell { text-align: right; overflow: visible; }
.rl-table td.ident-cell .link-btn { min-width: 52px; text-align: center; }
/* Smalle vensters: meer ruimte voor de knoppen; een knop die dan nog niet past breekt zijn tekst af i.p.v. weg te vallen. */
@media (max-width: 1500px) {
  .rl-table th:nth-child(1) { width: 138px; }
  .rl-table th:nth-child(2) { width: 15%; }
  .rl-table th:nth-child(3) { width: 15%; }
  .rl-table th:nth-child(4) { width: 18%; }
}
.rl-table .actions .link-btn { white-space: normal; text-align: center; }

/* ---- RDM: live gegevens ---- */
.subtabs small.live-on { color: var(--brand-green); font-weight: 600; }
.live-rdm-status { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; background: rgba(124, 254, 66, 0.07); border: 1px solid var(--brand-green-dim); font-size: 13px; color: var(--text-1); }
.live-rdm-status b { color: var(--brand-green); }
.live-rdm-status.paused { background: rgba(255, 179, 71, 0.07); border-color: #8a6a2f; }
.live-rdm-status.paused b { color: #ffb347; }
.lv-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-green); animation: lv-pulse 1.2s ease-in-out infinite; }
@keyframes lv-pulse { 50% { opacity: 0.25; } }
.lv-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.lv-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.lv-table th small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.lv-table th:nth-child(1) { width: 104px; }
.lv-table th:nth-child(2) { width: 15%; }
.lv-table th:nth-child(3) { width: 15%; }
.lv-table th:nth-child(5) { width: 16%; }
.lv-table th:nth-child(6) { width: 96px; }
.lv-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 13px; }
.lv-table td .sub { display: block; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-table .diff { color: #ffb347; }
.lv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: var(--text-2); }
.lv-ok .lv-dot { background: var(--brand-green); box-shadow: 0 0 6px rgba(124, 254, 66, 0.6); }
.lv-warn .lv-dot { background: #ffb347; }
.lv-bad .lv-dot { background: var(--danger); }
.lv-state { font-size: 12px; font-weight: 600; }
.lv-ok .lv-state { color: var(--brand-green); }
.lv-warn .lv-state { color: #ffb347; }
.lv-bad .lv-state { color: var(--danger); }
.lv-wait .lv-state { color: var(--text-2); }
.lv-sensors { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-sensor { display: inline-flex; flex-direction: column; min-width: 62px; padding: 4px 8px; white-space: nowrap; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-1); line-height: 1.25; }
.lv-sensor small { font-size: 10px; color: var(--text-2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-sensor b { font-size: 15px; color: var(--text-0); font-variant-numeric: tabular-nums; display: inline; }
.lv-sensor.warn { border-color: #ffb347; }
.lv-sensor.warn b { color: #ffb347; }
.lv-counters { font-size: 12px; color: var(--text-1); line-height: 1.5; }
.lv-age { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.lv-table tr:has(+ .lv-noterow) td { border-bottom: none; padding-bottom: 2px; }
.lv-noterow td { padding-top: 0; font-size: 12px; color: #ffb347; }
.lv-noterow.lv-bad td { color: var(--danger); }
.lv-msg.error { color: var(--danger); }
.lv-msg.warning { color: #ffb347; }
.lv-msg.advisory { color: var(--text-1); }
.stat-pill.ok b, .stat-pill.ok { color: var(--brand-green); }
.stat-pill.warn { color: #ffb347; }

/* ---- Live view: standen, hint en tooltip ---- */
.live-nav { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.live-nav .segmented { pointer-events: auto; background: rgba(20, 20, 22, 0.9); flex: none; }
.live-nav .segmented button { padding: 5px 12px; font-size: 12.5px; }
.live-nav-hint { font-size: 11px; line-height: 1.7; color: var(--text-1); background: rgba(20, 20, 22, 0.78); border: 1px solid var(--border); border-radius: 10px; padding: 3px 10px; max-width: 100%; }
.live-nav-hint kbd { font: inherit; font-weight: 600; color: var(--text-0); background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; margin: 0 1px; }
.live-canvas.walking canvas { cursor: grab; }
.live-canvas.panning canvas { cursor: move; }
.live-tip { position: absolute; z-index: 4; pointer-events: none; max-width: 300px; background: rgba(20, 20, 22, 0.95); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; font-size: 12px; color: var(--text-1); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.live-tip b { color: var(--text-0); font-size: 13px; }
.live-tip .num { color: var(--brand-green); font-weight: 700; margin-right: 6px; font-size: 13px; }
.live-tip .row { display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-tip .ok { color: #7cc0ff; }
.live-tip .warn, .lv-amber { color: #ffb347 !important; }
.live-tip .bad, .lv-red { color: var(--danger) !important; }
.kv b .lv-dot { margin-right: 6px; }

/* ---- Versie & updates ---- */
.update-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.update-status { padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-1); line-height: 1.5; }
.update-status b { color: var(--text-0); }
.update-status.ready { border-color: var(--brand-green-dim); background: rgba(124, 254, 66, 0.07); }
.update-status.ready b { color: var(--brand-green); }
.update-status.failed { border-color: var(--danger); }
.update-status .warn { color: #ffb347; }
.update-peers-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); font-weight: 600; margin-bottom: 4px; }
.update-peer { display: grid; grid-template-columns: minmax(140px, 1fr) 130px 110px 280px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-1); }
.update-peer .badge { justify-self: start; }
.update-body .hint-text { font-size: 12.5px; line-height: 1.55; margin: 0; }
.update-peer b { color: var(--text-0); }
.update-peer .badge.info { color: #7cc0ff; }
.update-more summary { cursor: pointer; font-size: 13px; color: var(--text-1); }
.update-more .inline { display: flex; gap: 8px; }
.update-more input { flex: 1; }
.share-credit { display: block; padding: 0 18px 14px; }

/* ---------------------------------------------------------------- stroom- en datalijnen */
.ph { display: inline-grid; place-items: center; min-width: 22px; height: 16px; padding: 0 4px; border-radius: 4px; font: 700 10px/1 'SFMono-Regular', Consolas, monospace; font-style: normal; color: #0b0b0c; background: #6f7377; flex: none; }
.ph1 { background: #e2a05c; }
.ph2 { background: #6cb6ff; }
.ph3 { background: #c9a3ff; }
.ph0 { background: var(--bg-2); color: var(--text-2); border: 1px dashed var(--border); }
.ln-chip { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; max-width: 200px; padding: 2px 8px 2px 6px; border-radius: 6px; border: 1px solid var(--border); border-left: 3px solid var(--lc, var(--border)); background: var(--bg-2); font-size: 12px; color: var(--text-0); vertical-align: middle; }
.ln-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-chip:hover { border-color: var(--brand-green-dim); border-left-color: var(--lc, var(--brand-green-dim)); }
.ln-chip.warn { background: rgba(255, 179, 71, 0.1); }
.ln-chip.bad { background: rgba(255, 92, 92, 0.14); border-color: rgba(255, 92, 92, 0.5); border-left-color: var(--danger); }
.ln-chip.dt.amb { border-style: dashed; border-left-style: solid; color: var(--warn); }
.ln-chip.dt.src-universe { color: var(--text-2); }
.ln-chip.dt.src-rdm::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-green); flex: none; }
.ln-none { font-size: 11.5px; color: var(--text-2); display: inline-flex; gap: 5px; align-items: center; }
.ln-cell { display: flex; flex-wrap: wrap; gap: 4px; }
td.ln { white-space: nowrap; }
.line-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: rgba(124, 254, 66, 0.12); border: 1px solid var(--brand-green-dim); font-size: 12px; color: var(--text-0); white-space: nowrap; }
.line-pill button { all: unset; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: var(--text-1); }
.line-pill button:hover { background: var(--bg-2); color: var(--text-0); }
.inline-select { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin: 0; white-space: nowrap; }
.inline-select select { margin: 0; padding: 5px 8px; font-size: 12.5px; width: auto; }
.load { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; }
.load-bar { position: relative; width: 84px; height: 6px; border-radius: 3px; background: var(--bg-0); overflow: hidden; outline: 1px solid var(--border); }
.load-bar span { display: block; height: 100%; background: var(--brand-green); }
.load-bar i { position: absolute; left: 80%; top: 0; bottom: 0; width: 1px; background: var(--text-2); opacity: 0.7; }
.load.warn .load-bar span { background: var(--warn); }
.load.over .load-bar span { background: var(--danger); }
.load b { color: var(--text-0); font-variant-numeric: tabular-nums; }
.load.over b { color: var(--danger); }
.load small { color: var(--text-2); }
.fx-chips { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; margin-left: 6px; align-items: center; }
.fxc { font: 11px/1.5 'SFMono-Regular', Consolas, monospace; padding: 0 5px; border-radius: 4px; background: var(--bg-2); color: var(--text-1); }
.fxc.more { color: var(--text-2); background: none; }
.fx-chips .arr { color: var(--text-2); font-style: normal; font-size: 10px; }
.lc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
.src-tag { font-size: 11px; padding: 1px 7px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-1); white-space: nowrap; }
.src-tag.src-rdm { color: var(--brand-green); border-color: rgba(124, 254, 66, 0.4); }
.src-tag.src-universe { color: var(--warn); border-color: rgba(255, 179, 71, 0.4); }
.warn-text { color: var(--warn); }
.ok-text { color: var(--brand-green); }
.badge.warn { background: rgba(255, 179, 71, 0.14); color: var(--warn); }
.lines-table td { vertical-align: middle; }
.lines-table tr.st-over td:first-child b { color: var(--danger); }
.lines-table tr.ln-src-row td { background: var(--bg-2); padding-top: 6px; padding-bottom: 6px; font-size: 12.5px; white-space: nowrap; }
.lines-table tr.ln-src-row td > * { margin-right: 14px; }
.src-ph { display: inline-flex; gap: 6px; align-items: center; color: var(--text-0); font-variant-numeric: tabular-nums; }
.lines-table tr.noline-row td { background: rgba(255, 179, 71, 0.06); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions .icon-btn[disabled] { opacity: 0.35; pointer-events: none; }

/* Stroom & data: overzicht */
.pw-stats { grid-template-columns: repeat(4, 1fr); margin: 0 0 10px; }
.pw-phases { margin: 0 0 10px; padding: 12px 16px; display: flex; gap: 0; overflow-x: auto; }
.ph-block { flex: 1 1 250px; min-width: 230px; padding: 0 20px; border-left: 1px solid var(--border); }
.ph-block:first-child { padding-left: 0; border-left: none; }
.ph-block:last-child { padding-right: 0; }
.ph-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ph-title b { font-family: 'Poppins', sans-serif; font-size: 13.5px; color: var(--text-0); overflow: hidden; text-overflow: ellipsis; }
.ph-row { display: grid; grid-template-columns: 26px 1fr 62px 58px; gap: 8px; align-items: center; font-size: 12.5px; margin: 4px 0; }
.ph-row b { text-align: right; color: var(--text-0); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-row small { color: var(--text-2); text-align: right; white-space: nowrap; }
.ph-bar { height: 10px; border-radius: 5px; background: var(--bg-0); border: 1px solid var(--border); overflow: hidden; }
.ph-bar span { display: block; height: 100%; }
.pb1 { background: #e2a05c; }
.pb2 { background: #6cb6ff; }
.pb3 { background: #c9a3ff; }
.stat.click { cursor: pointer; }
.stat.click:hover { border-color: var(--text-2); }
.pw-warnings { margin: 0 0 10px; padding: 0 0 0 18px; font-size: 12.5px; color: var(--warn); line-height: 1.45; overflow: auto; max-height: 58px; }
.pw-warnings li.ok { color: var(--brand-green); list-style: none; margin-left: -18px; }
#pw-types tr.need td:first-child b { color: var(--warn); }
#pw-groups td { white-space: nowrap; }
.card-header { gap: 0; }
.card-header h2 { white-space: nowrap; flex: none; }
.card-header .spacer { flex: 1; }
.card-header .hint { margin-left: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-header .link-btn { margin-left: 8px; flex: none; white-space: nowrap; }
/* Tabellen met lijnen: vaste kolommen, fixtures krijgen de rest */
.lines-table { table-layout: fixed; }
.lines-table th.c-line { width: 132px; } .lines-table th.c-ph { width: 50px; } .lines-table th.c-load { width: 268px; }
.lines-table th.c-loc { width: 150px; } .lines-table th.c-act { width: 164px; } .lines-table th.c-act1 { width: 84px; }
.lines-table th.c-data { width: 270px; } .lines-table th.c-uni { width: 56px; } .lines-table th.c-src { width: 122px; } .lines-table th.c-ch { width: 152px; }
.lines-table td { overflow: hidden; text-overflow: ellipsis; }
.lines-table td.c-loc { white-space: nowrap; }
.lines-table th, .lines-table td { padding-left: 10px; padding-right: 10px; }
.lines-table th:first-child, .lines-table td:first-child { padding-left: 14px; }
.lines-table .kw { margin-left: 10px; white-space: nowrap; }
.fx-range { font: 11.5px/1.4 'SFMono-Regular', Consolas, monospace; color: var(--text-1); margin-left: 6px; }
#pw-groups td.c-truss { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }

/* Dialoog: lijn kiezen */
.ld-list { display: grid; gap: 4px; max-height: 300px; overflow: auto; margin-top: 8px; }
.ld-item { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; }
.ld-item:hover { background: var(--bg-2); }
.ld-item.active { border-color: var(--brand-green); background: rgba(124, 254, 66, 0.08); }
.ld-item .spacer { flex: 1; }
.ld-new { padding: 8px 10px; border: 1px dashed var(--brand-green-dim); border-radius: 8px; font-size: 12.5px; color: var(--text-1); }
.ld-item > .muted { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-item small, .ld-item b { white-space: nowrap; }
.ld-item .spacer { display: none; }

/* ---------------------------------------------------------------- indeling: alles past in het venster */
html, body { height: 100%; overflow: hidden; }
.app-shell { height: 100vh; min-height: 0; grid-template-columns: 224px minmax(0, 1fr); }
main { height: 100vh; overflow-y: auto; padding: 0 22px; min-width: 0; }
.tab-panel { padding-bottom: 16px; }
.page-header { position: sticky; top: 0; z-index: 30; background: var(--bg-0); padding: 13px 0 9px; margin-bottom: 8px; align-items: center; }
.page-header h1 { font-size: 20px; line-height: 1.2; }
.page-header p { margin-top: 2px; font-size: 12.5px; }
.card { margin-bottom: 14px; }
.card-header { padding: 10px 14px; }
th, td { padding: 7px 14px; }
.subtabs { margin-bottom: 12px; }
.subtabs button { padding: 7px 13px; }
.show-banner { position: sticky; top: 0; z-index: 31; margin: 0; padding: 6px 14px; height: 32px; box-sizing: border-box; border-radius: 0 0 8px 8px; background: #2a1414; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.show-locked .page-header { top: 32px; }
body.show-locked .tab-panel.fit { height: calc(100vh - 32px); }

/* Pagina die precies in het venster past: alleen de inhoud van kaarten scrolt. */
.tab-panel.fit { height: 100vh; min-height: 520px; display: flex; flex-direction: column; padding-bottom: 14px; }
.tab-panel.fit > * { flex: none; }
.tab-panel.fit > .fill { flex: 1 1 0; min-height: 0; }
.fill { display: flex; flex-direction: column; min-height: 0; }
.fill > * { flex: none; }
.fill > .fill-card, .fill > .fill, .fill > .scroll { flex: 1 1 0; min-height: 0; }
.fill-card { display: flex; flex-direction: column; margin-bottom: 0; overflow: hidden; }
.fill-card > * { flex: none; }
.fill-card > .scroll { flex: 1 1 0; min-height: 0; overflow: auto; }
.scroll > table > thead th { position: sticky; top: 0; background: var(--bg-1); z-index: 2; }

/* Zijbalk: navigatie, standen en project passen zonder scrollen */
.sidebar { padding: 14px 12px 12px; gap: 8px; }
.brand { padding: 0 4px 2px; }
nav.tabs .nav-section { padding: 9px 12px 4px; }
nav.tabs .nav-section:empty { margin: 6px 8px 2px; padding: 3px 12px; }
nav.tabs button { padding: 6px 12px !important; }
nav.tabs button.active::before { left: -12px; top: 6px; bottom: 6px; }
.side-foot { margin-top: auto; display: grid; gap: 7px; padding-top: 6px; }
.show-lock { margin: 0; padding: 6px; }
.side-stats { position: relative; margin: 0; padding: 6px 10px; cursor: pointer; }
.side-stats:hover { border-color: var(--text-2); }
.side-stats-row { flex-wrap: wrap; font-size: 12.5px; gap: 4px; }
.side-stats-row small { margin-right: 5px; }
.side-stats-row span:first-child { color: var(--brand-green); }
.side-stats-unis { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); margin: 0; padding: 8px; max-height: 320px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); z-index: 40; }
.project-panel { position: relative; margin: 0; border: none; padding: 0; display: block; }
.project-btn { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-1); }
.project-btn:hover, .project-btn.open { border-color: var(--text-2); background: var(--bg-2); }
.project-btn .save-status { padding: 0; }
.pm-text { flex: 1; min-width: 0; display: grid; }
.pm-text b { font: 600 12.5px/1.3 'Poppins', sans-serif; color: var(--text-0); padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-text small { font-size: 10.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-caret { position: relative; color: var(--text-2); font-size: 17px; line-height: 1; }
.pm-caret i { position: absolute; top: -2px; right: -5px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-green); }
.project-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 5px; display: grid; gap: 1px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); z-index: 40; }
.project-menu button { all: unset; cursor: pointer; padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--text-1); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.project-menu button:hover { background: var(--bg-2); color: var(--text-0); }
.project-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 6px; width: auto; }

/* Patch: de lijst vult het venster; universes en typen elk op één regel */
#tab-patch .uni-strip { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; padding-bottom: 2px; }
#tab-patch .uni-tile { flex: 0 0 82px; padding: 5px 8px; gap: 2px 6px; border-radius: 8px; }
#tab-patch .uni-tile b { font-size: 13px; }
#tab-patch .uni-tile .ut-used { display: none; }
.type-strip { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 6px 10px; margin-bottom: 8px; border-radius: 10px; }
.type-strip.open { display: block; padding: 10px 12px; max-height: 38vh; overflow: auto; }
.ts-label { font: 600 10.5px 'Poppins', sans-serif; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-2); margin-right: 4px; flex: none; }
.type-chip { all: unset; cursor: pointer; white-space: nowrap; flex: none; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--text-1); background: var(--bg-2); }
.type-chip b { color: var(--brand-green); font-weight: 600; margin-left: 3px; }
.type-chip:hover { border-color: var(--brand-green-dim); color: var(--text-0); }
.type-chip.selected { border-color: var(--brand-green); background: rgba(124, 254, 66, 0.1); color: var(--text-0); }
.type-strip .spacer { flex: 1; }
.type-strip .ts-more { margin: 0; flex: none; }
.type-strip.open .ts-head { margin-bottom: 8px; }
#tab-patch .conflict-card { max-height: 118px; overflow: auto; margin-bottom: 8px; }
.patch-card { overflow: hidden; }
.patch-toolbar { padding: 8px 12px; gap: 8px; }
.patch-toolbar input.search { min-width: 170px; }
.sel-bar { position: static; padding: 7px 12px; }
#patch-groups .pg-head { position: sticky; top: 0; z-index: 3; padding: 6px 14px; }
.pg-table td, .pg-table th { padding: 5px 14px; }

/* Dunne, donkere schuifbalken (ook waar het systeem ze altijd toont) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #34343a; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #4a4a52; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }
#tab-patch .uni-strip::-webkit-scrollbar, .type-strip::-webkit-scrollbar { height: 6px; }
.side-stats-row { flex-wrap: nowrap; white-space: nowrap; }
nav.tabs button { padding: 5px 12px !important; }
nav.tabs .nav-section { padding: 8px 12px 3px; }
.pg-table .fx-type .sub { display: inline; margin: 0 0 0 7px; }
.pg-table td { white-space: nowrap; }
.pg-table td.fx-type { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.sidebar { overflow-x: hidden; }
#patch-line-pill:empty { display: none; }
.patch-toolbar input.search { min-width: 120px; }
.pg-table td, .pg-table th { padding-left: 8px; padding-right: 8px; }
.pg-table td:first-child, .pg-table th:first-child { padding-left: 14px; }
.pg-table td:last-child, .pg-table th:last-child { padding-right: 12px; }
.pg-table td.row-actions { width: 70px; }
.pg-table td.fx-type { max-width: 260px; }
.sel-bar { flex-wrap: nowrap; overflow: hidden; }
.sel-bar .link-btn { white-space: nowrap; flex: none; }
.sel-bar b { white-space: nowrap; }

/* ---------------------------------------------------------------- live view: indeling, decor, standpunten, inkleuren */
.tab-panel.fit > .grow { flex: 1 1 0; min-height: 0; }
#tab-live .live-toolbar { gap: 8px 10px; margin-bottom: 8px; }
#tab-live .live-toolbar .spacer { flex: 1; }
#tab-live .live-toolbar .check { margin: 0; white-space: nowrap; }
#tab-live .live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr); gap: 12px; margin: 0; align-items: stretch; }
#tab-live .live-canvas { height: auto; min-height: 0; }
#tab-live .live-side { max-height: none; min-height: 0; overflow: auto; align-content: start; gap: 10px; }
#live-output-slot:empty { display: none; }
#live-monitor-card { margin: 10px 0 0; max-height: 36vh; overflow: auto; }
#live-monitor-card .card-header label { margin: 0 0 0 14px; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); }
#live-monitor-card .card-header select { margin: 0; width: auto; padding: 4px 8px; }
#live-monitor-btn.on { border-color: var(--brand-green-dim); color: var(--brand-green); }
.live-nav { right: auto; max-width: calc(100% - 20px); }
.live-nav-hint { opacity: 0; transition: opacity 0.25s; }
.live-nav-hint.show, .live-nav:hover .live-nav-hint { opacity: 1; }
.live-nav .segmented { pointer-events: auto; }
.live-views { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; max-width: 52%; }
.lv-view { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: rgba(20, 20, 22, 0.9); }
.lv-view button, .lv-add { all: unset; cursor: pointer; font-size: 12px; color: var(--text-1); padding: 4px 9px; white-space: nowrap; }
.lv-view button:hover, .lv-add:hover { color: var(--brand-green); }
.lv-view button.x { padding: 4px 7px; color: var(--text-2); border-left: 1px solid var(--border); display: none; }
.lv-view:hover button.x { display: block; }
.lv-view button.x:hover { color: var(--danger); }
.lv-view kbd { font: 600 10px/1 'SFMono-Regular', Consolas, monospace; color: var(--text-2); border: 1px solid var(--border); border-radius: 3px; padding: 1px 3px; margin-right: 5px; }
.lv-add { border: 1px dashed var(--border); border-radius: 8px; background: rgba(20, 20, 22, 0.9); }
.live-legend { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 236px; max-height: min(48%, 330px); overflow: auto; background: rgba(20, 20, 22, 0.93); border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: grid; gap: 1px; }
.lg-title { font: 600 10.5px 'Poppins', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); padding: 3px 6px 4px; display: flex; justify-content: space-between; gap: 8px; }
.lg-title small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.lg-item { all: unset; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 3px 6px; border-radius: 6px; font-size: 12px; color: var(--text-1); }
.lg-item:hover { background: var(--bg-2); color: var(--text-0); }
.lg-item i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lg-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-item b { color: var(--text-0); font-variant-numeric: tabular-nums; font-weight: 600; }
.lg-note { font-size: 11.5px; color: var(--warn); padding: 3px 6px; line-height: 1.4; }
.lg-note.plain { color: var(--text-2); }
.lg-scale { height: 8px; margin: 2px 6px; border-radius: 4px; background: linear-gradient(90deg, #3b82f6, #3ddc84, #ffb347, #ff4d4d); }
.lg-range { display: flex; justify-content: space-between; padding: 0 6px 2px; font-size: 10.5px; color: var(--text-2); }
.live-detail a { color: var(--text-0); text-decoration: underline dotted; text-underline-offset: 3px; }
.live-detail a:hover { color: var(--brand-green); }
.live-tip .ph { margin-right: 3px; }
#live-output-slot .output-bar { margin-bottom: 8px; padding: 6px 10px; gap: 12px; flex-wrap: nowrap; }
#live-output-slot .output-bar .out-toggle { padding: 5px 12px; font-size: 12px; flex: none; }
#live-output-slot .output-bar label { flex: none; font-size: 12px; white-space: nowrap; }
#live-output-slot .output-bar select { max-width: 150px; }
#live-output-slot .output-bar .out-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.live-legend { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }

/* ---------------------------------------------------------------- overige pagina's passend in het venster */
/* Bediening: lijst links, rechts Parameters / Tester / Locks & limieten */
#tab-control .output-bar { margin-bottom: 10px; padding: 8px 12px; }
#tab-control .control-layout { grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 12px; align-items: stretch; }
.control-fixtures { display: flex; flex-direction: column; margin: 0; overflow: hidden; }
.control-fixtures > * { flex: none; }
.control-fixtures .ctl-list { flex: 1 1 0; min-height: 0; max-height: none; }
.control-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.control-right > .subtabs { flex: none; margin-bottom: 10px; }
.ctl-pane { flex: 1 1 0; min-height: 0; overflow: auto; }
.ctl-pane > .card { margin: 0; }

/* Chat & shitlist */
#tab-chat .chat-layout { grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 12px; }
#tab-chat .chat-card, #tab-chat .issues-card { display: flex; flex-direction: column; overflow: hidden; }
#tab-chat .chat-card > *, #tab-chat .issues-card > * { flex: none; }
#tab-chat .chat-log { flex: 1 1 0; height: auto; min-height: 0; }
#tab-chat .issues-list { flex: 1 1 0; min-height: 0; max-height: none; align-content: start; }

/* IP-monitor */
.net-top { display: flex; align-items: flex-end; gap: 14px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.net-top .subtabs { border-bottom: none; margin: 0; flex: 1; }
.net-top .net-summary { margin: 0 0 6px; }
.net-pane .netifs-bar { margin: 8px 14px; }

/* Plattegrond */
#tab-plan .plan-layout { grid-template-columns: 200px minmax(0, 1fr) 250px; grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 12px; }
#tab-plan .plan-layout > .plan-side:last-child { grid-column: auto; }
#tab-plan .plan-canvas { height: auto; min-height: 0; }
#tab-plan .plan-side { display: flex; flex-direction: column; overflow: hidden; }
#tab-plan .plan-side > * { flex: none; }
#tab-plan .plan-unplaced { flex: 1 1 0; min-height: 0; max-height: none; }
#tab-plan .plan-panel { flex: 1 1 0; min-height: 0; overflow: auto; align-content: start; }

/* DMX-adreskaart: universes op één regel */
#tab-map .map-universes { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 8px; padding-bottom: 2px; }
#tab-map .map-universes > * { flex: none; }
#tab-map .map-universes::-webkit-scrollbar { height: 6px; }
#tab-map .map-stats { margin-bottom: 8px; }

/* Fixturebibliotheek */
.lib-pane .share-results { flex: 1 1 0; min-height: 0; max-height: none; overflow: auto; }
.lib-pane #import-report-card { max-height: 32vh; overflow: auto; }
#library-table td { vertical-align: middle; }
.mode-more { all: unset; cursor: pointer; font-size: 11px; color: var(--brand-green); padding: 1px 6px; white-space: nowrap; }
.mode-more:hover { text-decoration: underline; }
.card-header .search { margin: 0 0 0 14px; max-width: 320px; }

/* RDM-controle: de lijst vult wat er over is */
#tab-rdm.fit > #rdm-sub-check, #tab-rdm.fit > #rdm-sub-live, #tab-rdm.fit > #rdm-sub-inventory { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
#tab-rdm.fit > #rdm-sub-settings { flex: 1 1 0; min-height: 0; overflow: auto; }
#rdm-sub-check > * { flex: none; }
#rdm-sub-check > .rdm-card { flex: 1 1 0; min-height: 170px; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 0; }
#rdm-sub-check > .rdm-card > * { flex: none; }
#rdm-sub-check #rdm-lines { flex: 1 1 0; min-height: 0; overflow: auto; }
#rdm-sub-check .rdm-steps { gap: 8px; margin-bottom: 8px; }
#rdm-sub-check .rdm-advice { max-height: 24vh; overflow: auto; gap: 6px; margin-bottom: 8px; }
#rdm-sub-live > .card, #rdm-sub-inventory > .card { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 0; }
#rdm-sub-live > .card > *, #rdm-sub-inventory > .card > * { flex: none; }
#rdm-sub-live #live-rdm-body, #rdm-sub-inventory #inv-body { flex: 1 1 0; min-height: 0; overflow: auto; }

/* Versie & updates */
#tab-about .card > div[style] { padding: 10px 16px !important; }
#tab-about .card p { margin: 6px 0; }

/* ---- live view: zoeken ---- */
#tab-live .live-toolbar .inline-select select { max-width: 172px; text-overflow: ellipsis; }
#tab-live .live-toolbar #live-haze { max-width: 150px; }
.live-search { position: relative; flex: 1 1 180px; min-width: 150px; max-width: 300px; }
.live-search-results.left { right: auto; left: 0; }
.live-search input { width: 100%; margin: 0; padding: 5px 10px; font-size: 12.5px; }
.live-search-results { position: absolute; top: calc(100% + 4px); right: 0; width: max(100%, 380px); z-index: 40; background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 4px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65); max-height: 360px; overflow: auto; }
.ls-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: baseline; width: 100%; margin: 0; text-align: left; background: none; border: 0; border-radius: 7px; padding: 6px 8px; color: var(--text-1); font: inherit; font-size: 12.5px; cursor: pointer; }
.ls-row b { color: var(--brand-green); font-weight: 600; font-size: 13.5px; }
.ls-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-row small { color: var(--text-2); margin-left: 8px; font-size: 11.5px; }
.ls-row i { font-style: normal; font-variant-numeric: tabular-nums; color: var(--text-0); white-space: nowrap; }
.ls-row.active, .ls-row:hover { background: var(--bg-2); color: var(--text-0); }
.ls-row.ls-all { display: block; margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 7px 7px; color: var(--text-0); }
.ls-empty { padding: 8px 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

/* Labels */
.lb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; min-height: 0; }
.lb-grid > .card { margin-bottom: 0; min-height: 0; }
.lb-table-wrap { flex: 1 1 0 !important; min-height: 0; overflow: auto; }
#lb-table td { padding: 3px 8px; vertical-align: middle; }
#lb-table td:first-child, #lb-table th:first-child { width: 28px; }
#lb-table input[type="text"] { width: 100%; margin: 0; padding: 5px 8px; font-size: 12.5px; }
#lb-table input[type="number"] { width: 58px; margin: 0; padding: 5px 6px; font-size: 12.5px; }
#lb-table tr.focus td { background: rgba(124, 254, 66, 0.06); }
#lb-table .lb-a input { font-weight: 600; }
.lb-side { display: flex; flex-direction: column; overflow: auto; }
.lb-form { padding: 12px 18px 4px; display: grid; gap: 10px; }
.lb-form label { display: grid; gap: 4px; font-size: 12px; color: var(--text-2); }
.lb-form select, .lb-custom input { margin: 0; }
.lb-custom { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.lb-custom input { width: 70px; }
.lb-preview { padding: 14px 18px; display: grid; gap: 10px; justify-items: center; }
.lb-preview canvas { background: #fff; border-radius: 4px; image-rendering: pixelated; max-width: 100%; box-shadow: 0 0 0 1px var(--border); }
.lb-preview .lb-small { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.lb-preview .lb-small canvas { width: 92px; height: auto; border-radius: 2px; cursor: pointer; }
#tab-labels .header-actions select { max-width: 230px; margin: 0; }
.bt-mode select + label { margin-top: 8px; }
.lb-tools { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.lb-tools .hint { margin: 0; }
#tab-labels select, #tab-labels input[type="text"], #tab-labels input[type="number"] {
  background: var(--bg-0); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; color: var(--text-0); font-size: 12.5px; font-family: inherit;
}
#tab-labels select:focus, #tab-labels input:focus { outline: none; border-color: var(--brand-green); }
#lb-table input[type="text"], #lb-table input[type="number"] { background: transparent; border-color: transparent; }
#lb-table tr:hover input[type="text"], #lb-table tr:hover input[type="number"], #lb-table input:focus { background: var(--bg-0); border-color: var(--border); }

/* Licentie */
.lic-chip[hidden] { display: none; }
.lic-chip { white-space: nowrap; }
.lic-banner button { white-space: nowrap; flex-shrink: 0; }
.lic-chip { all: unset; box-sizing: border-box; cursor: pointer; display: block; text-align: center; margin: -4px 0 6px; padding: 3px 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-1); font-size: 11.5px; font-weight: 600; }
.lic-chip:hover { border-color: var(--text-2); }
.lic-chip.warn { border-color: #d9a441; color: #f0c46a; }
.lic-chip.none { border-color: var(--danger); color: #ff9a9a; }
.lic-banner { position: sticky; top: 0; z-index: 21; margin: -8px 0 14px; padding: 8px 14px; border-radius: 8px; background: rgba(255, 92, 92, 0.12); border: 1px solid var(--danger); color: var(--text-0); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lic-banner.soft { background: rgba(217, 164, 65, 0.1); border-color: #d9a441; }
.lic-banner[hidden] { display: none; }
.lic-form { display: grid; gap: 6px; }
.lic-form label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.lic-form input { width: 290px; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-0); font-size: 13px; outline: none; }
.lic-form input:focus { border-color: var(--brand-green-dim); }
.lic-form .inline { display: flex; gap: 8px; align-items: center; }
.lic-form input::placeholder { letter-spacing: 0.06em; }
.lic-wrong { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid #d9a441; background: rgba(217, 164, 65, 0.08); font-size: 13px; color: var(--text-0); line-height: 1.5; }
.lic-wrong[hidden] { display: none; }
#lic-status.none { border-color: var(--danger); background: rgba(255, 92, 92, 0.08); }

/* Functies van de lamp (reset, lamp aan/uit, RDM) */
.ctl-fns h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin: 0 0 8px; font-weight: 600; }
.ctl-fns:empty { display: none; }
.fn-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.fn-name { min-width: 92px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.fn-group small { font-size: 11px; color: var(--text-2); }
.fn-btn { padding: 5px 10px; font-size: 12px; }
.fn-btn small { opacity: 0.7; }
.fn-btn.reset { border-color: #d9a441; color: #f0c46a; }
.fn-hold select { width: auto; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-0); font-size: 12px; }
.fn-none { font-size: 12.5px; color: var(--text-2); margin: 0 0 8px; line-height: 1.5; }
.fn-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 16px; }
.fn-quick .hint { font-size: 12px; color: #f0c46a; }
#fn-dialog .ctl-fns { border-top: 1px solid var(--border); padding-top: 14px; }
.row-actions .icon-btn + .icon-btn { margin-left: 6px; }

/* Tekeningen & rigplan */
.rig-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.rig-side { margin: 0; padding: 4px 0; max-height: calc(100vh - 150px); overflow: auto; }
.rig-side details { border-bottom: 1px solid var(--border); }
.rig-side details:last-child { border-bottom: none; }
.rig-side summary { cursor: pointer; padding: 10px 14px; font-size: 12.5px; font-weight: 600; color: var(--text-0); list-style: none; }
.rig-side summary::before { content: '▸'; display: inline-block; width: 14px; color: var(--text-2); }
.rig-side details[open] > summary::before { content: '▾'; }
.rig-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 2px 14px 14px; align-items: end; }
.rig-warn summary { cursor: pointer; color: var(--text-2); }
.rig-form label { display: grid; gap: 4px; font-size: 11px; color: var(--text-2); font-weight: 600; }
.rig-form .wide { grid-column: 1 / -1; }
.rig-side input, .rig-side select, .rig-bar select { box-sizing: border-box; width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-0); font-size: 12.5px; outline: none; }
.rig-side input:focus, .rig-side select:focus { border-color: var(--brand-green-dim); }
.rig-side input[type="checkbox"] { width: auto; }
.rig-xy { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.rig-xy .link-btn { padding: 5px 9px; font-size: 11.5px; }
.rig-types, .rig-lines { padding: 0 14px 12px; display: grid; gap: 10px; }
.rig-type { display: grid; gap: 5px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.rig-type:last-child { border-bottom: none; padding-bottom: 0; }
.rig-type-name { font-size: 12.5px; color: var(--text-0); }
.rig-type-name b { display: inline-block; min-width: 18px; text-align: center; margin-right: 4px; padding: 0 4px; border-radius: 4px; background: var(--brand-green); color: #000; font-size: 11px; }
.rig-type small, .rig-line small { color: var(--text-2); font-size: 11px; }
.rig-conn { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.rig-conn select.guess { border-color: #d9a441; }
.rig-side .check { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-1); font-weight: 500; white-space: nowrap; }
.rig-line { display: grid; grid-template-columns: 1fr 64px auto; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-0); }
.rig-line-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rig-line .check { grid-column: 3; }
.rig-main { min-width: 0; }
.rig-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.rig-bar select { width: auto; }
.rig-bar .spacer { flex: 1; }
.rig-pages { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-1); }
.rig-pages .link-btn { padding: 3px 9px; }
.rig-warn { margin-bottom: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid #d9a441; background: rgba(217, 164, 65, 0.08); font-size: 12px; color: var(--text-0); line-height: 1.55; }
.rig-warn[hidden] { display: none; }
.rig-paper { max-height: calc(100vh - 215px); overflow: auto; border-radius: 10px; background: #2a2a2e; padding: 14px; }
.rig-paper svg { display: block; height: auto; background: #fff; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.55); user-select: none; }
.rig-paper.picking svg { cursor: crosshair; }
.rig-paper .breakout:hover { filter: brightness(1.25); }
@media (max-width: 1100px) { .rig-layout { grid-template-columns: 1fr; } .rig-side { max-height: none; } }

/* Noodfuncties: nachtstand, SOS en kill switch */
.em-row { display: grid; grid-template-columns: 1fr auto 1fr 1fr; gap: 5px; }
.em-btn { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 5px 4px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-1); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; color: var(--text-1); white-space: nowrap; user-select: none; position: relative; overflow: hidden; }
.em-btn:hover { border-color: var(--text-2); }
.em-btn.gear { padding: 5px 7px; font-weight: 400; }
.em-btn.night.on { background: #1c3f9e; border-color: #3d6bff; color: #fff; }
.em-btn.sos { border-color: #7a2626; color: #ff9a9a; }
.em-btn.sos.on { background: var(--danger); border-color: var(--danger); color: #fff; animation: em-blink 1s steps(2) infinite; }
.em-btn.kill { border-color: #7a2626; color: #ff9a9a; }
.em-btn.kill.on { background: #fff; border-color: #fff; color: #000; }
.em-btn.kill.holding::before { content: ''; position: absolute; inset: 0; background: rgba(255, 92, 92, 0.55); transform-origin: left; animation: em-hold 1s linear forwards; }
@keyframes em-hold { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes em-blink { 50% { opacity: 0.55; } }
.em-banner { position: sticky; top: 0; z-index: 22; margin: -8px 0 14px; padding: 9px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; }
.em-banner[hidden] { display: none; }
.em-banner button { white-space: nowrap; flex-shrink: 0; }
.em-banner.sos { background: var(--danger); }
.em-banner.kill { background: #fff; color: #000; }
.em-banner.kill button { color: #000; border-color: #000; }
.em-banner.night { background: rgba(61, 107, 255, 0.18); border: 1px solid #3d6bff; font-weight: 600; }
#sos-dialog .dialog-actions.swap { flex-direction: row-reverse; justify-content: flex-end; }
.sos-go { background: var(--danger); border-color: var(--danger); color: #fff; }
.sos-go:disabled { opacity: 0.45; cursor: default; }
.night-types { display: grid; gap: 6px; max-height: 300px; overflow: auto; margin: 10px 0; }
.night-type { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text-0); cursor: pointer; }
.night-type small { color: var(--text-2); font-size: 11.5px; }
.night-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
#night-level { width: 100%; }

/* Zijbalk: het menu schuift, de knoppen onderin blijven altijd in beeld met ruimte eromheen. */
.sidebar { overflow: hidden; padding-bottom: 16px; }
.sidebar .brand, .sidebar .lic-chip { flex-shrink: 0; }
.sidebar nav.tabs { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin-right: -6px; padding-right: 6px; }
.sidebar nav.tabs > * { flex-shrink: 0; }
.side-foot { margin-top: 0; flex-shrink: 0; gap: 9px; padding-top: 12px; border-top: 1px solid var(--border); }
.em-row { gap: 6px; }
.em-btn { padding: 8px 4px; }
.em-btn.gear { padding: 8px 9px; }
.side-foot .show-lock { padding: 9px; }
.side-foot .side-stats { padding: 9px 10px; }
.side-foot .project-btn { padding: 10px; }
/* De knoppen onderin passen altijd binnen de zijbalk (niet breder dan de balk zelf). */
.side-foot { grid-template-columns: minmax(0, 1fr); }
.side-foot > * { min-width: 0; box-sizing: border-box; max-width: 100%; }
.em-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1fr); }
.em-btn { min-width: 0; padding-left: 2px; padding-right: 2px; overflow: hidden; text-overflow: clip; }
.em-btn.gear { padding-left: 8px; padding-right: 8px; }
.side-foot .show-lock { width: 100%; }
.side-foot .side-stats { padding: 9px 8px; }
.side-foot .side-stats-row { font-size: 12px; gap: 3px; }
.side-foot .side-stats-row small { margin-right: 4px; }

/* Showsimulatie: de balk onder in de live view. */
.live-sim { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); background: rgba(20, 20, 22, 0.92); border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px 6px 10px; font-size: 12.5px; white-space: nowrap; }
.live-sim[hidden] { display: none; }
.live-sim select, .live-sim input[type="number"] { padding: 4px 8px; font-size: 12.5px; }
.live-sim input[type="number"] { width: 64px; }
.live-sim label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.live-sim .link-btn { padding: 4px 12px; font-size: 12.5px; }
.live-sim .sim-time { color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 132px; }
.live-sim .sim-note { color: #7CFE42; font-weight: 600; }
#live-sim-btn.active { border-color: #7CFE42; color: #7CFE42; }

/* Groepen: een rij knoppen om in één keer te selecteren. */
.group-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-height: 68px; overflow-y: auto; padding: 2px 0 8px; }
.group-bar.live-groups { padding: 0 0 8px; }
.group-bar-title { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-right: 2px; }
.group-bar-empty { font-size: 12px; color: var(--text-2); }
.group-chip { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); border-radius: 999px; color: var(--text); font: inherit; font-size: 12.5px; padding: 3px 10px; cursor: pointer; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.group-chip small { color: var(--text-2); margin-left: 3px; }
.group-chip.auto { border-style: dashed; }
.group-chip:hover { border-color: #7CFE42; }
.group-chip.active { background: #7CFE42; border-color: #7CFE42; color: #000; font-weight: 600; }
.group-chip.active small { color: rgba(0, 0, 0, 0.6); }
.group-bar .link-btn { padding: 3px 10px; font-size: 12.5px; }
.group-auto-options { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.group-auto-options .check { align-items: flex-start; gap: 8px; }
#text-dialog label { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
#text-dialog input { width: 100%; }
/* Snelmenu (rechtermuisknop). */
.ctx-menu { position: fixed; z-index: 1000; min-width: 220px; max-width: 340px; background: #161618; border: 1px solid var(--border); border-radius: 10px; padding: 5px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6); }
.ctx-menu[hidden] { display: none; }
.ctx-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; color: var(--text); font: inherit; font-size: 13px; padding: 6px 10px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-menu button:hover:not(:disabled) { background: rgba(124, 254, 66, 0.14); }
.ctx-menu button:disabled { color: var(--text-2); opacity: 0.5; cursor: default; }
.ctx-menu button.danger { color: #ff7a7a; }
.ctx-menu .ctx-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); padding: 5px 10px 4px; }
.ctx-menu .ctx-sep { height: 1px; background: var(--border); margin: 4px 6px; }

/* SOS: tijdens het aftellen is de knop zichtbaar nog niet te gebruiken. */
#sos-next:disabled { opacity: .45; cursor: not-allowed; }
.out-toggle:disabled { opacity: .45; cursor: not-allowed; }

/* Night: de lijst met types (vinkje links, tekst ernaast, geen schuifbalk). */
.night-types { overflow-x: hidden; }
.night-type { display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 4px 0; }
.night-type input[type="checkbox"] { flex: none; width: auto; margin: 3px 0 0; }

/* Toegankelijkheid: zichtbare toetsenbordfocus (ook waar de rand elders is uitgezet), en
   geen bewegende overgangen voor wie dat zo heeft ingesteld. */
:where(button, a, select, input, summary, [tabindex], [data-go]):focus-visible { outline: 2px solid #7cfe42 !important; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.em-hint { font-size: 10px; color: #8a8a8a; text-align: right; margin: 2px 2px 0 0; }

/* Live view: bediening naast de 3D. De schuif krijgt de hele breedte onder de naam. */
.live-side .ctl-attr { grid-template-columns: 1fr auto 20px 20px 20px; grid-template-areas: "name val . . ." "range range range range range"; row-gap: 2px; }
.live-side .ctl-attr .name { grid-area: name; }
.live-side .ctl-attr .val { grid-area: val; }
.live-side .ctl-attr input[type="range"] { grid-area: range; }
.ctl-quick { display: flex; gap: 6px; margin: 4px 0 10px; }
.ctl-quick button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #3a3a40; cursor: pointer; padding: 0; }
.ctl-quick button:hover { border-color: #fff; }
.ctl-hint { font-size: 12px; color: #d8c27a; margin: 0 0 8px; }
/* MVR-venster: de knoppen blijven onderin staan, ook bij een lange lijst. */
#mvr-dialog .dialog-actions { position: sticky; bottom: 0; background: inherit; padding-top: 10px; }

/* Nodes: een node die niet antwoordt (grijze kaart, rode melding, rood badge). */
.node-card.offline { opacity: .6; }
.node-card.offline .node-port { filter: grayscale(1); }
.nc.bad { border-color: #ff5a5a; color: #ffb3b3; font-weight: 500; }
#nav-nodes.bad { background: var(--danger, #ff5a5a); color: #fff; }
/* Overview: een regel onder "Needs attention" die ergens heen gaat, laat dat zien. */
.ov-attention li[data-go]::after { content: ' →'; color: var(--brand-green); opacity: .7; }
