:root {
  --gw-green: #1e7b3c;
  --gw-green-dark: #1b5e30;
  --gw-green-ink: #2e7d32;
  --gw-green-soft: #e8f4ea;
  --gw-green-row: #eef6ef;
  --page: #f4f5f2;
  --surface: #ffffff;
  --ink: #1c1c1a;
  --ink-2: #52514e;
  --muted: #7a7873;
  --hairline: #e4e5e0;
  --good: #1e7b3c;
  --bad: #c62828;
  --bad-bg: #fdecec;
  --warn-bg: #fff6e0;
  --warn-ink: #6b4a00;
  --info-bg: #eaf2fc;
  --info-ink: #184f95;
  --err-bg: #fdecec;
  --radius: 0.5rem;
  font-family: "Nunito Sans", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}

/* Dashboard schaalt mee met grote schermen: alle maten staan in rem. Tot ca. 2000x990 blijft 1rem = 16px;
   daarboven groeit alles naar verhouding (begrensd door breedte én hoogte), zodat het beeld gelijk blijft. */
html:has(.app) { font-size: clamp(16px, min(0.8vw, 1.62vh), 28px); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
button { font: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 1.5rem; padding: 0.5rem 1rem;
  background: var(--gw-green-dark); color: #fff; min-height: 2.875rem;
}
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1rem; }
.brand-mark { width: 1.375rem; height: 1.25rem; background: url("logo.png") center / contain no-repeat; display: inline-block; flex-shrink: 0; }
.brand-sub { font-weight: 400; opacity: .75; font-size: 0.875rem; padding-left: 0.625rem; border-left: 1px solid rgba(255,255,255,.3); }
.user { margin-left: auto; display: flex; align-items: center; gap: 0.625rem; font-size: 0.75rem; }
.user-who { display: flex; flex-direction: column; line-height: 1.25; gap: 2px; }
.user-kicker { font-size: 0.625rem; opacity: .8; }
.user-who .user-name { background: rgba(255,255,255,.95); color: var(--ink); border-radius: 0.25rem; padding: 3px 0.5rem; font-size: 0.75rem; }
.user-who .user-role { color: var(--muted); }
.logout { color: #fff; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); border-radius: 0.25rem; padding: 0.3125rem 0.625rem; text-decoration: none; font-size: 0.75rem; font-weight: 600; }
.logout:hover { background: rgba(255,255,255,.18); }

/* ---------- Shell: zijbalk + inhoud ---------- */
.shell { display: grid; grid-template-columns: 12.375rem minmax(0, 1fr); gap: 0.875rem; padding: 0.875rem 0.75rem 1.5rem; align-items: start; }
.sidebar {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 0.875rem 0.75rem; display: flex; flex-direction: column; gap: 0.75rem; position: sticky; top: 0.75rem;
  z-index: 20; /* dropdown-popups moeten boven de inhoud vallen */
}
.sidebar .dash-dropdown-content { min-width: max(var(--radix-popover-trigger-width), 20rem); max-width: min(30rem, 96vw); }
.sidebar .dash-dropdown-option { white-space: normal; overflow-wrap: anywhere; }
.field { display: flex; flex-direction: column; gap: 0.3125rem; }
.field > label { font-size: 0.6875rem; color: var(--muted); }
.field-hint { font-size: 0.6562rem; line-height: 1.35; color: var(--muted); margin: 0.375rem 0 0; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.375rem; }
.field-pair .dash-dropdown-wrapper { min-width: 0; width: 100%; }
.field-pair .dash-dropdown { width: 100%; min-width: 0; }
.sidebar .dash-dropdown-value-item { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .dash-dropdown { min-height: 2rem; height: 2rem; padding: 0 0.5rem 0 0.625rem; border: 1px solid var(--hairline); border-radius: 0.25rem; font-size: 0.75rem; background: var(--surface); color: var(--ink); }
.sidebar .dash-dropdown:hover { border-color: #b9dcbf; }
.sidebar .dash-dropdown-value, .sidebar .dash-dropdown-placeholder { font-size: 0.75rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .dash-dropdown-trigger { display: flex; align-items: center; gap: 0.25rem; width: 100%; height: 100%; padding: 0; }
.sidebar .dash-dropdown-value { flex: 1; min-width: 0; text-align: left; }
.sidebar .dash-dropdown-trigger-icon { width: 0.8125rem; height: 0.8125rem; color: var(--ink); flex-shrink: 0; }
.field-pair .dash-dropdown { padding: 0 3px 0 0.4375rem; }
.field-pair .dash-dropdown-trigger { gap: 2px; }
.dash-dropdown-content, .dash-dropdown-options { font-size: 0.75rem; }

/* Schakelaar 'Vergelijk' */
.switch label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 2rem; height: 1.125rem; border-radius: 62.4375rem; background: #c9cbc5; position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 0.875rem; height: 0.875rem; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: #3fae5c; }
.switch input:checked::after { transform: translateX(0.875rem); }
.switch input:focus-visible { outline: 3px solid #7fc97f; outline-offset: 2px; }
.check label { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; }
.check input { accent-color: var(--gw-green); margin: 0; }

.actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 2px; }
.btn { background: var(--gw-green-dark); color: #fff; border: 1px solid var(--gw-green-dark); border-radius: 0.25rem; padding: 0.5rem 0.625rem; font-weight: 700; cursor: pointer; font-size: 0.75rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; }
.btn:hover { background: #154a26; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--hairline); }
.btn-ghost:hover { background: var(--gw-green-soft); }
.btn:focus-visible, .chip-x:focus-visible, .logout:focus-visible, .kpi-card:focus-visible, .legend-name:focus-visible { outline: 3px solid #7fc97f; outline-offset: 2px; }
.badge { background: var(--bad); color: #fff; border-radius: 62.4375rem; font-size: 0.625rem; min-width: 1rem; height: 1rem; padding: 0 0.25rem; display: inline-grid; place-items: center; }

/* ---------- Notificaties ---------- */
.main { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.notifications { display: flex; flex-direction: column; gap: 0.375rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 0.625rem; }
.notifications[hidden] { display: none; }
.notes-empty { margin: 0; font-size: 0.75rem; color: var(--muted); }

/* ---------- KPI-tegels (tevens paginakeuze) ---------- */
.content { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.kpi-card {
  text-align: left; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 0.875rem 1rem 0.75rem; cursor: pointer; color: inherit; min-height: 6.375rem; display: flex; flex-direction: column;
  align-items: flex-start; gap: 0.25rem; transition: border-color .15s, box-shadow .15s;
}
.kpi-card:hover { border-color: #b9dcbf; }
.kpi-card.is-active { border: 2px solid #3d9a52; padding: 0.8125rem 0.9375rem 0.6875rem; }
.kpi-label { font-size: 0.6875rem; color: var(--muted); display: flex; align-items: center; gap: 0.375rem; }
/* Lijnicoontjes (SVG als masker, kleur via currentColor) */
.kpi-icon { color: var(--gw-green-ink); width: 0.8125rem; height: 0.8125rem; display: inline-block; flex-shrink: 0; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.icon-box { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='m3 8 9 5 9-5M12 13v8'/%3E%3C/svg%3E"); }
.icon-euro { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M15.5 8.6a4.2 4.2 0 1 0 0 6.8M7.5 10.8h6M7.5 13.2h6'/%3E%3C/svg%3E"); }
.icon-cloud { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19H7a5 5 0 1 1 1.1-9.9A6 6 0 0 1 19.6 11 4 4 0 0 1 17.5 19z'/%3E%3C/svg%3E"); }
.kpi-value { font-size: 1.4375rem; font-weight: 800; color: var(--gw-green-ink); line-height: 1.2; margin-top: 0.25rem; }
.kpi-delta { margin-top: 2px; }
.kpi-foot { font-size: 0.6562rem; color: var(--muted); margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 2px; font-size: 0.6562rem; font-weight: 700; border-radius: 62.4375rem; padding: 1px 0.375rem; }
.pill-year { font-weight: 400; opacity: .8; margin-left: 2px; }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-good { background: var(--gw-green-soft); color: var(--good); }
.pill-neutral, .pill-na { background: #efefeb; color: var(--muted); }

/* ---------- Paneel ---------- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 0.75rem; background: var(--gw-green-dark); color: #fff; padding: 0.5625rem 0.75rem; min-height: 2rem; }
.panel-head h2 { margin: 0; font-size: 0.75rem; font-weight: 800; }
.panel-hint { margin-left: auto; font-size: 0.625rem; opacity: .9; }
.panel-body { padding: 0.875rem 0.75rem 0.5rem; }
.panel-sub { font-size: 0.75rem; margin: 1.25rem 0 0.375rem; }
.source-note { font-size: 0.6562rem; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--hairline); padding: 0.625rem 0.75rem 0.75rem; }
.chip-page { display: inline-flex; align-items: center; gap: 0.375rem; background: rgba(255,255,255,.16); border-radius: 62.4375rem; padding: 2px 0.25rem 2px 0.625rem; font-weight: 700; }
.chip-x { border: 0; background: rgba(255,255,255,.2); color: #fff; width: 1.125rem; height: 1.125rem; border-radius: 50%; font-size: 0.8125rem; line-height: 1; cursor: pointer; padding: 0; }

.breakdown { display: grid; grid-template-columns: 8.75rem minmax(0, 1fr); gap: 1.75rem; align-items: start; padding: 0.25rem 0 0 0.375rem; }
.breakdown .graph { width: 8.75rem; height: 8.75rem; } /* donut volgt de rem-schaal */
.legend { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.legend-more { border: 1px dashed #9fcfa8; border-radius: 0.25rem; padding: 0 0.625rem; }
.legend-more-summary { cursor: pointer; font-size: 0.6562rem; color: var(--gw-green-ink); padding: 0.375rem 0; list-style: none; display: flex; align-items: center; gap: 0.375rem; }
.legend-more-summary::-webkit-details-marker { display: none; }
.legend-more-summary::before { content: ""; border: 0.25rem solid transparent; border-left: 0.3125rem solid currentColor; border-right: 0; transition: transform .15s; }
.legend-more[open] > .legend-more-summary::before { transform: rotate(90deg); }
.legend-more[open] > .legend-more-summary { border-bottom: 1px dashed #cfe5d3; }
.legend-more-summary:hover { text-decoration: underline; }
.legend-more-summary:focus-visible { outline: 3px solid #7fc97f; outline-offset: 2px; }
/* Uitgeklapte lijst valt als laag over de grafiek, zodat de pagina niet langer wordt */
.legend-more { position: relative; }
.legend-more-list { position: absolute; z-index: 15; left: -1px; right: -1px; top: 100%; background: var(--surface);
  border: 1px dashed #9fcfa8; border-top: 0; border-radius: 0 0 0.25rem 0.25rem; padding: 0.25rem 0.625rem 0.375rem;
  max-height: min(20rem, 36vh); overflow-y: auto; box-shadow: 0 0.5rem 1.125rem rgba(0,0,0,.08); }
.legend-more[open] { border-radius: 0.25rem 0.25rem 0 0; }

/* ---------- Schermvullend (16:9 e.d.): geen paginascroll; de staafgrafiek krimpt of groeit mee ---------- */
.graph-fill { min-height: 8.75rem; }
@media (min-width: 1001px) and (min-height: 600px) {
  html, body { height: 100%; overflow: hidden; }
  #react-entry-point, #_dash-app-content, .app { height: 100%; }
  .app { display: flex; flex-direction: column; }
  .topbar { flex-shrink: 0; }
  .shell { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; padding-bottom: 0.5rem; }
  .sidebar { position: static; overflow-y: auto; overflow-x: hidden; align-self: start; max-height: 100%; }
  .main, .content-wrap, .content { min-height: 0; display: flex; flex-direction: column; }
  .main { height: 100%; }
  .content-wrap { flex: 1; }
  .content { flex: 1; }
  .kpi-row, .notifications { flex-shrink: 0; }
  .notifications { max-height: 30vh; overflow-y: auto; }
  .content > .panel { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: visible; }
  .panel-head, .source-note { flex-shrink: 0; }
  .panel-head { border-radius: var(--radius) var(--radius) 0 0; }
  .panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .panel-body:has(.table-wrap) { overflow-y: auto; } /* Verwerking: lange tabellen scrollen binnen het paneel */
  .panel-body > * { flex-shrink: 0; }
  .panel-body > .graph-fill { flex: 1 1 0; min-height: 8.75rem; }
  .footer { flex-shrink: 0; padding-bottom: 0.5rem; }
}
.legend-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.legend-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.7188rem; min-height: 1.375rem; }
.swatch { width: 0.5625rem; height: 0.5625rem; border-radius: 2px; flex-shrink: 0; display: inline-block; }
.legend-name { background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; text-align: left; font-size: 0.7188rem; }
span.legend-name { cursor: default; }
button.legend-name:hover { color: var(--gw-green); text-decoration: underline; }
.legend-value { margin-left: auto; color: var(--muted); font-size: 0.6562rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta { font-weight: 700; }
.tone-good { color: var(--good); }
.tone-bad { color: var(--bad); }
.tone-neutral, .tone-na { color: var(--muted); font-weight: 400; }
.year-legend { display: flex; gap: 0.875rem; font-size: 0.6562rem; color: var(--muted); padding: 0.25rem 0 0.375rem; }
.year-key { display: inline-flex; align-items: center; gap: 0.375rem; }
.year-key.is-missing .swatch { opacity: .35; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.7188rem; font-variant-numeric: tabular-nums; }
.data-table th { text-align: left; font-weight: 700; color: var(--ink); background: var(--gw-green-row); padding: 0.5rem; white-space: nowrap; }
.data-table td { border-bottom: 1px solid var(--hairline); padding: 0.4375rem 0.5rem; white-space: nowrap; vertical-align: middle; }
.data-table td:first-child { white-space: normal; }
.data-table .num { text-align: right; }
.data-table tfoot td { font-weight: 800; border-top: 2px solid #cfe5d3; border-bottom: 0; background: var(--gw-green-row); }
.data-table tbody tr:hover td { background: #f7faf7; }
.cell-sub { font-size: 0.5938rem; font-weight: 400; color: var(--muted); }
.co2-table td, .co2-table th { padding: 0.375rem 0.5rem; }
/* Sorteerbare kolomkoppen */
.is-sortable th { padding: 0; }
.sort-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 0.25rem; width: 100%; padding: 0.5rem;
  cursor: pointer; font-weight: 700; white-space: nowrap; }
.is-sortable th.num .sort-btn { justify-content: flex-end; }
.sort-btn::after { content: "↕"; font-size: 0.625rem; color: var(--muted); opacity: .6; }
th[aria-sort="descending"] .sort-btn::after { content: "▾"; color: var(--gw-green-ink); opacity: 1; font-size: 0.6875rem; }
th[aria-sort="ascending"] .sort-btn::after { content: "▴"; color: var(--gw-green-ink); opacity: 1; font-size: 0.6875rem; }
.sort-btn:hover { color: var(--gw-green); }
.sort-btn:focus-visible { outline: 3px solid #7fc97f; outline-offset: -3px; }

.alert { display: flex; gap: 0.5rem; align-items: flex-start; border-radius: 0.375rem; padding: 0.5625rem 0.75rem; font-size: 0.7812rem; }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert-info { background: var(--info-bg); color: var(--info-ink); }
.alert-error { background: var(--err-bg); color: var(--bad); }
.alert-icon { font-weight: 700; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0 1rem 1.25rem 14rem; font-size: 0.6875rem; color: var(--muted); }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(10.625rem, 1fr)); align-items: end; }
  .actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .footer { padding-left: 1rem; }
}
@media (max-width: 640px) {
  .topbar { padding-left: 1rem; padding-right: 1rem; }
  .shell { padding: 0.75rem 1rem 1.25rem; }
  .kpi-row { grid-template-columns: minmax(0, 1fr); }
  .breakdown { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .breakdown .legend { width: 100%; }
  .user-who, .brand-sub { display: none; }
}

/* ---------- Login ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #0f3d24, #1f6f3f); padding: 16px; }
.login-card { background: var(--surface); width: 100%; max-width: 380px; border-radius: 14px; padding: 28px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-card .brand { color: var(--gw-green-dark); font-size: 22px; }
.login-card .brand-mark { width: 41px; height: 34px; }
.login-card h1 { font-size: 20px; margin: 18px 0 12px; }
.login-card form { display: flex; flex-direction: column; gap: 6px; }
.login-card label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 8px; }
.login-card input { font-size: 15px; padding: 9px 10px; border: 1px solid #c3c2b7; border-radius: 6px; }
.login-card input:focus { outline: 2px solid var(--gw-green); border-color: var(--gw-green); }
.login-card button { margin-top: 16px; background: var(--gw-green); color: #fff; border: 0; border-radius: 6px; padding: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.login-card button:hover { background: var(--gw-green-dark); }
.login-error { background: var(--err-bg); color: var(--bad); padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.login-info { color: var(--ink-2); font-size: 13px; }
.login-foot { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.login-sep { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.login-sep::before, .login-sep::after { content: ""; flex: 1; border-top: 1px solid #dddcd3; }
.login-ms { display: block; margin-top: 12px; text-align: center; padding: 9px 10px; border: 1px solid #8c8c8c; border-radius: 6px; color: var(--ink); background: var(--surface); font-size: 15px; font-weight: 600; text-decoration: none; }
.login-ms:hover { background: #f3f3f0; }

/* ---------- Gebruikersbeheer (/beheer) ---------- */
.admin { max-width: 1100px; margin: 0 auto; padding: 24px; }
.admin h1 { font-size: 22px; margin: 0 0 16px; }
.admin h2 { font-size: 15px; margin: 22px 0 8px; }
.admin h2:first-of-type { margin-top: 0; }
.admin-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-head h1 { margin: 0; margin-right: auto; }
.admin-count { font-size: 14px; font-weight: 600; color: var(--muted); }
.admin-search { display: flex; gap: 8px; }
.admin input:not([type=radio]):not([type=checkbox]), .admin select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #c3c2b7; border-radius: 6px; background: #fff; width: 100%; }
.admin-search input { width: 260px; }
.admin input:focus, .admin select:focus { outline: 2px solid var(--gw-green); border-color: var(--gw-green); }
.admin label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 8px 0 4px; }
.admin label.check { font-weight: 400; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.admin fieldset { border: 0; padding: 0; margin: 12px 0 0; }
.admin legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; }
.admin-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table a { color: var(--gw-green-dark); }
.admin-table tr.is-inactive td { color: var(--muted); }
.admin-sub { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; background: #efeee8; color: var(--ink-2); margin: 0 4px 2px 0; }
.tag-ok { background: var(--gw-green-soft); color: var(--good); }
.tag-off { background: var(--err-bg); color: var(--bad); }
.admin-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.admin-form .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.admin-form form.inline, form.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
form.inline input { max-width: 300px; }
.admin-actions { margin-top: 20px; }
.admin-back { margin: 0 0 8px; font-size: 13px; }
.admin-back a { color: var(--gw-green-dark); }
.admin-msg { background: var(--gw-green-soft); color: var(--good); padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.admin .login-error ul { margin: 0; padding-left: 18px; }
.admin .login-error { margin-bottom: 16px; }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #8c1d1d; }
a.btn { display: inline-block; text-decoration: none; }
.secret { display: block; font-size: 18px; padding: 10px 12px; background: #f1f0ea; border-radius: 6px; word-break: break-all; user-select: all; }
.secret-small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.admin-nav { display: flex; gap: 4px; margin-right: auto; margin-left: 24px; }
.admin-nav a { color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 4px; opacity: .85; }
.admin-nav a:hover, .admin-nav a.is-active { background: rgba(255, 255, 255, .16); opacity: 1; }
.admin label.admin-check { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; white-space: nowrap; }
.import-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14px; }
.import-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-small { padding: 4px 8px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 700px) {
  .admin { padding: 16px; }
  .admin-topbar { gap: 12px; }
  .admin-topbar .brand-name, .admin-topbar .user-name { display: none; }
  .admin-search, .admin-search input { width: 100%; }
}
.loc-list { max-height: 240px; overflow-y: auto; border: 1px solid #c3c2b7; border-radius: 6px; padding: 4px 10px; background: #fff; margin-top: 6px; }
.admin .loc-list label.check { margin: 4px 0; }
.admin label.check[hidden] { display: none; }
.admin-status { margin: 0 0 4px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--gw-green-dark); text-decoration: underline; cursor: pointer; font-size: 12px; }

/* Klantenlijst: sorteren, pagineren, locaties uitklappen */
.sort-link { color: inherit !important; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.sort-link:hover { color: var(--gw-green-dark) !important; }
.sort-link.is-sorted { color: var(--ink) !important; }
.sort-mark { font-size: 10px; color: var(--muted); }
.sort-link.is-sorted .sort-mark { color: var(--gw-green-dark); }
.loc-details { margin-top: 6px; font-size: 13px; }
.loc-details summary { cursor: pointer; color: var(--gw-green-dark); width: fit-content; }
.loc-items { list-style: none; margin: 6px 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--hairline); display: grid; gap: 4px; }
.loc-items li { display: flex; flex-direction: column; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; }
.pager-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pager-link, .pager-current { min-width: 32px; padding: 5px 8px; text-align: center; border-radius: 6px; font-size: 14px; }
.pager-link { color: var(--gw-green-dark); text-decoration: none; }
.pager-link:hover { background: var(--gw-green-soft); }
.pager-current { background: var(--gw-green-dark); color: #fff; font-weight: 600; }
.pager-gap { color: var(--muted); padding: 0 2px; }
.pager-size { display: flex; align-items: center; gap: 8px; }
.admin .pager-size select { width: auto; }
.loc-items li.is-off .loc-name { color: var(--muted); }
.names-table .switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
