:root {
  --anwb-navy: #2563eb;
  --anwb-navy-2: #1d4ed8;
  --anwb-yellow: #2563eb;
  --anwb-yellow-text: #ffffff;
  --available: #1aa05a;
  --occupied: #4b5563;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #f3f4f6;
  --surface: #ffffff;
  --danger: #dc2626;
  --shadow: 0 8px 28px rgba(17, 24, 39, 0.14);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --nav-pill-h: 58px;
  --nav-bottom-gap: 14px;
  --nav-side-gap: 16px;
  --nav-h: 72px; /* legacy alias — zie --nav-float-space */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-float-space: calc(var(--nav-pill-h) + var(--nav-bottom-gap) + var(--safe-bottom));
  --font: "DM Sans", system-ui, sans-serif;
  --sheet-w-desktop: 420px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.anwb-app {
  font-family: var(--font);
  color: var(--ink);
  background: #dbe4ea;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; }
.hidden { display: none !important; }

/* —— Map —— */
.map-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.map-overlays {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
.ritq-home-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  box-shadow: var(--shadow);
}
.ritq-home-link img { height: 22px; width: auto; }
.map-overlays > * { pointer-events: auto; }

/* —— ANWB-achtige zwevende selectiekaart over de kaart —— */
.selection-popup {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--nav-float-space) + 14px);
  z-index: 28;
  max-width: 440px;
  margin: 0 auto;
  pointer-events: none;
  max-height: min(58vh, calc(100dvh - var(--nav-float-space) - 100px));
}
.selection-popup:not(.hidden) {
  display: block;
}
.station-card {
  pointer-events: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 12px 40px rgba(17, 24, 39, 0.22),
    0 2px 10px rgba(17, 24, 39, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: inherit;
  position: relative;
}
.station-card-grabber {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: #d1d5db;
  margin: 0.55rem auto 0.15rem;
  flex: none;
}
.station-card-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  box-shadow: none;
  background: var(--paper);
}
.station-card-body {
  padding: 0.15rem 1rem 0.35rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  flex: 1;
}
.station-card-actions {
  flex: none;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem 0.9rem 0.85rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
.travel-time {
  font-weight: 700;
  color: var(--anwb-navy);
}
.travel-time.is-pending {
  color: var(--muted);
  font-weight: 600;
}
.leaflet-interactive.route-line {
  cursor: default;
}
.station-card-actions .btn-yellow {
  flex: 1;
}
/* Mobiel: zoek-sheet krijgt .hidden bij selectie. Desktop houdt sidebar zichtbaar. */

.side-stack {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.side-stack > * { pointer-events: auto; }

.panel-tabs {
  display: none;
}
.desktop-only { display: none !important; }
.mobile-only { display: block; }

.sheet {
  position: relative;
  width: 100%;
  background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 30px rgba(17, 24, 39, 0.16);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  transition: height 0.22s ease, max-height 0.22s ease;
  /* collapsed: grip + zoek; nav zweeft eroverheen in de onderste zone */
  height: calc(108px + var(--nav-float-space));
  max-height: calc(108px + var(--nav-float-space));
}
.sheet[data-height="collapsed"] {
  height: calc(108px + var(--nav-float-space));
  max-height: calc(108px + var(--nav-float-space));
}
.sheet[data-height="mid"] {
  height: 52vh;
  max-height: 56vh;
}
.sheet[data-height="expanded"] {
  /* Kaart peek bovenaan; sheet tot onderkant — nav zweeft erover */
  height: calc(100dvh - 16vh);
  max-height: calc(100dvh - 14vh);
}
.sheet[data-height="collapsed"] .quick-controls,
.sheet[data-height="collapsed"] .list-subtitle,
.sheet[data-height="collapsed"] .charger-list,
.sheet[data-height="collapsed"] .list-sentinel,
.sheet[data-height="collapsed"] .status-line {
  display: none !important;
}

.sheet-drag-zone {
  flex: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  padding: 0.45rem 0 0.3rem;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.sheet-drag-zone:active {
  cursor: grabbing;
}
.sheet.is-dragging,
.profile-view.is-dragging {
  transition: none !important;
}

.sheet-grip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 56px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: inherit;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.sheet-grip:focus-visible {
  outline: 2px solid var(--anwb-navy);
  outline-offset: 2px;
}
.sheet-grip-bar {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: #c5cad3;
  pointer-events: none;
}
.sheet-grip:active .sheet-grip-bar {
  background: #9aa3b2;
}

.map-fabs { display: flex; flex-direction: column; gap: 0.5rem; }
.fab, .round-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.round-btn.ghost {
  box-shadow: none;
  background: transparent;
  width: 32px;
  height: 32px;
  font-size: 1.25rem;
  color: var(--muted);
}
.round-btn.busy {
  color: var(--danger);
}

.sheet-grabber {
  /* legacy alias — grip gebruikt .sheet-grip */
  display: none;
}
.sheet-search-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.35rem 0.9rem 0.55rem;
  flex: none;
}
.search-field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--paper);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.55rem 0.15rem 0.85rem;
  min-height: 46px;
}
.search-field input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  min-width: 0;
}
.search-ico { color: var(--muted); flex: none; }

