/* Hallmark · macrostructure: Marquee Hero / Workbench / Long Document · genre: modern-minimal · tone: bold utilitarian · anchor hue: safety orange · design-system: design.md · designed-as-app · nav: N1b · footer: Ft5 · enrichment: E8 generated hero photograph · generated: OpenAI built-in ImageGen · post-processed · contrast: pass (40–41) · slop: pass (42–49) · mobile: static pass */
/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4 */
@import url("tokens.css");

:root {
  --sp-font-khmer: var(--font-body);
  --sp-font-mono: var(--font-outlier);
  --sp-bg: var(--color-paper);
  --sp-bg-alt: var(--color-paper-3);
  --sp-surface: var(--color-paper-2);
  --sp-text: var(--color-ink);
  --sp-text-muted: var(--color-ink-2);
  --sp-text-subtle: var(--color-muted);
  --sp-border: var(--color-rule);
  --sp-border-strong: var(--color-rule-2);
  --sp-red: var(--color-accent);
  --sp-red-dark: var(--color-accent-strong);
  --sp-red-light: var(--color-accent-soft);
  --sp-green: var(--color-success);
  --sp-green-dark: var(--color-success-strong);
  --sp-green-light: var(--color-success-soft);
  --sp-amber: var(--color-warning);
  --sp-amber-light: var(--color-warning-soft);
  --sp-radius-sm: var(--radius-input);
  --sp-radius: var(--radius-card);
  --sp-radius-md: var(--radius-card);
  --sp-shadow-hard: var(--shadow-card);
  --sp-shadow-hard-lg: var(--shadow-lift);
  --sp-transition: var(--dur-short) var(--ease-out);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.sp-heading {
  min-width: 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

:lang(km),
.sp-khmer,
.sp-khmer-heading,
[lang="km-KH"] h1,
[lang="km-KH"] h2,
[lang="km-KH"] h3,
[lang="km-KH"] h4 {
  line-height: 1.25;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 4.25rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: var(--text-lg); }

p { margin-block-end: var(--space-sm); }
p:last-child { margin-block-end: 0; }

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: var(--rule-fine) solid var(--color-focus);
  outline-offset: var(--space-3xs);
}

::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sp-skip-link {
  position: fixed;
  inset-block-start: var(--space-sm);
  inset-inline-start: var(--space-sm);
  z-index: 1000;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  transform: translateY(-160%);
}

.sp-skip-link:focus {
  transform: translateY(0);
}

.sp-container {
  width: min(100%, 88rem);
  margin-inline: auto;
  padding-inline: clamp(var(--space-sm), 4vw, var(--space-xl));
}

.sp-main {
  flex: 1;
  padding-block: var(--space-xl) var(--space-3xl);
}

.page-home .sp-main {
  padding-block-start: var(--space-sm);
}

.sp-system-messages {
  margin-block-end: var(--space-md);
}

.sp-inline-form {
  display: inline;
}

/* Navigation · N1b balanced product bar */
.sp-navbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: var(--color-paper);
  border-block-end: var(--rule-hair) solid var(--color-rule);
}

.sp-nav-inner {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.sp-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  width: max-content;
  flex-shrink: 0;
  color: var(--color-ink);
}

.sp-brand-mark,
.sp-brand-badge {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding-inline: var(--space-2xs);
  border-radius: var(--radius-card);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1;
}

.sp-brand-copy {
  display: grid;
  line-height: 1;
}

.sp-brand-copy strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: -0.035em;
}

.sp-brand-copy small {
  margin-block-start: var(--space-3xs);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xs);
  padding: var(--space-3xs);
  list-style: none;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-paper-2);
}

.sp-nav-link {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  padding-inline: var(--space-sm);
  border-radius: var(--radius-pill);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.sp-nav-link:hover,
.sp-nav-link.active {
  background: var(--color-paper-3);
  color: var(--color-accent);
}

.sp-nav-link:active {
  background: var(--color-accent-soft);
}

.sp-nav-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.sp-user-greeting {
  max-width: 10rem;
  overflow: hidden;
  color: var(--color-muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-mobile-toggle {
  display: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding-inline: var(--space-xs);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
  color: var(--color-ink);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 700;
}

/* Buttons · all interaction states */
.sp-btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
  color: var(--color-ink);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.sp-btn-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.sp-btn-secondary {
  background: transparent;
  color: var(--color-ink);
}

.sp-btn-dark {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-paper);
}

.sp-btn-destructive {
  border-color: var(--color-danger);
  background: transparent;
  color: var(--color-danger);
}

.sp-btn-secondary.sp-btn-destructive {
  background: transparent;
  border-color: var(--color-rule-2);
  color: var(--color-danger);
  font-weight: 600;
}

.sp-btn-secondary.sp-btn-destructive:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.sp-btn-sm {
  min-height: 2.5rem;
  padding: var(--space-2xs) var(--space-sm);
  font-size: var(--text-xs);
}

.sp-btn-primary:hover,
.sp-btn-primary.is-hover {
  background: var(--color-focus);
}

.sp-btn-secondary:hover,
.sp-btn-secondary.is-hover {
  background: var(--color-paper-3);
}

.sp-btn:active,
.sp-btn.is-active {
  transform: translateY(1px);
}

.sp-btn:disabled,
.sp-btn.disabled,
.sp-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.sp-btn[aria-busy="true"],
.sp-btn[data-state="loading"] {
  opacity: 0.7;
  cursor: wait;
}

.sp-btn[data-state="error"] {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.sp-btn[data-state="success"] {
  border-color: var(--color-success);
  background: var(--color-success-soft);
  color: var(--color-success-strong);
}

/* Home · Marquee Hero */
.sp-hero-marquee {
  position: relative;
  min-height: min(78dvh, 52rem);
  display: grid;
  align-content: end;
  overflow: clip;
  border-radius: var(--radius-card);
  isolation: isolate;
}

@media (max-height: 34rem) and (orientation: landscape) {
  .sp-hero-marquee {
    min-height: min(52dvh, 20rem);
  }

  .sp-hero-copy {
    padding: var(--space-md) clamp(var(--space-md), 4vw, var(--space-xl)) var(--space-lg);
  }

  .sp-hero h1 {
    font-size: clamp(2.25rem, 7vw, 3.75rem);
  }
}

.sp-hero-image,
.sp-hero-shade {
  position: absolute;
  inset: 0;
}

.sp-hero-image {
  z-index: -2;
  background-image: url("/static/images/sompark-hero-v2.webp");
  background-position: center;
  background-size: cover;
  opacity: 0.76;
  transform: scale(1.025);
  animation: sp-hero-image-enter var(--dur-long) var(--ease-out) var(--dur-short) forwards;
}

.sp-hero-shade {
  z-index: -1;
  background: linear-gradient(to top, var(--color-image-shade), var(--color-overlay));
}

.sp-hero-copy {
  padding: var(--space-xl) clamp(var(--space-lg), 6vw, var(--space-3xl)) var(--space-3xl);
}

.sp-hero-location {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(var(--space-xs));
  animation: sp-hero-copy-enter var(--dur-short) var(--ease-out) forwards;
}

.sp-hero h1 {
  max-width: 12ch;
  color: var(--color-ink);
  font-size: var(--text-display);
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(var(--space-sm));
  animation: sp-hero-copy-enter var(--dur-short) var(--ease-out) var(--dur-micro) forwards;
}

.sp-hero h1 span {
  position: relative;
  display: inline-block;
  color: var(--color-ink);
}

.sp-hero h1 span::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: var(--rule-fine);
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: center left;
  animation: sp-hero-line-enter var(--dur-short) var(--ease-out) calc(var(--dur-long) + var(--dur-micro)) forwards;
}

.sp-hero-scroll {
  position: absolute;
  inset-inline-end: var(--space-lg);
  inset-block-end: var(--space-lg);
  margin: 0;
  color: var(--color-ink-2);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  writing-mode: vertical-rl;
  opacity: 0;
  animation: sp-hero-fade-enter var(--dur-short) var(--ease-out) calc(var(--dur-long) + var(--dur-short)) forwards;
}

@keyframes sp-hero-image-enter {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sp-hero-copy-enter {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sp-hero-line-enter {
  to { transform: scaleX(1); }
}

@keyframes sp-hero-fade-enter {
  to { opacity: 1; }
}

.sp-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--space-2xl);
  padding-block: var(--space-3xl);
  border-block-end: var(--rule-fine) solid var(--color-rule);
}

.sp-intro-copy {
  align-self: center;
}

.sp-intro-copy p,
.sp-directory-head p {
  max-width: 58ch;
  color: var(--color-ink-2);
}

.sp-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-block-start: var(--space-lg);
}

.sp-stat-strip,
.sp-hero-statboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block-start: var(--rule-hair) solid var(--color-rule);
  border-inline-start: var(--rule-hair) solid var(--color-rule);
}

