:root {
  --achtergrond: #F3F4F1;
  --vlak: #FFFFFF;
  --inkt: #1B2430;
  --inkt-zacht: #46505C;
  --grijs: #6B7280;
  --lijn: #D9DCD6;
  --rood: #C8102E;
  --rood-licht: #FBE9EC;
  --groen: #2E7D4F;
  --groen-licht: #E6F2EA;
  --oranje: #B45309;
  --oranje-licht: #FDF1E0;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--achtergrond); color: var(--inkt);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: var(--inkt); }
.stil { color: var(--grijs); font-size: 14px; }
.kop { padding: 20px 18px 8px; }
.pagina { max-width: 560px; margin: 0 auto; padding: 0 0 100px; }
.pagina.breed { max-width: 1000px; }
.sectie { padding: 8px 18px; }
.kaart { background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 14px 16px; margin: 0 18px 12px; }
.kaart h2 { margin-bottom: 10px; }

/* Installatieplaat — het herkenningspunt van de app */
.plaat {
  margin: 12px 18px; background: var(--inkt); color: #fff; border-radius: var(--radius);
  border-left: 8px solid var(--rood); padding: 14px 16px 12px;
}
.plaat .soort { font-size: 12px; color: #B9C0CA; margin-bottom: 2px; }
.plaat .naam { font-size: 19px; font-weight: 700; line-height: 1.2; }
.plaat .sub { font-size: 14px; color: #D5DAE1; margin-top: 4px; }
.plaat .meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: #B9C0CA; }
.plaat .meta b { color: #fff; font-weight: 600; }

/* Formulieren */
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 5px; }
label .stil { font-weight: 400; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--inkt); background: #fff;
  border: 1px solid var(--lijn); border-radius: 8px; padding: 11px 12px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 3px solid rgba(27,36,48,.25); outline-offset: 1px; }
.rij { display: flex; gap: 10px; }
.rij > * { flex: 1; }
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; border-radius: 8px; padding: 13px 16px; border: 1px solid var(--inkt);
  background: var(--inkt); color: #fff; cursor: pointer; width: 100%; text-decoration: none;
}
.knop.twee { background: #fff; color: var(--inkt); }
.knop.rood { background: var(--rood); border-color: var(--rood); }
.knop.klein { width: auto; padding: 8px 12px; font-size: 14px; }
.knop:disabled { opacity: .5; cursor: default; }
.knop + .knop { margin-top: 10px; }
.tekstknop { background: none; border: 0; color: var(--inkt-zacht); font: inherit; text-decoration: underline; padding: 10px 0; cursor: pointer; }
.fout { background: var(--rood-licht); color: #8A0B20; border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.ok { background: var(--groen-licht); color: #1E5A38; border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.verborgen { display: none !important; }

/* Onderste actiebalk (duimbereik) */
.actiebalk {
  position: fixed; left: 0; right: 0; bottom: 0; background: rgba(243,244,241,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--lijn); padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
}
.actiebalk .binnen { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; }
.actiebalk .knop { margin: 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 4px 18px 10px; overflow-x: auto; }
.tabs button {
  font: inherit; font-size: 14px; font-weight: 600; background: none; border: 0; padding: 8px 10px; color: var(--grijs);
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs button.actief { color: var(--inkt); border-color: var(--inkt); }

/* Lijsten */
.lijst { list-style: none; margin: 0; padding: 0; }
.lijst li { padding: 11px 0; border-top: 1px solid var(--lijn); display: flex; gap: 10px; align-items: flex-start; }
.lijst li:first-child { border-top: 0; }
.lijst .inhoud { flex: 1; min-width: 0; }
.lijst .titel { font-weight: 600; }
.lijst .sub { font-size: 13px; color: var(--grijs); margin-top: 2px; }
.stip { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--grijs); }
.stip.open { background: var(--rood); }
.stip.afgehandeld { background: var(--groen); }
.status { font-size: 13px; font-weight: 600; }
.status.open { color: var(--rood); }
.status.afgehandeld { color: var(--groen); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--achtergrond); color: var(--inkt-zacht); }
.tag.rood { background: var(--rood-licht); color: #8A0B20; }
.tag.groen { background: var(--groen-licht); color: #1E5A38; }
.tag.oranje { background: var(--oranje-licht); color: var(--oranje); }

/* Sleutel-waarde */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--grijs); }
.kv dd { margin: 0; word-break: break-word; }

/* Handtekening */
.handtekening { border: 1px dashed var(--grijs); border-radius: 8px; background: #fff; touch-action: none; width: 100%; height: 150px; display: block; }
.handtekening-rij { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }

/* Foto's */
.fotos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fotos img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--lijn); }

/* Vinkjes */
.vink { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 15px; margin: 8px 0; }
.vink input { width: 20px; height: 20px; margin: 0; }

/* Beheer */
.beheerkop { display: flex; justify-content: space-between; align-items: center; padding: 20px 18px 8px; }
.tabel { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabel th { text-align: left; color: var(--grijs); font-weight: 600; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--lijn); }
.tabel td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--lijn); vertical-align: top; }
.tabel tr:last-child td { border-bottom: 0; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--achtergrond); padding: 2px 5px; border-radius: 4px; }
.codegroot { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; font-weight: 700; letter-spacing: .06em; }
details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: draai .8s linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
@media (min-width: 720px) { .kolommen { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } }
