:root {
  --bg: #f6f1ec;
  --side: #efe7df;
  --card: #ffffff;
  --line: #e8dfd6;
  --text: #2a211c;
  --muted: #6f625a;
  --accent: #c2551f;
  --link: #9a3f1f;
  --action-bg: #fff4e8;
  --action-line: #f0cfa8;
  --ok: #2f8f6b;
  --bad: #b3261e;
  --radius: 10px;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
}

h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: 17px; letter-spacing: -0.01em; }
h2 { font-size: 15px; }
h3 { font-size: 13px; color: var(--muted); font-weight: 500; }

button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Zijbalk, pagina's en mobiele balk */
.sidebar { height: 100vh; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--side); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.logo { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
#wiki-search { font-size: 14px; padding: 6px 10px; }
.side-title { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; margin: 8px 6px 0; }
.side-links { display: grid; gap: 2px; }
.side-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 14px; }
.side-links a[aria-current="page"] { font-weight: 600; background: var(--card); box-shadow: 0 1px 2px rgba(60, 40, 20, 0.08); }
.count { min-width: 20px; padding: 0 6px; border-radius: 999px; text-align: center; font-size: 12px; line-height: 20px; background: var(--link); color: #ffffff; font-weight: 700; }
.count[hidden] { display: none; }
.side-foot { margin-top: auto; display: grid; gap: 8px; justify-items: start; padding-top: 8px; }
.side-foot .pill { display: block; }
.mobilebar { display: none; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: var(--bg); }
.mobile-title { font-weight: 600; }

.pages { min-width: 0; min-height: 0; height: 100vh; }
.page { height: 100%; min-height: 0; }
.page[hidden] { display: none !important; }
.dashboard { overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.dash-head { display: grid; gap: 6px; justify-items: start; padding: 26px 28px; border-radius: 18px; background: linear-gradient(100deg, #f7d6bd 0%, #f2c0cc 55%, #d6c6f2 100%); }
.dash-head h1 { font-size: 34px; color: var(--text); }
.dash-date { margin: 0; font-size: 14px; color: var(--text); }
.dash-summary { margin: 0; font-size: 16px; color: var(--text); }
.dash-head .btn.primary { margin-top: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
#card-network { cursor: pointer; }
#card-network[hidden] { display: none; }
.card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); min-width: 0; }
#card-action { background: var(--action-bg); border-color: var(--action-line); }
#card-action h2 { color: var(--link); }
.card h2 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.num { font-size: 40px; font-weight: 600; line-height: 1.1; margin: 0; }
.card-text { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plain-list li { display: grid; gap: 2px; min-width: 0; }
.plain-list .item-title { overflow-wrap: anywhere; }
.plain-list .item-meta, .plain-list .empty { font-size: 13px; color: var(--muted); }
.plain-list a.item-title { color: inherit; }

.pill { font-size: 13px; color: var(--muted); }
.pill.on::before, .pill.off::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--ok);
}
.pill.off::before { background: var(--bad); }

#wiki-tree { display: grid; gap: 2px; font-size: 14px; }
#wiki-tree details { margin-left: 4px; }
#wiki-tree summary { cursor: pointer; padding: 4px 6px; border-radius: var(--radius); list-style: none; }
#wiki-tree summary::-webkit-details-marker { display: none; }
#wiki-tree summary:hover { background: var(--side); }
.wiki-page { display: block; width: 100%; margin: 0; padding: 4px 8px; background: none; border: 0; border-left: 2px solid transparent; border-radius: 0 var(--radius) var(--radius) 0; text-align: left; cursor: pointer; font-size: 14px; }
.wiki-page:hover { background: var(--side); }
.wiki-page.active { border-left-color: var(--link); background: var(--side); }
#wiki-tree .hint { margin: 0; }
.placeholder { margin: 0; color: var(--muted); font-size: 13px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-height: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }

.control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 12px; padding: 12px; min-height: 0; }
.middle { display: grid; grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; min-height: 0; min-width: 0; }
.crew { display: flex; flex-direction: column; overflow: hidden; }
.wiki { display: flex; flex-direction: column; overflow: hidden; height: calc(100% - 24px); margin: 12px; }
#wiki-page { flex: 1; overflow-y: auto; min-height: 0; padding: 18px 22px; }

/* Markdown uit de wiki (uitvoer van public/markdown.js) */
.md { max-width: 80ch; line-height: 1.6; overflow-wrap: anywhere; }
.md h1 { font-size: 22px; margin: 0 0 0.6em; }
.md h2 { font-size: 18px; margin: 1.2em 0 0.4em; }
.md h3 { font-size: 16px; margin: 1em 0 0.3em; color: var(--text); }
.md h4 { font-size: 15px; margin: 1em 0 0.3em; color: var(--muted); }
.md p { margin: 0.6em 0; }
.md ul, .md ol { padding-left: 1.4em; margin: 0.4em 0; }
.md a { color: var(--link); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.md code { font-family: var(--mono); font-size: 0.88em; background: var(--side); padding: 1px 5px; border-radius: 4px; }
.md pre { background: #fbf8f5; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; font-size: 12.5px; }
.md table { display: block; overflow-x: auto; border-collapse: collapse; margin: 0.8em 0; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--side); font-weight: 600; }

/* Agents als bureaus met een statuslamp */
.agents { list-style: none; margin: 0; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); }
.agent { display: grid; grid-template-columns: 10px auto; column-gap: 8px; align-items: center; padding: 6px 12px 6px 10px; background: var(--side); border-radius: var(--radius); }
.agent .lamp { width: 10px; height: 10px; border-radius: 50%; background: var(--line); grid-row: span 2; }
.agent.busy .lamp { background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 1.4s ease-out infinite; }
.agent .name { font-weight: 500; font-size: 14px; }
.agent .meta { font-size: 12px; color: var(--muted); }
.agents .empty { color: var(--muted); font-size: 13px; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(194, 85, 31, 0.5); }
  100% { box-shadow: 0 0 0 8px rgba(194, 85, 31, 0); }
}