.sp-stat-item {
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-md);
  border-inline-end: var(--rule-hair) solid var(--color-rule);
  border-block-end: var(--rule-hair) solid var(--color-rule);
}

.sp-stat-val {
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 700;
  line-height: 1;
}

.sp-stat-currency {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.sp-stat-label {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* Inventory */
.sp-zone-directory {
  padding-block: var(--space-3xl) var(--space-xl);
}

.sp-directory-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.85fr);
  gap: var(--space-xl);
  align-items: end;
}

.sp-search {
  display: flex;
  align-items: stretch;
  gap: var(--space-2xs);
}

.sp-district-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-block: var(--space-xl) var(--space-md);
}

.sp-filter-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding-inline: var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
  transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.sp-filter-link:hover,
.sp-filter-link.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.sp-filter-link:active {
  transform: translateY(1px);
}

.sp-zone-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.sp-zone-card {
  position: relative;
  min-width: 0;
  min-height: 23rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-lg);
  overflow: clip;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.sp-zone-card:hover {
  transform: translateY(-3px);
}

.sp-zone-card.full-zone {
  background: var(--color-paper);
  border-style: dashed;
  box-shadow: none;
}

.sp-zone-index {
  position: absolute;
  inset-inline-end: var(--space-sm);
  inset-block-end: calc(var(--space-sm) * -1);
  z-index: 0;
  color: var(--color-paper-3);
  font-family: var(--font-display);
  font-size: 9rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.sp-zone-card > *:not(.sp-zone-index) {
  position: relative;
  z-index: 1;
}

.sp-zone-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.sp-zone-title {
  max-width: 17ch;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.sp-zone-title a:hover {
  color: var(--color-accent);
}

.sp-zone-khmer,
.sp-zone-address {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

.sp-zone-khmer { margin-block-start: var(--space-2xs); }
.sp-zone-address { margin-block-start: var(--space-lg); }

.sp-zone-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  margin-block-start: var(--space-lg);
  padding-block-start: var(--space-md);
  border-block-start: var(--rule-hair) solid var(--color-rule);
}

.sp-meta-label {
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-meta-value,
.sp-meta-hours {
  margin-block-start: var(--space-3xs);
  font-weight: 700;
}

.sp-meta-value {
  font-size: var(--text-lg);
}

.sp-meta-value span {
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: var(--text-xs);
}

.sp-zone-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-block-start: var(--space-lg);
}

/* Availability and system states */
.sp-avail-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-3xs) var(--space-xs);
  border: var(--rule-hair) solid currentColor;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

.sp-avail-badge.available { background: var(--color-success-soft); color: var(--color-success-strong); }
.sp-avail-badge.limited { background: var(--color-warning-soft); color: var(--color-warning); }
.sp-avail-badge.full { background: var(--color-danger-soft); color: var(--color-danger); }

.sp-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-pill);
  background: currentColor;
}

.sp-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-block-end: var(--space-md);
  border: var(--rule-hair) solid currentColor;
  border-radius: var(--radius-card);
}

.sp-alert strong {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-alert-success { background: var(--color-success-soft); color: var(--color-success-strong); }
.sp-alert-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.sp-alert-error,
.sp-alert-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.sp-alert-info { background: var(--color-info-soft); color: var(--color-info); }

/* Toast Notification System · Fixed-position stackable notifications */
.sp-toast-container {
  position: fixed;
  top: max(1.5rem, env(safe-area-inset-top) + 0.5rem);
  right: max(1.5rem, env(safe-area-inset-right) + 0.5rem);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: min(26rem, calc(100% - 2rem));
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}

@media (max-width: 36rem) {
  .sp-toast-container {
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    left: max(0.75rem, env(safe-area-inset-left));
    width: auto;
    max-width: none;
  }
}

.sp-toast {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
  color: var(--color-ink);
  box-shadow: var(--shadow-lift);
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
  animation: sp-toast-slide var(--dur-short) var(--ease-out);
}

@keyframes sp-toast-slide {
  from {
    opacity: 0;
    transform: translateX(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sp-toast.sp-toast-dismissing {
  opacity: 0;
  transform: translateX(1.5rem);
  pointer-events: none;
}

.sp-toast:focus-visible {
  outline: var(--rule-fine) solid var(--color-focus);
  outline-offset: var(--space-3xs);
}

.sp-toast-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  border-top-left-radius: var(--radius-card);
  border-bottom-left-radius: var(--radius-card);
  background: currentColor;
}

.sp-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.125rem;
  margin-left: var(--space-3xs);
  flex-shrink: 0;
}

.sp-toast-content {
  min-width: 0;
}

.sp-toast-title {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: var(--space-3xs);
}

.sp-toast-body {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-ink);
  line-height: 1.45;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.sp-toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--color-ink-2);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  align-self: flex-start;
  justify-self: end;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}

.sp-toast-close:hover {
  background: var(--color-paper-3);
  color: var(--color-ink);
  border-color: var(--color-rule-2);
}

.sp-toast-close:focus-visible {
  outline: var(--rule-fine) solid var(--color-focus);
  outline-offset: var(--space-3xs);
}

@media (max-width: 48rem) {
  .sp-toast-close {
    width: 2.75rem; /* 44px minimum touch target on mobile */
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    font-size: 1.375rem;
  }
}

/* Toast type variants */
.sp-toast-success {
  border-color: var(--color-success-soft);
  color: var(--color-success-strong);
}
.sp-toast-success .sp-toast-indicator { background: var(--color-success); }
.sp-toast-success .sp-toast-icon { color: var(--color-success); }

.sp-toast-error,
.sp-toast-danger {
  border-color: var(--color-danger-soft);
  color: var(--color-danger);
}
.sp-toast-error .sp-toast-indicator,
.sp-toast-danger .sp-toast-indicator { background: var(--color-danger); }
.sp-toast-error .sp-toast-icon,
.sp-toast-danger .sp-toast-icon { color: var(--color-danger); }

.sp-toast-warning {
  border-color: var(--color-warning-soft);
  color: var(--color-warning);
}
.sp-toast-warning .sp-toast-indicator { background: var(--color-warning); }
.sp-toast-warning .sp-toast-icon { color: var(--color-warning); }

.sp-toast-info {
  border-color: var(--color-info-soft);
  color: var(--color-info);
}
.sp-toast-info .sp-toast-indicator { background: var(--color-info); }
.sp-toast-info .sp-toast-icon { color: var(--color-info); }

/* Dashboard Component Styles */
.sp-dashboard-greeting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  box-shadow: var(--shadow-card);
}

.sp-dashboard-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-3xs) var(--space-xs);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-paper-3);
  color: var(--color-accent);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2xs);
}

.sp-dashboard-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (max-width: 48rem) {
  .sp-dashboard-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sp-action-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  color: var(--color-ink);
  text-decoration: none;
  min-width: 0;
  transition: transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.sp-action-card:hover {
  border-color: var(--color-accent);
  background: var(--color-paper-3);
  transform: translateY(-2px);
}

.sp-action-card:focus-visible {
  outline: var(--rule-fine) solid var(--color-focus);
  outline-offset: var(--space-3xs);
}

.sp-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-card);
  background: var(--color-paper-3);
  color: var(--color-accent);
  border: var(--rule-hair) solid var(--color-rule);
}

.sp-action-card:hover .sp-action-icon {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  border-color: var(--color-accent);
}

.sp-action-title {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  line-height: 1.1;
  margin-bottom: var(--space-3xs);
}

.sp-action-desc {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.4;
  margin: 0;
}

.sp-action-arrow {
  align-self: flex-end;
  font-family: var(--font-outlier);
  font-size: var(--text-md);
  color: var(--color-accent);
  transition: transform var(--dur-micro) var(--ease-out);
}

.sp-action-card:hover .sp-action-arrow {
  transform: translateX(4px);
}

.sp-action-card-button {
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.sp-dashboard-active-box {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-success);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-card);
}

.sp-dashboard-active-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.sp-dashboard-active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.sp-dashboard-metric-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-ink-2);
  margin-bottom: var(--space-3xs);
}

.sp-dashboard-metric-value {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-ink);
}

.sp-dashboard-metric-code {
  font-family: var(--font-outlier);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
}

.sp-empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
}

.sp-empty-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-pill);
  background: var(--color-paper-3);
  border: var(--rule-fine) solid var(--color-rule);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.sp-empty-state h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2xs);
}

.sp-empty-state p {
  color: var(--color-ink-2);
  max-width: 32rem;
  margin: 0 auto var(--space-lg) auto;
  line-height: 1.5;
}


.sp-res-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  margin-block-end: var(--space-lg);
  border: var(--rule-hair) solid var(--color-success);
  border-radius: var(--radius-card);
  background: var(--color-success-soft);
}

