/* Uses the project palette from variables.css (auto-injected by Nodge on
   project creation). Don't redefine --color-* tokens here — they come from
   the user's chosen palette and update when the user changes it. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui, 'Satoshi', system-ui, sans-serif);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 12px);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

h1 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 600;
}

h2 {
  margin: 32px 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

label {
  display: block;
  margin-bottom: 16px;
}

/* Author-regels met display: block (zoals hierboven bij label) overrulen
   anders de UA-default voor het hidden-attribuut. Deze regel geldt generiek
   voor alle elementen, zodat [hidden] altijd werkt. */
[hidden] { display: none !important; }

label span {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}

input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius-sm, 8px);
  font-family: inherit;
  font-size: 14px;
}

input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: transparent;
}

small {
  display: block;
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 12px;
}

button {
  width: 100%;
  padding: 10px 16px;
  background: var(--color-primary);
  color: var(--color-on-primary, white);
  border: none;
  border-radius: var(--radius-sm, 8px);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--color-primary-hover, var(--color-primary));
  filter: brightness(1.05);
}

button.ghost {
  width: auto;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
}

button.ghost:hover {
  background: var(--color-hover);
  filter: none;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.msg {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
}

.msg.ok {
  background: var(--color-accent-20, rgba(138, 162, 109, 0.15));
  color: var(--color-accent);
}

.msg.error, .error {
  background: var(--color-error-bg, var(--color-primary-20, rgba(207, 94, 63, 0.12)));
  color: var(--color-error, var(--color-primary));
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
}

.muted {
  margin-top: 24px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

code {
  font-family: var(--font-code, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 12px;
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

section { margin-top: 8px; }

/* ── App-shell (dashboard + run-pagina) ─────────────────────────────
   Mobiel-eerst: geen zwevende kaart maar een volwaardige app-laag met
   sticky topbar en één contentkolom. Prijzen en datums zetten we in de
   mono-face (JetBrains Mono): het vertrekbord-gevoel van een prijsscanner. */

body.app {
  display: block;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.topbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand em {
  font-style: normal;
  color: var(--color-accent);
}

.brand.small {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.who {
  font-size: 12px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) 64px;
}

/* ── Lucide-iconen (icons.js) ─────────────────────────────────────
   Vaste render-grootte, los van het formaat in het bronbestand
   (viewBox 24x24): 16px oogt bij tekst-formaten in deze app. De
   Lucide-default stroke-width (2) oogt te zwaar op dat formaat, dus hier
   verdund — de SVG schaalt mee via viewBox, dus dit is de ene plek om het
   voor alle iconen tegelijk bij te stellen. */
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

/* Icoon-only knop (en icoon-only link, .stay-link hieronder): vast
   klikoppervlak van 36px, ook al is het icoon zelf kleiner — richtlijn
   uit AGENTS.md/CLAUDE.md-instructies voor toegankelijkheid. */
button.ghost.icon-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

/* Ghost-knop met zowel icoon (aria-hidden) als zichtbare tekst: label is
   dan de toegankelijke naam, geen los aria-label nodig. */
button.ghost.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Dashboard: actieknoppen en scanlijsten ─────────────────────── */

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 28px;
}

button.action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  padding: 14px 18px;
  border-radius: var(--radius, 10px);
  min-height: 64px;
}

button.action .action-title {
  font-size: 15px;
  font-weight: 700;
}

button.action .action-sub {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.75;
}

button.action.secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

button.action.secondary:hover {
  background: var(--color-hover);
  filter: none;
}

.scan-section { margin-top: 28px; }

.scan-section h2 {
  margin: 0 0 12px;
  font-size: 12px;
}

.empty-note {
  font-size: 13px;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm, 8px);
  padding: 14px 16px;
  margin: 0;
}

.scan-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scan-item {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.scan-item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.scan-item-head strong { font-size: 15px; }

.scan-schedule {
  font-size: 12px;
  color: var(--color-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scan-scope {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Scope + alarm samen op één metaregel (dashboard.js, scanMetaLine): het
   alarm-deel krijgt een bell-icoon en de secundaire kleur zodat het opvalt
   tussen de rest van de (neutrale) scope-tekst. */
.scan-scope.scan-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
}

.scan-alarm-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-secondary);
}

.meta-sep { opacity: 0.6; }

.run-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.run-status-text { color: var(--color-text-muted); }

.run-status .progress {
  margin-top: 0;
  flex: 1 1 160px;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.badge-running {
  border-color: transparent;
  background: var(--color-primary-20);
  color: var(--color-primary);
}

.badge-done {
  border-color: transparent;
  background: var(--color-accent-20);
  color: var(--color-accent);
}

.badge-failed, .badge-cancelled {
  border-color: transparent;
  background: var(--color-error-bg);
  color: var(--color-error);
}

.badge-cancelled { opacity: 0.85; }

.scan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.scan-actions button { min-height: 34px; }

/* ── Watchlist: het informatieve deel van een rij klikbaar (opent de
   detaildialoog), broer van de "Verwijderen"-knop in .watch-row — geen
   knop-in-knop. De rij is zo twee regels (kop + metaregel) i.p.v. drie, met
   "Verwijderen" rechtsboven op dezelfde hoogte als de titel. */
.watch-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.watch-row .watch-row-btn { flex: 1 1 auto; min-width: 0; }

.watch-row-btn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: var(--space-1);
  margin: calc(var(--space-1) * -1);
  border: none;
  border-radius: var(--radius-sm, 6px);
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

/* Zichtbare aanwijzing dat de rij klikbaar is (opent de detaildialoog):
   dezelfde hover-tint als overal elders (--color-hover), ook op focus zodat
   toetsenbordgebruikers hem net zo goed zien. */
.watch-row-btn:hover,
.watch-row-btn:focus-visible {
  background: var(--color-hover);
}

.watch-row-btn:hover .scan-item-head strong,
.watch-row-btn:focus-visible .scan-item-head strong { text-decoration: underline; }

button.ghost.primary {
  color: var(--color-primary);
  border-color: var(--color-primary-20);
}

button.ghost.danger {
  color: var(--color-error);
  border-color: var(--color-error-bg);
}

button.ghost.danger:hover { background: var(--color-error-bg); }

.estimate {
  margin: 4px 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.progress {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  border-radius: inherit;
  transition: width 0.6s ease;
}

/* ── Formulieren: chips, multiselect, dialogs ───────────────────── */

select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius-sm, 8px);
  font-family: inherit;
  font-size: 14px;
}

select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
  border-color: transparent;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-grid label { margin-bottom: 0; }

/* Drie losse instellingen (samenstel-dialog: Vooruit scannen / Workers /
   Delay) naast elkaar op bredere schermen i.p.v. de gewone 2-koloms
   .field-grid, die de derde op een halve, verder lege rij liet staan. Op
   smalle schermen wint de bestaande mobiele .field-grid-regel (1 kolom,
   later in dit bestand) alsnog — zelfde specificiteit, latere bron. */
.field-grid-3 { grid-template-columns: repeat(3, 1fr); }

.pair {
  display: flex;
  gap: 8px;
}

.pair input { flex: 1; min-width: 0; }
.pair select { width: auto; flex: 1; }

fieldset {
  margin: var(--space-3) 0;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  min-width: 0;
}

/* Twee subsecties binnen één samengevoegde fieldset (run.html: Maanden +
   schoolvakantie, Afstand: reistijd + campings, Accommodatie: soort + type).
   Hergebruikt de globale <small>-stijl (kleur, formaat) als kopje. */
fieldset small.sub-label {
  margin: 0 0 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

fieldset .sub-section { margin-bottom: 12px; }
fieldset .sub-section:last-child { margin-bottom: 0; }

legend {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 4px;
}

/* Aanvinkbare chips: het native vinkje is verborgen, de chip zelf toont
   de status. Grote raakvlakken voor mobiel. */
.chip-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

label.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  background: var(--color-bg);
  color: var(--color-text);
}

label.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

label.chip:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-20);
  color: var(--color-text);
  font-weight: 600;
}

label.chip:has(input:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

/* Verblijfsduur-chips in de samenstel-dialog (2 t/m 21 nachten, 20 losse
   opties): vast raster van 10 kolommen i.p.v. de gewone flex-wrap
   .chip-checks, zodat het altijd twee rijen blijft in plaats van tot vier op
   smalle schermen — de gewone chipmaat is te groot voor zoveel opties. */
#scan-nights {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

#scan-nights label.chip {
  padding: 7px 0;
  justify-content: center;
  font-size: 12px;
}

/* Chip met een prijsregel eronder (maand- en nachtenfacetten). */
label.chip.chip-stack { padding: 6px 14px; }

.chip-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.chip-price {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

label.chip:has(input:checked) .chip-price { color: var(--color-primary); }

/* Reistijdslider in de filterdialog. */
.range-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-field input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--color-primary);
}

