/* Woddex Auto — huisstijl van de auto (docs/style-guide.md, tokens uit
   dev/src/index.css), op telefoonmaat: maten van de Instellingen-kaarten
   (§7.2), knoppen 64 px (§7.4), licht en donker via het systeem. */

/* Gotham: gelicenseerd voor eigen gebruik; de server geeft de bestanden
   alleen aan wie ingelogd is (src/app.ts). Tot dan het systeemfont. */
@font-face {
  font-family: "Gotham";
  src: url("/fonts/Gotham-Book.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("/fonts/Gotham-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("/fonts/Gotham-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface-hover: #d2d7f0;
  --surface-sunk: #f7f6f3;
  --divider: #c9ceea;
  --accent: #4361ee;
  --accent-press: #3651d4;
  --accent-soft: #dce3fd;
  --on-accent: #ffffff;
  --text: #1b1b2f;
  --text-dim: #6b6e8a;
  --text-disabled: #a6a9c2;
  --ok: #2ec27e;
  --warn: #e5484d;
  --ok-soft: #e3f8ea;
  --warn-soft: #fdf0f0;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --shadow-flat: 0 1px 3px rgba(27, 27, 47, 0.08);
  --shadow-card: 0 4px 8px rgba(27, 27, 47, 0.08), 0 18px 40px rgba(27, 27, 47, 0.2);
  --shadow-dialog: 0 8px 16px rgba(27, 27, 47, 0.1), 0 28px 64px rgba(27, 27, 47, 0.32);
  --touch-min: 64px;
  --ease-enter: cubic-bezier(0.2, 0, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --dur-enter: 300ms;
  --dur-exit: 180ms;
  --dur-color: 150ms;
  /* Afgeleid zoals SETTINGS_VARS in de auto (§7). */
  --ok-ink: color-mix(in srgb, var(--ok) 60%, var(--text));
  --warn-ink: color-mix(in srgb, var(--warn) 80%, var(--text));
  /* Dock van de auto (§4.2): zwart in beide thema's; hier de tabbalk. */
  --dock-bg: #0a0a0c;
  --dock-fg: #ffffff;
  --dock-fg-dim: #8a8d99;
  --tabs-h: 80px;
  --edge: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1015;
    --surface: #1b1c24;
    --surface-hover: #292b38;
    --surface-sunk: #16171e;
    --divider: #2a2c3c;
    --accent: #5d78ff;
    --accent-press: #4361ee;
    --accent-soft: rgba(93, 120, 255, 0.18);
    --text: #f3f4f8;
    --text-dim: #9fa2b8;
    --text-disabled: #62657a;
    --ok-soft: rgba(46, 194, 126, 0.16);
    --warn-soft: rgba(229, 72, 77, 0.16);
    --shadow-flat: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 4px 10px rgba(0, 0, 0, 0.4), 0 20px 44px rgba(0, 0, 0, 0.58);
    --shadow-dialog: 0 8px 18px rgba(0, 0, 0, 0.45), 0 32px 72px rgba(0, 0, 0, 0.72);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Gotham", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}
h1,
h2,
p {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color var(--dur-color) ease-out,
    color var(--dur-color) ease-out,
    opacity var(--dur-color) ease-out,
    transform 120ms ease-out;
}
button:active:not(:disabled) {
  transform: scale(0.96);
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- knoppen */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--touch-min);
  padding: 0 22px;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 700;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:active:not(:disabled) {
  background: var(--accent-press);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-flat);
}
.btn-soft {
  background: var(--bg);
  color: var(--text);
}
.btn-secondary:active:not(:disabled),
.btn-soft:active:not(:disabled) {
  background: var(--surface-hover);
}
.btn-quiet {
  min-height: 48px;
  padding: 0 16px;
  color: var(--text-dim);
  font-size: 15px;
}
.btn-block {
  width: 100%;
}
a.btn {
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}
a.btn:active {
  transform: scale(0.96);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--text);
}
.icon-btn:active:not(:disabled) {
  background: var(--surface-hover);
}

/* ---------------------------------------------------------------- pagina */

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 20px) var(--edge) calc(var(--safe-bottom) + var(--tabs-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 8px;
}
.title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.car-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}
.car-status .dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--text-disabled);
}
.car-status.on .dot {
  background: var(--ok);
}
.car-status.driving {
  color: var(--text);
}
.car-status.driving .dot {
  background: var(--ok);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.card {
  background: var(--surface);
  border-radius: 26px;
  padding: 20px;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px 8px;
}
.label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-disabled);
}
.count {
  font-size: 14px;
  color: var(--text-disabled);
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 18px;
  border-radius: 20px;
  background: var(--warn-soft);
  color: var(--warn-ink);
  font-size: 15px;
  font-weight: 500;
}
.banner p {
  flex: 1;
}
.banner .btn {
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
}