.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow: auto;
}
.suggest-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}
.suggest-list li:hover,
.suggest-list li[aria-selected="true"] { background: #eff6ff; }
.suggest-list strong { font-size: 0.9rem; }
.suggest-list span { font-size: 0.68rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }

.status-line, .list-subtitle {
  margin: 0;
  padding: 0 1rem 0.55rem;
  font-size: 0.84rem;
  color: var(--muted);
  flex: none;
}
.status-line.error { color: var(--danger); }
.status-line.info { color: var(--anwb-navy); }

.charger-list {
  flex: 1;
  overflow: auto;
  /* Laatste resultaten scrollen boven de zwevende nav */
  padding: 0 0.75rem calc(var(--nav-float-space) + 1.35rem);
  -webkit-overflow-scrolling: touch;
}

.charger-card {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.35rem;
  cursor: pointer;
}
.charger-card:active { background: #f9fafb; }
.charger-card.is-selected {
  background: #eef4fb;
  box-shadow: inset 3px 0 0 var(--anwb-navy);
}
.charger-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.charger-card-top h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.charger-card-top p {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-size: 0.92rem;
}
.charger-dist {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.charger-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 8px;
  padding: 0.22rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--paper);
  color: var(--ink);
}
.pill.ok { background: #e8f8ef; color: var(--available); }
.pill.bad { background: #e5e7eb; color: var(--occupied); }
.pill.price { font-variant-numeric: tabular-nums; }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

/* —— Detail pane —— */
.detail-pane {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: inherit;
}
.detail-scroll {
  flex: 1;
  overflow: auto;
  padding: 0.75rem 1rem 1rem;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.detail-close-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.25rem;
}
.detail-brand {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #1f6b45;
  letter-spacing: -0.02em;
}
.detail-brand.is-other { color: var(--anwb-navy); }
.detail-address {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.detail-meta {
  margin: 0.35rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.detail-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }

.warn-box {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.warn-box svg { flex: none; color: var(--anwb-navy); margin-top: 1px; }

.section-block { margin-bottom: 1rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.section-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.section-head .hint { color: var(--muted); font-size: 0.78rem; }

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  font-size: 0.95rem;
}
.price-row strong { font-variant-numeric: tabular-nums; }
.price-row .sub {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.15rem;
}
.link-btn {
  border: none;
  background: none;
  color: var(--anwb-navy);
  font-weight: 700;
  padding: 0.4rem 0;
  cursor: pointer;
}
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.hours-table td {
  padding: 0.35rem 0;
  color: var(--ink);
}
.hours-table td:last-child { text-align: right; color: var(--muted); }

.detail-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.detail-foot-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-actions {
  flex: none;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  /* Actierij blijft zichtbaar BÓVEN de zwevende pill-nav */
  padding: 0.7rem 0.9rem calc(0.7rem + var(--nav-float-space));
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -6px 18px rgba(17, 24, 39, 0.06);
  position: relative;
  z-index: 6;
}
.btn-yellow {
  flex: 1;
  border: none;
  background: var(--anwb-yellow);
  color: var(--anwb-yellow-text);
  font-weight: 800;
  font-size: 1.02rem;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn-yellow:active { filter: brightness(0.96); }
.ghost-outline {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--anwb-navy);
  font-weight: 700;
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
}

.quick-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0 0.9rem 0.55rem;
  flex: none;
}
.quick-field {
  display: grid;
  gap: 0.2rem;
}
.quick-field span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.quick-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
}

.list-sentinel {
  text-align: center;
  padding: 0.75rem 0.75rem calc(0.5rem + var(--nav-float-space));
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

/* —— Floating pill nav (ANWB-stijl, zwevend boven sheet) —— */
.app-chrome {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: transparent;
  border: none;
  padding: 0 var(--nav-side-gap) calc(var(--nav-bottom-gap) + var(--safe-bottom));
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
}
.bottom-nav {
  pointer-events: auto;
  display: flex;
  gap: 0.15rem;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.45rem;
  box-shadow:
    0 10px 32px rgba(17, 24, 39, 0.18),
    0 2px 8px rgba(17, 24, 39, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.06);
  min-width: 220px;
  width: min(340px, 100%);
  height: var(--nav-pill-h);
  box-sizing: border-box;
  align-items: center;
}

.nav-item-cta {
  color: var(--anwb-navy);
}
.nav-item-cta span { font-weight: 800; }

.operator-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.operator-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  flex: none;
}
.operator-logo-fallback {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e8eef8;
  color: var(--anwb-navy);
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: none;
}
.nav-item {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  min-height: 48px;
}
.nav-item.active {
  color: var(--anwb-navy);
}
.nav-item.active svg {
  background: #eef2f8;
  border-radius: 50%;
  padding: 0.32rem;
  box-sizing: content-box;
}

/* Leaflet zoom boven floating nav */
.leaflet-bottom.leaflet-right {
  bottom: calc(var(--nav-float-space) + 10px) !important;
  right: 10px !important;
}

/* —— Profile / Sessie: mobiel full-screen (geen map-peek, geen grip) —— */
.profile-view {
  position: relative;
  width: 100%;
  z-index: 12;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.profile-content-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Full-screen overlay op mobiel wanneer Sessie/Profiel actief */
#app[data-view="profile"] .profile-view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh !important;
  max-height: none !important;
  border-radius: 0;
  box-shadow: none;
  z-index: 30;
  padding: env(safe-area-inset-top, 0px) 0 var(--nav-float-space);
  background: #fff;
}
#app[data-view="profile"] .profile-drag-zone,
#app[data-view="profile"] .sheet-grip {
  display: none !important;
}
#app[data-view="profile"] .map-overlays {
  display: none !important;
}
#app[data-view="profile"] .map-canvas {
  visibility: hidden;
}

