/* Solum Signal UI — alle waarden komen uit tokens.css */

* { box-sizing: border-box; }

/* Het hidden-attribuut moet altijd winnen, ook van display:flex/grid op een ID.
   Zonder deze regel blijft o.a. de dossier-overlay onzichtbaar over het scherm liggen
   en vangt hij alle klikken op. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100vh;
  height: 100dvh;              /* dynamische viewport: geen afgesneden inhoud achter de mobiele adresbalk */
  overscroll-behavior: none;   /* geen pull-to-refresh / bounce binnen de app */
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--paper);
}

body { display: flex; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: var(--text-sm); margin: var(--s-1) 0; }
.muted.small { font-size: var(--text-xs); }

::selection { background: var(--t-woningbouw-fill); color: var(--t-woningbouw-ink); }

:focus { outline: none; }
:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

/* --- Layout --- */

#sidebar {
  width: 392px;
  min-width: 392px;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  background: var(--paper);
  border-right: 1px solid var(--hairline);
  padding-bottom: var(--s-12);
}

#map { flex: 1; height: 100vh; height: 100dvh; background: var(--surface-sunken); }

/* --- Brand --- */

.brand {
  padding: var(--s-6) var(--s-6) var(--s-5);
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.logo { display: flex; align-items: center; gap: var(--s-3); color: var(--ink); }
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-display);
}
.tagline { margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--text-sm); }
.stats { margin: var(--s-3) 0 0; font-size: var(--text-xs); color: var(--faint); min-height: 14px; }
.user-bar {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--text-sm); color: var(--muted);
}

/* --- Panelen --- */

.panel { padding: var(--s-5) var(--s-6) var(--s-2); }
.panel h2 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  margin: 0 0 var(--s-3);
  display: flex; align-items: center; gap: var(--s-2);
}

.label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--muted);
  margin-bottom: var(--s-2);
}
.label strong { color: var(--ink); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: var(--text-sm); float: right; }

/* --- Knoppen --- */

.btn {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  padding: 9px var(--s-4);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--surface-sunken); border-color: var(--faint); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 600; }
.btn.primary:hover { background: #33312C; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--surface); font-weight: 600; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-sunken); color: var(--ink); }
.btn.small { padding: 4px var(--s-3); font-size: var(--text-sm); }
.btn.block { display: block; width: 100%; text-align: center; text-decoration: none; }
.linklike {
  background: none; border: none; padding: 0; font: inherit;
  color: inherit; text-decoration: underline; cursor: pointer;
}

/* --- Formulier --- */

#area-form { margin-top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-4); }
.field { display: block; }
.field-row { display: flex; gap: var(--s-2); }
.field-row input { flex: 1; }

input[type="text"], input[type="email"] {
  width: 100%;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  padding: 9px var(--s-3);
  transition: border-color var(--t-fast) var(--ease);
}
input[type="text"]:hover, input[type="email"]:hover { border-color: var(--faint); }
input[type="text"]::placeholder, input[type="email"]::placeholder { color: var(--faint); }

input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--hairline-strong);
  margin: var(--s-2) 0;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--hairline-strong);
  cursor: grab;
  transition: transform var(--t-fast) var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--hairline-strong); cursor: grab;
}

/* Onderwerp-chips: checkbox visueel verborgen, label in plankleur */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 5px var(--s-3);
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  color: var(--muted);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.chip span:hover { border-color: var(--faint); color: var(--ink); }
.chip input:checked + span {
  background: var(--chip-fill);
  border-color: var(--chip-line);
  color: var(--chip-ink);
  font-weight: 600;
}
.chip input:focus-visible + span { box-shadow: var(--focus-ring); }