/* --- de lijst */

.stops {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Raster: nummer | naam (+ pil) over de volle breedte; daaronder adres en
   de knoppen. Lange namen ("Oldehoofsterkerkhof 2") passen zo op 412 px. */
.stop {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 2px;
  padding: 14px 0 10px 2px;
}
.stop + .stop {
  border-top: 1px solid var(--bg);
}
.num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--bg);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dim);
}
.stop.first .num {
  background: var(--accent);
  color: var(--on-accent);
}
.stop.started .num {
  background: var(--ok);
}
.stop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  min-width: 0;
}
.stop-name {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stop-foot {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.addr {
  flex: 1;
  min-width: 0;
  margin-right: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}
.pill.busy {
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok-ink);
}
.pill.busy::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 1.6s ease-in-out infinite;
}
.move {
  flex: none;
  display: flex;
  border-radius: 14px;
  background: var(--bg);
}
.move .icon-btn {
  width: 44px;
}
.stop .del {
  color: var(--warn-ink);
}
.stop .del:active:not(:disabled) {
  background: var(--warn-soft);
}

/* --- leeg */

.empty {
  padding: 28px 24px 24px;
}
.empty-art {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
}
.empty-art .icon {
  width: 32px;
  height: 32px;
}
.empty h2 {
  margin-top: 18px;
  font-size: 22px;
  font-weight: 700;
}
.steps {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.steps li {
  display: flex;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}
.steps .icon {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--text);
}
.steps b {
  color: var(--text);
  font-weight: 700;
}
.loading {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
}

.foot {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

/* --- vaste balk onderaan */

body[data-tab="ritten"] .page {
  padding-bottom: calc(var(--safe-bottom) + var(--tabs-h) + 104px);
}
/* Knoppen van Ritten, net boven de tabbalk. */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + var(--tabs-h));
  z-index: 10;
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px var(--edge) 12px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.bar .btn-primary {
  flex: 1;
}

/* --- tabbalk (zoals de dock: zwart, actief = wit op een zachte tegel) */

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px var(--edge) calc(var(--safe-bottom) + 8px);
  background: var(--dock-bg);
}
.tab {
  flex: 1;
  max-width: 200px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--radius-md);
  color: var(--dock-fg-dim);
  font-size: 13px;
  font-weight: 700;
}
.tab .icon {
  width: 26px;
  height: 26px;
}
.tab[aria-selected="true"] {
  color: var(--dock-fg);
  background: rgba(255, 255, 255, 0.08);
}
.tab:active:not(:disabled) {
  transform: scale(0.94);
}

/* ---------------------------------------------------------------- auto */

.status {
  display: flex;
  align-items: center;
  gap: 16px;
}
.status-tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 18px;
  background: var(--bg);
  color: var(--text-dim);
}
.status.driving .status-tile,
.status.on .status-tile {
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok-ink);
}
.status.parked .status-tile {
  background: var(--accent-soft);
  color: var(--accent);
}
.status-tile .icon {
  width: 28px;
  height: 28px;
}
.status-text {
  min-width: 0;
}
.status-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.status-detail {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}
.status.driving .status-detail {
  color: var(--text);
}

.map-card {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg);
}
.map-img {
  display: block;
  width: 100%;
  height: auto;
}
.map-fail {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}
.map-frame.failed .map-img {
  visibility: hidden;
}
.map-frame.failed .map-fail {
  display: flex;
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
/* Waarden in een rij op dezelfde hoogte; het tankbalkje staat eronder. */
.tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  background: var(--surface);
}
.tile-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-disabled);
}
.tile-label .icon {
  width: 16px;
  height: 16px;
}
.tile-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}
.tile-unit {
  margin-left: 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-dim);
}
.meter {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--bg);
  overflow: hidden;
}
.meter-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
}
.tile.warn {
  grid-column: 1 / -1;
  min-height: 0;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  background: var(--warn-soft);
  color: var(--warn-ink);
}
.warn-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: color-mix(in srgb, var(--warn) 16%, transparent);
}
.warn-title {
  font-size: 17px;
  font-weight: 700;
}
.warn-sub {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 500;
}
.updated {
  padding: 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- inloggen */

.login {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px);
  text-align: center;
}
.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}
.login .sub {
  margin-top: 6px;
  font-size: 17px;
  color: var(--text-dim);
}
.pin-dots {
  display: flex;
  gap: 16px;
  height: 20px;
}
.pin-dots span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  transition:
    background-color var(--dur-color) ease-out,
    border-color var(--dur-color) ease-out;
}
.pin-dots span.on {
  background: var(--accent);
  border-color: var(--accent);
}
.pin-shake {
  animation: pin-shake 300ms ease-in-out;
}
@keyframes pin-shake {
  20%,
  60% {
    transform: translateX(-7px);
  }
  40%,
  80% {
    transform: translateX(7px);
  }
}
.pin-msg {
  min-height: 24px;
  font-size: 17px;
  color: var(--warn);
}
.keys {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 14px 22px;
}
.key {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--surface);
  font-size: 30px;
  font-weight: 500;
  display: grid;
  place-items: center;
}
.key:active:not(:disabled) {
  background: var(--surface-hover);
}
.key.plain {
  background: transparent;
  color: var(--text-dim);
}
.key.ok {
  background: var(--accent);
  color: var(--on-accent);
}
.key.ok:active:not(:disabled) {
  background: var(--accent-press);
}
.key .icon {
  width: 28px;
  height: 28px;
}

