/* Kids Supercar - shared design tokens
   Two registers, one identity:
   - .kiosk-*   customer flow (phone, scanned via QR at the car)
   - .console-* staff dashboard (desktop/tablet at the venue) */

:root {
  --ground: #14122a;
  --surface: #1f1b3d;
  --surface-2: #262148;
  --line: #332c5c;

  --accent: #ff5a36;
  --accent-ink: #2a0e05;
  --accent-2: #ffc857;

  --ink: #f5f3ff;
  --muted: #9089b5;

  --success: #2fcb8c;
  --success-ink: #04241a;
  --warning: #f0a202;
  --warning-ink: #2c1900;
  --danger: #f0446e;
  --danger-ink: #2c0512;

  /* Kids Supercar brand: black / white / racing red - matches the logo. */
  --kiosk-page-bg: #0a0a0a;
  --kiosk-card-bg: #ffffff;
  --kiosk-ink: #141110;
  --kiosk-muted: #767676;
  --kiosk-line: #e9e9e9;
  --kiosk-red: #e31e24;
  --kiosk-red-ink: #ffffff;
  --kiosk-red-tint: #fdecec;
  --kiosk-success: #1f9d55;
  --kiosk-warning: #b9750a;
  --kiosk-failed: #3a3a3a;

  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --radius-kiosk: 20px;
  --radius-console: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- kiosk (customer) - black / white / racing red ---------- */

.kiosk-page {
  min-height: 100dvh;
  background: var(--kiosk-page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.kiosk-card {
  width: 100%;
  max-width: 400px;
  background: var(--kiosk-card-bg);
  color: var(--kiosk-ink);
  border-radius: var(--radius-kiosk);
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.6);
}

.lang-switch {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.lang-switch a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--kiosk-line);
  color: var(--kiosk-muted);
  text-decoration: none;
}

.lang-switch a.active {
  border-color: var(--kiosk-red);
  color: var(--kiosk-red);
}

.powered-by {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 1.5rem -1.5rem -1.75rem;
  padding: 1.1rem 1.5rem;
  background: #0a0a0a;
  border-radius: 0 0 var(--radius-kiosk) var(--radius-kiosk);
}

.powered-by span {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.85;
}

.powered-by img {
  height: 18px;
  width: auto;
}

.privacy-link {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  color: #ffffff;
  opacity: 0.5;
  text-decoration: underline;
  margin-top: 0.15rem;
}

.partner-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.partner-lockup img {
  max-height: 42px;
  width: auto;
}

.partner-lockup .tagline {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--kiosk-muted);
}

.kiosk-wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.kiosk-wordmark .red {
  color: var(--kiosk-red);
}

.car-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.car-photo img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-photo-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #ffffff;
  opacity: 0.55;
}

.car-photo-placeholder svg {
  width: 56px;
  height: 56px;
}

.car-photo-placeholder span {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kiosk-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kiosk-muted);
  margin: 0.3rem 0 1.25rem;
}

.kiosk-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--kiosk-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--kiosk-success) 20%, transparent);
  flex: none;
}

.kiosk-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0 0 0.2rem;
}

.kiosk-subtitle {
  color: var(--kiosk-muted);
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}

.kiosk-section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kiosk-muted);
  margin: 0 0 0.6rem;
}

.package-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tier-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--kiosk-line);
  background: var(--kiosk-card-bg);
  cursor: pointer;
  position: relative;
  /* Reset for when this is used on a <button> (e.g. the extend-ride list)
     instead of a <label> (the main package list) - buttons don't inherit
     font/color/text-align by default and get native OS chrome without
     this. Missing `color` here specifically made the unstyled "+5"
     duration number invisible on mobile: it fell back to the browser's
     default button text color instead of the card's dark ink. */
  font: inherit;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.tier-row input[type="radio"] {
  accent-color: var(--kiosk-red);
  width: 18px;
  height: 18px;
  flex: none;
}

.tier-row:hover {
  border-color: color-mix(in srgb, var(--kiosk-red) 45%, var(--kiosk-line));
}

.tier-row:has(input:checked) {
  border-color: var(--kiosk-red);
  background: var(--kiosk-red-tint);
}

.tier-row.is-featured {
  padding-top: 1.05rem;
}

.tier-badge {
  position: absolute;
  top: -0.5rem;
  left: 2.6rem;
  background: var(--kiosk-red);
  color: var(--kiosk-red-ink);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.tier-duration {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  flex: 1;
}

.tier-duration span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.76rem;
  color: var(--kiosk-muted);
  margin-top: 0.1rem;
}

