/* ------------------------------------------------------------------
   PREEN bay kiosk · components
   Reusable, screen-agnostic building blocks. All prefixed with .k-.
   ------------------------------------------------------------------ */

/* ---------- inline icons ---------- */
.k-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.22em; }
.k-btn .k-icon { width: 22px; height: 22px; }
.k-eyebrow .k-icon { width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.k-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--hit-min);
  padding: 0 30px;
  border: 0;
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: var(--fs-md);
  letter-spacing: 0.005em;
  color: #fff;
  /* A shade deeper than the brand blue behind the label: white on #1677ff is 4.1:1, here 4.7-5.2:1. */
  background: linear-gradient(180deg, #2a7bf0, #1366e6 50%, var(--p-blue-deep));
  box-shadow: var(--sh-blue), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), filter var(--dur-fast), opacity var(--dur-fast);
}
@media (hover: hover) { .k-btn:hover { transform: translateY(-2px); filter: brightness(1.04); } }
.k-btn:active { transform: scale(0.97); }
.k-btn:disabled, .k-btn.is-busy { opacity: 0.55; cursor: not-allowed; transform: none; }
.k-btn.is-busy { position: relative; color: transparent; }
.k-btn.is-busy::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: k-spin 800ms linear infinite;
}
.k-btn--xl { min-height: var(--hit-cta); padding: 0 44px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.k-btn--sm { min-height: 56px; padding: 0 20px; font-size: var(--fs-sm); }
.k-btn--block { width: 100%; }

.k-btn--ink {
  background: linear-gradient(180deg, #1c3f5c, var(--p-navy) 55%, var(--p-ink));
  box-shadow: 0 14px 30px rgba(11, 28, 43, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.k-btn--white {
  background: #fff;
  color: var(--p-navy);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.k-btn--ghost {
  background: var(--k-chrome-surface);
  color: var(--k-chrome-fg);
  border: 1.5px solid var(--k-chrome-line);
  box-shadow: none;
  backdrop-filter: blur(14px);
}
/* On the dark photo screens a ghost button was 10% white over whatever the photo showed (1.8:1 under
   "Gift voucher?"). A navy base keeps the white label readable on any picture. */
body[data-theme="dark"] .k-btn--ghost { background: rgba(11, 28, 43, 0.5); }
@media (hover: hover) { .k-btn--ghost:hover { border-color: var(--k-accent); filter: none; } }
/* Darkened over the owner's accent (chrome.applySite sets --p-again): the light #e2782d top stop put
   white "Start again" at 3.5:1. */
.k-btn--again {
  background: linear-gradient(180deg, rgba(11, 28, 43, 0.1), rgba(11, 28, 43, 0.32)), var(--p-again);
  box-shadow: var(--sh-again), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.k-btn--again.is-pulse { animation: k-pop 420ms var(--ease-emph); }
.k-btn--success {
  background: linear-gradient(180deg, #22c58e, var(--p-success) 60%, #0b8a5f);
  box-shadow: 0 14px 30px rgba(14, 159, 110, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.k-btn[hidden] { display: none; }

/* back link */
.k-back {
  display: inline-flex;
  /* In a grid (wash list head, pay side, code pad) it stretched to the full column and read like an
     empty search field. */
  justify-self: start;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 20px 0 14px;
  border: 1.5px solid var(--k-line);
  border-radius: var(--r-pill);
  background: var(--k-surface);
  color: var(--k-fg);
  font-weight: 800;
  font-size: var(--fs-sm);
  backdrop-filter: blur(14px);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast);
}
@media (hover: hover) { .k-back:not(:disabled):hover { transform: translateX(-2px); border-color: var(--k-accent); } }
.k-back svg { width: 22px; height: 22px; }
/* The code screen locks Back while Yes is on the wire. */
.k-back:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- chips / badges ---------- */
.k-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--k-surface-2);
  border: 1px solid var(--k-line);
  color: var(--k-fg);
  font-weight: 800;
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.k-chip svg { width: 18px; height: 18px; flex: none; }
.k-chip--accent { background: var(--tone-regular-soft); border-color: transparent; color: var(--p-blue-deep); }
.k-chip--gold { background: var(--p-gold-soft); border-color: transparent; color: #7a3a10; }
.k-chip--success { background: var(--p-success-soft); border-color: transparent; color: #0a6b4a; }
.k-chip--warn { background: var(--p-warn-soft); border-color: transparent; color: var(--p-warn); }
.k-chip--danger { background: var(--p-danger-soft); border-color: transparent; color: var(--p-danger); }
body[data-theme="dark"] .k-chip { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.16); color: #fff; }
body[data-theme="dark"] .k-chip--success { background: rgba(14,159,110,0.28); color: #b8f5d9; }
body[data-theme="dark"] .k-chip--accent { background: rgba(58,166,255,0.28); color: #dbeaff; }
body[data-theme="dark"] .k-chip--warn { background: rgba(194,65,12,0.30); color: #ffd3b8; }
/* A free wash (loyalty card): never "Paid". */
.k-chip--free { background: var(--p-success-soft); border-color: transparent; color: #0a6b4a; }
body[data-theme="dark"] .k-chip--free { background: rgba(14,159,110,0.28); border-color: rgba(110,231,183,0.3); color: #b8f5d9; }

/* The DEMO / "Test reader" badge is what tells drivers an approval moves no money: big enough to read,
   and it never wraps or shrinks (the bay name gives way instead). */
.k-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.k-badge--demo { background: var(--p-gold-soft); color: #7a3a10; border: 1px solid rgba(196, 90, 24, 0.28); }
body[data-theme="dark"] .k-badge--demo { background: rgba(90, 42, 12, 0.72); color: #ffe1cc; border-color: rgba(244, 211, 190, 0.4); }
.k-badge[hidden] { display: none; }

/* live status dot */
.k-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--p-success); box-shadow: 0 0 0 4px rgba(14, 159, 110, 0.18); }
.k-dot--live { animation: k-blink 1.6s ease-in-out infinite; }
.k-dot--off { background: var(--p-danger); box-shadow: 0 0 0 4px rgba(200, 30, 30, 0.16); }
.k-dot--warn { background: var(--p-warn); box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.16); }

/* ---------- surfaces ---------- */
.k-panel {
  position: relative;
  background: var(--k-surface);
  border: 1px solid var(--k-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.k-panel--pad { padding: clamp(22px, 2.6vw, 40px); }
.k-panel--solid { background: var(--k-surface-solid); }
/* Dark glass sits on a photo: 10% white over a light patch of the picture left white text at 3-4:1.
   A navy base (still blurred glass, with its light edge) keeps panel text readable on any photo. */
body[data-theme="dark"] .k-panel:not(.k-panel--solid) { background: rgba(11, 28, 43, 0.45); }

.k-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: var(--fs-sm);
  background: var(--p-gold-soft);
  color: #7a3a10;
  border: 1px solid rgba(196, 90, 24, 0.28);
}
.k-banner--danger { background: var(--p-danger-soft); color: var(--p-danger); border-color: rgba(200, 30, 30, 0.2); }
.k-banner--info { background: var(--tone-regular-soft); color: var(--p-blue-deep); border-color: rgba(22, 119, 255, 0.18); }
/* Good news ("Code accepted. Your car is in the line."): green with a check, like the Paid chip. */
.k-banner--ok { background: var(--p-success-soft); color: #0a6b4a; border-color: rgba(14, 159, 110, 0.28); }
.k-banner svg { width: 22px; height: 22px; flex: none; }
body[data-theme="dark"] .k-banner--info { background: rgba(58, 166, 255, 0.18); color: #cfe6ff; border-color: rgba(255,255,255,0.14); }
body[data-theme="dark"] .k-banner--ok { background: rgba(14, 159, 110, 0.3); color: #c8f7e1; border-color: rgba(110, 231, 183, 0.32); }

.k-error {
  min-height: 24px;
  margin: 0;
  color: var(--p-danger);
  font-weight: 800;
  font-size: var(--fs-sm);
}
body[data-theme="dark"] .k-error { color: #ff9aa8; }
.k-error:empty { display: none; }

/* ---------- form ---------- */
.k-field { display: grid; gap: 8px; }
.k-field__label {
  font-size: var(--fs-xs);
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--k-fg-muted);
}
.k-input {
  width: 100%;
  min-height: 64px;
  padding: 0 20px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--k-line);
  background: var(--k-surface-solid);
  color: var(--k-fg);
  font-size: var(--fs-md);
  font-weight: 700;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.k-input:focus { border-color: var(--p-blue); box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.16); }
.k-input::placeholder { color: var(--k-fg-soft); font-weight: 600; }

/* ---------- price ---------- */
.k-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-price);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--k-fg);
}
.k-price small {
  font-family: var(--font-ui);
  font-size: max(0.42em, 14px);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--k-fg-muted);
  margin-right: 0.28em;
  vertical-align: 0.24em;
}

/* ---------- poster card (bay + programme) ---------- */
.k-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  text-align: left;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--r-xl);
  background: var(--k-surface-solid);
  color: var(--k-fg);
  box-shadow: var(--sh-2);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
@media (hover: hover) { .k-card:hover { transform: translateY(-6px); box-shadow: var(--sh-3); border-color: var(--k-accent); } }
.k-card:active { transform: scale(0.985); }
.k-card:disabled, .k-card.is-disabled { opacity: 0.55; cursor: not-allowed; filter: saturate(0.6); }
@media (hover: hover) { .k-card:disabled:hover, .k-card.is-disabled:hover { transform: none; } }
.k-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--p-mist);
}
.k-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 900ms var(--ease-out);
}
@media (hover: hover) { .k-card:hover .k-card__media img { transform: scale(1.08); } }
.k-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 28, 43, 0) 55%, rgba(11, 28, 43, 0.35) 100%);
}
.k-card__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--p-navy);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.k-card__tag--gold { background: linear-gradient(180deg, #f4d3be, #c45a18); color: #3b1c08; }
.k-card__body {
  display: grid;
  gap: 10px;
  padding: 20px 24px 24px;
  align-content: start;
}
.k-card__title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); letter-spacing: -0.015em; line-height: 1.1; }
.k-card__desc {
  color: var(--k-fg-muted);
  font-size: var(--fs-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.k-card__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.k-card__foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--k-line);
}
.k-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 8px 0 18px;
  border-radius: var(--r-pill);
  background: var(--p-ink);
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-sm);
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.k-card__cta i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.k-card__cta svg { width: 18px; height: 18px; }
@media (hover: hover) { .k-card:hover .k-card__cta { background: var(--p-blue); } }
@media (hover: hover) { .k-card:hover .k-card__cta i { transform: translateX(2px); } }
/* Programme card on the wash list: Details beside the name, the price selects the wash. */
.k-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* A glove-sized pill (56 px, like Back). The negative margin lets it draw at 56 px while the head row
   keeps its 44 px, so the photo and the price button do not move on a 1024 px tablet. */
.k-card__details {
  flex: none;
  min-height: 56px;
  margin-block: -6px;
  padding: 0 18px;
  border: 1.5px solid var(--k-line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--k-fg);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 800;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
@media (hover: hover) { .k-card__details:hover { border-color: var(--k-accent); color: var(--k-accent); } }
.k-card__choose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  margin-top: 6px;
  padding: 0 10px 0 22px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--p-ink);
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.k-card__prices { display: grid; justify-items: start; gap: 2px; }
.k-card__was { color: rgba(255, 255, 255, 0.6); font-size: var(--fs-xs); font-weight: 800; }
.k-card__choose .k-price { color: #fff; font-size: clamp(26px, 2.4vw, 34px); }
.k-card__choose .k-price small { color: #fff; }
.k-card__choose i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.k-card__choose svg { width: 22px; height: 22px; }
@media (hover: hover) { .k-card__choose:hover { background: var(--p-blue); } }
.k-card__choose:active { transform: scale(0.98); }
.k-card__details:disabled, .k-card__choose:disabled { cursor: not-allowed; }
.k-card--speedy { --card-tone: var(--tone-speedy); }
.k-card--regular { --card-tone: var(--tone-regular); }
.k-card--thorough { --card-tone: var(--tone-thorough); }
.k-card::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: var(--card-tone, transparent);
  z-index: 2;
}

/* ---------- phase timeline ---------- */
.k-phases { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.k-phases__item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 6px 0;
}
.k-phases__item + .k-phases__item::before {
  content: "";
  position: absolute;
  left: 21px;
  top: -18px;
  height: 24px;
  width: 2px;
  background: var(--k-line);
}
.k-phases__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--k-surface-2);
  border: 1.5px solid var(--k-line);
  font-weight: 900;
  font-size: 15px;
  color: var(--k-fg);
}
.k-phases__name { font-weight: 800; font-size: var(--fs-md); }
.k-phases__time { color: var(--k-fg-muted); font-weight: 800; font-size: var(--fs-sm); }
.k-phases__item.is-done .k-phases__num { background: var(--p-success-strong); border-color: transparent; color: #fff; }
.k-phases__item.is-on .k-phases__num { background: var(--k-accent-text); border-color: transparent; color: var(--k-accent-fg); box-shadow: 0 0 0 6px rgba(58, 166, 255, 0.22); animation: k-breathe 1.8s ease-in-out infinite; }
.k-phases__item.is-on .k-phases__name { color: var(--k-fg); }
.k-phases__item.is-todo .k-phases__name { color: var(--k-fg-muted); }
.k-phases--compact .k-phases__item { min-height: 48px; grid-template-columns: 34px 1fr auto; gap: 12px; }
.k-phases--compact .k-phases__num { width: 34px; height: 34px; font-size: 14px; }
.k-phases--compact .k-phases__item + .k-phases__item::before { left: 16px; top: -14px; height: 18px; }
.k-phases--compact .k-phases__name { font-size: var(--fs-sm); }

/* ---------- steps list (how it works) ---------- */
.k-howto { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: howto; }
.k-howto__item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--k-surface-2);
  border: 1px solid var(--k-line);
  transition: background var(--dur-base), border-color var(--dur-base), opacity var(--dur-base);
}
.k-howto__num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--k-surface-solid);
  border: 1.5px solid var(--k-line);
  font-weight: 900;
  color: var(--k-fg);
}
.k-howto__item b { display: block; font-size: var(--fs-md); font-weight: 800; }
.k-howto__item span { color: var(--k-fg-muted); font-size: var(--fs-sm); }
.k-howto__item.is-on { border-color: var(--k-accent); background: rgba(58, 166, 255, 0.12); }
.k-howto__item.is-on .k-howto__num { background: var(--k-accent-text); color: var(--k-accent-fg); border-color: transparent; animation: k-breathe 1.8s ease-in-out infinite; }
.k-howto__item.is-done .k-howto__num { background: var(--p-success-strong); color: #fff; border-color: transparent; }
/* A finished step is marked by its green tick. Fading the whole item (opacity 0.8) dropped its text
   below AA. */

/* ---------- QR + reference ---------- */
.k-qr {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 18px;
  border-radius: var(--r-lg);
  background: #fff;
  color: var(--p-ink);
  box-shadow: var(--sh-2);
}
.k-qr__code { width: 100%; max-width: 232px; aspect-ratio: 1; }
.k-qr__code svg { width: 100%; height: 100%; display: block; }
.k-ref {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
}
.k-ref--lg { font-size: clamp(28px, 3vw, 40px); }

/* ---------- progress ring ---------- */
.k-ring { position: relative; width: var(--ring, 220px); height: var(--ring, 220px); }
.k-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.k-ring__track { fill: none; stroke: var(--k-line); stroke-width: 12; }
.k-ring__bar { fill: none; stroke: var(--k-accent); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1 1; transition: stroke-dashoffset 900ms var(--ease-out); }
.k-ring__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 2px;
}
.k-ring__pct { font-family: var(--font-display); font-weight: 700; font-size: calc(var(--ring, 220px) * 0.24); line-height: 1; letter-spacing: -0.02em; }
.k-ring__cap { font-size: var(--fs-xs); font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--k-fg-muted); }