/* Segmented control (fase) */
.segmented {
  display: flex;
  background: var(--surface-sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 2px;
}
.segmented label { flex: 1; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
  border-radius: calc(var(--r-sm) - 2px);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(27,26,23,0.08); }
.segmented input:focus-visible + span { box-shadow: var(--focus-ring); }

/* Pro add-on (vroege signalen) */
.addon {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.addon:hover { border-color: var(--faint); }
.addon:has(input:checked) { border-color: var(--ink); background: var(--surface); }
.addon input { margin-top: 3px; flex: none; }
.addon input:focus-visible { box-shadow: var(--focus-ring); }
.addon-body { display: flex; flex-direction: column; gap: 2px; }
.addon-title { font-size: var(--text-base); font-weight: 600; display: flex; align-items: center; gap: var(--s-2); }
.addon-tag {
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  background: var(--ink); color: var(--surface);
  padding: 1px var(--s-2); border-radius: var(--r-full);
}
.addon-desc { font-size: var(--text-sm); color: var(--muted); line-height: 1.4; }

.hint { font-size: var(--text-sm); color: var(--muted); margin: var(--s-3) 0 0; }
.preview-count { font-size: var(--text-sm); font-weight: 600; color: var(--ink); min-height: 18px; margin: 0; }

/* Gemaskeerde preview (gratis kennismaking — details achter de paywall) */
.preview-sample { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
.preview-sample:empty { margin: 0; }
.preview-card {
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-sm);
  padding: var(--s-2) var(--s-3);
}
.preview-masked { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-sm); color: var(--muted); }
.preview-masked .blocks {
  display: inline-block; width: 96px; height: 9px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--hairline-strong) 0 14px, transparent 14px 18px);
}
.preview-hint { font-size: var(--text-xs); color: var(--faint); margin: var(--s-1) 0 0; line-height: 1.4; }

/* --- Prijs --- */

.price-box {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
}
.price-line { display: flex; align-items: baseline; gap: var(--s-2); }
.price {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
}
.per { font-size: var(--text-sm); color: var(--muted); }

.form-buttons { display: flex; gap: var(--s-2); }
.form-buttons .btn { flex: 1; }

/* --- Cards --- */

.card-list { display: flex; flex-direction: column; gap: var(--s-2); }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.card:hover { border-color: var(--hairline-strong); box-shadow: var(--shadow-panel); }
.card.selected { border-color: var(--ink); }
.card .title {
  font-weight: 600;
  font-size: var(--text-base);
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2);
}
.card .meta { color: var(--muted); margin-top: var(--s-1); }
.card .delete {
  border: none; background: none;
  color: var(--faint);
  font-size: var(--text-md);
  line-height: 1;
  cursor: pointer;
  padding: 2px var(--s-1);
  border-radius: var(--r-sm);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.card .delete:hover { color: var(--danger); background: var(--danger-soft); }

.feed-item { animation: slide-in var(--t-slow) var(--ease) both; }
.feed-item .title a { color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.4; }
.feed-item .title a:hover { text-decoration: underline; }

/* --- Feed: filterbalk + accordion per gebied (multi-gebied overzicht) --- */

.feed-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin-bottom: var(--s-3); }
.feed-toolbar select {
  font-family: var(--font-ui); font-size: var(--text-xs); color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm); padding: 5px var(--s-2); min-width: 0; width: 100%;
}
.feed-toolbar select:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.feed-group { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.feed-group summary {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-3); cursor: pointer; list-style: none; user-select: none;
  transition: background var(--t-fast) var(--ease);
}
.feed-group summary::-webkit-details-marker { display: none; }
.feed-group summary:hover { background: var(--surface-sunken); }
.feed-group summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.feed-group .chev {
  flex: none; width: 7px; height: 7px; margin-top: -3px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(-45deg); transition: transform var(--t-fast) var(--ease);
}
.feed-group[open] .chev { transform: rotate(45deg); margin-top: -5px; }
.feed-group .g-name { flex: 1; min-width: 0; font-weight: 600; font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-group .g-count { flex: none; color: var(--muted); font-size: var(--text-xs); }
.feed-group .g-new {
  flex: none; background: var(--ink); color: var(--surface);
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-caps);
  padding: 1px 8px; border-radius: var(--r-full);
}
.feed-group .g-items { border-top: 1px solid var(--hairline); }
.feed-sub { padding: var(--s-2) var(--s-3); font-size: var(--text-sm); cursor: pointer; transition: background var(--t-fast) var(--ease); }
.feed-sub + .feed-sub { border-top: 1px solid var(--hairline); }
.feed-sub:hover { background: var(--surface-sunken); }
.feed-sub .meta { color: var(--muted); margin-top: var(--s-1); }
.feed-item .new-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); margin-right: 5px; vertical-align: 2px; }