.tier-price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--kiosk-ink);
}

.loyalty-link {
  color: var(--kiosk-red);
  font-weight: 700;
  text-decoration: none;
}

.loyalty-link:hover {
  text-decoration: underline;
}

.loyalty-steps {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.loyalty-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.loyalty-steps p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--kiosk-ink);
}

.loyalty-step-num {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--kiosk-red-tint);
  color: var(--kiosk-red);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kiosk-footnote {
  margin: 0.9rem 0 0;
  font-size: 0.76rem;
  color: var(--kiosk-muted);
  text-align: center;
}

.email-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--kiosk-muted);
  margin-bottom: 0.25rem;
}

.email-field input {
  background: var(--kiosk-card-bg);
  border: 1.5px solid var(--kiosk-line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--kiosk-ink);
}

.email-field input:focus {
  outline: none;
  border-color: var(--kiosk-red);
}

.email-field textarea {
  background: var(--kiosk-card-bg);
  border: 1.5px solid var(--kiosk-line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--kiosk-ink);
  min-height: 6rem;
  resize: vertical;
}

.email-field textarea:focus {
  outline: none;
  border-color: var(--kiosk-red);
}

.kiosk-cta {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  border: none;
  background: var(--kiosk-red);
  color: var(--kiosk-red-ink);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.kiosk-cta:active {
  transform: scale(0.98);
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
}

.suggestion-chip {
  background: var(--kiosk-card-bg);
  border: 1.5px solid var(--kiosk-line);
  border-radius: 14px;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-body);
  color: var(--kiosk-ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  line-height: 1.25;
}

/* Date-on-top, time-below layout for a future/later slot - the plain
   "now" chip below overrides back to a single centered line, since it has
   no date/time to stack. */
.suggestion-chip .chip-date {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--kiosk-muted);
}

.suggestion-chip .chip-time {
  font-size: 0.88rem;
  font-weight: 800;
}

.suggestion-chip.is-now {
  border-radius: 999px;
  border-color: var(--kiosk-red);
  color: var(--kiosk-red);
  font-size: 0.82rem;
  font-weight: 700;
}

.suggestion-chip.is-selected {
  background: var(--kiosk-red);
  border-color: var(--kiosk-red);
  color: var(--kiosk-red-ink);
}

.suggestion-chip.is-selected .chip-date {
  color: var(--kiosk-red-ink);
  opacity: 0.85;
}

.test-badge {
  display: inline-block;
  border: 1px dashed var(--kiosk-muted);
  color: var(--kiosk-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--kiosk-line);
  margin-bottom: 1.25rem;
}

.legal-back {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--kiosk-muted);
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.legal-content {
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--kiosk-ink);
  margin: 0;
  padding: 1.35rem 0 0.55rem;
  border-top: 1px solid var(--kiosk-line);
}

.legal-content h2:first-of-type {
  padding-top: 0;
  border-top: none;
}

.legal-content p,
.legal-content li {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--kiosk-ink);
  margin: 0 0 0.6rem;
}

.legal-content ul {
  margin: 0 0 0.6rem;
  padding-left: 1.1rem;
}

.legal-content .legal-placeholder {
  color: var(--kiosk-red);
  font-weight: 600;
}

.legal-content .legal-meta {
  display: inline-block;
  color: var(--kiosk-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}

.legal-content .legal-intro {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--kiosk-ink);
  margin: 0 0 0.3rem;
  padding-bottom: 1.1rem;
}

.free-ride-banner {
  background: var(--kiosk-red-tint);
  border: 1.5px solid var(--kiosk-red);
  color: var(--kiosk-red);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.4;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.1rem;
}

.kiosk-error {
  background: var(--kiosk-red-tint);
  border: 1.5px solid var(--kiosk-red);
  color: var(--kiosk-red);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.4;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.toast-added {
  background: var(--kiosk-success);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.toast-added.fade-out {
  opacity: 0;
  transform: translateY(-6px);
}

.status-ring {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.25rem auto 1.25rem;
  border: 6px solid var(--kiosk-line);
}

.status-ring span {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-ring span#countdown {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0;
  text-transform: none;
}

.status-ring span#countdown.expired {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0 0.4rem;
  text-align: center;
}

.status-ring.paid {
  border-color: var(--kiosk-success);
}
.status-ring.paid span {
  color: var(--kiosk-success);
}

.status-ring.pending {
  border-color: var(--kiosk-warning);
}
.status-ring.pending span {
  color: var(--kiosk-warning);
}

.status-ring.failed {
  border-color: var(--kiosk-failed);
}
.status-ring.failed span {
  color: var(--kiosk-red);
}

.status-ring.almost-done {
  border-color: var(--kiosk-warning);
  animation: almost-done-pulse 1.6s ease-in-out infinite;
}
.status-ring.almost-done span#countdown {
  color: var(--kiosk-warning);
}