.range-field output {
  min-width: 5.5em;
  text-align: right;
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.range-field:has(input:not(:disabled)) output { color: var(--color-text); }

.filters-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.legend-sub {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

/* Doorzoekbare multiselect (multiselect.js) */
.ms { min-width: 0; }

.ms-search { margin-bottom: 8px; }

.ms-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.ms-clear {
  width: auto;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 4px;
}

.ms-clear:hover { background: none; filter: none; text-decoration: underline; }

.ms-list {
  max-height: 216px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  background: var(--color-bg);
}

.ms-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 12px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}

.ms-option:last-child { border-bottom: none; }

.ms-option:hover { background: var(--color-hover); }

.ms-option input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.ms-option small {
  margin: 0 0 0 auto;
  font-size: 12px;
  text-align: right;
  flex-shrink: 0;
}

.ms-empty {
  margin: 0;
  padding: 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Kaartselectie voor campings in de samenstel-dialog (Leaflet, vendored —
   public/map.js). Leaflet zelf tekent de tegels/markers; hier het
   toggle-knopje en de afmetingen van het kaartpaneel.

   De toggle-knop was eerst een "ghost small"-knop en viel daardoor volledig
   weg tussen de andere formuliervelden. Nu een eigen, zichtbare secundaire
   stijl (volle breedte, duidelijke rand/achtergrond, normaal formaat) met
   een klein inline kaart/pin-icoontje ervoor. */
button.map-toggle {
  margin-top: 8px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-primary-20);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}

/* Specificity gelijk aan (button.map-toggle) + :hover nodig om de algemene
   button:hover-regel (solide --color-primary-achtergrond) te verslaan. */
button.map-toggle:hover {
  background: var(--color-primary-20);
  filter: brightness(1.1);
}

.camping-map-panel { margin-top: 10px; }

.camping-map {
  height: 360px;
  width: 100%;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--color-border);
}