.sp-res-statusline,
.sp-res-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.sp-res-status {
  color: var(--color-success-strong);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-res-ticket {
  font-family: var(--font-outlier);
}

.sp-res-ticket,
.sp-res-copy {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

.sp-res-banner h3 { margin-block: var(--space-2xs); }

/* Forms and workbench surfaces */
.sp-form-group {
  margin-block-end: var(--space-md);
}

.sp-label {
  display: block;
  margin-block-end: var(--space-2xs);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 700;
}

.sp-required,
.sp-field-error {
  color: var(--color-danger);
}

.sp-input,
.sp-select,
select.sp-input,
textarea.sp-input {
  width: 100%;
  min-height: 3rem;
  padding: var(--space-xs) var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-input);
  outline: var(--rule-fine) solid transparent;
  background: var(--color-paper);
  color: var(--color-ink);
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.sp-input:hover,
.sp-select:hover {
  border-color: var(--color-muted);
}

.sp-input:focus,
.sp-select:focus,
.sp-input:focus-visible,
.sp-select:focus-visible {
  border-color: var(--color-focus);
  outline: var(--rule-fine) solid var(--color-focus);
  outline-offset: var(--space-3xs);
}

.sp-input:disabled,
.sp-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sp-input.is-invalid,
.sp-input[aria-invalid="true"] {
  border-color: var(--color-danger);
  background: var(--color-danger-soft);
}

.sp-input.is-success,
.sp-input[aria-invalid="false"]:not(:placeholder-shown) {
  border-color: var(--color-success);
}

/* Date Inputs & High-Contrast Native Picker */
input[type="date"],
input[type="date"].sp-input {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.92) brightness(1.15);
  opacity: 0.85;
  padding: var(--space-3xs);
  border-radius: var(--radius-input);
  transition: opacity var(--dur-short) var(--ease-out), filter var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    filter: invert(1) brightness(1.3);
    background-color: var(--color-paper-3);
  }
}

input[type="date"]::-webkit-calendar-picker-indicator:focus-visible {
  outline: var(--rule-fine) solid var(--color-focus);
  outline-offset: 2px;
  opacity: 1;
}

.sp-field-help,
.sp-field-error {
  margin-block-start: var(--space-2xs);
  min-height: 1lh;
  font-size: var(--text-xs);
}

.sp-field-feedback {
  min-height: 1lh;
  color: var(--color-muted);
  font-size: var(--text-xs);
}

/* ==========================================================================
   SomPark Universal Back Navigation Link
   Enforces at least 44x44px touch targets, visible keyboard focus, safe clearance
   from sticky navbar, and clean bilingual Khmer/English typography.
   ========================================================================== */
.sp-back-nav {
  display: flex;
  align-items: center;
  margin-block-end: var(--space-xs);
  scroll-margin-top: calc(5.5rem + 1rem);
}

.sp-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs, 0.5rem);
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm, 8px);
  background: var(--color-paper-2, #f8fafc);
  border: var(--rule-hair, 1px) solid var(--color-rule, #e2e8f0);
  color: var(--color-ink, #0f172a);
  font-family: var(--font-body);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.35;
  box-sizing: border-box;
  scroll-margin-top: calc(5.5rem + 1rem);
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.sp-back-link:hover {
  background: var(--color-paper-hover, #f1f5f9);
  border-color: var(--color-accent, #2563eb);
  color: var(--color-ink-vibrant, #000000);
  box-shadow: var(--shadow-fine, 0 1px 3px rgba(0,0,0,0.05));
  transform: translateX(-2px);
}

.sp-back-link:focus-visible {
  outline: 3px solid var(--color-accent, #2563eb);
  outline-offset: 2px;
}

.sp-back-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-block;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-out);
}

.sp-back-link:hover .sp-back-icon {
  transform: translateX(-3px);
}

.sp-back-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.sp-back-text {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sp-back-khmer {
  font-family: var(--font-khmer, "Noto Sans Khmer", sans-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-ink-2, #475569);
  white-space: normal;
  word-break: break-word;
}

.sp-auth-container .sp-back-nav {
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  margin-block-end: var(--space-sm);
}

.sp-ticket-page-container > .sp-back-nav {
  margin-block-end: var(--space-sm);
}

/* Scroll clearance so fixed/sticky navbar never obscures heading or Back link */
.sp-page-header,
.sp-back-nav,
.sp-back-link,
[id="parking-zones"],
[id="page-header"] {
  scroll-margin-top: calc(5.5rem + 1rem);
}

.sp-page-header {
  display: grid;
  gap: var(--space-2xs);
  margin-block-end: var(--space-xl);
  padding-block-end: var(--space-lg);
  border-block-end: var(--rule-fine) solid var(--color-rule);
}

.sp-page-khmer {
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 700;
}

.sp-page-header p {
  max-width: 65ch;
  color: var(--color-ink-2);
  font-size: var(--text-lg);
}

.sp-empty-state {
  padding: var(--space-2xl) var(--space-lg);
  border: var(--rule-hair) dashed var(--color-rule-2);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
  text-align: center;
}

.sp-empty-mark {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-block-end: var(--space-sm);
  border-radius: var(--radius-card);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
}

.sp-empty-state h3 { margin-block-end: var(--space-2xs); }
.sp-empty-state p { max-width: 50ch; margin: 0 auto var(--space-md); color: var(--color-ink-2); }

/* Ticket keeps its printed-paper identity on screen */
.sp-ticket-sheet {
  --sp-bg: var(--color-print-paper);
  --sp-bg-alt: var(--color-print-paper);
  --sp-surface: var(--color-print-paper);
  --sp-text: var(--color-print-ink);
  --sp-text-muted: var(--color-print-muted);
  --sp-text-subtle: var(--color-print-muted);
  --sp-border: var(--color-print-muted);
  --sp-border-strong: var(--color-print-rule);
  position: relative;
  max-width: 42rem;
  margin-inline: auto;
  padding: clamp(var(--space-md), 5vw, var(--space-xl));
  border: var(--rule-fine) solid var(--color-print-rule);
  border-radius: var(--radius-card);
  background: var(--color-print-paper);
  color: var(--color-print-ink);
  box-shadow: var(--shadow-lift);
}

.sp-ticket-sheet h1,
.sp-ticket-sheet h2,
.sp-ticket-sheet h3,
.sp-ticket-sheet h4,
.sp-ticket-sheet a,
.sp-ticket-sheet strong { color: var(--color-print-ink); }

.sp-ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block-end: var(--space-md);
  margin-block-end: var(--space-md);
  border-block-end: var(--rule-fine) dashed var(--color-print-rule);
}

/* Ticket Header Branding · Consistent with Navigation */
.sp-ticket-sheet .sp-ticket-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
}

.sp-ticket-sheet .sp-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  background: var(--color-accent);
  color: #000000;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.sp-ticket-sheet .sp-ticket-brand .sp-brand-copy {
  display: grid;
  line-height: 1.05;
}

.sp-ticket-sheet .sp-ticket-brand .sp-brand-copy strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--color-paper); /* signature dark graphite: oklch(18% 0.015 255) */
  line-height: 1;
}

.sp-ticket-sheet .sp-ticket-brand .sp-brand-copy small {
  margin-block-start: var(--space-3xs);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-print-rule); /* dark graphite: oklch(18% 0 0) */
  line-height: 1;
}

.sp-ticket-sheet .sp-ticket-khmer-tagline {
  margin-block-start: var(--space-2xs);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-print-rule); /* dark graphite contrast on white sheet */
  line-height: 1.35;
}

.sp-ticket-barcode {
  display: inline-block;
  margin-block-start: var(--space-2xs);
  padding: var(--space-2xs) var(--space-sm);
  border: var(--rule-fine) solid var(--color-print-rule);
  background: var(--color-print-paper);
  color: var(--color-print-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Error · Long Document */
.sp-error-page {
  width: min(100%, 48rem);
  margin-inline: auto;
  padding-block: var(--space-2xl);
}

.sp-error-code {
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 700;
}

.sp-error-page h1 { margin-block-end: var(--space-md); }
.sp-error-page > p:not(.sp-error-code) { max-width: 60ch; margin-block-end: var(--space-lg); color: var(--color-ink-2); }

/* Footer · Ft5 statement */
.sp-footer {
  margin-block-start: auto;
  padding-block: var(--space-3xl) var(--space-xl);
  border-block-start: var(--rule-fine) solid var(--color-rule);
  background: var(--color-paper-2);
}

.sp-footer-statement {
  max-width: 15ch;
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 9vw, 8rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.sp-footer-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: var(--space-lg);
  margin-block-start: var(--space-2xl);
  padding-block-start: var(--space-sm);
  border-block-start: var(--rule-hair) solid var(--color-rule);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.sp-footer-wordmark {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

.sp-footer-links {
  display: flex;
  gap: var(--space-md);
}

.sp-footer-links a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: var(--color-ink-2);
  white-space: nowrap;
}

.sp-footer-links a:hover { color: var(--color-accent); }
.sp-footer-meta > p { justify-self: end; margin: 0; text-align: end; }

/* Compatibility for existing workbench templates */
.sp-hero:not(.sp-hero-marquee) {
  padding: var(--space-xl);
  margin-block-end: var(--space-xl);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
}

.sp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--space-xl);
  align-items: center;
}

.sp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
}