/* ---------- linear wait bar ---------- */
.k-wait { position: relative; height: 8px; border-radius: 6px; background: var(--k-surface-2); overflow: hidden; }
.k-wait::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, var(--k-accent), transparent);
  animation: k-slide 1.6s var(--ease-in-out) infinite;
}
.k-wait--timer { background: rgba(255,255,255,0.14); }
.k-wait--timer::after { display: none; }
.k-wait__fill { position: absolute; inset: 0; transform-origin: left; background: var(--k-accent); border-radius: 6px; transition: transform 1s linear; }

/* ---------- stat ---------- */
.k-stat { display: grid; gap: 4px; }
.k-stat b { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); line-height: 1; letter-spacing: -0.02em; }
.k-stat span { font-size: var(--fs-xs); font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--k-fg-muted); }
.k-stats { display: flex; gap: var(--sp-6); flex-wrap: wrap; }

/* ---------- status mark ---------- */
.k-mark {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  margin: 0 auto;
}
.k-mark svg { width: 52px; height: 52px; }
.k-mark--ok { background: var(--p-success-soft); color: var(--p-success); animation: k-pop 520ms var(--ease-emph); }
.k-mark--no { background: var(--p-danger-soft); color: var(--p-danger); animation: k-shake 380ms var(--ease-emph); }
.k-mark--warn { background: var(--p-warn-soft); color: var(--p-warn); animation: k-pop 520ms var(--ease-emph); }
body[data-theme="dark"] .k-mark--ok { background: rgba(14,159,110,0.28); color: #8ff0c6; }
body[data-theme="dark"] .k-mark--no { background: rgba(200,30,30,0.26); color: #ff9aa8; }
body[data-theme="dark"] .k-mark--warn { background: rgba(194,65,12,0.28); color: #ffc79f; }

/* ---------- PIN overlay + keypad ---------- */
.k-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 28, 43, 0.62);
  backdrop-filter: blur(10px);
  animation: k-fade 200ms var(--ease-out) both;
}
.k-overlay__card {
  width: min(560px, 100%);
  display: grid;
  gap: 18px;
  padding: 32px;
  border-radius: var(--r-xl);
  background: #fff;
  color: var(--p-ink);
  box-shadow: var(--sh-3);
  animation: k-rise 320ms var(--ease-out) both;
}
.k-pin {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.k-pin__cell {
  width: 56px;
  height: 68px;
  border-radius: 16px;
  border: 2px solid var(--p-line);
  background: var(--p-ice);
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--p-ink);
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}
.k-pin__cell.is-filled { border-color: var(--p-navy); }
.k-pin__cell.is-next { border-color: var(--p-blue); box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.16); }
.k-pin.is-error .k-pin__cell { border-color: var(--p-danger); animation: k-shake 380ms var(--ease-emph); }
.k-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.k-keypad__key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 72px;
  border-radius: 20px;
  border: 1.5px solid var(--p-line);
  background: #fff;
  font-size: 26px;
  font-weight: 800;
  color: var(--p-ink);
  transition: transform var(--dur-fast), background var(--dur-fast);
}
@media (hover: hover) { .k-keypad__key:hover { background: var(--p-ice); } }
.k-keypad__key:active { transform: scale(0.96); background: var(--p-foam); }
.k-keypad__key--soft { background: var(--p-ice); font-size: var(--fs-sm); font-weight: 900; letter-spacing: 0.06em; }
/* Delete shows a backspace glyph (a key with an x), large enough to read at arm's length. */
.k-keypad__key--soft .k-icon { width: 30px; height: 30px; }