/* —— Station full-screen detail (Zie meer) —— */
.station-detail-view {
  display: none;
}
.station-detail-view:not(.hidden) {
  display: flex;
}
.station-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.station-detail-inner {
  padding: 0.5rem 1rem 1.5rem;
  max-width: 560px;
  margin: 0 auto;
}
.station-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.connector-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.connector-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  background: var(--paper);
  border-radius: 10px;
  font-size: 0.9rem;
}
.connector-list span { color: var(--muted); font-weight: 600; }
.muted-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.station-detail-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-bottom: 0.5rem;
}

#app[data-view="station"] .station-detail-view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  z-index: 30;
  padding: env(safe-area-inset-top, 0px) 0 var(--nav-float-space);
  background: #fff;
  display: flex;
  flex-direction: column;
}
#app[data-view="station"] .map-overlays {
  display: none !important;
}
#app[data-view="station"] .map-canvas {
  visibility: hidden;
}
#app[data-view="station"] .profile-view {
  display: none !important;
}
#app[data-view="station"] .selection-popup,
#app[data-view="profile"] .selection-popup {
  display: none !important;
}

.profile-inner { padding: 1rem 1rem 2rem; max-width: 560px; margin: 0 auto; width: 100%; }
.profile-screen-head { margin-bottom: 1rem; }
.profile-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}
.profile-card-title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.btn-block { width: 100%; margin-top: 0.35rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.menu-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--paper);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex: none;
}
.menu-row small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.1rem;
}
.menu-chevron {
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
}
.profile-foot {
  text-align: center;
  margin: 1rem 0 0;
  font-size: 0.85rem;
}
.profile-foot a { color: var(--anwb-navy); font-weight: 600; }