table {
  color: var(--color-ink);
}

code {
  font-family: var(--font-outlier);
}

@media (max-width: 74rem) {
  .sp-nav-inner {
    display: flex;
    justify-content: space-between;
  }

  .sp-nav-links {
    display: none;
  }

  .sp-nav-links.mobile-active {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 5rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-sm);
    border: 0;
    border-block-end: var(--rule-hair) solid var(--color-rule);
    border-radius: 0;
    background: var(--color-paper-2);
    max-height: calc(100dvh - 5.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-lift);
    z-index: 99;
    animation: sp-menu-enter var(--dur-short) var(--ease-out);
  }

  .sp-nav-link {
    justify-content: center;
    min-height: 2.75rem;
  }

  .sp-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sp-intro,
  .sp-directory-head,
  .sp-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-intro { gap: var(--space-xl); }
  .sp-zone-board { grid-template-columns: minmax(0, 1fr); }
  .sp-footer-grid { grid-template-columns: minmax(0, 1fr); }

  .sp-footer-meta {
    grid-template-columns: 1fr auto;
  }

  .sp-footer-meta > p {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: start;
  }
}

@media (max-width: 40rem) {
  .sp-container {
    padding-inline: clamp(var(--space-sm), 4vw, var(--space-md));
  }

  .sp-main {
    padding-block: var(--space-lg) var(--space-2xl);
  }

  .sp-nav-auth {
    gap: var(--space-2xs);
  }

  .sp-user-greeting,
  .sp-nav-login {
    display: none;
  }

  .sp-hero-marquee {
    min-height: 68dvh;
  }

  .sp-hero-image {
    background-position: 62% center;
  }

  .sp-hero-copy {
    padding: var(--space-lg) var(--space-md) var(--space-2xl);
  }

  .sp-hero h1 {
    font-size: var(--text-display-s);
  }

  .sp-hero-scroll {
    display: none;
  }

  .sp-intro,
  .sp-zone-directory,
  .sp-footer {
    padding-block: var(--space-2xl);
  }

  .sp-stat-strip,
  .sp-hero-statboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-stat-item {
    min-height: 7rem;
  }

  .sp-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sp-search .sp-btn-secondary {
    grid-column: 1 / -1;
  }

  .sp-district-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sp-filter-link {
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sp-zone-card {
    min-height: auto;
    padding: var(--space-md);
  }

  .sp-zone-header,
  .sp-zone-footer,
  .sp-res-banner,
  .sp-res-actions,
  .sp-ticket-header {
    align-items: stretch;
    flex-direction: column;
  }

  .sp-zone-footer .sp-btn,
  .sp-res-actions .sp-btn {
    width: 100%;
  }

  .sp-footer-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-footer-links {
    flex-direction: column;
    gap: 0;
  }

  .sp-footer-meta > p {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: var(--dur-micro) !important;
    animation-iteration-count: 1 !important;
    transition-duration: var(--dur-micro) !important;
    transform: none !important;
  }

  .sp-hero-image,
  .sp-hero-location,
  .sp-hero h1,
  .sp-hero h1 span::after,
  .sp-hero-scroll,
  .sp-nav-links.mobile-active,
  :root.js-motion [data-reveal] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Staff Operations Workbench · Modern Dark Minimalist Utilitarian */
.sp-admin-workbench {
  margin-block: var(--space-lg) var(--space-3xl);
  min-width: 0;
}

.sp-admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-2xl);
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.sp-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-3xs) var(--space-xs);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-paper-3);
  color: var(--color-accent);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

.sp-admin-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xs);
  color: var(--color-ink);
}

.sp-admin-subtitle {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0;
  max-width: 65ch;
}

.sp-admin-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sp-admin-header-actions .sp-btn {
  min-height: 2.75rem; /* 44px touch height */
  padding: 0.5rem 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Stat Grid (Summary Cards) */
.sp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  min-width: 0;
}

@media (max-width: 68rem) {
  .sp-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 36rem) {
  .sp-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sp-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  min-height: 8.5rem;
  min-width: 0;
  overflow: hidden;
  transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}

.sp-stat-card:hover {
  border-color: var(--color-rule-2);
  transform: translateY(-2px);
}

.sp-stat-label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-ink-2);
  line-height: 1.3;
  margin-bottom: var(--space-3xs);
  overflow-wrap: break-word;
}

.sp-stat-number {
  font-family: var(--font-outlier);
  font-size: clamp(2.25rem, 3.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-ink);
  margin-block: var(--space-2xs);
  letter-spacing: -0.02em;
}

.sp-stat-meta {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.4;
  margin-top: auto;
  overflow-wrap: break-word;
}

.sp-stat-green { color: var(--color-success); }
.sp-stat-amber { color: var(--color-warning); }
.sp-stat-red { color: var(--color-danger); }
.sp-stat-accent { color: var(--color-accent); }

/* Workbench Section & Section Bar */
.sp-workbench-section {
  margin-top: var(--space-3xl);
  min-width: 0;
}

.sp-section-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-2xs);
}

.sp-section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--space-2xs);
  color: var(--color-ink);
  letter-spacing: -0.02em;
}

.sp-section-desc {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0;
  max-width: 70ch;
}

.sp-badge-count {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--color-paper-3);
  border: var(--rule-hair) solid var(--color-rule-2);
  color: var(--color-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Tables & Horizontal Scroll Wrappers */
.sp-table-wrapper {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-md);
  max-width: 100%;
}

.sp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--text-sm);
}

/* Specific min-widths per table preventing compressed columns */
#admin-zones-table {
  min-width: 78rem;
}

#admin-active-reservations-table {
  min-width: 84rem;
}

#admin-completed-reservations-table {
  min-width: 74rem;
}

.sp-table thead tr {
  background: var(--color-paper-3);
  border-bottom: var(--rule-fine) solid var(--color-rule-2);
}

.sp-table th {
  padding: 1.125rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink);
  white-space: nowrap;
  vertical-align: middle;
}

.sp-table td {
  padding: 1.125rem 1.25rem;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  color: var(--color-ink);
  vertical-align: middle;
  line-height: 1.45;
}

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

.sp-table tbody tr:hover {
  background: oklch(24% 0.014 255);
}

/* Specific Column Widths & Alignments */
.col-zone { min-width: 18rem; }
.col-capacity { min-width: 6.5rem; text-align: center; }
.col-occupied { min-width: 6.5rem; text-align: center; }
.col-vacant { min-width: 6.5rem; text-align: center; }
.col-occupancy { min-width: 13rem; }
.col-rate { min-width: 8.5rem; }
.col-status { min-width: 9rem; }
.col-actions { min-width: 10.5rem; text-align: right; }

.col-ticket { min-width: 10.5rem; }
.col-customer { min-width: 11rem; }
.col-res-zone { min-width: 14rem; }
.col-plate { min-width: 9.5rem; }
.col-phone { min-width: 10rem; }
.col-dates { min-width: 12.5rem; }
.col-created { min-width: 10.5rem; }
.col-actions-active { min-width: 15rem; text-align: right; }
.col-actions-completed { min-width: 10rem; text-align: right; }

/* Cell typography */
.sp-cell-zone {
  display: grid;
  gap: 0.25rem;
}

.sp-zone-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.25;
}

.sp-zone-khmer {
  font-size: var(--text-xs);
  color: var(--color-accent);
  font-weight: 600;
  line-height: 1.35;
}

.sp-zone-district {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.3;
}

/* Progress bar */
.sp-progress-container {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 11rem;
}

.sp-progress-bar {
  flex: 1;
  height: 0.625rem;
  background: var(--color-paper-3);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.sp-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width var(--dur-short) var(--ease-out);
}

.sp-progress-fill.available {
  background: var(--color-success);
}

.sp-progress-fill.limited {
  background: var(--color-warning);
}

.sp-progress-fill.full {
  background: var(--color-danger);
}

.sp-progress-text {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
  min-width: 2.75rem;
  text-align: right;
  color: var(--color-ink-2);
}

/* Badges and Links */
.sp-plate-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: var(--color-paper-3);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  font-family: var(--font-outlier);
  font-weight: 700;
  font-size: var(--text-xs);
  color: var(--color-ink);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.sp-ticket-link {
  font-family: var(--font-outlier);
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.sp-ticket-link:hover {
  color: var(--color-focus);
}

.sp-action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  justify-content: flex-end;
  flex-shrink: 0;
  white-space: nowrap;
}