.camping-map-tooltip {
  font-size: 12px;
  line-height: 1.5;
}

.camping-map-tooltip strong {
  display: block;
  font-size: 13px;
}

/* Dialogs: gecentreerd paneel op desktop, bottom-sheet op mobiel. */
dialog.sheet {
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 12px);
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-4);
  width: calc(100% - 32px);
  max-width: 600px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

dialog.sheet::backdrop {
  background: var(--color-overlay, rgba(0, 0, 0, 0.5));
}

dialog.sheet .dialog-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  text-transform: none;
  letter-spacing: normal;
}

dialog.sheet header.row { margin-bottom: 16px; }

dialog.sheet h2 { margin-top: 24px; font-size: 12px; }

dialog.sheet #logout-all { margin-top: 8px; }

.dialog-footer {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.dialog-footer button[type="submit"] { flex: 1; }

/* ── Run-pagina: toolbar, vertrekdata-strip, resultaatkaarten ────── */

.back-link {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover { color: var(--color-primary); }

.run-meta {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 9px 16px;
  min-height: 40px;
}

.filters-btn:hover { background: var(--color-hover); filter: none; }

.filters-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-on-primary, white);
  font-size: 12px;
  font-weight: 700;
}

.cheapest {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cheapest-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.cheapest-price {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
}

.date-block { margin-bottom: 20px; }

.date-block h2 {
  margin: 0 0 10px;
  font-size: 12px;
}

.h2-sub {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

/* Het vertrekbord: horizontaal scrollende datumchips met de goedkoopste
   prijs per nacht. Tikken filtert op die datum, nog eens tikken heft op. */
.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.date-chip {
  width: auto;
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 86px;
  padding: 9px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  color: var(--color-text);
  font-weight: 500;
}

.date-chip:hover { background: var(--color-hover); filter: none; }

.date-chip-day {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: capitalize;
  white-space: nowrap;
}

.date-chip-price {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* Subtiele tint voor datums binnen een schoolvakantie (regio Midden). */
.date-chip.vacation {
  background: var(--color-secondary-20);
}

.date-chip.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-20);
}

.date-chip.selected .date-chip-day { color: var(--color-text); }
.date-chip.selected .date-chip-price { color: var(--color-primary); }

.date-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.date-head h2 { margin: 0 0 10px; }

button.small {
  width: auto;
  padding: 5px 12px;
  font-size: 12px;
  min-height: 0;
}

/* ── Prijskalender: maandraster met goedkoopste prijs per dag ────── */

.cal-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--color-secondary-20);
  border: 1px solid var(--color-secondary);
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.cal-nav strong {
  font-size: 14px;
  text-transform: capitalize;
}

.cal-nav button { width: 40px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-wd {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  text-align: center;
  padding: 4px 0;
}

.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  padding: 6px 2px;
  width: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  color: var(--color-text);
  font-weight: 500;
}

.cal-day.empty {
  background: none;
  border: none;
  min-height: 0;
}

.cal-day.disabled {
  background: none;
  border-color: transparent;
  color: var(--color-text-muted);
  opacity: 0.45;
}

/* Subtiele tint voor dagen binnen een schoolvakantie (regio Midden). */
.cal-day.vacation {
  background: var(--color-secondary-20);
}

/* Klein stipje voor een feestdag; de naam staat in het title-attribuut. */
.holiday-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
}

button.cal-day:hover { background: var(--color-hover); filter: none; }

.cal-daynr { font-size: 12px; }

.cal-price {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cal-day.cheap .cal-price { color: var(--color-accent); }

.cal-day.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-20);
}

