:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1b1f2a; --muted: #5d6475; --line: #dde1e8;
  --navy: #14213d; --accent: #fca311; --accent-ink: #1b1f2a; --link: #1d4ed8;
  --ok: #157347; --bad: #b42318; --radius: 12px; --shadow: 0 1px 2px rgba(20,33,61,.08), 0 2px 8px rgba(20,33,61,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141f; --card: #182030; --ink: #e8ebf2; --muted: #9aa3b5; --line: #2a3447;
    --link: #8ab4ff; --ok: #4ade80; --bad: #f87171; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--link); }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .6rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }

/* kopbalk */
.top { position: sticky; top: 0; z-index: 10; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 1rem;
  padding: .5rem max(16px, env(safe-area-inset-left)); flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-weight: 700; }
.nav { display: flex; gap: .25rem; overflow-x: auto; margin-left: auto; scrollbar-width: none; }
.nav a { color: #d7dcea; text-decoration: none; padding: .45rem .7rem; border-radius: 8px; white-space: nowrap; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.actief { background: rgba(252,163,17,.18); color: var(--accent); }
.badge { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; text-align: center; line-height: 1.3em; }
@media (max-width: 640px) {
  .top { gap: .25rem; padding-bottom: 0; }
  .nav { margin-left: 0; width: calc(100% + 32px); margin-inline: -16px; padding: 0 12px .4rem; }
}

.app { max-width: 1080px; margin: 0 auto; padding: 1.25rem 16px 4rem; }
.app.vol { max-width: none; padding: 0; }

/* kaarten en formulieren */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.stack > * + * { margin-top: .9rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row.tussen { justify-content: space-between; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .875rem; }
input[type=text], input[type=password], input[type=url], textarea, select {
  width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem;
}
textarea { min-height: 5rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
button, .knop { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px;
  padding: .55rem 1rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }
button:hover, .knop:hover { border-color: var(--muted); }
.primair { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.primair:hover { filter: brightness(1.05); border-color: var(--accent); }
.gevaar { color: var(--bad); }
.klein { min-height: 36px; padding: .3rem .7rem; font-size: .875rem; }
button:disabled { opacity: .55; cursor: default; }
.fout { color: var(--bad); font-weight: 600; }
.login { max-width: 400px; margin: 8vh auto 0; }
.keuze { display: flex; gap: .5rem; flex-wrap: wrap; }
.keuze label { font-weight: 500; display: flex; gap: .4rem; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .8rem; cursor: pointer; margin: 0; }
.keuze input { margin: 0; }

/* tools */
.zoek { max-width: 320px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.tool { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; color: inherit; position: relative; transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--accent); transform: translateY(-1px); }
.tool .icoon { font-size: 1.8rem; line-height: 1; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; background: var(--bg); border-radius: 10px; }
.tool strong { font-size: 1.05rem; }
.tool .meta { font-size: .8rem; color: var(--muted); margin-top: auto; }
.pin { position: absolute; top: .7rem; right: .8rem; font-size: .75rem; color: var(--muted); }
.toevoegen { border-style: dashed; align-items: center; justify-content: center; text-align: center; color: var(--muted); min-height: 140px; }
.toolframe { display: flex; flex-direction: column; height: calc(100dvh - 52px); }
.toolbalk { display: flex; gap: .6rem; align-items: center; padding: .5rem 16px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolframe iframe { flex: 1; border: 0; width: 100%; background: #fff; }
@media (max-width: 640px) { .toolframe { height: calc(100dvh - 96px); } }

/* bestanden */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.actief { color: var(--ink); border-color: var(--accent); }
.zending { margin-bottom: .8rem; }
.zending.nieuw { border-left: 4px solid var(--accent); }
.zending .kop { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.bericht { white-space: pre-wrap; margin: .5rem 0; }
.bestandlijst { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .4rem; }
.bestandlijst li { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; background: var(--bg); border-radius: 8px; padding: .4rem .6rem; }
.bestandlijst .naam { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.voorbeeld { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; margin-top: .4rem; }
.collegas { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: .3rem; }
.collegas label { font-weight: 500; display: flex; gap: .6rem; align-items: center; padding: .45rem .5rem; border-radius: 6px; margin: 0; cursor: pointer; }
.collegas label:hover { background: var(--bg); }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.4rem; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--accent); background: rgba(252,163,17,.08); }
progress { width: 100%; height: 10px; accent-color: var(--accent); }

/* tabel gebruikers */
.tabel { width: 100%; border-collapse: collapse; }
.tabel th, .tabel td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabel th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.uit { opacity: .55; }
@media (max-width: 640px) { .tabel .opt { display: none; } }
.code { font-family: ui-monospace, Consolas, monospace; background: var(--bg); padding: .5rem .7rem; border-radius: 8px; font-size: 1.1rem; display: inline-block; user-select: all; }

.toast { position: fixed; bottom: max(1rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff;
  padding: .7rem 1.1rem; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.25); z-index: 50; max-width: calc(100% - 32px); }

/* Menco */
.chat { display: flex; flex-direction: column; gap: .6rem; max-height: 60vh; overflow-y: auto; padding-right: .2rem; }
.bel { border-radius: 12px; padding: .6rem .8rem; max-width: 92%; }
.bel p { margin: .3rem 0; }
.bel.jij { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.bel.menco { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.vondst { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; margin: .5rem 0; }
.vondst .stuk { white-space: pre-wrap; font-size: .95rem; }
mark { background: rgba(252,163,17,.35); color: inherit; border-radius: 3px; padding: 0 .1em; }
details > summary { list-style-position: inside; }
.antwoord { border-left: 4px solid var(--accent); padding: .1rem 0 .1rem .7rem; margin: .4rem 0; }
.antwoord p:first-child { font-size: 1.05rem; }
.meer { margin-top: .5rem; }
.meer > summary { cursor: pointer; font-weight: 600; color: var(--link); padding: .3rem 0; }
ul.antwoord { margin: .3rem 0; padding-left: 1.2rem; border-left: 4px solid var(--accent); }
ul.antwoord li { margin: .45rem 0; }
.bronlabel { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.let-op { background: rgba(252,163,17,.12); border: 1px solid rgba(252,163,17,.45); border-radius: 8px; padding: .45rem .6rem; }
.ai-antwoord { background: var(--card); border: 1px solid var(--accent); border-radius: 10px; padding: .6rem .8rem; margin: .5rem 0 .8rem; }
.ai-tekst { font-size: 1.05rem; margin: .4rem 0 .2rem; white-space: pre-line; }
.bronchip { display: inline-flex; align-items: center; gap: .2rem; font-size: .78rem; background: rgba(252,163,17,.15); border: 1px solid rgba(252,163,17,.45);
  border-radius: 99px; padding: 0 .5rem; margin: 0 .15rem; text-decoration: none; color: inherit; white-space: nowrap; vertical-align: middle; }
a.bronchip:hover { background: rgba(252,163,17,.3); }
.cursor { animation: knipper 1s steps(2) infinite; color: var(--accent); }
@keyframes knipper { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
.eerder { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .6rem; }
.eerder:empty { display: none; }
button.chip { min-height: 32px; padding: .2rem .7rem; border-radius: 99px; font-weight: 500; font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Menco met zijmenu veelgestelde vragen */
.menco-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; margin-top: 1rem; align-items: start; }
.faq-plek:empty { display: none; }
.faq { position: sticky; top: 64px; max-height: calc(100dvh - 80px); overflow-y: auto; }
.faq > summary { cursor: pointer; font-weight: 700; }
.faq input { margin-bottom: .5rem; }
.faq-item { border-top: 1px solid var(--line); padding: .5rem 0; }
.faq-item > summary { cursor: pointer; font-weight: 500; line-height: 1.35; }
.faq-item[open] > summary { color: var(--accent); }
.faq-antwoord p { margin: .4rem 0; }
@media (max-width: 999px) {
  .menco-grid { grid-template-columns: 1fr; }
  .faq-plek { order: -1; }
  .faq { position: static; max-height: none; }
}
/* Menco: mappen voor bronnen */
.bronlijst { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: .2rem .4rem; }
.bronmap { border-bottom: 1px solid var(--line); }
.bronmap:last-child { border-bottom: 0; }
.bronmap > summary { display: flex; align-items: center; gap: .45rem; cursor: pointer; padding: .45rem .2rem; list-style: none; }
.bronmap > summary::-webkit-details-marker { display: none; }
.bronmap > summary::before { content: '▸'; color: var(--muted); width: .8rem; }
.bronmap[open] > summary::before { content: '▾'; }
.bronrij { display: flex; align-items: center; gap: .5rem; padding: .3rem .2rem .3rem 1.9rem; flex-wrap: wrap; border-radius: 6px; }
.bronrij:hover { background: var(--bg); }
.klein-select { width: auto; max-width: 11rem; padding: .25rem .4rem; font-size: .8rem; min-height: 32px; }
/* Menco: antwoord van internet */
.web-antwoord { background: var(--card); border: 1px dashed var(--link); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0 .2rem; }
.webchip { background: rgba(29,78,216,.12); border-color: rgba(29,78,216,.45); }
@media (prefers-color-scheme: dark) { .webchip { background: rgba(138,180,255,.15); border-color: rgba(138,180,255,.45); } }
/* Menco: zijmenu "Zoeken in" */
.app.breed { max-width: 1440px; }
.menco-grid { grid-template-columns: 270px minmax(0, 1fr) 300px; }
.zoekin { position: sticky; top: 64px; max-height: calc(100dvh - 80px); overflow-y: auto; padding: .8rem; }
.zoekmap { display: flex; align-items: center; gap: .3rem; margin: .15rem 0; }
.schakel { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; text-align: left; padding: .45rem .5rem; min-height: 40px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 500; }
.schakel .knopje { flex: none; width: 30px; height: 17px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.schakel .knopje::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: left .15s; }
.zoekmap.aan .schakel { border-color: var(--accent); background: rgba(252,163,17,.12); }
.zoekmap.aan .knopje { background: var(--accent); }
.zoekmap.aan .knopje::after { left: 15px; }
.zoekmap.deels .knopje { background: rgba(252,163,17,.5); }
.zoekmap.deels .knopje::after { left: 8.5px; }
.zoekmap.uit .mapnaam { color: var(--muted); }
.schakel .mapnaam { flex: 1; min-width: 0; line-height: 1.25; overflow-wrap: anywhere; }
.schakel .teller { font-size: .75rem; color: var(--muted); flex: none; }
.zoekmap .alleen { min-height: 40px; padding: .2rem .45rem; flex: none; }
.zoekin .tip { margin: .6rem 0 0; }
.zoekregel { margin: .45rem 0 0; }
@media (max-width: 1199px) {
  .menco-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .menco-grid .faq-plek { grid-column: 1 / -1; order: 0; }
  .faq { position: static; max-height: none; }
}
@media (max-width: 799px) {
  .menco-grid { grid-template-columns: 1fr; }
  .zoekin { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
  .zoekin > .row:first-child { width: 100%; }
  .zoekmap { margin: 0; }
  .schakel { flex: none; min-height: 36px; padding: .3rem .55rem; }
  .schakel .mapnaam { max-width: 9rem; }
  .zoekin .tip { width: 100%; }
}
/* Radar */
.radar-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; margin-top: 1rem; align-items: start; }
.radar-lijst { display: grid; gap: .75rem; }
.radar-item h3 { margin: .35rem 0 .3rem; font-size: 1.05rem; line-height: 1.35; }
.radar-item h3 a { color: inherit; }
.radar-item p { margin: .3rem 0; }
.radar-labels { display: flex; flex-wrap: wrap; gap: .3rem; }
.radar-label { font-size: .75rem; padding: .05rem .5rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.radar-label.soort-lek { border-color: #d64545; color: #d64545; }
.radar-label.soort-storing { border-color: #e0a100; color: #b88400; }
.radar-label.soort-product { border-color: #2f8f5b; color: #2f8f5b; }
.radar-label.soort-evenement { border-color: #3d6fd1; color: #3d6fd1; }
.radar-label.merk { font-weight: 600; color: var(--ink); }
.radar-ev { position: sticky; top: 64px; max-height: calc(100dvh - 80px); overflow-y: auto; }
.radar-ev-item { border-top: 1px solid var(--line); padding: .5rem 0; }
.radar-form { display: grid; gap: .5rem; margin-top: .75rem; }
.radar-form[hidden] { display: none; }
@media (max-width: 899px) { .radar-grid { grid-template-columns: 1fr; } .radar-ev { position: static; order: -1; max-height: none; } }
.radar-ev-item.feestdag { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; padding: .3rem 0; font-size: .9rem; }
.radar-ev-item.feestdag > .small { white-space: nowrap; }