/* ---------------------------------------------------------------- paneel (sheet) */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.4);
  animation: fade-in var(--dur-enter) var(--ease-enter);
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  max-width: 560px;
  max-height: calc(100dvh - var(--safe-top) - 24px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-dialog);
  animation: sheet-in 350ms var(--ease-enter);
}
.sheet.full {
  height: calc(100dvh - var(--safe-top) - 24px);
}
.sheet.out {
  animation: sheet-out var(--dur-exit) var(--ease-exit) forwards;
}
.scrim.out {
  animation: fade-out var(--dur-exit) var(--ease-exit) forwards;
}
@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
@keyframes sheet-out {
  to {
    transform: translateY(40px);
    opacity: 0;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 4px 8px;
}
.sheet-head h2 {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px var(--edge) 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sheet-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px var(--edge) calc(var(--safe-bottom) + 16px);
}
.sheet .sub {
  padding: 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--touch-min);
  padding: 0 8px 0 20px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-dim);
}
.field:focus-within {
  box-shadow: 0 0 0 2px var(--accent);
}
.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  font-size: 17px;
  color: var(--text);
}
.field input::placeholder,
textarea::placeholder {
  color: var(--text-disabled);
}
.field input::-webkit-search-cancel-button {
  display: none;
}
textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 16px;
  resize: vertical;
  outline: 0;
}
textarea:focus {
  box-shadow: 0 0 0 2px var(--accent);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  border-radius: 26px;
  background: var(--surface);
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 10px 10px;
  border-radius: 18px;
  text-align: left;
}
.rows li + li {
  border-top: 1px solid var(--bg);
}
button.row:active:not(:disabled) {
  background: var(--surface-hover);
  transform: none;
}
.row .tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: var(--bg);
  color: var(--text-dim);
}
.row .tile.accent {
  background: var(--accent-soft);
  color: var(--accent);
}
.row-text {
  flex: 1;
  min-width: 0;
}
.row-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.row-sub {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hint {
  padding: 4px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}

/* afvinken */
.check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  border: 2px solid var(--text-disabled);
  color: transparent;
}
.check .icon {
  width: 18px;
  height: 18px;
  stroke-width: 3;
}
[aria-checked="true"] .check {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--warn-soft);
  color: var(--warn-ink);
  font-size: 15px;
  font-weight: 500;
}
.notice .icon {
  width: 22px;
  height: 22px;
}
.notice.info {
  background: var(--accent-soft);
  color: var(--text);
}

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 16px;
  text-align: center;
}
.state h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.state p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}
.state .tile {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
}
.state .tile.warn {
  background: var(--warn-soft);
  color: var(--warn-ink);
}
.state .tile .icon {
  width: 30px;
  height: 30px;
}
.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------- melding */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--tabs-h) + 16px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 2 * var(--edge));
  min-height: 52px;
  padding: 6px 6px 6px 18px;
  border-radius: 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  transform: translateX(-50%);
  animation: toast-in var(--dur-enter) var(--ease-enter);
}
.toast.solo {
  padding-right: 18px;
}
.toast.out {
  animation: toast-out var(--dur-exit) var(--ease-exit) forwards;
}
.toast button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  font-weight: 700;
  /* Leesbaar op de omgekeerde toast in beide thema's. */
  color: color-mix(in srgb, var(--accent) 55%, var(--bg));
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

body[data-tab="ritten"] .toast {
  bottom: calc(var(--safe-bottom) + var(--tabs-h) + 96px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