.session-empty {
  text-align: center;
  padding: 1.5rem 1rem 1.25rem;
  margin-bottom: 0.85rem;
  background: linear-gradient(160deg, #eff6ff, #f8fafc);
  border: 1px dashed #bfdbfe;
  border-radius: 18px;
}
.session-empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}
.session-empty h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.session-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.session-list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}
.session-item:last-child { border-bottom: none; }
.session-item-main strong { display: block; font-size: 0.92rem; }
.session-item-main .meta {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}
.session-item-nums {
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  flex: none;
}
.session-item-nums strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  margin-top: 0.1rem;
}

.ritq-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-float-space) + 12px);
  transform: translateX(-50%) translateY(12px);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.ritq-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#app[data-view="profile"] .profile-content-scroll {
  background: #f8fafc;
}

.profile-name {
  margin: 0.4rem 0 0.85rem;
  text-align: center;
  color: var(--anwb-navy);
  font-size: 1.45rem;
  font-weight: 800;
}
.profile-car-hero {
  background: linear-gradient(160deg, #e8eef8, #f8fafc);
  border-radius: 18px;
  padding: 1.4rem 1rem;
  text-align: center;
  margin-bottom: 0.85rem;
  border: 1px solid var(--line);
}
.profile-car-hero .car-hero-img {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 0.55rem;
  background: #eef2f7;
}
.profile-car-hero .vehicle-ph-hero {
  width: 100%;
  height: 130px;
  margin: 0 auto 0.65rem;
  border-radius: 14px;
  font-size: 0.9rem;
}
.profile-car-hero .vehicle-ph-hero svg {
  width: 42%;
  max-width: 200px;
}
.profile-car-hero strong { display: block; font-size: 1.1rem; margin-top: 0.35rem; }
.profile-car-hero span { color: var(--muted); font-size: 0.9rem; }
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 0.85rem;
  border: 1px solid var(--line);
}
.stat-card .label { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.stat-card .value { font-size: 1.45rem; font-weight: 800; margin-top: 0.15rem; }

.menu-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: none;
  background: #fff;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.menu-row:last-child { border-bottom: none; }
.menu-row .grow { flex: 1; }
.menu-row .grow strong { display: block; font-weight: 700; }
.menu-row .grow span { color: var(--muted); font-size: 0.8rem; }
.menu-row .chev { color: #9ca3af; }

.auth-box, .subpanel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.auth-box h2, .subpanel h2 {
  margin: 0 0 0.35rem;
  color: var(--anwb-navy);
  font-size: 1.25rem;
}
.auth-box p, .subpanel p { color: var(--muted); font-size: 0.9rem; }
.form-grid { display: grid; gap: 0.55rem; margin-top: 0.75rem; }
.form-grid label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.form-grid input, .form-grid select, .field select, .field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  background: #fff;
  color: var(--ink);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.field-row.tight { margin-top: 0.35rem; }
.field span { display: block; font-size: 0.75rem; font-weight: 700; color: var(--muted); margin-bottom: 0.25rem; }
.history-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  background: var(--paper);
  border-radius: 12px;
  margin-bottom: 0.75rem;
}
.history-summary strong { display: block; font-size: 1.2rem; }
.history-summary span { color: var(--muted); font-size: 0.78rem; }

/* —— Overlay sheets —— */
.overlay-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
}
.overlay-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(90vh, 860px);
  background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheet-up 0.22s ease;
}
.overlay-grabber {
  width: 42px; height: 4px; border-radius: 4px; background: #d1d5db;
  margin: 0.55rem auto 0;
}
.overlay-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem 0.5rem;
}
.overlay-header h2 {
  margin: 0;
  color: var(--anwb-navy);
  font-size: 1.35rem;
}
.overlay-sub { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.88rem; }
.filter-body, .price-content {
  flex: 1;
  overflow: auto;
  padding: 0.35rem 1rem 1rem;
}
.filter-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.filter-section-head h3, .filter-h {
  margin: 0.9rem 0 0.55rem;
  color: var(--anwb-navy);
  font-size: 1.05rem;
}
.link-danger {
  border: none; background: none; color: var(--danger);
  font-weight: 700; cursor: pointer;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  width: 48px; height: 28px; border-radius: 999px; background: #d1d5db;
  position: relative; flex: none; transition: 0.15s;
}
.switch::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  transition: 0.15s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-row input:checked + .switch { background: var(--anwb-navy); }
.toggle-row input:checked + .switch::after { transform: translateX(20px); }

.chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.filter-chip {
  border: 1.5px solid #bfdbfe;
  background: #fff;
  color: var(--anwb-navy);
  border-radius: 12px;
  padding: 0.85rem 0.6rem;
  font-weight: 700;
  cursor: pointer;
}
.filter-chip.active {
  background: #eff6ff;
  border-color: var(--anwb-navy);
  box-shadow: inset 0 0 0 1px var(--anwb-navy);
}
.overlay-footer {
  padding: 0.75rem 1rem calc(0.9rem + var(--safe-bottom));
  border-top: 1px solid var(--line);
}
.overlay-footer .btn-yellow { width: 100%; display: block; }

.price-connector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 700;
}
.price-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.55rem;
}
.price-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 700;
}
.price-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.action-sheet {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100% - 1.5rem));
  margin: auto 0.75rem calc(1rem + var(--safe-bottom));
  display: grid;
  gap: 0.45rem;
  animation: sheet-up 0.2s ease;
}
.action-title {
  margin: 0 0 0.25rem;
  text-align: center;
  color: #fff;
  font-weight: 700;
}
.action-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  background: #fff;
  color: var(--anwb-navy);
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  cursor: pointer;
}
.action-btn.cancel { color: var(--danger); margin-top: 0.2rem; }

@keyframes sheet-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Leaflet tweaks */
.leaflet-control-attribution { font-size: 10px !important; }
.pin-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--available); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  display: grid; place-items: center; color: #fff; font-size: 12px;
}
.pin-dot-near {
  width: 22px; height: 22px;
  font-size: 10px;
  border-width: 2px;
  opacity: 0.92;
}
.pin-dot.expensive { background: #b42318; }
.pin-dot.mid { background: var(--anwb-navy); }
.pin-dot.unknown { background: #6b7280; }
.user-pin-wrap { background: transparent !important; border: none !important; }
.user-pin {
  position: relative;
  width: 48px;
  height: 48px;
}
.user-pin-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.55);
  z-index: 2;
}
.user-pin-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.28);
  animation: user-pulse 2.2s ease-out infinite;
  z-index: 1;
}
@keyframes user-pulse {
  0% { transform: scale(0.45); opacity: 0.85; }
  70% { transform: scale(1); opacity: 0.15; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* —— Desktop: één nette zijbalk, tabs erín —— */
@media (min-width: 900px) {
  .app-chrome { display: none; }
  .mobile-only { display: none !important; }
  .desktop-only { display: flex !important; }

  .side-stack {
    left: 16px;
    top: 16px;
    bottom: 16px;
    right: auto;
    width: var(--sheet-w-desktop);
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .panel-tabs {
    display: flex;
    gap: 0.3rem;
    padding: 0.55rem;
    border-bottom: 1px solid var(--line);
    background: #fff;
    flex: none;
  }
  .side-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0.65rem 0.4rem;
    border-radius: 10px;
    cursor: pointer;
  }
  .side-tab.active {
    background: var(--anwb-navy);
    color: #fff;
  }

  .sheet {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    flex: 1;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: 0.4rem;
  }
  .charger-list {
    padding-bottom: 1rem;
  }
  .detail-actions {
    padding: 0.65rem 0.9rem;
    box-shadow: none;
  }
  .sheet-grabber,
  .sheet-hint,
  .sheet-grip,
  .sheet-drag-zone { display: none !important; }

  .map-overlays {
    left: calc(var(--sheet-w-desktop) + 32px);
    right: 16px;
    justify-content: flex-end;
  }

  .selection-popup {
    left: calc(var(--sheet-w-desktop) + 28px);
    right: 20px;
    bottom: 24px;
    max-width: 400px;
    margin: 0;
    margin-right: 0;
    margin-left: auto;
    max-height: min(70vh, calc(100dvh - 48px));
  }

  .profile-view {
    position: absolute;
    inset: 53px 0 0 0;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    min-height: 0;
    padding: 0 !important;
  }
  #app[data-view="profile"] .profile-view {
    position: absolute;
    inset: 53px 0 0 0;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    z-index: auto;
  }
  #app[data-view="profile"] .map-canvas {
    visibility: visible;
  }
  #app[data-view="profile"] .map-overlays {
    display: flex !important;
  }
  .profile-view .sheet-grabber,
  .profile-view .sheet-hint,
  .profile-view .sheet-grip,
  .profile-view .sheet-drag-zone { display: none !important; }

  .station-detail-view:not(.hidden),
  #app[data-view="station"] .station-detail-view {
    position: absolute;
    inset: 53px 0 0 0;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    z-index: 4;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }
  #app[data-view="station"] .map-canvas {
    visibility: visible;
  }
  #app[data-view="station"] .map-overlays {
    display: flex !important;
  }
  .profile-content-scroll {
    overflow: auto;
  }
  .profile-inner { padding: 1.1rem 1rem 2rem; }

  .overlay-sheet { align-items: center; }
  .overlay-panel {
    border-radius: 20px;
    max-height: min(86vh, 820px);
    margin: 1rem;
  }
  .action-sheet { margin: auto; }
}