.package-list.extend-highlight .tier-row {
  border-color: var(--kiosk-warning);
  animation: almost-done-pulse 1.6s ease-in-out infinite;
}

@keyframes almost-done-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kiosk-warning) 45%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--kiosk-warning) 0%, transparent); }
}

/* ---------- console (staff dashboard) ---------- */

.console-shell {
  display: flex;
  min-height: 100dvh;
  background: var(--ground);
}

.console-sidebar {
  width: 216px;
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.console-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.console-brand img {
  display: block;
  max-width: 100%;
  width: 84px;
  height: auto;
}

.console-brand .venue-name {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.76rem;
  color: var(--muted);
}

.console-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.console-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.console-nav-item.active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink);
}

.console-nav-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.console-nav-sub {
  margin-left: 0.85rem;
  padding-left: 0.6rem;
  border-left: 2px solid var(--line);
  font-size: 0.8rem;
  font-weight: 500;
}

.console-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.console-nav-parent-row {
  display: flex;
  align-items: stretch;
  gap: 0.1rem;
}

.console-nav-parent-row .console-nav-item {
  flex: 1;
}

.console-nav-caret {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.65rem;
  transition: transform 0.15s ease;
}

.console-nav-caret:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.console-nav-children {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.console-nav-group.collapsed .console-nav-caret {
  transform: rotate(-90deg);
}

.console-nav-group.collapsed .console-nav-children {
  display: none;
}

/* .console-topbar and .console-mobile-panel only exist to give the mobile
   hamburger menu something to show/hide - on desktop they unwrap via
   display:contents so .console-brand/.console-mobile-toggle and
   .console-nav/.console-venue-switch/.console-user stay direct flex
   children of .console-sidebar, exactly as before these wrappers existed. */
.console-topbar,
.console-mobile-panel {
  display: contents;
}

.console-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}

.console-mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.console-sidebar.mobile-nav-open .console-mobile-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.console-sidebar.mobile-nav-open .console-mobile-toggle span:nth-child(2) {
  opacity: 0;
}

.console-sidebar.mobile-nav-open .console-mobile-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.console-nav-item .soon {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
}

