/* Grizzly Rapportagecontrole — huisstijl: donkerblauw, oranje, lichtblauw, wit. */
@font-face {
  font-family: 'Archivo';
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #102C42;
  --navy-2: #1B3D57;
  --navy-3: #2A5272;
  --orange: #F9A51B;
  --orange-press: #E2900A;
  --sky: #E8F2F8;
  --sky-2: #D3E3EE;
  --white: #FFFFFF;
  --ink: #102C42;
  --muted: #50687B;
  --line: #D3E3EE;
  --rust: #B5471B;      /* aandachtspunt */
  --rust-bg: #FBEDE6;
  --slate: #5E7383;     /* niet controleerbaar */
  --slate-bg: #EEF2F5;
  --pine: #2D7A57;      /* geen aandachtspunt */
  --pine-bg: #E7F4EE;
  --focus: #F9A51B;
  --r-card: 10px;
  --r-ctl: 6px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink);
  background: var(--sky); font-stretch: 100%;
}
a { color: var(--navy-3); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; background: var(--orange); color: var(--navy); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-stretch: 78%; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 .75em; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }

/* ---------- Kopband ---------- */
.topbar { background: var(--navy); color: var(--white); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--white); text-decoration: none; }
.brand-mark { width: 14px; height: 14px; background: var(--orange); border-radius: 3px; align-self: center; }
.brand-name { font-weight: 850; font-stretch: 72%; font-size: 1.35rem; letter-spacing: .01em; }
.brand-app { font-weight: 400; font-size: .95rem; color: #B9CCDB; }
.mainnav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.mainnav a { color: #CFE0EC; text-decoration: none; padding: 18px 12px 15px; border-bottom: 3px solid transparent; font-weight: 550; }
.mainnav a:hover { color: var(--white); }
.mainnav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--orange); }
.mainnav .pill { background: var(--orange); color: var(--navy); border-radius: 10px; padding: 0 7px; font-size: .78rem; font-weight: 800; margin-left: 4px; }
.userbox { display: flex; align-items: center; gap: 12px; color: #CFE0EC; font-size: .9rem; }
.userbox button { background: transparent; color: var(--white); border: 1px solid var(--navy-3); }
.userbox button:hover { background: var(--navy-2); }

/* ---------- Telbord (groepen) ---------- */
.board { background: var(--navy); color: var(--white); border-top: 1px solid var(--navy-2); }
.board-inner { max-width: 1240px; margin: 0 auto; padding: 18px 20px 0; }
.board-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.board-title h1 { color: var(--white); margin: 0; }
.board-title .muted { color: #A9C0D2; }
.groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.group {
  appearance: none; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; min-height: 0; background: transparent; border: 0; color: #BFD3E2; text-align: left; cursor: pointer;
  padding: 10px 14px 14px; border-bottom: 4px solid transparent; font: inherit; border-radius: 0;
}
.group:hover { background: var(--navy-2); color: var(--white); }
.group[aria-pressed="true"] { border-bottom-color: var(--orange); color: var(--white); background: var(--navy-2); }
.group-count { display: block; font-size: 2.6rem; font-weight: 850; font-stretch: 66%; line-height: 1; font-variant-numeric: tabular-nums; }
.group-label { display: block; font-size: .9rem; margin-top: 4px; }
.group-sub { display: block; font-size: .78rem; color: #8FAAC0; margin-top: 2px; }

/* ---------- Pagina ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; margin-bottom: 18px; }
.panel > h2:first-child { margin-top: 0; }
.notice { border-left: 4px solid var(--orange); background: #FFF7E8; padding: 12px 14px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; margin-bottom: 14px; }
.notice.info { border-left-color: var(--navy-3); background: var(--white); }
.notice.err { border-left-color: var(--rust); background: var(--rust-bg); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Formulieren ---------- */
label { font-weight: 600; font-size: .88rem; display: block; margin-bottom: 4px; }
input[type=text], input[type=search], input[type=password], input[type=date], input[type=number], select, textarea {
  font: inherit; color: var(--ink); background: var(--white); border: 1px solid #B7CCDB; border-radius: var(--r-ctl);
  padding: 8px 10px; width: 100%; min-height: 40px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-3); outline: 2px solid rgba(249,165,27,.6); outline-offset: 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.check input { margin-top: 4px; }
button, .btn {
  font: inherit; font-weight: 650; cursor: pointer; border-radius: var(--r-ctl); padding: 8px 14px; min-height: 40px;
  border: 1px solid #B7CCDB; background: var(--white); color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
button:hover, .btn:hover { border-color: var(--navy-3); }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-2); color: var(--white); }
.btn-report { background: var(--orange); border-color: var(--orange); color: var(--navy); font-weight: 750; }
.btn-report:hover { background: var(--orange-press); border-color: var(--orange-press); color: var(--navy); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--navy-3); padding: 6px 8px; min-height: 32px; }
.btn-quiet:hover { background: var(--sky); border-color: transparent; }
.btn-danger { color: var(--rust); border-color: #E2B9A6; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 180px; }
.row > .shrink { flex: 0 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }

/* ---------- Filterbalk ---------- */
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; }
.filters-grid { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1.2fr 1.2fr 1fr; gap: 10px 12px; align-items: end; }
.filters-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.filters-toggle { display: none; }
.filters-foot .row { flex: 0 1 auto; align-items: center; }
.filters-foot .row > * { flex: 0 0 auto; }
.result-count { font-weight: 650; }

/* ---------- Campagnekaarten ---------- */
.cards { display: grid; gap: 12px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sky-2); }
.card[data-status="aandachtspunt"]::before { background: var(--rust); }
.card[data-status="geen"]::before { background: var(--pine); }
.card[data-status="niet_controleerbaar"]::before { background: var(--slate); }
.card-head { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; padding: 16px 18px 12px 22px; align-items: start; }
.card-title { font-size: 1.15rem; font-weight: 750; font-stretch: 82%; margin: 0 0 6px; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.card-meta b { color: var(--ink); font-weight: 600; }
.card-action { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.no-url { color: var(--rust); font-weight: 650; font-size: .92rem; padding: 9px 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--slate-bg); color: var(--slate); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.aandachtspunt { background: var(--rust-bg); color: var(--rust); }
.status.geen { background: var(--pine-bg); color: var(--pine); }
.status.niet_gecontroleerd { background: var(--white); color: var(--muted); border: 1px dashed #A8BDCC; }
.chip { display: inline-block; font-size: .78rem; padding: 1px 7px; border-radius: 4px; background: var(--sky); color: var(--navy-3); font-weight: 600; }
.chip.inactive { background: #F1E7D7; color: #7A5314; }
.card-body { padding: 0 18px 12px 22px; }
.period { border-top: 1px solid var(--sky-2); padding: 10px 0 4px; }
.period-head { font-weight: 700; font-size: .9rem; margin-bottom: 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.period-head a { font-weight: 500; font-size: .84rem; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.finding { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: .9rem; }
.finding .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--slate); }
.finding[data-status="aandachtspunt"] .dot { background: var(--rust); }
.finding[data-status="onderdrukt"] .dot { background: transparent; border: 2px solid var(--slate); }
.finding[data-status="geen"] .dot { background: var(--pine); }
.finding-comp { font-weight: 650; }
.finding-meta { color: var(--muted); font-size: .8rem; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1px; }
.method { font-size: .74rem; font-weight: 700; padding: 0 6px; border-radius: 3px; border: 1px solid var(--sky-2); color: var(--navy-3); }
.method.visueel { border-color: #F3CE8E; color: #8A5A08; }
.method.historisch { border-color: #C9B8E0; color: #5B3F86; }
details.suppressed summary { cursor: pointer; color: var(--muted); font-size: .86rem; margin: 4px 0; }
.note-box { border-top: 1px solid var(--sky-2); background: #F7FBFD; padding: 12px 18px 14px 22px; }
.note-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-indicator { font-size: .86rem; color: var(--muted); }
.note-indicator.has { color: var(--navy); font-weight: 650; }
.note-indicator.draft { color: #8A5A08; font-weight: 650; }
.note-editor { margin-top: 10px; }
.note-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.save-msg { font-size: .86rem; }
.save-msg.ok { color: var(--pine); font-weight: 650; }
.save-msg.err { color: var(--rust); font-weight: 650; }
.save-msg.info { color: #8A5A08; font-weight: 650; }
.conflict { margin-top: 10px; border: 1px solid #E8C08A; background: #FFF7E8; border-radius: var(--r-ctl); padding: 12px; }
.conflict pre { white-space: pre-wrap; font-family: inherit; background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 8px; max-height: 180px; overflow: auto; margin: 6px 0 10px; }

/* ---------- Paginering ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.pager button[aria-current="page"] { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--sky-2); vertical-align: top; }
table.data th { font-weight: 700; font-size: .84rem; color: var(--muted); background: #F7FBFD; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Voortgang ---------- */
.progress { height: 10px; background: var(--sky); border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--orange); transition: width .4s; }
.run { border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; background: var(--white); margin-bottom: 10px; }
.run-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 10px 0; font-size: .9rem; }
.stats b { font-size: 1.25rem; font-stretch: 72%; display: block; font-variant-numeric: tabular-nums; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 20px; }
.login { background: var(--white); border-radius: 12px; padding: 30px; width: 100%; max-width: 400px; }
.login h1 { font-size: 1.6rem; }
.login .brand-name { color: var(--navy); }

/* ---------- Tabs (beheer) ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; min-height: 40px; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--orange); }

/* ---------- Toasts ---------- */
.toast-region { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--navy); color: var(--white); padding: 12px 14px; border-radius: 8px; border-left: 5px solid var(--orange); }
.toast.err { border-left-color: #F06A3A; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); background: var(--white); border: 1px dashed #B7CCDB; border-radius: var(--r-card); }
.mapping-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: .9rem; }

/* ---------- Mobiel ---------- */
@media (max-width: 980px) {
  .filters-grid { grid-template-columns: 1fr 1fr; }
  .filters-grid .f-search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .topbar-inner { gap: 6px 14px; padding: 8px 14px 0; }
  .brand-app { display: none; }
  .mainnav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .mainnav a { padding: 10px 10px 9px; white-space: nowrap; }
  .board-inner { padding: 14px 14px 0; }
  .groups { grid-template-columns: repeat(5, minmax(108px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; }
  .group { scroll-snap-align: start; padding: 8px 10px 12px; }
  .group-count { font-size: 2rem; }
  .page { padding: 14px 12px 50px; }
  .filters { position: static; }
  .filters-toggle { display: inline-flex; width: 100%; }
  .filters.collapsed .filters-grid, .filters.collapsed .filters-foot .clear { display: none; }
  .filters-grid { grid-template-columns: 1fr; margin-top: 10px; }
  .card-head { grid-template-columns: 1fr; padding: 14px 14px 10px 18px; }
  .card-action { align-items: stretch; }
  .card-action .status { align-self: flex-start; }
  .group-label { font-size: .84rem; line-height: 1.25; }
  .card-action .btn-report { width: 100%; min-height: 46px; }
  .card-body, .note-box { padding-left: 18px; padding-right: 14px; }
  h1 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