@media (display-mode: standalone) {
  .map-overlays { top: calc(12px + env(safe-area-inset-top)); }
}

/* Vehicle picker / session log extras */
.vehicle-grid {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}
.vehicle-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.vehicle-card.active {
  border-color: var(--anwb-navy);
  box-shadow: inset 0 0 0 1px var(--anwb-navy);
}
.vehicle-card img, .vehicle-ph {
  width: 88px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  background: #e8eef8;
  flex: none;
}
.vehicle-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-weight: 800;
  color: var(--anwb-navy);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  background: linear-gradient(160deg, #eef2f8, #e2e8f2);
  box-shadow: inset 0 0 0 1px rgba(0,44,119,0.08);
}
.vehicle-ph svg {
  width: 68%;
  height: auto;
  color: var(--anwb-navy);
}
.vehicle-ph span { line-height: 1; color: var(--anwb-navy); }
.vehicle-card strong { display: block; font-size: 0.92rem; }
.vehicle-card span { color: var(--muted); font-size: 0.78rem; }

.session-form-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 0.85rem;
  margin-top: 0.75rem;
}
.month-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  height: 72px;
  margin: 0.75rem 0 0.35rem;
}
.month-bars .bar {
  flex: 1;
  background: #93c5fd;
  border-radius: 4px 4px 0 0;
  min-height: 3px;
}
.month-bars .bar.is-zero { background: #e5e7eb; min-height: 3px; }