/* --- Feedback-knop (rechtsonder, stil; alleen ingelogd) --- */

#feedback-widget { position: fixed; right: var(--s-4); bottom: var(--s-4); z-index: 1100; display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); }
.feedback-fab {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--r-full);
  padding: 6px 14px; cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.feedback-fab:hover { color: var(--ink); background: var(--surface-sunken); }
.feedback-fab:active { transform: scale(0.98); }
.feedback-fab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.feedback-panel {
  width: min(320px, calc(100vw - 2 * var(--s-4)));
  background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); padding: var(--s-3) var(--s-4) var(--s-4);
}
.feedback-panel .label { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--muted); margin-bottom: var(--s-2); }
.feedback-panel textarea {
  width: 100%; resize: vertical; min-height: 84px; font-family: var(--font-ui); font-size: var(--text-sm);
  color: var(--ink); background: var(--paper); border: 1px solid var(--hairline-strong); border-radius: var(--r-sm);
  padding: var(--s-2) var(--s-3); box-sizing: border-box;
}
.feedback-panel textarea:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.feedback-actions { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }
@media (max-width: 720px) {
  /* mobiel: boven de onderste UI-laag blijven, niet over het alertpaneel heen */
  #feedback-widget { right: var(--s-3); bottom: var(--s-3); }
}
.feed-item .deadline { font-size: var(--text-xs); color: var(--muted); margin-top: var(--s-1); }
.feed-item .deadline.urgent { color: var(--danger); font-weight: 600; }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Badges (plankleuren) --- */

.badges { margin-top: var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-1); }
.badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px var(--s-2);
  border-radius: var(--r-full);
  background: var(--surface-sunken);
  color: var(--muted);
}
.badge.topic { background: var(--chip-fill); color: var(--chip-ink); }
.badge.fase-ontwerp { background: transparent; border: 1px dashed var(--faint); color: var(--muted); }
.badge.fase-definitief { background: transparent; border: 1px solid var(--faint); color: var(--muted); }
.badge.fase-visie, .badge.fase-planvorming { background: transparent; border: 1px dashed var(--faint); color: var(--muted); }
.badge.vroeg { background: var(--ink); color: var(--surface); border: 1px dashed var(--surface); outline: 1px solid var(--ink); }
.feed-item .summary { color: var(--ink); margin-top: var(--s-1); line-height: 1.45; }
.feed-item .vague { font-style: italic; }

.count-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--r-full);
  padding: 1px var(--s-2);
}
.count-badge:empty { display: none; }

/* --- Lege staat --- */

.empty-state {
  text-align: center;
  padding: var(--s-6) var(--s-4);
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: var(--text-sm);
}
.empty-state svg { display: block; margin: 0 auto var(--s-3); color: var(--faint); }
.empty-state .btn { margin-top: var(--s-3); }

/* --- Skeletons --- */

.skeleton {
  border-radius: var(--r-md);
  background: var(--surface-sunken);
  position: relative;
  overflow: hidden;
  height: 64px;
}
.skeleton::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--surface), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

/* --- Billing --- */

.billing-total { display: flex; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-2); }
.billing-row {
  display: flex; justify-content: space-between;
  font-size: var(--text-sm); color: var(--muted);
  padding: var(--s-1) 0;
}
.billing-row .num { color: var(--ink); }
.billing-status {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  padding: 3px var(--s-2);
  border-radius: var(--r-full);
  background: var(--surface-sunken);
  color: var(--muted);
  margin-bottom: var(--s-3);
}
.billing-status.active { background: var(--t-agrarisch_wonen-fill); color: var(--t-agrarisch_wonen-ink); }
.billing-status.pending { background: var(--t-horeca_gemengd-fill); color: var(--t-horeca_gemengd-ink); }