.sp-action-btn-group .sp-btn {
  min-height: 2.75rem; /* 44px min touch height */
  padding: 0.45rem 0.875rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.sp-empty-panel {
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

/* Pagination */
.sp-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-paper-3);
  border-top: var(--rule-hair) solid var(--color-rule);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.sp-pagination-info {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
}

.sp-pagination-controls {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.sp-pagination-current {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-ink);
  padding-inline: var(--space-2xs);
}

/* Accessible HTML5 <dialog> Modal */
.sp-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(92vw, 32rem);
  width: 100%;
  color: var(--color-ink);
  z-index: 1000;
  overflow: visible;
}

.sp-dialog::backdrop {
  background: var(--color-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sp-dialog[open] {
  animation: sp-dialog-appear var(--dur-short) var(--ease-out);
}

@keyframes sp-dialog-appear {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.sp-dialog-box {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sp-dialog-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.sp-dialog-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: var(--radius-card);
  background: var(--color-paper-3);
  border: var(--rule-hair) solid var(--color-accent);
  color: var(--color-accent);
}

.sp-dialog-title {
  font-size: var(--text-xl);
  line-height: 1.15;
  margin-bottom: 2px;
}

.sp-dialog-subtitle {
  font-size: var(--text-xs);
  color: var(--color-accent);
  font-weight: 600;
}

.sp-dialog-body {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-ink);
}

.sp-dialog-message {
  margin: 0;
}

.sp-dialog-ticket-highlight {
  font-family: var(--font-outlier);
  color: var(--color-accent);
}

.sp-dialog-plate-highlight {
  font-family: var(--font-outlier);
  color: var(--color-ink);
  background: var(--color-paper-3);
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
}

.sp-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
  flex-wrap: wrap;
}

/* Touch targets & responsive safety */
@media (max-width: 48rem) {
  .sp-admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .sp-admin-header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .sp-admin-header-actions .sp-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.75rem;
  }

  .sp-table th,
  .sp-table td {
    padding: 0.875rem 1rem;
  }

  .sp-dialog-actions {
    flex-direction: column-reverse;
  }

  .sp-dialog-actions .sp-btn {
    width: 100%;
    min-height: 2.75rem; /* 44px min touch target */
  }

  .sp-dialog-actions form {
    width: 100%;
  }
}

/* ==================================================
   SomPark Responsive Component Hardening Primitives
   ================================================== */

/* Universal Touch Target & Input Resiliency */
.sp-btn,
.sp-nav-link,
.sp-filter-link,
.sp-input,
.sp-select {
  min-height: 2.75rem; /* 44px minimum touch target */
}

@media (pointer: coarse) {
  .sp-btn,
  .sp-nav-link,
  .sp-filter-link,
  .sp-input,
  .sp-select {
    min-height: 3rem; /* 48px on coarse touch devices */
  }
}

/* Auth Layout (Login & Signup) */
.sp-auth-container {
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
  margin-block: var(--space-xl);
  min-width: 0;
}

.sp-auth-card {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: clamp(1.25rem, 5vw, 2.5rem);
  box-shadow: var(--shadow-lift);
  min-width: 0;
}

.sp-auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.sp-auth-header .sp-brand {
  justify-content: center;
  margin-bottom: var(--space-xs);
  margin-inline: auto;
}

.sp-auth-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-3xs);
  color: var(--color-ink);
}

.sp-auth-desc {
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  line-height: 1.45;
  margin: 0;
}

.sp-auth-submit {
  width: 100%;
  margin-top: var(--space-lg);
  font-size: var(--text-md);
  min-height: 2.75rem;
}

.sp-auth-footer {
  border-top: var(--rule-hair) solid var(--color-rule);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.sp-auth-link {
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Zone Detail & Status */
.sp-zone-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--space-xl);
  align-items: stretch;
  min-width: 0;
}

@media (max-width: 56rem) {
  .sp-zone-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
  }
}

.sp-zone-status-card,
.sp-zone-facility-card,
.sp-zone-sidebar-card {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--shadow-card);
  min-width: 0;
  margin-bottom: var(--space-xl);
}

/* Sticky Booking Card Column: follows scroll below 5rem navbar with 1.25rem gap, stops before footer */
.sp-zone-detail-sidebar {
  display: block;
  height: 100%;
  min-width: 0;
  position: static;
}

.sp-zone-sidebar-card {
  position: -webkit-sticky;
  position: sticky;
  top: calc(5rem + 1.25rem);
  margin-bottom: 0;
  z-index: 20;
}

@media (max-width: 56rem), (max-height: 35rem) {
  .sp-zone-detail-sidebar {
    height: auto;
  }

  .sp-zone-sidebar-card {
    position: static !important;
    top: auto !important;
    margin-bottom: var(--space-xl) !important;
  }
}

.sp-zone-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-top: var(--space-md);
  text-align: center;
  min-width: 0;
}

@media (max-width: 32rem) {
  .sp-zone-metrics-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-sm);
  }
}

.sp-amenities-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  min-width: 0;
}

@media (max-width: 36rem) {
  .sp-amenities-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Booking & Form Layouts */
.sp-booking-container {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  min-width: 0;
}

.sp-booking-card {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: clamp(1.25rem, 5vw, 2.5rem);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.sp-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  min-width: 0;
}

@media (max-width: 44rem) {
  .sp-form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xs);
  }
}

/* Vehicle Plate Grouped Field */
.sp-plate-group {
  border: 0;
  padding: 0;
  margin: 0;
  margin-block-end: var(--space-md);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sp-plate-group legend {
  padding: 0;
  margin-block-end: var(--space-2xs);
  display: block;
}

.sp-sublabel {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-ink-2);
  margin-block-end: var(--space-3xs);
}

.sp-plate-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--space-sm);
  min-width: 0;
}

@media (max-width: 36rem) {
  .sp-plate-inputs {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xs);
  }
}

.sp-plate-subfield {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sp-plate-preview {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  margin-block-start: var(--space-2xs);
  padding: var(--space-3xs) var(--space-sm);
  background: var(--color-paper-3);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-input);
}

.sp-plate-preview-label {
  color: var(--color-muted);
}

.sp-plate-preview-val {
  font-family: var(--font-outlier);
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sp-form-note {
  background: var(--color-paper-3);
  border-inline-start: var(--rule-bold) solid var(--color-accent);
  padding: var(--space-sm) var(--space-md);
  margin-block: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-ink);
  line-height: 1.5;
  border-radius: var(--radius-input);
}

.sp-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

@media (max-width: 36rem) {
  .sp-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sp-form-actions .sp-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Ticket Page Container, Navigation & Action Bars */
.sp-ticket-page-container {
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
}

.sp-ticket-nav-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
}

.sp-ticket-actions-bar {
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sp-ticket-actions-group {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.sp-ticket-action-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.sp-ticket-nav-bar .sp-btn,
.sp-ticket-actions-group .sp-btn,
.sp-ticket-action-form .sp-btn {
  min-height: 2.75rem; /* 44px minimum touch target */
  line-height: 1.35; /* Generous for Khmer text */
  text-align: center;
}

@media (max-width: 40rem) {
  .sp-ticket-actions-bar,
  .sp-ticket-actions-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .sp-ticket-action-form {
    width: 100%;
    display: flex;
  }

  .sp-ticket-actions-bar .sp-btn,
  .sp-ticket-actions-group .sp-btn,
  .sp-ticket-action-form .sp-btn {
    width: 100%;
    justify-content: center;
  }
}

.sp-ticket-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-md);
  margin-block-end: var(--space-lg);
  font-size: var(--text-sm);
  min-width: 0;
}

@media (max-width: 36rem) {
  .sp-ticket-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sp-ticket-sheet .sp-ticket-rate-panel {
  background: #f3f4f6;
  border: var(--rule-hair) solid var(--color-print-rule);
  border-radius: var(--radius-card);
  padding: var(--space-sm) var(--space-md);
  margin-block-end: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  min-width: 0;
  color: var(--color-print-ink);
}

.sp-ticket-sheet .sp-ticket-rate-panel strong,
.sp-ticket-sheet .sp-ticket-rate-panel > div {
  color: var(--color-print-ink);
}

.sp-ticket-barcode {
  font-family: var(--font-outlier);
  font-size: clamp(1.35rem, 4.5vw, 2.25rem);
  letter-spacing: 0.15em;
  overflow-wrap: break-word;
  word-break: break-all;
}

/* User Dashboard & Ticket Table Min-widths */
#tickets-table {
  min-width: 62rem;
}

#recent-tickets-table {
  min-width: 58rem;
}

/* Dialog Containment for Mobile Landscape */
.sp-dialog {
  max-height: calc(100dvh - 2rem);
}