.notice-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.notice-banner-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: color-mix(in srgb, var(--kiosk-red, #e31e24) 10%, var(--surface, #fff));
  border: 1.5px solid var(--kiosk-red, #e31e24);
  color: var(--kiosk-red, #e31e24);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
}

.notice-banner-item:hover {
  background: color-mix(in srgb, var(--kiosk-red, #e31e24) 18%, var(--surface, #fff));
}

.nav-badge {
  margin-left: auto;
  background: var(--kiosk-red, #e31e24);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  min-width: 1.1rem;
  text-align: center;
}

.console-venue-switch {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.console-venue-switch-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.console-venue-switch select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.5rem;
}

.console-user {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.console-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.console-user-role {
  font-size: 0.7rem;
  color: var(--muted);
}

.console-account-link {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.console-account-link:hover {
  color: var(--ink);
}

.console-logout {
  margin-top: 0.5rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.console-logout:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.console-main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem clamp(1rem, 4vw, 2.5rem) 3rem;
}

@media (max-width: 760px) {
  .console-shell {
    flex-direction: column;
  }

  .console-sidebar {
    width: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0.75rem;
    border-right: none;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--surface);
  }

  /* On desktop .console-topbar is display:contents (see base rule) - here
     it becomes a real row so the brand and hamburger button sit side by
     side instead of each taking the full sidebar width. */
  .console-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .console-brand {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
  }

  .console-brand img {
    width: 32px;
  }

  .console-brand .venue-name {
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .console-mobile-toggle {
    display: flex;
  }

  /* The full nested nav (identical markup/behaviour to desktop - same
     collapsible Auto's/Vestigingen groups) renders inside this dropdown
     panel instead of a horizontal scroll strip, since a nested tree
     doesn't translate well to a single scrolling row. */
  .console-mobile-panel {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    padding: 0.85rem 0.9rem;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .console-sidebar.mobile-nav-open .console-mobile-panel {
    display: flex;
  }

  .console-venue-switch {
    padding-top: 0;
    border-top: none;
  }

  .console-user {
    margin-top: 0;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--line);
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .console-logout-form {
    margin-left: auto;
  }

  .console-main {
    padding: 1.25rem 1rem 2.5rem;
  }
}

.booking-car-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.booking-car-row:last-child {
  border-bottom: none;
}

.booking-car-label {
  flex: 0 0 110px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  padding-top: 0.3rem;
}

.booking-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1 1 auto;
}

.booking-chip {
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.booking-chip.checked-in {
  background: var(--accent);
  color: var(--accent-ink);
}

.console-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.75rem;
}

.console-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
}

.console-title .venue {
  color: var(--muted);
  font-weight: 500;
  font-size: 1rem;
}

.console-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.console-live .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-console);
  padding: 1rem 1.1rem;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
}

.stat-trend {
  display: inline-block;
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 600;
  vertical-align: middle;
}

.stat-trend.is-up {
  color: var(--success);
}

.stat-trend.is-down {
  color: var(--danger);
}

.stat-trend.is-flat {
  color: var(--muted);
}

.chart-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

@media (max-width: 760px) {
  .chart-row {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-console);
  padding: 1.1rem 1.2rem;
}

.chart-card h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 1.1rem;
}

.track-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

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

.track-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
  /* Glides smoothly toward each new real position over (just under) the
     board's own reporting interval, rather than snapping there and then
     sitting still - keeps the illustration looking continuously in
     motion even though a real GPS fix only arrives every 45s. */
  transition: left 40s linear, top 40s linear;
}

.track-marker-label {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  white-space: nowrap;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 130px;
}

.bar-chart-scroll {
  overflow-x: auto;
}

.bar-chart-scroll .bar-chart {
  width: max-content;
  min-width: 100%;
}

.bar-chart-scroll .bar {
  flex: none;
  width: 26px;
}

.bar-chart .bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  height: 100%;
}

.bar-chart .bar-fill {
  width: 100%;
  max-width: 20px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  min-height: 2px;
}

.bar-chart .bar-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.rank-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.rank-list li:first-child .rank-badge {
  background: color-mix(in srgb, var(--accent-2) 30%, var(--surface-2));
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-info .name {
  font-weight: 700;
  font-size: 0.88rem;
}

.rank-info .meta {
  font-size: 0.74rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.rank-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.donut-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.donut {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  flex: none;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.82rem;
  min-width: 0;
}

.donut-legend .row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.donut-legend .swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
}

.donut-legend .row span:last-child {
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--muted);
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-console);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

tbody tr:target {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

thead th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

.status-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-chip.paid {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}
.status-chip.paid .dot {
  background: var(--success);
}

.status-chip.pending {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
}
.status-chip.pending .dot {
  background: var(--warning);
}

.status-chip.failed {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}
.status-chip.failed .dot {
  background: var(--danger);
}

.status-chip.refunded {
  background: color-mix(in srgb, var(--muted) 20%, transparent);
  color: var(--muted);
}
.status-chip.refunded .dot {
  background: var(--muted);
}

.status-chip.source-board {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}
.status-chip.source-board .dot {
  background: var(--accent);
}

.status-chip.source-server {
  background: color-mix(in srgb, var(--muted) 20%, transparent);
  color: var(--muted);
}
.status-chip.source-server .dot {
  background: var(--muted);
}

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

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.filter-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.filter-row input[type="date"],
.filter-row select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
}

.filter-clear {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}

.pager {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.pager a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.console-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-console);
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.console-btn.secondary {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.console-btn.danger {
  background: var(--danger);
  color: var(--danger-ink);
}

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 0 0 1.5rem;
}

.message-bubble {
  max-width: 640px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-console);
  background: var(--surface-2);
  border: 1px solid var(--line);
  align-self: flex-start;
}

.message-bubble.staff {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.message-bubble-body {
  white-space: pre-wrap;
  font-size: 0.9rem;
  margin: 0;
}

.message-bubble-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.pricing-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-console);
  flex-wrap: wrap;
}

.pricing-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.pricing-row input[type="number"] {
  width: 90px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
}

.pricing-row input[type="radio"] {
  accent-color: var(--accent);
}

.row-form {
  display: inline;
}

.auth-card {
  max-width: 380px;
  margin: 2.5rem auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form select {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  padding: 0.55rem 0.7rem;
}

.auth-form .console-btn {
  margin-top: 0.4rem;
}

.auth-error {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  border: 1px solid var(--danger);
  color: var(--ink);
  border-radius: var(--radius-console);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.auth-meta {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.auth-meta a {
  color: var(--ink);
  font-weight: 600;
}

.auth-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