/* --- Toasts --- */

#toast-root {
  position: fixed;
  top: var(--s-4); right: var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-2);
  z-index: var(--z-toast);
}
.toast {
  background: var(--ink);
  color: var(--surface);
  font-size: var(--text-sm);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  max-width: 320px;
  animation: slide-in var(--t-slow) var(--ease) both;
}
.toast.error { background: var(--danger); }

/* --- Dialog --- */

dialog {
  border: none;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  padding: var(--s-6);
  max-width: 360px;
  font-family: var(--font-ui);
  color: var(--ink);
}
dialog::backdrop { background: rgba(27, 26, 23, 0.4); }
dialog h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  letter-spacing: var(--tracking-display);
  margin: 0 0 var(--s-2);
}
dialog .form-buttons { margin-top: var(--s-5); }

/* --- Kansdossier --- */

#dossier-overlay { position: fixed; inset: 0; z-index: var(--z-toast); display: flex; justify-content: flex-end; }
.dossier-backdrop { position: absolute; inset: 0; background: rgba(27, 26, 23, 0.4); animation: fade-in var(--t-med) var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.dossier-panel {
  position: relative;
  width: 560px; max-width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--paper);
  border-left: 1px solid var(--hairline);
  box-shadow: var(--shadow-pop);
  padding: var(--s-6);
  animation: slide-from-right var(--t-slow) var(--ease) both;
}
@keyframes slide-from-right { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dossier-panel, .dossier-backdrop { animation: none; } }

.dossier-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); }
.dossier-head h2 { font-family: var(--font-display); font-size: var(--text-lg); letter-spacing: var(--tracking-display); margin: var(--s-1) 0 var(--s-1); line-height: 1.3; }

/* fase-pijplijn */
.pipeline { display: flex; gap: var(--s-1); margin: var(--s-5) 0; }
.pipeline-step { flex: 1; text-align: center; }
.pipeline-bar { height: 4px; border-radius: var(--r-full); background: var(--hairline-strong); }
.pipeline-step.done .pipeline-bar { background: var(--ink); }
.pipeline-step.current .pipeline-bar { background: var(--t-woningbouw-line); }
.pipeline-label { display: block; font-size: var(--text-xs); color: var(--muted); margin-top: var(--s-2); text-transform: capitalize; }
.pipeline-step.current .pipeline-label { color: var(--ink); font-weight: 600; }

/* dossierblokken */
.dblock { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: var(--s-4); margin-bottom: var(--s-3); }
.dblock h3 { font-family: var(--font-display); font-size: var(--text-md); letter-spacing: var(--tracking-display); margin: 0 0 var(--s-3); display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.dblock .src { font-size: var(--text-xs); color: var(--faint); font-weight: 400; letter-spacing: 0; text-transform: none; }
.dblock dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-4); margin: 0; }
.dblock dt { color: var(--muted); font-size: var(--text-sm); }
.dblock dd { margin: 0; font-size: var(--text-sm); text-align: right; font-weight: 500; }
.dblock .nodata { font-size: var(--text-sm); color: var(--muted); font-style: italic; }
.dblock .ecli { font-size: var(--text-sm); padding: var(--s-1) 0; border-top: 1px solid var(--hairline); }
.dblock .ecli:first-of-type { border-top: none; }

/* zienswijze-klok */
.klok { display: flex; align-items: baseline; gap: var(--s-2); }
.klok .dagen { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; letter-spacing: var(--tracking-display); }
.klok.urgent .dagen { color: var(--t-hoogbouw-ink); }
.klok.verlopen .dagen { color: var(--muted); }

.eigendom-badge { display: inline-block; font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-caps); padding: 2px var(--s-2); border-radius: var(--r-full); }
.eigendom-badge.zakelijk { background: var(--t-bedrijventerrein-fill); color: var(--t-bedrijventerrein-ink); }
.eigendom-badge.particulier, .eigendom-badge.onbekend { background: var(--surface-sunken); color: var(--muted); }
.avg-note { font-size: var(--text-xs); color: var(--faint); margin-top: var(--s-3); line-height: 1.4; }