.board { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 0; }
.column { padding: 10px 14px; overflow-y: auto; border-right: 1px solid var(--line); }
.column:last-child { border-right: 0; }
.column ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.task { padding: 8px 10px; border-left: 3px solid var(--line); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.task .title { font-size: 14px; }
.task .who { font-size: 12px; color: var(--muted); }
.task.doing { border-left-color: var(--accent); }
.task.done { border-left-color: var(--ok); }
.task.failed { border-left-color: var(--bad); }
.task.failed .who { color: var(--bad); }

.output { display: flex; flex-direction: column; overflow: hidden; }
#log { flex: 1; margin: 0; padding: 12px 14px; overflow: auto; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--text); background: #fbf8f5; }
#log .tag { color: var(--link); }
#log .err { color: var(--bad); }

.chat { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.model { font-size: 12px; color: var(--muted); }
.messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 8px 12px; border-radius: var(--radius); white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--side); }
.msg.chief, .msg.report { align-self: flex-start; border-left: 3px solid var(--link); background: rgba(154, 63, 31, 0.06); }
.msg.thinking { color: var(--muted); font-style: italic; }
.msg.error { border-left-color: var(--bad); color: var(--bad); }
.composer { display: grid; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
textarea, input, select { width: 100%; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
textarea { resize: vertical; }

.btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; font-size: 14px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--text); border-color: var(--text); color: #ffffff; font-weight: 600; }
.btn.quiet { background: transparent; }
.btn:disabled { opacity: 0.5; cursor: wait; }

dialog { width: min(520px, calc(100vw - 32px)); padding: 0; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
dialog::backdrop { background: rgba(42, 33, 28, 0.45); }
#agent-form, #access-form { display: grid; gap: 12px; padding: 20px; }
#access-form > label { display: grid; gap: 4px; font-size: 14px; }
#access-form code { font-size: 12px; }
#agent-form label { display: grid; gap: 4px; font-size: 14px; }
#agent-form small { color: var(--muted); font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); display: flex; gap: 16px; padding: 8px 12px; }
legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
#agent-form .radio { display: flex; align-items: center; gap: 6px; }
.radio input { width: auto; }
.hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.error { margin: 0; color: var(--bad); font-size: 14px; min-height: 1em; }
.actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 900px) {
  body { height: auto; min-height: 100vh; grid-template-columns: minmax(0, 1fr); }
  .mobilebar { display: flex; }
  .sidebar { display: none; position: fixed; top: 49px; left: 0; right: 0; bottom: 0; height: auto; z-index: 20; background: var(--side); }
  .sidebar.open { display: flex; }
  .pages { height: auto; }
  .page { height: auto; }
  .dashboard { padding: 16px; }
  .dash-head { padding: 20px; }
  .dash-head h1 { font-size: 24px; }
  .cards, .lists { grid-template-columns: minmax(0, 1fr); }
  .control { grid-template-columns: minmax(0, 1fr); padding: 12px 16px 16px; }
  .middle { grid-template-rows: auto 50vh; }
  .chat { height: 70vh; }
  .wiki { min-height: 70vh; margin: 12px 16px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .column { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  .agent.busy .lamp { animation: none; }
}

/* Loginscherm */
body.login-page { display: grid; place-items: center; grid-template: none; min-height: 100vh; height: auto; padding: 16px; }
.login { width: min(360px, 100%); display: grid; gap: 14px; padding: 28px 24px; }
.login label { display: grid; gap: 4px; font-size: 14px; }
.login-lamp { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(194, 85, 31, 0.35); }

.drafter { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
.drafter .btn { justify-self: start; }
.drafter .hint { margin: 0; }
.drafter .hint.error { color: var(--bad); }

.msg.action { border-left-color: var(--accent); background: var(--action-bg); }
.msg .badge { display: block; width: fit-content; margin-bottom: 4px; padding: 1px 8px; border-radius: 10px; background: var(--link); color: #ffffff; font-size: 12px; font-weight: 700; font-style: normal; }
.agent { cursor: pointer; border: 1px solid transparent; }
.agent:hover, .agent:focus-visible { border-color: var(--line); }


.access-choices { display: grid; gap: 8px; border: 0; padding: 0; margin: 0 0 10px; }
.access-choices label { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: baseline; padding: 8px 10px; background: var(--bg); border-radius: var(--radius); cursor: pointer; }
.access-choices .hint { grid-column: 2; margin: 0; }
#access-form [hidden] { display: none; }

dialog.wide { width: min(860px, calc(100vw - 32px)); }
.dialog-body { display: grid; gap: 12px; padding: 20px; }
.log-text { max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; background: #fbf8f5; color: var(--text); padding: 10px 12px; border-radius: var(--radius); margin: 0; }
#update-stat:empty { display: none; }
#update-commits { margin: 0; padding-left: 18px; }

.warn { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius); background: var(--action-bg); color: var(--bad); font-size: 13.5px; }
#update-sensitive[hidden] { display: none; }

/* Roadmap: bord met een kolom per stap; kleuren uit de variabelen hierboven */
.roadmap { overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.rm-head { padding: 22px 28px; border-radius: 18px; background: linear-gradient(100deg, #f7d6bd 0%, #f2c0cc 55%, #d6c6f2 100%); }
.rm-head h1 { font-size: 30px; color: var(--text); }
.rm-updated { margin: 4px 0 0; font-size: 14px; color: var(--text); }
.rm-error:empty { display: none; }
.rm-error { padding: 10px 14px; border-radius: var(--radius); background: var(--action-bg); color: var(--bad); font-size: 14px; }
.rm-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.rm-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.rm-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rm-chip.st-live { color: var(--ok); background: rgba(47, 143, 107, 0.14); }
.rm-chip.st-bezig { color: var(--link); background: var(--action-bg); box-shadow: inset 0 0 0 1px var(--action-line); }
.rm-chip.st-besproken { color: var(--muted); background: var(--bg); }
.rm-chip.st-wacht { color: #5b4a8a; background: #efeaf7; }
.rm-chip.st-ijskast { color: #46596a; background: #e9eef2; }
.rm-scroll { overflow-x: auto; padding-bottom: 6px; }
.rm-lanes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 12px; }
.rm-lane { background: var(--side); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rm-lane.now { background: var(--action-bg); box-shadow: inset 0 0 0 1px var(--action-line); }
.rm-lane.ice { background: #e9eef2; }
.rm-lane h2 { margin: 0; font-size: 16px; font-weight: 600; text-wrap: balance; }
.rm-step { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.rm-why { margin: 0; font-size: 13px; color: var(--muted); }
.rm-here { align-self: flex-start; background: var(--link); color: #ffffff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.rm-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.rm-card > * { max-width: 100%; }
.rm-top { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; width: 100%; }
.rm-card h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.rm-num { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none; }
.rm-nu { margin: 0; font-size: 13px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; width: 100%; }
.rm-items { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); width: 100%; }
.rm-items li.done { color: var(--ok); }
.rm-links { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--link); text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.rm-link:hover { border-color: var(--muted); }
.rm-link svg { width: 13px; height: 13px; flex: none; }
.rm-link-bad { color: var(--muted); }
.rm-edit { font-size: 13px; padding: 4px 10px; margin-top: 2px; }
.rm-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.rm-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.rm-panel h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.rm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.rm-dep { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rm-dep small { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.rm-from { font-family: var(--mono); font-size: 13px; background: var(--side); border-radius: 8px; padding: 2px 8px; white-space: nowrap; }
.rm-to { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-to span { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 1px 7px; }
.rm-open { display: grid; gap: 2px; }
.rm-open span { color: var(--muted); }
.rm-empty { color: var(--muted); font-size: 13px; }
.rm-dialog { width: min(600px, calc(100vw - 32px)); }
#rd-form { display: grid; gap: 12px; padding: 20px; }
#rd-form > label { display: grid; gap: 4px; font-size: 14px; }
#rd-form small { color: var(--muted); font-weight: 400; }
#rd-form h2 { font-size: 17px; }
.rm-links-field { display: grid; gap: 8px; }
.rm-link-row { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-link-row input { flex: 1 1 160px; min-width: 0; }
.rm-link-row input.rd-url { flex-basis: 260px; }
#rd-form .actions { flex-wrap: wrap; }
#rd-reload[hidden] { display: none; }

@media (max-width: 900px) {
  .roadmap { padding: 16px; }
  .rm-lanes { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); }
  .rm-head { padding: 20px; }
  .rm-head h1 { font-size: 24px; }
  .rm-bottom { grid-template-columns: minmax(0, 1fr); }
}

/* Netwerk-pagina: diagnose, schakels, pinggrafiek, kaartweergave, wifi-test. Kleuren uit de variabelen hierboven */
.netwerk { overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.net-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.net-head h1 { font-size: 28px; }
.net-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.net-date { width: auto; padding: 6px 10px; font-size: 14px; }
.net-push-status { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.net-push-status:empty { display: none; }
.net-export { position: relative; }
.net-export > summary { list-style: none; }
.net-export > summary::-webkit-details-marker { display: none; }
.net-export-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; display: grid; min-width: 140px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(42, 33, 28, 0.1); overflow: hidden; }
.net-export-menu a { padding: 8px 12px; color: var(--text); text-decoration: none; font-size: 14px; }
.net-export-menu a:hover { background: var(--action-bg); }
.net-export-kop { padding: 8px 12px 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.net-error { padding: 10px 14px; border-radius: var(--radius); background: var(--action-bg); color: var(--bad); font-size: 14px; }
.net-error:empty { display: none; }
.net-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.net-body[hidden] { display: none; }
.net-diag { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; border-radius: 18px; background: var(--action-bg); border: 1px solid var(--action-line); }
.net-diag-label { font-size: 13px; font-weight: 600; color: var(--link); }
.net-diag-tekst { font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.net-schakels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.net-schakel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.net-schakel.let_op { border-color: var(--action-line); }
.net-schakel.slecht { border-color: var(--bad); }
.net-schakel-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.net-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.net-big { font-size: 34px; font-weight: 600; line-height: 1.1; }
.net-unit { font-size: 16px; font-weight: 400; color: var(--muted); }
.net-regel { font-size: 14px; color: var(--muted); }
.net-chip { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; background: var(--bg); color: var(--muted); }
.net-chip.ok { color: var(--ok); background: rgba(47, 143, 107, 0.14); }
.net-chip.let_op { color: var(--link); background: var(--action-bg); box-shadow: inset 0 0 0 1px var(--action-line); }
.net-chip.slecht { color: var(--bad); background: rgba(179, 38, 30, 0.1); }
.net-chip.onbekend { color: var(--muted); background: var(--bg); }
.net-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.net-panel h2 { margin: 0; font-size: 16px; font-weight: 600; }
.net-panel-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.net-legenda { font-size: 13px; color: var(--muted); }
.net-legenda .leg-down { color: var(--ok); }
.net-legenda .leg-up { color: var(--link); }
.net-leeg { margin: 0; font-size: 13px; color: var(--muted); }
.net-chart { width: 100%; height: 200px; display: block; }
.net-chart .grid { stroke: var(--line); }
.net-chart .lijn { fill: none; stroke-width: 2; }
.net-chart .internet { stroke: var(--accent); }
.net-chart .router { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.net-chart .verlies { fill: var(--action-line); opacity: 0.6; }
.net-chart .band { fill: var(--bad); opacity: 0.08; }
.net-chart .band.let_op { fill: var(--action-line); opacity: 0.45; }
.net-chart .band-label { font-size: 11px; fill: var(--link); }
.net-chart .as { font-size: 11px; fill: var(--muted); }
.net-chart .snelpunt.down, .net-chart .snelwaarde.down { fill: var(--ok); }
.net-chart .snelpunt.up, .net-chart .snelwaarde.up { fill: var(--link); }
.net-chart .snelpunt { stroke: var(--card); stroke-width: 1.5; }
.net-chart .snelwaarde { font-size: 11px; font-weight: 600; }
.net-chart .snelijn { stroke-width: 2; }
.net-chart .snelijn.down { stroke: var(--ok); }
.net-chart .snelijn.up { stroke: var(--link); }
.net-chart .snelhit { fill: transparent; stroke: none; }
.net-map { display: flex; flex-direction: column; gap: 12px; }
.net-knopen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.net-knoop { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.net-pijl { color: var(--muted); }
.net-deco { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-width: 0; }
.net-deco > summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; list-style: none; }
.net-deco > summary::-webkit-details-marker { display: none; }
.net-deco-meta { font-size: 13px; color: var(--muted); }
.net-devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; padding: 0 14px 14px; }
.net-device { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); cursor: pointer; min-width: 0; color: var(--text); }
.net-device:hover { border-color: var(--muted); }
.net-device.nieuw { border-color: var(--accent); }
.net-device.niet-gevonden { border-style: dashed; background: transparent; color: var(--muted); }
.net-device-naam { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.net-device-meta, .net-device-snelheid { font-size: 12.5px; color: var(--muted); }
.net-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--link); color: #ffffff; }
.net-tag.zacht { background: var(--bg); color: var(--muted); border: 1px solid var(--line); font-weight: 600; }
.net-kaart { gap: 14px; }
.net-kaart-melding { margin: 0; padding: 8px 12px; border-radius: var(--radius); background: var(--action-bg); color: var(--link); font-size: 13px; }
.net-kaart-melding:empty { display: none; }
.net-kaart-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.net-lagen { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; font-size: 14px; }
.net-lagen > .net-knoop, .net-lagen > .net-pijl { align-self: center; }
.net-laag { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-width: 0; }
.net-apps { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; min-width: 0; }
.net-app { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); text-align: left; cursor: pointer; max-width: 100%; min-width: 0; }
.net-app:hover, .net-app:focus-visible { border-color: var(--muted); }
.net-app.klein { flex-direction: row; align-items: baseline; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 13px; }
.net-app.net-gok { border-style: dashed; }
.net-app.net-onbekend { border-color: var(--action-line); }
.net-app-rij { display: flex; align-items: center; gap: 6px; min-width: 0; }
.net-app-naam { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.net-app-ip { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.net-gezien { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.net-groepen { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.net-groep { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); min-width: 0; }
.net-groep-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.net-groep-kop h3 { font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.net-groep-aantal { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 1px 8px; flex: none; }
.net-app-form { flex: 1 1 100%; display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--action-line); border-radius: 10px; background: var(--card); min-width: 0; }
.net-app-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.net-app-acties { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.net-app-fout { margin: 0; font-size: 13px; color: var(--bad); }
.net-app-fout:empty { display: none; }
.net-detail { font-size: 14px; display: grid; gap: 4px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius); }
.net-detail:empty { display: none; }
.net-detail-rij { display: flex; gap: 8px; }
.net-detail-rij span:first-child { min-width: 80px; color: var(--muted); }
.net-wifi-wrap { overflow-x: auto; }
.net-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.net-table th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 8px 6px 0; }
.net-table td { padding: 8px 8px 8px 0; border-top: 1px solid var(--line); }
.net-table th.net-num, .net-table td.net-num { text-align: right; padding-right: 0; }
.net-table tr.via-proxy td { color: var(--muted); }
.wifi-result { margin: 0; font-size: 15px; font-weight: 600; min-height: 1em; }
#wifi-form { display: grid; gap: 12px; padding: 20px; }
#wifi-form > label { display: grid; gap: 4px; font-size: 14px; }
#wifi-form small { color: var(--muted); font-weight: 400; }
#wifi-form .hint { margin: 0; }

@media (max-width: 900px) {
  .netwerk { padding: 16px; }
  .net-diag { padding: 18px; }
  .net-diag-tekst { font-size: 18px; }
  .net-big { font-size: 28px; }
  .net-lagen { flex-direction: column; }
  .net-laag { flex: none; }
  .net-lagen > .net-pijl { align-self: center; transform: rotate(90deg); }
}

/* Diensten op het dashboard: een kaart met tegels per groep, status als puntje, formulier boven de tegels */
.diensten { display: flex; flex-direction: column; gap: 16px; }
.dn-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.dn-tijd { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.dn-melding { margin: 0; padding: 10px 14px; border-radius: var(--radius); background: var(--action-bg); color: var(--bad); font-size: 14px; }
.dn-melding:empty { display: none; }
.dn-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.dn-form[hidden] { display: none; }
.dn-form h2 { font-size: 16px; margin: 0; }
.dn-velden { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dn-veld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.dn-veld input, .dn-veld select { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); font-size: 15px; font-weight: 400; }
.dn-knoppen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dn-weg { margin-left: auto; color: var(--bad); }
.dn-leeg { margin: 0; font-size: 14px; color: var(--muted); }
.dn-groepen { display: flex; flex-direction: column; gap: 22px; }
.dn-groep { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dn-groep > h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }
.dn-groep-weg { align-self: flex-start; font-size: 13px; }
.dn-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.dn-tegel-wrap { position: relative; min-width: 0; }
.dn-tegel, .dn-tegel-nieuw { display: flex; flex-direction: column; gap: 10px; width: 100%; height: 100%; min-height: 104px; padding: 14px 14px 40px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-align: left; text-decoration: none; min-width: 0; }
.dn-tegel:hover { border-color: var(--muted); }
.dn-tegel-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; color: var(--link); }
.dn-tegel-naam { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.dn-stip { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--muted); }
.dn-stip.up { background: var(--ok); }
.dn-stip.down { background: var(--bad); }
.dn-potlood { position: absolute; right: 6px; bottom: 6px; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.dn-potlood:hover { border-color: var(--line); background: var(--bg); color: var(--text); }
.dn-tegel-nieuw { align-items: center; justify-content: center; border-style: dashed; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.dn-tegel-nieuw:hover { border-color: var(--muted); color: var(--text); }
.dn-stip.onbekend { background: var(--line); box-shadow: inset 0 0 0 1px var(--muted); }

/* Documenten */
.page.documenten { overflow-y: auto; padding: 16px 24px 24px; }
.doc-eigen { display: block; height: auto; min-height: 100vh; }
.doc-eigen .mobilebar.doc-balk { display: flex; }
.doc-pagina { display: block; height: auto; padding: 16px 24px 24px; min-width: 0; }
.doc-app { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 1400px; }
.doc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.doc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-zoek { flex: 1 1 200px; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.doc-top .btn[hidden] { display: none; }
.doc-melding { margin: 0; padding: 10px 14px; border-radius: var(--radius); background: var(--action-bg); border: 1px solid var(--action-line); color: var(--bad); font-size: 14px; overflow-wrap: anywhere; }
.doc-melding:empty { display: none; }
.doc-melding[data-soort="ok"] { color: var(--ok); background: #eef6f2; border-color: #bfe0d1; }
.doc-uploads { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.doc-uploads:empty { display: none; }
.doc-upload { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.doc-upload-naam { min-width: 0; overflow-wrap: anywhere; }
.doc-upload-staat { color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.doc-upload-klaar .doc-upload-staat { color: var(--ok); }
.doc-upload-fout .doc-upload-staat { color: var(--bad); }
.doc-gesloten { padding: 12px 14px; border: 1px solid var(--action-line); background: var(--action-bg); border-radius: var(--radius); display: grid; gap: 8px; }
.doc-gesloten[hidden] { display: none; }
.doc-kolommen { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 12px; align-items: start; min-width: 0; }
.doc-kolommen.prullenbak { grid-template-columns: 210px minmax(0, 1fr); }
.doc-kolommen.prullenbak .doc-voorbeeld { display: none; }
.doc-boomwrap, .doc-lijst, .doc-voorbeeld { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.doc-boomwrap { padding: 6px; }
.doc-boom-toggle { display: none; width: 100%; text-align: left; }
.doc-boom-lijst { list-style: none; margin: 0; padding: 0; }
.doc-boom-lijst .doc-boom-lijst { padding-left: 14px; }
.doc-boom-knop { display: block; width: 100%; text-align: left; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; overflow-wrap: anywhere; }
.doc-boom-knop:hover { background: var(--bg); }
.doc-boom-knop[aria-current="true"] { background: var(--action-bg); font-weight: 600; }
.doc-lijst:focus { outline: none; }
.doc-lijst-kop { display: grid; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc-lijst-acties { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.doc-lijst-acties .doc-recht { margin-right: auto; }
.doc-kruimels { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; color: var(--muted); }
.doc-kruimel { border: 0; background: transparent; padding: 2px 4px; border-radius: 4px; cursor: pointer; color: var(--muted); overflow-wrap: anywhere; }
.doc-kruimel:hover { background: var(--bg); }
.doc-kruimel[aria-current="page"] { color: var(--text); font-weight: 600; }
.doc-recht { font-size: 12px; background: var(--action-bg); border: 1px solid var(--action-line); border-radius: 20px; padding: 1px 10px; white-space: nowrap; }
.doc-zoek-kop { font-size: 15px; overflow-wrap: anywhere; }
.doc-rijen { display: flex; flex-direction: column; min-width: 0; }
.doc-rij { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; min-width: 0; }
.doc-rij:last-child { border-bottom: 0; }
button.doc-rij { cursor: pointer; }
button.doc-rij:hover { background: var(--bg); }
.doc-rij[aria-current="true"] { background: var(--action-bg); }
.doc-icoon { flex: none; width: 52px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.doc-rij-map .doc-rij-naam { font-weight: 600; }
.doc-rij-naam { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.doc-rij-meta { flex: none; font-size: 12px; color: var(--muted); max-width: 45%; text-align: right; overflow-wrap: anywhere; }
.doc-prul { flex-wrap: wrap; }
.doc-prul .doc-rij-meta { flex: 1 1 100%; max-width: none; text-align: left; order: 3; }
.doc-leeg { margin: 0; padding: 16px 12px; color: var(--muted); font-size: 14px; }
.doc-drop { margin: 10px 12px; padding: 12px; border: 2px dashed #e0b48f; border-radius: var(--radius); text-align: center; color: var(--muted); background: #fffaf5; font-size: 14px; }
.doc-drop.actief { background: var(--action-bg); border-color: var(--accent); }
.doc-voorbeeld { padding: 12px; display: grid; gap: 10px; position: sticky; top: 12px; }
.doc-bestandsnaam { font-size: 15px; overflow-wrap: anywhere; color: var(--text); }
.doc-meta { margin: 0; font-size: 13px; color: var(--muted); }
.doc-beeld { max-width: 100%; max-height: 360px; object-fit: contain; border-radius: 8px; background: var(--bg); justify-self: center; }
.doc-pdf { width: 100%; height: 380px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.doc-geen-voorbeeld { margin: 0; padding: 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 14px; }
.doc-voorbeeld-acties { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-download { text-decoration: none; display: inline-block; }
.doc-terug { display: none; justify-self: start; }
.btn.doc-weg { color: var(--bad); }
.doc-dialoog { width: min(460px, calc(100vw - 32px)); }
.doc-dialoog-form { display: grid; gap: 12px; padding: 20px; }
.doc-dialoog-form label { display: grid; gap: 4px; font-size: 14px; }
.doc-dialoog-form input[type="text"], .doc-dialoog-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.doc-dialoog-tekst { margin: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.doc-rechten-vast { margin: 0; font-size: 14px; }
.doc-kies { margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); max-height: 260px; overflow-y: auto; }
.doc-kies legend { padding: 0 6px; font-size: 13px; color: var(--muted); }
.doc-dialoog-form .doc-kies-rij { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; cursor: pointer; }
.doc-kies-rij:hover { background: var(--bg); }
.doc-kies-rij span { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .page.documenten, .doc-pagina { padding: 12px 16px 20px; }
  .doc-kolommen { grid-template-columns: 180px minmax(0, 1fr) 260px; }
  .doc-kolommen.prullenbak { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 699px) {
  .doc-kolommen, .doc-kolommen.prullenbak { grid-template-columns: minmax(0, 1fr); }
  .doc-boom-toggle { display: block; }
  .doc-boom.dicht { display: none; }
  .doc-voorbeeld { display: none; position: static; }
  .doc-kolommen.toon-voorbeeld .doc-voorbeeld { display: grid; }
  .doc-kolommen.toon-voorbeeld .doc-boomwrap, .doc-kolommen.toon-voorbeeld .doc-lijst { display: none; }
  .doc-terug { display: inline-block; }
  .doc-pdf { height: 55vh; }
  .doc-rij-meta { max-width: 40%; }
  .doc-top .btn { flex: none; }
}

/* Labels bij het voorbeeld: chips, een invoer en een × per chip. */
.doc-labels { margin: 0.75rem 0; }
.doc-labels-kop { font-size: 0.9rem; margin: 0 0 0.35rem; }
.doc-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.doc-chip { display: inline-flex; align-items: center; gap: 0.2rem; border: 1px solid currentColor; border-radius: 999px; padding: 0.1rem 0.25rem 0.1rem 0.6rem; }
.doc-chip-naam { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }
.doc-chip-weg { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0 0.3rem; min-width: 1.5rem; min-height: 1.5rem; }
.doc-label-form { display: flex; gap: 0.4rem; margin-top: 0.5rem; }
.doc-label-invoer { flex: 1; min-width: 0; font: inherit; padding: 0.3rem 0.5rem; }
.doc-rij-label { font-size: 0.85rem; opacity: 0.8; }
.doc-labels-status { font-size: 0.85rem; opacity: 0.8; margin: 0.3rem 0 0; min-height: 1em; }