.sp-dialog-box {
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==================================================
   SomPark Native Motion System · Accessible & Restrained
   ================================================== */

@keyframes sp-menu-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Microinteractions: Buttons and Fine-Pointer Cards */
@media (hover: hover) and (pointer: fine) {
  .sp-btn:hover {
    transform: translateY(-1px);
  }
  .sp-btn:active,
  .sp-btn.is-active {
    transform: translateY(0);
  }
  .sp-zone-card:hover,
  .sp-action-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-rule-2);
    box-shadow: var(--shadow-lift);
  }
  .sp-btn svg,
  .sp-nav-link svg,
  .sp-arrow-link .sp-arrow {
    transition: transform var(--dur-short) var(--ease-out);
  }
  .sp-btn:hover svg,
  .sp-nav-link:hover svg,
  .sp-arrow-link:hover .sp-arrow {
    transform: translateX(2px);
  }
}

.sp-btn:focus-visible {
  transform: none !important;
}

/* Progressive Scroll & Entrance Reveals */
:root.js-motion [data-reveal] {
  opacity: 0;
  transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out);
  will-change: opacity, transform;
}

:root.js-motion [data-reveal="up"],
:root.js-motion [data-reveal=""] {
  transform: translateY(16px);
}

:root.js-motion [data-reveal="left"] {
  transform: translateX(-16px);
}

:root.js-motion [data-reveal="right"] {
  transform: translateX(16px);
}

:root.js-motion [data-reveal="scale"] {
  transform: scale(0.98) translateY(12px);
}

:root.js-motion [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Restrained Stagger Delays (capped at 300ms) */
:root.js-motion [data-reveal-delay="40"] { transition-delay: 40ms; }
:root.js-motion [data-reveal-delay="50"] { transition-delay: 50ms; }
:root.js-motion [data-reveal-delay="60"] { transition-delay: 60ms; }
:root.js-motion [data-reveal-delay="80"] { transition-delay: 80ms; }
:root.js-motion [data-reveal-delay="100"] { transition-delay: 100ms; }
:root.js-motion [data-reveal-delay="120"] { transition-delay: 120ms; }
:root.js-motion [data-reveal-delay="140"] { transition-delay: 140ms; }
:root.js-motion [data-reveal-delay="150"] { transition-delay: 150ms; }
:root.js-motion [data-reveal-delay="160"] { transition-delay: 160ms; }
:root.js-motion [data-reveal-delay="180"] { transition-delay: 180ms; }
:root.js-motion [data-reveal-delay="200"] { transition-delay: 200ms; }
:root.js-motion [data-reveal-delay="240"] { transition-delay: 240ms; }
:root.js-motion [data-reveal-delay="250"] { transition-delay: 250ms; }
/* ==========================================================================
   SomPark Workflow, Gate Operations, and QR Styles
   ========================================================================== */

/* Booking Form: Redesigned Payment Header & Facility Rate */
.sp-payment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-block-end: var(--space-xs);
}

.sp-facility-rate-indicator {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}

.sp-facility-rate-label {
  color: var(--color-muted);
}

.sp-facility-rate-val {
  font-family: var(--font-outlier);
  font-weight: 700;
  color: var(--color-accent);
}

.sp-facility-rate-kh {
  color: var(--color-muted);
  font-size: var(--text-2xs);
}

/* Two Selectable Payment Cards */
.sp-payment-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin-block: var(--space-xs) var(--space-md);
}

@media (max-width: 48rem) {
  .sp-payment-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-sm);
  }
}

.sp-pay-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
  min-width: 0;
}

.sp-pay-card:hover {
  border-color: var(--color-muted);
  background: var(--color-paper-3);
}

.sp-pay-card:has(input[type="radio"]:checked),
.sp-pay-card.is-selected {
  border-color: var(--color-accent);
  background: rgba(234, 88, 12, 0.05);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.sp-pay-card:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.sp-pay-card.is-disabled,
.sp-pay-card:has(input[type="radio"]:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.sp-pay-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-block-end: var(--space-sm);
}

.sp-pay-card-radio {
  accent-color: var(--color-accent);
  width: 1.25rem;
  height: 1.25rem;
  margin-block-start: 0.15rem;
  cursor: pointer;
  flex-shrink: 0;
}

.sp-pay-card-radio:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.sp-pay-card-heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sp-pay-card-title {
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-ink);
  line-height: 1.3;
}

.sp-pay-card-title-kh {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.4;
}

.sp-pay-card-rate {
  display: flex;
  align-items: baseline;
  gap: var(--space-2xs);
  margin-block-end: var(--space-sm);
  padding-block-end: var(--space-xs);
  border-block-end: var(--rule-hair) solid var(--color-rule-2);
}

.sp-pay-amount {
  font-family: var(--font-outlier);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.02em;
}

.sp-pay-amount-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.sp-pay-card-body {
  margin-block-end: var(--space-sm);
  flex-grow: 1;
}

.sp-pay-card-text {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.5;
  margin-block-end: var(--space-2xs);
}

.sp-pay-card-text-kh {
  font-size: var(--text-2xs);
  color: var(--color-muted);
  line-height: 1.6;
}

.sp-pay-card-footer {
  margin-block-start: auto;
  padding-block-start: var(--space-xs);
  border-block-start: var(--rule-hair) solid var(--color-rule-2);
  font-size: var(--text-2xs);
}

.sp-pay-arrival-note {
  color: var(--color-ink-2);
  line-height: 1.4;
}

.sp-pay-arrival-note-kh {
  color: var(--color-muted);
  line-height: 1.5;
  margin-block-start: 0.15rem;
}

.sp-pay-future-warning {
  margin-block-start: var(--space-xs);
  padding: var(--space-2xs) var(--space-xs);
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-input);
  color: #f87171;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

/* Compact Price Explanation & Disclosure */
.sp-pricing-box {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: var(--space-md);
  margin-block: var(--space-md);
}

.sp-pricing-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-block-end: var(--space-md);
  padding-block-end: var(--space-sm);
  border-block-end: var(--rule-hair) solid var(--color-rule-2);
}

.sp-pricing-rule {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sp-pricing-rule-title {
  font-size: var(--text-sm);
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.4;
}

.sp-pricing-rule-kh {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.5;
}

.sp-pricing-example {
  background: var(--color-paper-3);
  border-radius: var(--radius-input);
  padding: var(--space-sm) var(--space-md);
  margin-block-end: var(--space-sm);
}

.sp-pricing-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
  margin-block-end: var(--space-2xs);
}

.sp-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-xs);
}

.sp-pricing-label {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
}

.sp-pricing-value {
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-ink);
}

.sp-pricing-value.sp-overstay-val {
  color: #ef4444;
}

.sp-pricing-clarification {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.5;
  margin-block-start: var(--space-2xs);
}

.sp-clarify-kh {
  font-size: var(--text-2xs);
  margin-inline-start: var(--space-2xs);
}

/* Accessible Details / Disclosure */
.sp-billing-disclosure {
  margin-block-start: var(--space-sm);
  border-block-start: var(--rule-hair) solid var(--color-rule-2);
  padding-block-start: var(--space-xs);
}

.sp-billing-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: var(--space-2xs) 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  list-style: none;
  user-select: none;
}

.sp-billing-summary::-webkit-details-marker {
  display: none;
}

.sp-billing-summary:hover {
  color: #fb923c;
}

.sp-summary-chevron {
  display: inline-block;
  transition: transform var(--dur-short) var(--ease-out);
  font-size: var(--text-sm);
}

.sp-billing-disclosure[open] .sp-summary-chevron {
  transform: rotate(180deg);
}

.sp-disclosure-content {
  padding-block-start: var(--space-xs);
}

.sp-disclosure-list {
  margin: 0;
  padding-inline-start: 1.25rem;
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.6;
}

.sp-disclosure-list li {
  margin-block-end: var(--space-xs);
}

.sp-kh-sub {
  display: block;
  font-size: var(--text-2xs);
  color: var(--color-muted);
  line-height: 1.5;
  margin-block-start: 0.1rem;
}

/* Pre-Submit Summary */
.sp-booking-submit-summary {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: var(--space-sm) var(--space-md);
  margin-block: var(--space-md) var(--space-xs);
}

.sp-summary-due {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-block-end: 0.2rem;
}

.sp-summary-due-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink);
}

.sp-summary-due-amount {
  font-family: var(--font-outlier);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-accent);
}

.sp-summary-note {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.5;
}

.sp-summary-note-kh {
  color: var(--color-muted);
  font-size: var(--text-2xs);
  margin-inline-start: var(--space-2xs);
}

/* Plate Preview Placeholder Style */
.sp-plate-preview-val.is-placeholder {
  color: var(--color-muted);
  font-family: inherit;
  font-style: italic;
  font-weight: 400;
  letter-spacing: normal;
}