.dossier-foot { margin-top: var(--s-5); }
.dossier-foot .muted { text-align: center; margin-top: var(--s-2); }

.feed-item .dossier-link { font-size: var(--text-xs); color: var(--muted); margin-top: var(--s-2); display: inline-flex; align-items: center; gap: 4px; }
.feed-item:hover .dossier-link { color: var(--ink); }

@media (max-width: 860px) {
  .dossier-panel { width: 100%; padding: var(--s-4); }
}

/* --- Pijplijnbord --- */

#board-overlay { position: fixed; inset: 0; z-index: var(--z-toast); background: var(--paper); display: flex; flex-direction: column; }
.board-inner { display: flex; flex-direction: column; height: 100%; padding: var(--s-5) var(--s-6); }
.board-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--s-4); }
.board-head h2 { font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: var(--tracking-display); margin: var(--s-1) 0 0; }

.board-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); flex: 1; min-height: 0; overflow: hidden; }
.board-col { display: flex; flex-direction: column; background: var(--surface-sunken); border-radius: var(--r-md); padding: var(--s-3); min-height: 0; }
.board-col-head { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--muted); margin-bottom: var(--s-3); display: flex; justify-content: space-between; }
.board-col-cards { display: flex; flex-direction: column; gap: var(--s-2); overflow-y: auto; flex: 1; }
.board-col-empty { font-size: var(--text-sm); color: var(--faint); font-style: italic; padding: var(--s-2); }

.board-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: var(--s-3); }
.board-card.updated { border-color: var(--t-woningbouw-line); box-shadow: 0 0 0 1px var(--t-woningbouw-line); }
.board-card .bc-title { font-size: var(--text-sm); font-weight: 600; line-height: 1.35; }
.board-card .bc-meta { font-size: var(--text-xs); color: var(--muted); margin: var(--s-1) 0; }
.board-card .bc-update { display: inline-block; font-size: var(--text-xs); font-weight: 600; background: var(--t-woningbouw-fill); color: var(--t-woningbouw-ink); padding: 1px var(--s-2); border-radius: var(--r-full); margin-bottom: var(--s-1); }
.board-card textarea { width: 100%; margin-top: var(--s-2); border: 1px solid var(--hairline-strong); border-radius: var(--r-sm); padding: 6px 8px; font-family: var(--font-ui); font-size: var(--text-sm); resize: vertical; min-height: 42px; }
.board-card .bc-actions { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.board-card .bc-actions button, .board-card .bc-actions a { font-size: var(--text-xs); padding: 3px 8px; }

@media (max-width: 860px) {
  .board-columns { grid-template-columns: 1fr; overflow-y: auto; }
  .board-col { min-height: 160px; }
}

/* --- Leaflet-aanpassingen --- */

.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow-panel) !important; border-radius: var(--r-sm) !important; overflow: hidden; }
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-bottom: 1px solid var(--hairline) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface-sunken) !important; }
.leaflet-popup-content-wrapper {
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-pop) !important;
  font-family: var(--font-ui);
  color: var(--ink);
}
.leaflet-popup-content { font-size: var(--text-sm); line-height: 1.5; margin: var(--s-3) var(--s-4) !important; }
.leaflet-popup-content a { color: var(--ink); font-weight: 600; }
.leaflet-container { font-family: var(--font-ui) !important; }
.leaflet-bar a { border-radius: 0 !important; }

#map.drawing { cursor: crosshair; }

/* --- Mobiel & tablet --- */

@media (max-width: 860px) {
  body { flex-direction: column; }
  #map { order: -1; height: 44vh; height: 44dvh; min-height: 320px; flex: none; width: 100%; }
  #sidebar { width: 100%; min-width: 0; height: auto; flex: 1; border-right: none; border-top: 1px solid var(--hairline); }
  #toast-root { top: auto; bottom: var(--s-4); left: var(--s-4); right: var(--s-4); }
  .toast { max-width: none; }
}