/* The wash a driver saved for this plate in the app (wash list). */

/* ---------- number plate ---------- */
/* The plate as it looks on the car: white, a black rim inside a white edge, black letters. The country
   sits in a small grey box on the left (Swiss plates carry the crest there; we never draw crests). */
.k-plate {
  --plate-h: clamp(46px, 5.4vh, 64px);
  display: inline-flex;
  align-items: stretch;
  flex: none;
  height: var(--plate-h);
  max-width: 100%;
  border: calc(var(--plate-h) * 0.055) solid #121417;
  border-radius: calc(var(--plate-h) * 0.15);
  background: #fff;
  color: #121417;
  box-shadow: 0 0 0 calc(var(--plate-h) * 0.05) #fff, 0 12px 28px rgba(0, 0, 0, 0.32);
  font-family: var(--font-ui);
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
}
.k-plate__cc {
  display: grid;
  place-items: center;
  padding: 0 calc(var(--plate-h) * 0.16);
  border-right: calc(var(--plate-h) * 0.04) solid #121417;
  background: #eef1f5;
  font-size: calc(var(--plate-h) * 0.26);
  letter-spacing: 0.04em;
}
.k-plate__text {
  display: flex;
  align-items: center;
  min-width: calc(var(--plate-h) * 1.2);
  padding: 0 calc(var(--plate-h) * 0.26);
  font-size: calc(var(--plate-h) * 0.58);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.k-plate--sm { --plate-h: 30px; box-shadow: 0 0 0 1.5px #fff; }
.k-plate--sm .k-plate__text { min-width: 0; }
.k-plate--xl { --plate-h: clamp(70px, 11.5vh, 132px); }

/* ---------- toast ---------- */
.k-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: var(--r-pill);
  background: var(--p-ink);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--sh-3);
  animation: k-rise 320ms var(--ease-out) both;
}