/* Countdown Badges & Boxes */
.sp-countdown-box {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: #fffbeb;
  color: #92400e;
  border: var(--rule-hair) solid #fde68a;
  border-radius: var(--radius-input);
  font-size: var(--text-xs);
  font-weight: 700;
}

.sp-countdown-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.3);
}

/* Redesigned Arrival Countdown Banner */
.sp-arrival-banner {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: clamp(var(--space-sm), 3vw, var(--space-md)) clamp(var(--space-md), 4vw, var(--space-lg));
  background: var(--color-paper-2);
  border: var(--rule-fine) solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  color: var(--color-ink);
  min-width: 0;
}

.sp-arrival-banner-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  min-width: 0;
}

.sp-arrival-banner-heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-ink);
  line-height: 1.3;
}

.sp-arrival-banner-deadline {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.45;
}

.sp-arrival-banner-deadline strong {
  color: var(--color-ink);
  font-weight: 700;
}

.sp-arrival-banner-timer-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}

.sp-arrival-timer-label {
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sp-arrival-timer-digits {
  font-family: var(--font-outlier);
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.sp-arrival-banner.sp-countdown-expired {
  border-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.08);
}

.sp-arrival-banner.sp-countdown-expired .sp-arrival-timer-digits {
  color: var(--color-danger);
  font-size: var(--text-sm);
}

@media (max-width: 38rem) {
  .sp-arrival-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .sp-arrival-banner-timer-block {
    align-items: flex-start;
    width: 100%;
    padding-top: var(--space-2xs);
    border-top: var(--rule-hair) dashed var(--color-rule);
  }
}

/* Live Exit Countdown Banner */
.sp-exit-banner {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: clamp(var(--space-sm), 3vw, var(--space-md)) clamp(var(--space-md), 4vw, var(--space-lg));
  background: rgba(16, 185, 129, 0.08);
  border: var(--rule-fine) solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.06);
  color: var(--color-ink);
  min-width: 0;
}

.sp-exit-banner-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  min-width: 0;
}

.sp-exit-banner-heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  color: #10b981;
  line-height: 1.3;
}

.sp-exit-banner-deadline {
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  line-height: 1.45;
}

.sp-exit-banner-deadline strong {
  color: var(--color-ink);
  font-weight: 700;
}

.sp-exit-banner-timer-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}

.sp-exit-timer-label {
  font-size: var(--text-2xs);
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sp-exit-timer-digits {
  font-family: var(--font-outlier);
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #10b981;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.sp-exit-banner.sp-countdown-expired {
  border-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.08);
}

.sp-exit-banner.sp-countdown-expired .sp-exit-timer-digits {
  color: var(--color-danger);
  font-size: var(--text-sm);
}

@media (max-width: 38rem) {
  .sp-exit-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .sp-exit-banner-timer-block {
    align-items: flex-start;
    width: 100%;
    padding-top: var(--space-2xs);
    border-top: var(--rule-hair) dashed var(--color-rule);
  }
}

/* Scannable Parking Access QR Container */
.sp-qr-sheet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-block: var(--space-md);
  padding: var(--space-md);
  background: #ffffff;
  color: #000000;
  border: var(--rule-fine) solid #e5e7eb;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
}

.sp-qr-img {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.sp-qr-title {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #111827;
  text-transform: uppercase;
  margin-block-start: var(--space-xs);
}

.sp-qr-note {
  font-size: var(--text-2xs);
  color: #6b7280;
  margin-block-start: var(--space-3xs);
}

/* Full-Screen Gate Pass Mode */
.sp-gate-pass-body {
  background: #ffffff !important;
  color: #000000 !important;
  margin: 0;
  padding: var(--space-md);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sp-gate-pass-box {
  width: 100%;
  max-width: 420px;
  text-align: center;
  padding: var(--space-lg);
  background: #ffffff;
  border: 2px solid #111827;
  border-radius: var(--radius-card);
}

.sp-gate-pass-qr {
  width: 240px;
  height: 240px;
  margin: var(--space-md) auto;
  image-rendering: pixelated;
  background: #ffffff;
  padding: 12px;
  border: 2px solid #000000;
}

/* Staff Gate Scanner Workbench */
.sp-scanner-container {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-lg);
  margin-block-start: var(--space-md);
}

@media (max-width: 48rem) {
  .sp-scanner-container {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sp-scanner-card {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: var(--space-md);
}

.sp-mode-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-block-end: var(--space-md);
  border-block-end: var(--rule-fine) solid var(--color-rule-2);
  padding-block-end: var(--space-xs);
}

.sp-mode-tab {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  background: transparent;
  color: var(--color-ink-2);
  border: var(--rule-hair) solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.sp-mode-tab.is-active {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  border-color: var(--color-accent);
}

.sp-camera-box {
  position: relative;
  width: 100%;
  height: 240px;
  background: #000000;
  border-radius: var(--radius-input);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--color-muted);
}

.sp-barrier-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-card);
  margin-block-end: var(--space-md);
}

.sp-barrier-closed {
  background: rgba(239, 68, 68, 0.15);
  border: var(--rule-fine) solid #ef4444;
  color: #f87171;
}

.sp-barrier-open {
  background: rgba(34, 197, 94, 0.15);
  border: var(--rule-fine) solid #22c55e;
  color: #4ade80;
}

.sp-bill-breakdown {
  background: var(--color-paper-3);
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: var(--space-md);
  margin-block: var(--space-sm);
}

.sp-bill-row {
  display: flex;
  justify-content: space-between;
  padding-block: var(--space-3xs);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.sp-bill-row.sp-bill-total {
  border-block-start: var(--rule-fine) solid var(--color-rule-2);
  padding-block-start: var(--space-xs);
  margin-block-start: var(--space-3xs);
  font-weight: 800;
  font-size: var(--text-base);
  color: var(--color-ink);
}

.sp-overstay-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #f87171;
  border-radius: var(--radius-pill);
  font-size: var(--text-2xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   SomPark Customer Exit Payment (.sp-pay-exit-*)
   ========================================================================== */

.sp-pay-exit-container {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  box-sizing: border-box;
  padding: var(--space-sm);
}

.sp-pay-exit-card {
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-card);
}

.sp-pay-exit-header {
  margin-bottom: var(--space-md);
}

.sp-pay-exit-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-bottom: var(--space-2xs);
}

.sp-pay-exit-title {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  color: var(--color-ink);
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

.sp-pay-exit-subtitle {
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  line-height: 1.4;
}

.sp-pay-exit-plate {
  font-family: var(--font-outlier);
  font-weight: 700;
  color: var(--color-ink);
  white-space: nowrap;
}

.sp-pay-exit-hero {
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background: var(--color-paper-3);
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-card);
  margin-bottom: var(--space-md);
}

.sp-pay-exit-hero-label {
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  display: block;
  margin-bottom: 0.25rem;
}

.sp-pay-exit-hero-amount {
  font-family: var(--font-outlier);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.1;
  display: block;
}

.sp-pay-exit-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-ink);
  margin-bottom: var(--space-md);
}

.sp-pay-exit-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  min-width: 0;
}

.sp-pay-exit-row-label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--color-ink-2);
  line-height: 1.4;
  word-break: break-word;
}

.sp-pay-exit-row-label strong {
  color: var(--color-ink);
}

.sp-pay-exit-row-value {
  flex: 0 0 auto;
  font-family: var(--font-outlier);
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-ink);
  text-align: right;
}

.sp-pay-exit-row-overstay .sp-pay-exit-row-label {
  color: var(--color-danger);
}

.sp-pay-exit-row-overstay .sp-pay-exit-row-value {
  color: var(--color-danger);
}

.sp-pay-exit-row-paid .sp-pay-exit-row-label,
.sp-pay-exit-row-paid .sp-pay-exit-row-value {
  color: var(--color-success);
}

.sp-pay-exit-divider {
  height: 1px;
  background: var(--color-rule-2);
  margin-block: var(--space-2xs);
}

.sp-pay-exit-total {
  padding-top: var(--space-2xs);
  font-size: var(--text-md);
  font-weight: 700;
}

.sp-pay-exit-total .sp-pay-exit-row-label {
  color: var(--color-ink);
  font-size: var(--text-md);
}

.sp-pay-exit-total .sp-pay-exit-row-value {
  font-size: clamp(1.2rem, 3.5vw, 1.45rem);
  font-weight: 800;
  color: var(--color-accent);
}

.sp-pay-exit-policy {
  background: var(--color-paper-3);
  border-left: 3px solid var(--color-accent);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-card);
  margin-bottom: var(--space-md);
  font-size: var(--text-xs);
  line-height: 1.55;
  color: var(--color-ink-2);
}

.sp-pay-exit-policy p {
  margin: 0 0 0.35rem;
}

.sp-pay-exit-policy p:last-child {
  margin-bottom: 0;
}

.sp-pay-exit-form {
  min-width: 0;
  width: 100%;
}