.cal-day.selected .cal-price { color: var(--color-primary); }

.cal-grid .empty-note { grid-column: 1 / -1; }

.result-summary {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.stay-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stay-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
}

.stay-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.stay-camping {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.stay-camping strong { font-size: 15px; }

.stay-place {
  font-size: 12px;
  color: var(--color-text-muted);
}

.stay-acco {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stay-kind {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary-20);
  background: var(--color-secondary-20);
  border-radius: 999px;
  padding: 1px 8px;
}

.stay-when {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 12px;
  color: var(--color-text-muted);
}

.stay-dist {
  font-size: 12px;
  color: var(--color-text-muted);
}

.stay-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  text-align: right;
}

.stay-ppn {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.stay-ppn-amount {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 19px;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
}

.stay-ppn-label {
  font-size: 11px;
  color: var(--color-text-muted);
}

.stay-total {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.stay-was { opacity: 0.7; }

/* Icoon-only link (external-link), zelfde klikoppervlak/uiterlijk als de
   icoon-only knoppen ernaast (.stay-actions) — geen tekstlink meer. */
.stay-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  color: var(--color-primary);
}

.stay-link:hover { background: var(--color-hover); }

.stay-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 2px;
}

/* ── Volgen-dialoog: bestaande watches van dit camping + type ─────── */

.watch-existing-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watch-existing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
}

.watch-existing-window {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 12px;
}

/* ── Prijsverloop-dialoog: inline SVG-lijngrafiek ─────────────────── */

.history-chart {
  margin: 4px 0 14px;
}

.history-svg {
  display: block;
  width: 100%;
  height: auto;
}

.history-line {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2;
}

.history-dot {
  fill: var(--color-accent);
}

/* Assen en labels van de grafiek. De SVG heeft een viewBox van 320 breed en
   schaalt mee met de dialoog, dus font-size staat in user units (px van de
   viewBox), niet in de uiteindelijke schermpixels. */

/* Assen op --color-text-muted met opacity in plaats van --color-border: die
   laatste is in het donkere thema vrijwel niet van de dialoogachtergrond te
   onderscheiden. */

.history-grid {
  stroke: var(--color-text-muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.35;
}

.history-axis {
  stroke: var(--color-text-muted);
  stroke-width: 1;
  opacity: 0.55;
}

.history-label {
  fill: var(--color-text-muted);
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 9px;
}

.history-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
}

.history-stats dt {
  color: var(--color-text-muted);
}

.history-stats dd {
  margin: 0;
  font-family: var(--font-code, ui-monospace, monospace);
  text-align: right;
}

/* ── Veranderingen-dialoog: dalers/stijgers/nieuw/verdwenen ───────── */

.diff-section { margin-bottom: 20px; }

.diff-section:last-child { margin-bottom: 0; }

.diff-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.diff-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diff-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
}

.diff-row:hover { background: var(--color-hover); filter: none; }

.diff-camping { font-weight: 600; }

.diff-meta {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 12px;
  color: var(--color-text-muted);
}

.diff-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 13px;
}

.diff-old { color: var(--color-text-muted); }

.diff-new { font-weight: 700; }

.diff-price {
  font-family: var(--font-code, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 700;
}

.diff-delta { font-weight: 700; }

.diff-delta.down { color: var(--color-accent); }

.diff-delta.up { color: var(--color-error); }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.pager button { width: auto; }

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── Mobiel ──────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .shell { padding: var(--space-3) var(--space-2) 56px; }

  .topbar-inner { padding: 10px 12px; }

  .who { display: none; }

  .actions-row { grid-template-columns: 1fr; }

  .field-grid { grid-template-columns: 1fr; }

  /* Icoon-only knoppen blijven compact (vast 36px, zie .icon-btn); alleen
     de primaire tekstknop ("Resultaten openen") vult de resterende ruimte —
     dat hield deze rij vroeger, met vijf tekstknoppen, over twee regels;
     met icoon-only secundaire acties past hij nu op één rij. */
  .scan-actions .ghost.primary { flex: 1 1 auto; }

  /* Bottom-sheet: dialogs schuiven vanaf de onderkant het scherm in. */
  dialog.sheet {
    margin: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 32px);
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: var(--space-3);
  }

  .toolbar { align-items: flex-start; }

  .stay-card {
    flex-direction: column;
    gap: 10px;
  }

  /* .stay-price bleef eerder ook op mobiel de kolomlayout (rechts uitgelijnd)
     gebruiken zonder wrap-fix: met tekstknoppen ("Prijsverloop", "Volgen",
     "Bekijk op roan.nl") paste dat niet op één rij en duwde de pagina breder
     dan het scherm (vandaar destijds een aparte rij-layout met verplichte
     wrap). Nu de acties en de link icoon-only zijn, is de standaard
     kolomlayout smal genoeg en is die workaround overbodig. */
}
