:root {
  /* Logo: navy #2a2c78, aqua #3ea1d5, foam #e7f6fb. Action aqua is darker so white text stays readable. */
  --bg: #e7f6fb;
  --ink: #142044;
  --muted: #3a5168;
  --card: #ffffff;
  --line: #c5e0ec;
  --green: #0c6e96;
  --green-dark: #2a2c78;
  --amber: #e6a317;
  --amber-ink: #6d4a08;
  --red: #8f2d2d;
  --blue: #0c6e96;
  --shadow: 0 10px 28px rgba(20, 48, 90, 0.1);
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --display: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% 28%, rgba(62, 192, 224, 0.22) 0 12px, transparent 14px),
    radial-gradient(circle at 92% 62%, rgba(255, 255, 255, 0.85) 0 8px, transparent 10px),
    radial-gradient(circle at 12% 78%, rgba(62, 161, 213, 0.18) 0 16px, transparent 18px),
    linear-gradient(180deg, #f5fcfe 0%, #e7f6fb 38%, #d7f1f8 100%);
}
body.staff { padding-bottom: 84px; }
img { max-width: 100%; }
a { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
h1 { font-size: 2rem; line-height: 1.1; }
p { margin: 0 0 0.8rem; }

.top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px 28px;
  background: linear-gradient(115deg, #2a2c78 0%, #2d4d96 52%, #147eae 100%);
  color: #f4fbfe;
}
.top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath fill='%23f5fcfe' d='M0 26c140 18 260 24 400 8 150-16 230-34 380-26 170 8 250 34 400 26 130-8 200-26 260-18v32H0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 14px; background: white; object-fit: contain; }
.brand strong { display: block; font-family: var(--display); font-size: 1.15rem; }
.brand small { color: #d7f3fb; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.top-actions form { margin: 0; }
.who { font-size: 0.85rem; color: #d7f3fb; }
.top .btn.ghost { color: #f4fbfe; border-color: rgba(255,255,255,0.45); }
.top .btn.primary { background: linear-gradient(180deg, #8ad8f2, #3ec0e0); color: #10203f; min-height: 48px; padding: 10px 18px; }

.pin-card { max-width: 440px; margin: 24px auto; }
.pin-dots { font-size: 2rem; letter-spacing: 0.4rem; text-align: center; margin: 0 0 12px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.keypad button {
  min-height: 72px;
  font-size: 1.6rem;
  border-radius: 16px;
  border: 1px solid #b7dceb;
  background: white;
  color: var(--ink);
  font-weight: 700;
}

.wrap { width: min(1080px, calc(100% - 24px)); margin: 18px auto 32px; }
.lede { font-size: 1.05rem; max-width: 40rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card h2 { font-size: 1.35rem; }

.flash { padding: 10px 12px; border-radius: 12px; margin: 0 0 12px; }
.flash.ok { background: #d7f6ee; color: #0d5c48; }
.flash.info { background: #e5f4fb; color: #0c4f6e; }
.flash.warn { background: #fff4d8; color: var(--amber-ink); }
.flash.bad { background: #fdecec; color: var(--red); }

.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--green);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
  box-shadow: 0 2px 0 rgba(16, 40, 80, 0.12);
}
.btn.primary { background: var(--green-dark); }
.btn.ghost { background: transparent; color: var(--green-dark); border-color: var(--line); box-shadow: none; }
.btn.danger { background: transparent; color: var(--red); border-color: #e7c1c1; }
.btn.amber { background: var(--amber); color: #2a1c04; }
.btn.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.duration-inputs { display: flex; align-items: center; gap: 8px; }
.duration-inputs input, .duration-inputs select { width: auto; flex: 1 1 0; min-width: 0; min-height: 44px; }
.duration-unit { flex: 0 0 auto; font-weight: 700; text-transform: none; letter-spacing: 0; }
.field span, .field-label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
input:not([type]), input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #b7dceb;
  background: white;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(14, 126, 174, 0.28); border-color: var(--green); }

.grid-2 { display: grid; gap: 12px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.picker {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  -webkit-overflow-scrolling: touch;
}
.picker-row {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.picker-row[hidden] { display: none; }
.picker-row.on { background: #dff4fb; }
.picker-row .meta { color: var(--muted); font-size: 0.85rem; }
.picker-selected { margin: 0 0 8px; }
.picker-add { margin-bottom: 8px; }
.new-customer { margin-bottom: 12px; }
.day-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0 14px; }
.day-nav form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; flex: 1 1 220px; margin: 0; }
.day-nav .field { margin: 0; flex: 1 1 160px; }
details.card > summary.btn { width: fit-content; margin-bottom: 12px; list-style: none; }
details.card > summary.btn::-webkit-details-marker { display: none; }
.chip, .choice {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #b7dceb;
  background: white;
  padding: 8px 14px;
  cursor: pointer;
}
.chip.on, .choice:has(input:checked), .slot:has(input:checked) {
  background: var(--green-dark);
  color: white;
  border-color: var(--green-dark);
}
.choice { display: flex; align-items: center; gap: 8px; }
.choice input, .slot input { accent-color: var(--green-dark); }
#vehicles .choice { position: relative; justify-content: center; }
#vehicles .choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
#vehicles .choice:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }

.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid #b7dceb;
  background: white;
}
#visit-choice { display: grid; gap: 8px; }
#visit-choice .slot { width: 100%; }
.step-label { font-weight: 700; margin: 4px 0 0; }
.service-step { display: grid; gap: 8px; }
#vehicles { display: flex; flex-wrap: wrap; gap: 8px; }
.wash-list { display: grid; gap: 8px; }
.wash-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #b7dceb;
  background: white;
  cursor: pointer;
}
.wash-copy { display: grid; gap: 2px; min-width: 0; }
.wash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wash-name { flex: 1 1 auto; min-width: 0; font-size: 1.05rem; line-height: 1.3; }
.wash-price { flex: 0 0 auto; margin-left: auto; white-space: nowrap; text-align: right; font-size: 1.05rem; line-height: 1.3; }
.wash-meta { color: var(--muted); font-size: 0.92rem; }
.wash-option:has(input:checked) {
  background: var(--green-dark);
  color: white;
  border-color: var(--green-dark);
}
.wash-option:has(input:checked) .wash-meta { color: rgba(255, 255, 255, 0.86); }
.price-line { font-family: var(--display); font-size: 1.6rem; margin: 4px 0 8px; }

.callout {
  background: #fff4d8;
  border-radius: 14px;
  padding: 12px;
  color: var(--amber-ink);
}
.rules { display: grid; gap: 8px; }
.rules div { background: #eef8fc; border-radius: 12px; padding: 10px 12px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.suggest-list { display: grid; gap: 6px; margin: 0; }
#company-mask { margin: 0; }
#company-matches:empty,
#company-mask:empty { display: none; }
.field > .actions { margin-top: 0; }
.suggest-list button { text-align: left; justify-content: flex-start; }

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e3f4fa;
}
.tag.pass, .tag.in_bay { background: #d7f6ee; color: #0d5c48; }
.tag.fail { background: #fdecec; color: var(--red); }
.tag.pending, .tag.booked { background: #fff4d8; color: var(--amber-ink); }
.tag.bay { background: #dff4fb; color: #0c4f6e; }
.tag.prepay { background: #f3e4ff; color: #5b2a86; }
.tag.internal { background: #e4e7f6; color: #2a2c78; }
.tag.na { background: #eee; color: #555; }

.list { display: grid; gap: 10px; }
.job {
  display: grid;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}
.job strong { font-size: 1.15rem; }
.job .meta { color: var(--muted); font-size: 0.92rem; }

.side-jobs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.side-jobs:not(:has(a)) { display: none; }
.side-jobs a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  background: #dff6fb;
  color: inherit;
  text-decoration: none;
  border: 1px solid #b7dceb;
}
.week-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; background: #ffffff; }
.week-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(132px, 1fr)); min-width: 980px; }
.time-gutter { position: sticky; left: 0; z-index: 2; background: #ffffff; }
.day-head { height: 44px; margin: 0; display: flex; align-items: flex-end; padding: 0 6px 6px; font-size: 0.92rem; }
.daycol.today .day-head { color: var(--green); }
.daycol.weekend .day-head { color: var(--amber-ink); }
.time-label, .grid-open, .day-slots { font-size: 0.78rem; }
.time-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  box-sizing: border-box;
}
.day-slots { display: grid; grid-auto-rows: 44px; }
.grid-open, .grid-book {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: 4px 6px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  text-decoration: none;
  overflow: hidden;
}
.grid-open { color: var(--muted); background: white; }
.grid-open:hover, .grid-open:focus { background: #dff4fb; color: var(--green-dark); }
.grid-book { background: var(--green-dark); color: white; line-height: 1.2; }
.grid-book.pending { background: #0b6e86; }
.grid-book.complete { background: #5e564c; }
.grid-book small { display: block; opacity: 0.9; }
.today-grid { display: grid; grid-template-columns: 52px 1fr; }

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--green-dark);
  z-index: 5;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1;
  text-align: center;
  color: #c5e9f6;
  text-decoration: none;
  padding: 12px 4px 14px;
  font-size: 0.82rem;
  font-weight: 700;
}
.tabbar a[aria-current="page"] { color: white; box-shadow: inset 0 -3px 0 #3ec0e0; }
@media (max-width: 420px) {
  .tabbar a { font-size: 0.72rem; padding: 12px 2px 14px; }
}
@media (min-width: 900px) {
  body.staff { padding-bottom: 24px; }
  .tabbar { position: sticky; top: 0; bottom: auto; }
}

.sig { width: 100%; height: 140px; background: white; border: 1px dashed #b7dceb; border-radius: 12px; touch-action: none; }
.addon { display: grid; grid-template-columns: auto 1fr auto 72px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.addon input[type="number"] { min-height: 40px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; padding: 6px 0; }
.check input[type="text"], .check input[type="number"] { grid-column: 2; }
.row-between { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.empty { padding: 18px; text-align: center; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.svc { margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 1fr; gap: 2px 12px; margin: 0 0 14px; }
.kv dt { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; margin-top: 8px; }
.kv dd { margin: 0; }
@media (min-width: 480px) {
  .kv { grid-template-columns: 140px 1fr; }
  .kv dt { margin-top: 0; }
}
.kv span { color: var(--muted); }
.eyebrow { margin: 0 0 6px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green); font-size: 0.82rem; }
.shop-block { margin-top: 8px; }
.confirm h1 { margin-bottom: 8px; }
.verify-pass, .verify-fail {
  font-family: var(--display);
  font-size: 2.4rem;
  margin: 0;
}
.verify-pass { color: var(--green); }
.verify-fail { color: var(--red); }
.footer-note { margin-top: 28px; color: var(--muted); font-size: 0.9rem; }
.site-footer { margin-top: 28px; color: var(--muted); font-size: 0.9rem; display: flex; gap: 14px; flex-wrap: wrap; }
.legal h2 { font-size: 1.15rem; margin: 1.2rem 0 0.3rem; }
details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

@media print {
  .top, .tabbar, .no-print, .flash, .site-footer { display: none !important; }
  body { background: white; }
  .wrap { width: auto; margin: 0; }
  .card { box-shadow: none; border: none; }
}
