/* MJOP – stijlblad. Mobiel eerst, werkt zonder externe bronnen. */
:root {
  --ink: #17232d;
  --ink-2: #4a5866;
  --muted: #6d7a86;
  --line: #e1e6eb;
  --line-2: #eef1f4;
  --bg: #f4f6f8;
  --card: #ffffff;
  --brand: #16425b;
  --brand-2: #2f6690;
  --brand-soft: #e5eef5;
  --accent: #d9822b;
  --ok: #2e7d4f;
  --warn: #b7791f;
  --bad: #c0392b;
  --c1: #1e7b45; --c2: #4caf50; --c3: #c5b91f; --c4: #f0932b; --c5: #e05a2b; --c6: #a61e1e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 2px 8px rgba(16, 32, 48, .04);
  --nav-w: 240px;
  --top-h: 56px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: 1.5rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; margin-top: 1em; }
p { margin: 0 0 .75em; }
small { font-size: .82em; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.neg { color: var(--bad); font-weight: 600; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.right { float: right; }
.hide-sm { display: none; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--brand); color: #fff; padding-top: env(safe-area-inset-top);
}
.topbar .brand { color: #fff; display: flex; align-items: center; gap: 10px; font-weight: 600; flex: 1; min-width: 0; }
.topbar .brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { background: none; border: 0; color: #fff; padding: 8px; margin-left: -6px; cursor: pointer; }
.me { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; font-weight: 700; }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 800; }

.sidenav {
  position: fixed; inset: 0 auto 0 0; width: 270px; max-width: 84vw; z-index: 50;
  background: #10324a; color: #cfdbe5; display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-open .sidenav { transform: none; }
.nav-backdrop { display: none; }
.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
.nav-head { display: flex; gap: 10px; align-items: center; padding: 18px 16px; color: #fff; }
.nav-head small { display: block; color: #9fb4c4; }
.sidenav > a, .nav-foot a {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px; color: #cfdbe5; border-left: 3px solid transparent;
}
.sidenav > a:hover { background: rgba(255,255,255,.05); text-decoration: none; }
.sidenav a.active { background: rgba(255,255,255,.09); color: #fff; border-left-color: var(--accent); }
.nav-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 8px 0 12px; }
.nav-foot a { flex-direction: column; align-items: flex-start; gap: 0; }
.nav-foot small { color: #9fb4c4; }
.nav-foot .linkbtn { color: #9fb4c4; padding: 4px 18px; }

.main { padding: 16px 14px 60px; max-width: 1280px; margin: 0 auto; }
body.wide .main { max-width: none; }
body.bare .main { max-width: 460px; padding-top: 8vh; }
.narrow { max-width: 460px; margin: 0 auto; }
.narrow-left { max-width: 680px; }

@media (min-width: 960px) {
  .topbar { display: none; }
  .sidenav { transform: none; width: var(--nav-w); }
  .nav-backdrop { display: none !important; }
  body:not(.bare) .main { margin-left: var(--nav-w); padding: 24px 32px 60px; }
  body.wide:not(.bare) .main { margin-left: var(--nav-w); }
  .hide-sm { display: table-cell; }
  h1 { font-size: 1.7rem; }
}

/* ---------- Componenten ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.page-head .code { font-weight: 500; }
.actions, .btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form, .btn-row form { margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 16px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.highlight { border-color: #b9d3e6; background: #f5f9fc; }
.card.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.danger-zone { border-color: #f1c9c4; }
.urgent-box { border-color: #f1c9c4; background: #fff8f7; }
.pad { padding: 8px 4px; }

.cols { display: grid; gap: 16px; grid-template-columns: 1fr; }
.cols > .card { margin-bottom: 0; }
.cols { margin-bottom: 16px; }
@media (min-width: 860px) { .cols { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important;
  white-space: nowrap;
}
.btn:hover { border-color: #c5ced6; background: #fafbfc; }
.btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.primary:hover { background: var(--brand); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: .88rem; }
.btn.block { width: 100%; min-height: 48px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand-2); font: inherit; cursor: pointer; }
.danger-text { color: var(--bad) !important; }
form.inline { display: inline; }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; }
.alert-success { background: #edf7f0; border-color: #bfe1ca; color: #1d5a35; }
.alert-error { background: #fdf0ee; border-color: #f2c4bd; color: #8e2a1e; }
.alert-warning { background: #fff7e8; border-color: #f2d9a6; color: #7a5413; }
.alert-info { background: var(--brand-soft); border-color: #c7dbea; color: var(--brand); }
.copyrow { display: flex; gap: 6px; margin-top: 8px; }
.copyrow input { flex: 1; min-width: 0; }

/* Formulieren */
.form label, label.field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .88rem; color: var(--ink-2); margin-bottom: 12px; }
.form label > small { font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #cfd7de; border-radius: 9px;
  padding: 9px 11px; min-height: 42px; width: 100%; font-weight: 400;
}
textarea { min-height: 0; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc2de; outline-offset: 0; border-color: var(--brand-2); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand-2); }
input[type=file] { padding: 7px; }
label.check { display: flex; flex-direction: row !important; align-items: center; gap: 10px !important; font-weight: 500 !important; }
.out { display: block; padding: 9px 0; font-weight: 700; color: var(--ink); }
.grid2, .grid3, .grid4 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .span2 { grid-column: span 2; }
  .span3, .span4 { grid-column: 1 / -1; }
}
@media (min-width: 960px) { .grid4 { grid-template-columns: repeat(4, 1fr); } .span4 { grid-column: span 4; } }
.grid2.tight { gap: 0 10px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; }
.role-opt { flex-direction: row !important; align-items: flex-start; gap: 10px !important; padding: 8px 0; margin: 0 !important; }
.role-opt span { display: flex; flex-direction: column; font-weight: 400; }
.role-opt small { color: var(--muted); }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; }
.checkgrid label { margin-bottom: 6px; }
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; }
.checklist .ok { color: var(--ok); } .checklist .bad { color: var(--bad); font-weight: 700; }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 700; font-size: 1.15rem; margin-bottom: 18px; color: var(--brand); }
.upload-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.upload-row input { flex: 1 1 180px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 220px; }
.toolbar form { display: flex; gap: 8px; }
.toolbar.filters { justify-content: flex-start; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.toolbar.filters label { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; color: var(--ink-2); gap: 2px; }
.toolbar.filters input { width: 100px; }
.toolbar.filters select { width: auto; }
.filter-input { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: .88rem; }
.chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:hover { text-decoration: none; border-color: #c5ced6; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--brand); }

.dropdown { position: relative; }
.dropdown summary { list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown > div { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 240px; z-index: 20; padding: 6px 0; }
.dropdown > div a { display: block; padding: 9px 14px; color: var(--ink); }
.dropdown > div a:hover { background: var(--bg); text-decoration: none; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.b-green { background: #e3f3e8; color: #1d6a3b; } .b-amber { background: #fdf1db; color: #8a5b0c; }
.b-red { background: #fbe4e1; color: #a12a1b; } .b-blue { background: #e1edf7; color: #1f5582; }
.b-purple { background: #ede6f7; color: #5b3a8c; } .b-grey { background: var(--line-2); color: var(--ink-2); }

.cond { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; font-weight: 800; font-size: .85rem; color: #fff; vertical-align: middle; }
.cond.c0 { background: #dfe4e8; color: #6d7a86; }
.c1 { --cc: var(--c1); } .c2 { --cc: var(--c2); } .c3 { --cc: var(--c3); } .c4 { --cc: var(--c4); } .c5 { --cc: var(--c5); } .c6 { --cc: var(--c6); }
.cond.c1, .cond.c2, .cond.c3, .cond.c4, .cond.c5, .cond.c6 { background: var(--cc); }
.cond.c3 { color: #2d2a05; }

/* KPI's en tegels */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; }
.kpi:hover { text-decoration: none; border-color: #c5ced6; }
.kpi small { color: var(--muted); font-weight: 600; }
.kpi strong { font-size: 1.3rem; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .82rem; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--ink); }
.tile:hover { text-decoration: none; border-color: var(--brand-2); }
.tile h3 { margin: 6px 0 2px; }
.tile-top { display: flex; justify-content: space-between; align-items: center; }
.code { font-size: .8rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
dl.mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; margin: 10px 0 0; }
dl.mini dt { font-size: .75rem; color: var(--muted); } dl.mini dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
dl.props { display: grid; grid-template-columns: 1fr; gap: 10px 18px; margin: 0 0 10px; }
@media (min-width: 560px) { dl.props { grid-template-columns: 1fr 1fr; } dl.props.cols4 { grid-template-columns: repeat(4, 1fr); } }
dl.props dt { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
dl.props dd { margin: 2px 0 0; }

/* Lijsten */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line-2); }
.list li:first-child { border-top: 0; }
.list li > a, .list li > div { flex: 1; min-width: 0; color: var(--ink); }
.list li > a:hover { text-decoration: none; }
.list li > a:hover strong { color: var(--brand-2); }
.list.big li { padding: 14px 2px; }
.list form { margin: 0; }
.progress { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.steps { padding-left: 20px; } .steps li { margin-bottom: 6px; }
.errors { color: var(--bad); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 2px solid var(--line); padding: 0 0 14px 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); }
.tl-head { margin-bottom: 2px; }

/* Tabellen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:hover td { background: #fafcfd; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.dim td { opacity: .55; }
.space-block { padding: 0; overflow: hidden; }
.space-block > summary, .insp-space > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.space-block > summary::-webkit-details-marker, .insp-space > summary::-webkit-details-marker { display: none; }
.space-block > summary::after, .insp-space > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.space-block:not([open]) > summary::after, .insp-space:not([open]) > summary::after { transform: rotate(-90deg); }
.space-block .tbl th:first-child, .space-block .tbl td:first-child { padding-left: 16px; }
.space-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 14px; }
.stype { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c, #888); border: 1px solid currentColor; border-radius: 5px; padding: 1px 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }

/* MJOP-tabel */
.mjop { font-size: .82rem; }
.mjop th, .mjop td { padding: 7px 8px; }
.mjop .sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 210px; max-width: 280px; box-shadow: 1px 0 0 var(--line); }
.mjop th.sticky { background: #fafbfc; z-index: 2; }
.mjop tr.grp td { background: var(--brand-soft); font-weight: 700; }
.mjop tr.grp td.sticky { background: var(--brand-soft); }
.mjop td.hit { background: #f3f8fb; }
.mjop .overdue { color: var(--bad); background: #fff6f5; }
.mjop tfoot td { background: #fafbfc; border-top: 1px solid var(--line); }
.mjop tfoot tr.tot td { font-weight: 800; background: #eef3f7; }
.mjop tfoot td.sticky { background: #fafbfc; } .mjop tfoot tr.tot td.sticky { background: #eef3f7; }
.mjop-wrap { max-height: 75vh; }
.mjop thead th { position: sticky; top: 0; z-index: 2; }
.mjop thead th.sticky { z-index: 3; }

/* Grafiek */
.chart-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart { width: 100%; min-width: 560px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; }
.chart rect:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .85rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.distbar { display: flex; height: 26px; border-radius: 7px; overflow: hidden; margin-top: 12px; font-size: .78rem; font-weight: 700; }
.distbar span { display: grid; place-items: center; color: #fff; background: var(--cc); white-space: nowrap; overflow: hidden; }
.distbar span.c3 { color: #2d2a05; }

/* Foto's */
.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.thumb { position: relative; margin: 0; width: 96px; }
.thumb img, .thumb .pdf { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; background: var(--line-2); text-align: center; font-weight: 700; color: var(--ink-2); font-size: .85rem; line-height: 1.2; }
.thumb figcaption { font-size: .75rem; color: var(--muted); }
.thumb form { margin: 0; }
.thumb .x { position: absolute; top: -7px; right: -7px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.thumb.uploading img { opacity: .4; }
.thumb.uploading::after { content: ""; position: absolute; inset: 35px; border: 3px solid var(--brand-2); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Conditiekeuze (formulier) */
.cond-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.cond-pick label { flex-direction: row; margin: 0; cursor: pointer; }
.cond-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.cond-pick .cond { width: 40px; height: 40px; font-size: 1rem; opacity: .45; }
.cond-pick input:checked + .cond { opacity: 1; outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- Inspectietool ---------- */
body.inspect-mode .main { max-width: 820px; padding-top: 0; }
.insp-head {
  position: sticky; top: var(--top-h); z-index: 20; background: var(--bg); padding: 10px 0 8px; margin: 0 -2px 10px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 960px) { .insp-head { top: 0; } }
.insp-title { display: flex; align-items: center; gap: 10px; }
.insp-title .back { font-size: 2rem; line-height: 1; padding: 0 6px; color: var(--brand); }
.insp-title > div { flex: 1; min-width: 0; }
.insp-title strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp-title small { color: var(--muted); }
.sync { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #e3f3e8; color: #1d6a3b; white-space: nowrap; }
.sync.busy { background: var(--brand-soft); color: var(--brand); }
.sync.offline { background: #fdf1db; color: #8a5b0c; }
.sync.error { background: #fbe4e1; color: #a12a1b; }
.insp-tools { display: flex; gap: 8px; margin-top: 8px; }
.insp-tools input { flex: 1; }
.insp-tools select { width: auto; flex: 0 0 auto; }
.insp-count { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.insp-meta { padding: 0; }
.insp-meta summary { padding: 12px 16px; cursor: pointer; }
.insp-meta form { padding: 0 16px 6px; }
.insp-space { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.sp-count { font-size: .85rem; color: var(--muted); }
.sp-count b { color: var(--ok); }
.insp-item { border-top: 1px solid var(--line-2); }
.ii-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 60px; }
.ii-head:active { background: var(--bg); }
.ii-name { flex: 1; min-width: 0; }
.ii-name strong { display: block; }
.ii-name small { color: var(--muted); }
.ii-score .cond { width: 36px; height: 36px; font-size: 1rem; border-radius: 9px; }
.ii-flags { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: var(--muted); }
.urgent-flag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bad); color: #fff; }
.insp-item.open { background: #fbfcfd; box-shadow: inset 3px 0 0 var(--brand-2); }
.insp-item.is-done .ii-name strong { color: var(--ink-2); }
.ii-body { padding: 4px 16px 16px; }
.score-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 6px; }
.score-btn {
  border: 2px solid var(--cc); background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 2px 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; font: inherit; min-height: 62px; touch-action: manipulation;
}
.score-btn b { font-size: 1.35rem; line-height: 1.1; color: var(--cc); }
.score-btn small { font-size: .62rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .02em; }
.score-btn.on { background: var(--cc); }
.score-btn.on b, .score-btn.on small { color: #fff; }
.score-btn.c3.on b, .score-btn.c3.on small { color: #2d2a05; }
.score-desc { min-height: 1.4em; }
.ii-body label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: .85rem; color: var(--ink-2); margin-bottom: 10px; }
.ii-body .grid2 { grid-template-columns: 1fr 1fr; }
.ii-body .grid2 .span2 { grid-column: 1 / -1; }
label.urgent { color: var(--bad) !important; background: #fff6f5; border: 1px solid #f6d3ce; border-radius: 9px; padding: 10px 12px; }
.photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.add-photo { width: 96px; height: 96px; border: 2px dashed #b8c4ce; border-radius: 10px; display: grid; place-items: center; text-align: center; cursor: pointer; color: var(--ink-2); font-weight: 600; margin: 0 !important; font-size: .85rem; line-height: 1.3; }
.add-photo:active { background: var(--brand-soft); }
.ii-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
.insp-finish { margin-top: 24px; }
.start-insp { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.start-insp label { flex: 1 1 240px; margin: 0; }

/* Rapport */
.report-item { border-top: 1px solid var(--line-2); padding: 12px 0; break-inside: avoid; }
.report-item:first-of-type { border-top: 0; }
.ri-head { margin-bottom: 4px; }
.ri-defect { font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.advice { background: var(--brand-soft); padding: 6px 10px; border-radius: 8px; }

/* Afdrukken */
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .topbar, .sidenav, .nav-backdrop, .no-print, .actions, .tabs, .toolbar, .filter-input { display: none !important; }
  body:not(.bare) .main { margin: 0; padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .card.flush { break-inside: auto; }
  .mjop-wrap { max-height: none; overflow: visible; }
  .mjop .sticky { position: static; box-shadow: none; }
  .mjop thead th { position: static; }
  a { color: inherit; }
  .cond, .distbar span, .chip i, .legend i, .dot, .chart rect { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .thumb, .thumb img { width: 120px; height: 120px; }
}