.sp-pay-exit-main-btn {
  width: 100%;
  min-height: 3.25rem;
  min-width: 0;
  font-size: var(--text-md);
  font-weight: 700;
  white-space: normal !important;
  text-align: center;
  justify-content: center;
  line-height: 1.35;
  padding: var(--space-xs) var(--space-sm);
}

.sp-pay-exit-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: var(--space-md);
}

.sp-pay-exit-details-wrapper {
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sp-pay-exit-details {
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-paper-3);
  font-size: var(--text-xs);
}

.sp-pay-exit-details summary {
  padding: var(--space-xs) var(--space-sm);
  font-weight: 600;
  cursor: pointer;
  color: var(--color-ink-2);
  user-select: none;
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.sp-pay-exit-details summary:hover {
  color: var(--color-ink);
}

.sp-pay-exit-details summary:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.sp-pay-exit-details-content {
  padding: var(--space-sm);
  border-top: 1px solid var(--color-rule);
  color: var(--color-ink-2);
  line-height: 1.6;
}

.sp-pay-exit-details-content dl {
  display: grid;
  grid-template-columns: minmax(130px, auto) 1fr;
  gap: 0.4rem 0.75rem;
  margin: 0;
}

.sp-pay-exit-details-content dt {
  color: var(--color-muted);
  font-weight: 600;
}

.sp-pay-exit-details-content dd {
  margin: 0;
  color: var(--color-ink);
}

.sp-pay-exit-dev-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.sp-pay-exit-dev-btn {
  min-height: 44px;
  white-space: normal !important;
  line-height: 1.35;
  text-align: center;
  justify-content: center;
}

.sp-dev-help-text {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

@media (max-width: 40rem) {
  .sp-pay-exit-container {
    padding: var(--space-2xs);
  }
  .sp-pay-exit-card {
    padding: var(--space-sm);
  }
  .sp-pay-exit-details-content dl {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .sp-pay-exit-details-content dt {
    margin-top: 0.4rem;
  }
}

@media print {
  body {
    background: var(--color-print-paper) !important;
    color: var(--color-print-ink) !important;
  }

  .sp-navbar,
  .sp-footer,
  .no-print,
  .sp-btn,
  .sp-ticket-nav-bar,
  .sp-ticket-actions-bar,
  .sp-arrival-banner,
  .sp-exit-banner,
  .sp-dialog {
    display: none !important;
  }

  .sp-main,
  .sp-container,
  .sp-ticket-page-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .sp-ticket-sheet {
    width: 100% !important;
    max-width: none !important;
    padding: var(--space-sm) !important;
    border-color: var(--color-print-ink) !important;
    box-shadow: none !important;
  }

  .sp-ticket-sheet .sp-brand-mark {
    background: var(--color-accent) !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .sp-ticket-sheet .sp-ticket-brand .sp-brand-copy strong,
  .sp-ticket-sheet .sp-ticket-brand .sp-brand-copy small,
  .sp-ticket-sheet .sp-ticket-khmer-tagline {
    color: #000000 !important;
  }

  :root.js-motion [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Google Maps Demo & AI Smart Parking Assistant Components
   ========================================================================== */

/* Demo Badge */
.sp-badge-demo {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.45);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="dark"] .sp-badge-demo {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.5);
}

/* Maps Section */
.sp-map-section {
  padding: 3rem 0;
  border-bottom: var(--rule-fine) solid var(--color-rule);
}

.sp-map-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.sp-map-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--color-paper-2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-input);
  border: var(--rule-fine) solid var(--color-rule-2);
  font-size: 0.82rem;
  color: var(--color-ink-2);
}

.sp-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.sp-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.sp-dot-available { background: #10b981; }
.sp-dot-limited { background: #f59e0b; }
.sp-dot-full { background: #ef4444; }

.sp-map-wrapper {
  position: relative;
  background: var(--color-paper-2);
  border-radius: var(--radius-card);
  border: var(--rule-fine) solid var(--color-rule-2);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.sp-map-canvas {
  width: 100%;
  height: 440px;
  background: var(--color-paper-3);
}

/* ==========================================================================
   Google Maps InfoWindow & Custom Popup Styling
   ========================================================================== */

/* Remove Google Maps empty header row so content starts cleanly at the top */
.gm-style .gm-style-iw-chr,
.gm-style .gm-style-iw-ch {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 15 !important;
}

.gm-style .gm-style-iw {
  padding: 0 !important;
}

/* Outer InfoWindow Container */
.gm-style .gm-style-iw-c {
  background-color: #121927 !important;
  color: #f8fafc !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* InfoWindow Tail / Triangle */
.gm-style .gm-style-iw-tc::after {
  background-color: #121927 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* InfoWindow Close Button ("X") aligned cleanly in top-right corner */
.gm-style button.gm-ui-hover-effect {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0.85 !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 20 !important;
}

.gm-style button.gm-ui-hover-effect:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  opacity: 1 !important;
  transform: scale(1.08);
}

.gm-style button.gm-ui-hover-effect span {
  background-color: #ffffff !important;
  margin: 0 !important;
}

/* SomPark InfoWindow Inner Card */
.sp-infowindow {
  width: 285px;
  padding: 12px 14px 14px 14px;
  font-family: var(--font-body, "Plus Jakarta Sans", sans-serif);
  color: var(--color-ink, #f8fafc);
  box-sizing: border-box;
}

.sp-iw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-right: 32px; /* Leaves clear space for the close button */
  min-height: 22px;
}

.sp-iw-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sp-iw-district {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent, #f97316);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

.sp-iw-hours {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.sp-iw-title {
  margin: 0 0 3px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.sp-iw-khmer {
  font-family: var(--font-khmer, "Noto Sans Khmer", sans-serif);
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-bottom: 8px;
}

.sp-iw-address {
  margin: 0 0 12px 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.sp-iw-pin-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-accent, #f97316);
}

/* Meta Bar: Availability & Price */
.sp-iw-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 14px;
}

.sp-iw-avail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.sp-iw-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sp-iw-avail.sp-avail-available {
  color: #10b981;
}
.sp-iw-avail.sp-avail-available .sp-iw-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.sp-iw-avail.sp-avail-limited {
  color: #f59e0b;
}
.sp-iw-avail.sp-avail-limited .sp-iw-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.sp-iw-avail.sp-avail-full {
  color: #ef4444;
}
.sp-iw-avail.sp-avail-full .sp-iw-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.sp-iw-price {
  text-align: right;
}

.sp-iw-amount {
  font-family: var(--font-outlier, "Barlow Condensed", sans-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

/* Action Buttons */
.sp-iw-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.sp-iw-btn {
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease-out;
  box-sizing: border-box;
}

.sp-iw-btn-book {
  flex: 1;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
  border: none;
}

.sp-iw-btn-book:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.45);
}

.sp-iw-btn-disabled {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  color: #64748b !important;
  cursor: not-allowed;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sp-iw-btn-details {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding-inline: 12px;
}

.sp-iw-btn-details:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Map Fallback Directory */
.sp-map-fallback {
  padding: 1.75rem;
  background: var(--color-paper-2);
}

.sp-fallback-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--color-paper-3);
  border: var(--rule-fine) solid var(--color-rule);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-input);
  margin-bottom: 1.5rem;
}

.sp-fallback-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.sp-fallback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.sp-fallback-card {
  background: var(--color-paper);
  border: var(--rule-fine) solid var(--color-rule);
  border-radius: var(--radius-input);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}

.sp-fallback-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.sp-fallback-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.sp-fallback-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: var(--rule-fine) solid var(--color-rule);
}

/* AI Smart Parking Assistant Section */
.sp-ai-assistant-section {
  padding: 2.5rem 0;
  border-bottom: var(--rule-fine) solid var(--color-rule);
}

.sp-ai-card {
  background: var(--color-paper-2);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.sp-ai-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ea580c 0%, #f59e0b 50%, #10b981 100%);
}

.sp-ai-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sp-ai-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.sp-ai-input-row .sp-input {
  flex: 1;
}

.sp-ai-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.sp-chip {
  background: var(--color-paper);
  border: var(--rule-fine) solid var(--color-rule);
  color: var(--color-ink);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--dur-short) var(--ease-out);
}

.sp-chip:hover {
  background: var(--color-paper-3);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.sp-ai-response {
  margin-top: 1.25rem;
  animation: sp-fade-in 0.3s var(--ease-out);
}

.sp-ai-response-bubble {
  background: var(--color-paper);
  border: var(--rule-fine) solid var(--color-rule-2);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
}

.sp-ai-response-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.sp-ai-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-ink);
}

.sp-ai-login-prompt {
  background: var(--color-paper);
  border: var(--rule-fine) solid var(--color-rule);
  border-radius: var(--radius-input);
  padding: 1.25rem;
  text-align: center;
}

