:root {
  --bg: #07141f;
  --bg-elev: #0c1d2c;
  --surface: #122536;
  --surface-2: #183044;
  --line: #2a455c;
  --text: #f3f7fb;
  --muted: #9eb3c6;
  --accent: #4db8ff;
  --accent-ink: #041018;
  --shop: #3ee0a4;
  --rent: #ffb030;
  --oos: #ff6b6b;
  --danger: #ff7a7a;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --tap: 48px;
  --tabbar: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.4;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

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

a {
  color: var(--accent);
}

button {
  touch-action: manipulation;
}

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

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom));
}

.app.is-form {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar.is-compact {
  align-items: center;
  padding-top: calc(8px + env(safe-area-inset-top));
  padding-bottom: 8px;
}

.topbar.is-compact h1 {
  font-size: 1.2rem;
  font-weight: 650;
}

.topbar.is-compact .subhead {
  margin-top: 1px;
}

.topbar.is-compact .brand-mark,
.topbar.is-compact .icon-btn,
.topbar.is-compact .topbar-actions {
  margin-top: 0;
}

.topbar .brand-mark,
.topbar .icon-btn,
.topbar-actions {
  margin-top: 2px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-line {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.25;
}

.subhead {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.icon-btn {
  width: var(--tap);
  height: var(--tap);
  flex: 0 0 var(--tap);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.net-chip {
  display: inline-flex;
  align-items: center;
  align-self: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.net-chip.is-on {
  background: color-mix(in srgb, var(--shop) 22%, transparent);
  color: var(--shop);
}

.net-chip.is-off {
  background: color-mix(in srgb, var(--oos) 20%, transparent);
  color: var(--oos);
}

.net-note {
  margin: 6px 0 0;
  min-height: 1.35em;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.net-note.is-idle {
  visibility: hidden;
}

.edits-banner.is-offline {
  background: color-mix(in srgb, var(--oos) 12%, transparent);
}

.edits-banner .net-chip {
  margin-right: 6px;
}

.topbar > .net-chip {
  margin-top: 6px;
}

.icon-btn.notify-bell {
  position: relative;
}

.notify-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.grow {
  flex: 1;
  min-width: 0;
}

.topbar-unit {
  align-items: flex-start;
}

.topbar-unit .grow {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.topbar-chips:empty {
  display: none;
}

.page {
  padding: 14px 16px 8px;
}

.search {
  position: relative;
  margin-bottom: 12px;
}

.search input {
  width: 100%;
  height: var(--tap);
  padding: 0 44px 0 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}

.search input::placeholder {
  color: #7f96aa;
}

.search .lead,
.search .clear {
  position: absolute;
  top: 0;
  height: var(--tap);
  width: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
}

.search .lead {
  left: 0;
  pointer-events: none;
}

.search .clear {
  right: 0;
  color: var(--text);
}

.search svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips.wrap {
  flex-wrap: wrap;
  overflow: visible;
}

.chips.is-searching {
  opacity: 0.42;
}

.search-match {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.search-cancelled-head {
  margin-top: 14px;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
}

.chip .count {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
}

.chip.is-on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.chip.is-on .count {
  color: var(--accent-ink);
  opacity: 0.72;
}

.chip[data-status="at-shop"].is-on {
  background: var(--shop);
  border-color: var(--shop);
}

.chip[data-status="out-on-rent"].is-on {
  background: var(--rent);
  border-color: var(--rent);
}

.chip[data-status="out-of-service"].is-on {
  background: var(--oos);
  border-color: var(--oos);
}

.chip[data-status="upcoming"].is-on {
  background: #7aa2ff;
  border-color: #7aa2ff;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 5px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.card > a.card-body {
  display: block;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.card > a.card-main,
a.card {
  color: inherit;
  text-decoration: none;
}

.card.status-at-shop,
.card.status-in-service {
  border-left-color: var(--shop);
}

.card.status-out-on-rent {
  border-left-color: var(--rent);
}

.card.status-out-of-service {
  border-left-color: var(--oos);
}

.card.card-oos-dim {
  opacity: 0.72;
}

.card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--bg-elev);
}

.card.is-upcoming-tile .card-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.card-upcoming-tile {
  flex: 0 0 64px;
  width: 64px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 4px 5px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}

.card-upcoming-tile-dow {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
}

.card-upcoming-tile.is-relative .card-upcoming-tile-dow {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.64rem;
}

.card-upcoming-tile-date {
  margin: 2px 0 0;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
}

.card-upcoming-tile-time {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.card-upcoming-tile.is-today {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-elev));
}

.fleet-day-head {
  position: sticky;
  top: calc(72px + env(safe-area-inset-top));
  z-index: 6;
  margin: 14px 0 8px;
  padding: 8px 0 6px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.list > .fleet-day-head:first-child {
  margin-top: 0;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text);
}

.card-sub,
.card-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.card-sub .part-number,
.card-title .part-number,
.card-note .part-number {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.card-note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-out .card-title {
  font-size: 1rem;
  font-weight: 400;
}

.card.has-maps {
  flex-direction: column;
  align-items: stretch;
}

.card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.maps-link,
.card-address {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

button.maps-link,
button.card-address {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.card-address {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 12px;
  min-height: 44px;
}

.card-contact {
  margin: 4px 0 0;
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--muted);
}

.card-email,
.mail-link {
  color: var(--accent);
  font-weight: 600;
}

.card-email {
  display: block;
  margin: 0 14px 12px;
  min-height: 44px;
}

.badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-shop {
  background: color-mix(in srgb, var(--shop) 18%, transparent);
  color: var(--shop);
}

.badge-rent {
  background: color-mix(in srgb, var(--rent) 18%, transparent);
  color: var(--rent);
}

.badge-oos {
  background: color-mix(in srgb, var(--oos) 18%, transparent);
  color: var(--oos);
}

.badge-low {
  background: color-mix(in srgb, var(--rent) 20%, transparent);
  color: var(--rent);
}

.badge-used {
  background: color-mix(in srgb, var(--muted) 22%, transparent);
  color: var(--text);
}

.history-kind {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-kind-service {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.history-kind-oil {
  background: color-mix(in srgb, var(--rent) 18%, transparent);
  color: var(--rent);
}

.history-kind-grease {
  background: color-mix(in srgb, var(--shop) 18%, transparent);
  color: var(--shop);
}

.badge-warn {
  display: inline-block;
  margin-top: 8px;
  background: color-mix(in srgb, var(--rent) 16%, transparent);
  color: var(--rent);
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--bg-elev);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.hero {
  margin: 0 0 14px;
}

.hero-name {
  margin: 8px 0 6px;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.hero-customer {
  margin: 0;
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-address,
.hero-when {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: pre-wrap;
}

.shop-photo {
  margin: 0 0 12px;
}

.shop-photo a {
  display: block;
  touch-action: pan-y;
}

.shop-photo img {
  display: block;
  width: 100%;
  height: 210px;
  max-height: 210px;
  object-fit: cover;
  object-position: center;
  background: var(--bg-elev);
  border-radius: 16px;
  border: 1px solid var(--line);
}

.photo-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
}

.photo-block .shop-photo {
  margin: 0;
}

.photo-extra {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.photo-extra.is-gallery {
  gap: 0;
}

.gallery {
  position: relative;
  touch-action: pan-y;
}

.gallery-frame {
  position: relative;
  height: 210px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  touch-action: pan-y;
}

.gallery-track {
  display: flex;
  height: 210px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 210px;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
}

.gallery .shop-photo {
  margin: 0;
}

.gallery .shop-photo img {
  height: 210px;
  max-height: 210px;
  border-radius: 0;
  border: 0;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  color: var(--text);
  cursor: pointer;
}

.gallery-nav[hidden] {
  display: none;
}

.gallery-nav svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

.gallery-nav.is-prev {
  left: 8px;
}

.gallery-nav.is-next {
  right: 8px;
}

.gallery-nav.is-next svg {
  transform: scaleX(-1);
}

.gallery-pin {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.gallery-pin svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.gallery-pin.is-main {
  background: color-mix(in srgb, var(--rent) 22%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--rent) 50%, var(--line));
  color: var(--rent);
}

.gallery-pin.is-main svg {
  fill: currentColor;
}

.gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.gallery-count {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
}

.gallery-dot.is-on {
  width: 18px;
  background: var(--accent);
}

.card-ready-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.card-ready-copy {
  min-width: 0;
  flex: 1;
}

.photo-extra.is-compact .shop-photo img {
  height: 210px;
  max-height: 210px;
}

.photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-block .btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  cursor: pointer;
}

.photo-block .btn.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.photo-status {
  margin: 0;
  padding: 28px 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.spec {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.spec span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.spec strong {
  font-size: 1rem;
  font-weight: 700;
  word-break: break-word;
}

.spec.wide {
  grid-column: 1 / -1;
}

.service-toggle {
  margin: 4px 0 16px;
}

.service-toggle-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.service-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.service-btn {
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.service-btn.is-in.is-on {
  background: var(--shop);
  color: var(--accent-ink);
  border-color: var(--shop);
}

.service-btn.is-out.is-on {
  background: var(--oos);
  color: #041018;
  border-color: var(--oos);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.btn-ghost {
  background: transparent;
}

label.btn {
  cursor: pointer;
}

.actions .btn {
  width: 100%;
  cursor: pointer;
}

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

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

select {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 14px;
  background-color: var(--surface);
  padding: 12px 14px;
  color: var(--text);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.edits-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 52px;
}

.sw-update-slot {
  min-height: 0;
}

.sw-update-slot:not(:empty) {
  min-height: 52px;
  margin: 0 0 12px;
}

.sw-update-slot .edits-banner {
  margin: 0;
}

.edits-banner.quiet {
  background: var(--surface);
  font-weight: 600;
  color: var(--muted);
}

.edits-banner.auth-ok {
  background: color-mix(in srgb, var(--shop) 14%, transparent);
}

.edits-banner.auth-ok.is-reconnect {
  min-height: 0;
}

.banner-error.is-compact {
  margin-top: 4px;
  white-space: normal;
}

.edits-banner .text-btn {
  display: inline;
  margin-left: 6px;
  padding: 8px 0;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.edits-banner.sw-update {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.edits-banner.sw-update.is-applying {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.edits-banner.notify-item,
.edits-banner.notify-prompt {
  display: block;
  text-decoration: none;
}

.edits-banner.notify-item {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.notify-read-all {
  margin: 0 0 12px;
  padding: 8px 0;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.notify-list {
  display: grid;
  gap: 8px;
}

.notify-sheet-panel {
  max-height: min(80vh, 640px);
  overflow: auto;
}

.notify-sheet-panel .notify-list {
  margin: 8px 0 12px;
}

.notify-card {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.notify-card.is-read {
  opacity: 0.72;
}

.notify-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.notify-body {
  margin: 0;
  font-weight: 600;
}

.notify-toggles {
  display: grid;
  gap: 8px;
  margin: 12px 0 8px;
}

.notify-toggle {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.notify-toggle input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
}

.notify-toggle strong {
  display: block;
}

.notify-toggle small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.arrival-push-setup {
  margin: 10px 0 16px;
}

.arrival-push-setup summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
}

.arrival-push-setup .form {
  margin-top: 10px;
}

.card-upcoming {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.card.status-upcoming-planned {
  border-left-color: var(--rent);
}

.card.status-upcoming-on-the-way {
  border-left-color: #ff8a1f;
}

.card.status-upcoming-delivered {
  border-left-color: var(--shop);
}

.card.status-upcoming-cancelled {
  border-left-color: var(--oos);
  opacity: 0.78;
}

.card.status-job-out {
  border-left-color: var(--rent);
}

.card.status-job-upcoming {
  border-left-color: var(--accent);
}

.card.status-job-returned {
  border-left-color: var(--shop);
}

.card-upcoming .card-body {
  display: block;
  padding: 0 0 4px;
  color: inherit;
  text-decoration: none;
}

.card-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.card-phone svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-phone.is-plain {
  background: var(--surface-2);
  color: var(--muted);
}

.today-shortcut {
  display: block;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--rent) 16%, transparent);
  color: var(--rent);
  font-weight: 700;
  text-decoration: none;
}

.today-block {
  margin: 4px 0 16px;
  padding: 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--rent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--rent) 28%, var(--line));
}

.upcoming-calendar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upcoming-day {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.upcoming-day-rail {
  position: sticky;
  top: calc(86px + env(safe-area-inset-top));
  z-index: 5;
  padding: 6px 0 4px;
}

.upcoming-day-dow {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.upcoming-day-date {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.upcoming-day-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.upcoming-day-cards .card-upcoming {
  margin: 0;
}

.today-block .text-btn {
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
}

.upcoming-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 10px;
}

.section-head .text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  min-height: 44px;
  padding: 8px 0;
}

.section-head .text-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cal-nav {
  display: grid;
  grid-template-columns: var(--tap) minmax(0, 1fr) var(--tap);
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}

.cal-nav-title {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 16px;
}

.cal-dow {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 4px 2px 6px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.cal-day.is-empty {
  pointer-events: none;
}

.cal-day.has-jobs {
  background: var(--surface);
  border-color: var(--line);
}

.cal-day.is-today {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}

.cal-day.is-on {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--text);
}

.cal-num {
  line-height: 1.1;
  font-size: 0.95rem;
}

.cal-count {
  margin-top: 2px;
  min-width: 1.15rem;
  padding: 0 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rent) 22%, transparent);
  color: var(--rent);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.seg-3 .seg-btn {
  font-size: 0.78rem;
  padding: 8px 4px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.badge-temp-freezer {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.badge-temp-cooler {
  background: color-mix(in srgb, var(--shop) 18%, transparent);
  color: var(--shop);
}

.badge-temp-multi {
  background: color-mix(in srgb, var(--rent) 18%, transparent);
  color: var(--rent);
}

.badge-upcoming {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: color-mix(in srgb, #7b8cff 22%, transparent);
  color: #b8c4ff;
}

.badge-upcoming svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-due {
  border: 0;
  font: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.badge-due-due {
  background: color-mix(in srgb, #ff8a1f 22%, transparent);
  color: #ffb060;
}

.badge-due-soon {
  background: color-mix(in srgb, #f5d000 24%, transparent);
  color: #ffe36a;
}

.badge-due-overdue {
  background: color-mix(in srgb, var(--oos) 22%, transparent);
  color: #ff8a8a;
}

.badge-due-none {
  background: color-mix(in srgb, var(--muted) 22%, transparent);
  color: #c5d0da;
}

.badge-rental-ready {
  background: color-mix(in srgb, var(--shop) 22%, transparent);
  color: var(--shop);
}

.badge-needs-prep {
  background: color-mix(in srgb, var(--muted) 22%, transparent);
  color: #c5d0da;
}

.badge[data-badge-nav] {
  cursor: pointer;
}

.ready-size-line {
  margin: 0 0 12px;
  color: var(--shop);
  font-weight: 700;
}

.ready-card {
  margin: 12px 0 16px;
  padding: 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--shop) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--shop) 26%, var(--line));
}

.page > .hint + .ready-card,
.page > .ready-card:first-child {
  margin-top: 4px;
}

.ready-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.ready-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  min-height: 56px;
}

.ready-item.is-on {
  border-color: color-mix(in srgb, var(--shop) 45%, var(--line));
  background: color-mix(in srgb, var(--shop) 12%, var(--surface));
}

.ready-check {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg-elev);
  color: var(--shop);
  display: grid;
  place-items: center;
}

.ready-item.is-on .ready-check {
  background: color-mix(in srgb, var(--shop) 18%, transparent);
  border-color: var(--shop);
}

.ready-check svg {
  display: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ready-item.is-on .ready-check svg {
  display: block;
}

.ready-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ready-copy strong {
  font-weight: 700;
}

.ready-detail,
.ready-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.badge-ready-issue {
  background: color-mix(in srgb, #e23d3d 22%, transparent);
  color: #ff8a8a;
}

.badge-task-count {
  background: color-mix(in srgb, var(--muted) 22%, transparent);
  color: #c5d0da;
}

.ready-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}

.ready-row .ready-item {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

.ready-problem-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #ff8a1f 40%, var(--line));
  background: color-mix(in srgb, #ff8a1f 10%, var(--surface));
  color: #ffb060;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
}

.ready-problem-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.ready-general {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ready-issues {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ready-issue-block {
  display: grid;
  gap: 6px;
}

.ready-issue-photos .gallery-frame {
  height: 140px;
}

.ready-issue {
  margin: 0;
  padding: 6px 8px;
  border-radius: 10px;
  background: color-mix(in srgb, #ff8a1f 8%, var(--surface));
  color: var(--text);
  font-size: 0.86rem;
  text-decoration: none;
}

.ready-issue.is-urgent {
  background: color-mix(in srgb, #e23d3d 12%, var(--surface));
}

.ready-problem-sheet .maps-sheet-panel {
  max-height: min(88vh, 720px);
  overflow: auto;
}

.ready-problem-mode {
  border: 0;
  margin: 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unit-open-tasks {
  margin: 12px 0 8px;
}

.return-pick-row.is-conflict {
  opacity: 0.55;
}

.quote-avail {
  font-weight: 650;
}

.badge-after-hours {
  background: color-mix(in srgb, #9b7cff 20%, transparent);
  color: #c4b0ff;
}

.badge-on-the-way {
  background: color-mix(in srgb, #ff8a1f 22%, transparent);
  color: #ffb060;
}

.btn-on-the-way {
  background: color-mix(in srgb, #ff8a1f 18%, var(--surface));
  color: #ffb060;
  border-color: color-mix(in srgb, #ff8a1f 45%, var(--line));
}

.card-note-way {
  color: #ffb060;
  font-weight: 700;
}

.card-note-eta {
  color: var(--muted);
  font-weight: 600;
}

.card-note-eta[data-drive-source="live"] {
  color: #8fd4b4;
}

.card-ready-action .btn-on-the-way,
.card-ready-action .btn-on-the-way-pickup {
  width: 100%;
}

.badge-on-the-way-pickup {
  background: color-mix(in srgb, #4db8ff 22%, transparent);
  color: #8fd4ff;
}

.btn-on-the-way-pickup {
  background: color-mix(in srgb, #4db8ff 18%, var(--surface));
  color: #8fd4ff;
  border-color: color-mix(in srgb, #4db8ff 45%, var(--line));
}

.card-note-way-pickup {
  color: #8fd4ff;
  font-weight: 700;
}

.badge-returning {
  background: color-mix(in srgb, var(--shop) 22%, transparent);
  color: var(--shop);
}

.trip-banners {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.trip-banners .section-head {
  margin: 0;
}

.trip-strip-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.trip-strip-summary {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--shop) 35%, var(--line));
  background: color-mix(in srgb, var(--shop) 14%, var(--surface));
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  min-height: 2.4em;
}

.driver-trip-name,
.driver-trip-line {
  font-size: 0.95rem;
  line-height: 1.3;
  min-height: 1.3em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-trip-you {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--shop) 28%, transparent);
  color: var(--shop);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.driver-trip-kind,
.driver-trip-dest {
  margin-top: 2px;
  color: var(--text);
  font-size: 0.95em;
}

.driver-trip-dest {
  color: var(--muted);
}

.identity-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.identity-email {
  margin: 0;
  font-weight: 700;
}

.identity-driver {
  margin: 2px 0 0;
  color: var(--muted);
}

.identity-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.trip-banners .trip-banner {
  margin: 0;
}

.trip-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--shop) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--shop) 35%, var(--line));
}

.trip-banner.driver-trip {
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
}

.trip-banner.driver-trip.is-compact,
.trip-banner.trip-banner-start.is-compact {
  padding: 8px 10px;
  gap: 6px;
  margin: 0;
}

.trip-banner p {
  margin: 0;
}

.trip-banner-copy {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.driver-trip-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 1.25em;
  margin-top: 2px;
}

.trip-banner-copy .card-note-eta,
.trip-banner .card-note-eta {
  margin-top: 0;
  min-height: 1.25em;
  font-weight: 700;
  font-size: 0.82rem;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-trip-dest {
  min-height: 0;
}

.trip-loc {
  margin-top: 0;
  min-height: 1.25em;
  color: var(--muted);
  font-size: 0.82rem;
  flex: 0 1 auto;
  white-space: nowrap;
}

.trip-keep-open {
  margin-top: 6px;
  min-height: 2.5em;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

[data-trip-eta-host] {
  min-height: 2.8em;
}

[data-trip-from],
[data-trip-updated] {
  min-height: 1.4em;
}

[data-trip-keep-open] {
  min-height: 3.2em;
}

[data-trip-sheet]:not([hidden]) .live-map-wrap,
[data-trip-sheet]:not([hidden]) .live-map-wrap[hidden] {
  display: block;
  min-height: max(260px, 40vh);
  height: max(280px, 42vh);
}

.trip-banner .btn {
  flex: 0 0 auto;
}

.trip-banner-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
}

.trip-banner-actions.is-compact {
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  min-height: 34px;
}

.trip-banner-actions .btn {
  width: 100%;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.trip-banner-actions.is-compact .btn,
.trip-banner .btn-compact {
  width: auto;
  flex: 1 1 0;
  padding: 6px 8px;
  font-size: 0.85rem;
  line-height: 1.2;
}

.trip-banner-start.is-compact {
  flex-direction: row;
  align-items: center;
}

.trip-banner-start.is-compact p {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9rem;
}

.trip-banner-start.is-compact .btn {
  flex: 0 0 auto;
  width: auto;
}

.trip-banner-start {
  background: color-mix(in srgb, var(--shop) 8%, var(--surface));
}

.live-map-wrap {
  position: relative;
  margin: 8px 0 4px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b1a24;
  flex: 1 0 auto;
  flex-shrink: 0;
  min-height: max(260px, 40vh);
  height: max(280px, 42vh);
}

.live-map,
.trip-map,
.live-map-wrap [data-trip-gmap] {
  display: block;
  width: 100%;
  height: max(280px, 42vh);
  min-height: 260px;
  border: 0;
  touch-action: none;
}

.trip-map-legend {
  margin: 0;
  padding: 6px 10px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 82%, #0b1a24);
}

.trip-map-missing {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  min-height: 240px;
}

.trip-pin-row {
  margin: 0;
  font-size: 0.95rem;
}

.trip-speak {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
}

.trip-speak input {
  width: 22px;
  height: 22px;
}

.trip-turns-wrap,
.trip-steps-wrap {
  padding: 8px 10px 10px;
  background: color-mix(in srgb, var(--surface) 88%, #0b1a24);
  border-radius: 12px;
  max-height: min(28vh, 220px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.trip-turns-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.trip-turns {
  margin: 0;
  padding: 0 0 0 1.15rem;
  display: grid;
  gap: 6px;
}

.trip-next {
  flex-shrink: 0;
}

.trip-next-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: #1a73e8;
  color: #fff;
}

.trip-next-glyph {
  font-size: 1.8rem;
  line-height: 1;
}

.trip-next-dist {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.trip-next-instr {
  margin: 2px 0 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.trip-dir-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, #f97316 18%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.trip-recenter {
  position: absolute;
  right: 10px;
  bottom: 42px;
  z-index: 2;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0b1a24;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.trip-turns li {
  color: var(--muted);
  font-size: 0.9rem;
}

.trip-turns li.is-done {
  text-decoration: line-through;
  opacity: 0.65;
}

.trip-turns li.is-next {
  color: var(--text);
  font-weight: 700;
  background: color-mix(in srgb, var(--shop) 14%, transparent);
  border-radius: 10px;
  padding: 8px 10px 8px 8px;
  margin-left: -4px;
}

.leaflet-container {
  font: inherit;
  background: #0b1a24;
}

.leaflet-control-attribution {
  font-size: 10px;
  background: rgba(7, 20, 31, 0.72);
  color: #9ab;
}

.leaflet-control-attribution a {
  color: #cde;
}

.badge-ready {
  background: color-mix(in srgb, var(--shop) 20%, transparent);
  color: var(--shop);
}

.ready-shortcut {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--shop) 16%, transparent);
  color: var(--shop);
  font-weight: 700;
  text-align: left;
  min-height: 44px;
}

.ready-block {
  margin: 4px 0 16px;
  padding: 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--shop) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--shop) 28%, var(--line));
}

.ready-block .text-btn {
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  min-height: 44px;
  padding: 8px 0;
  cursor: pointer;
}

.card.status-ready,
.card.card-ready {
  border-left-color: var(--shop);
}

.card-ready-action {
  display: block;
  margin: 0 12px 12px;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--shop) 16%, transparent);
  color: var(--shop);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.card-ready-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: none;
  padding: 0 12px 12px;
  min-height: 0;
}

.card-ready-actions .btn {
  width: 100%;
}

.badge-power-electric {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.badge-power-diesel {
  background: color-mix(in srgb, var(--rent) 16%, transparent);
  color: var(--rent);
}

.badge-power-dual {
  background: color-mix(in srgb, var(--shop) 16%, transparent);
  color: var(--shop);
}

.badge-power-unset {
  background: color-mix(in srgb, var(--shop) 12%, transparent);
  color: var(--muted, #8b93a7);
}

.running-on-edit .seg {
  margin-top: 4px;
}

.seg-btn {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}

.seg-btn.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.banner-error {
  margin-top: 6px;
  color: var(--danger);
  font-weight: 600;
  white-space: pre-wrap;
  word-break: break-word;
}

.banner-error-actions {
  margin-top: 8px;
}

.banner-error .banner-reconnect,
.edits-banner .banner-reconnect {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 0;
  padding: 0 2px;
  color: var(--danger);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
  font-weight: 600;
}

.field-error[hidden] {
  display: none;
}

.locked-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.actions .btn:disabled,
.form .btn:disabled {
  opacity: 0.45;
}

.checkout {
  margin: 4px 0 0;
  padding: 12px 14px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.checkout legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 10px;
  padding: 8px 0;
  font-weight: 600;
  line-height: 1.35;
}

.check-row input {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 2px;
  accent-color: var(--shop);
}

.checkout-ok {
  color: var(--shop);
  font-weight: 700;
}

.edited-pill {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.today-section {
  margin: 0 0 8px;
}

.today-quiet {
  margin: 20px 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  text-align: center;
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.entry {
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

a.service-row {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.service-row p.meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.entry h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}

.entry p {
  margin: 8px 0 0;
}

.entry .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.entry.is-open {
  border-color: color-mix(in srgb, var(--rent) 45%, var(--line));
}

.rental-flag {
  color: var(--rent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rental-hist {
  padding: 0;
  overflow: hidden;
}

.rental-hist-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.rental-hist-copy {
  min-width: 0;
  flex: 1;
}

.rental-hist-copy h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0;
}

.rental-hist-addr,
.rental-hist-dates {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.rental-hist-addr {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rental-hist-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.rental-hist-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--rent) 18%, var(--surface));
  color: var(--rent);
}

.rental-hist-chip.is-ready {
  background: color-mix(in srgb, var(--shop) 20%, var(--surface));
  color: var(--shop);
}

.rental-hist-chip.is-returning {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent);
}

.rental-hist-chip.is-closed {
  background: color-mix(in srgb, var(--muted) 16%, var(--surface));
  color: var(--muted);
}

.rental-hist-photos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.rental-hist-photos svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.rental-hist-detail {
  padding: 0 14px 12px;
  border-top: 1px solid var(--line);
}

.rental-hist-detail .meta:first-child {
  margin-top: 10px;
}

.rental-hist-notes {
  white-space: pre-wrap;
}

.entry-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.linkish-edit {
  color: var(--accent);
}

.linkish {
  background: none;
  border: 0;
  color: var(--danger);
  font-weight: 700;
  padding: 8px;
  min-height: 44px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-heading {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.time-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.price-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.money-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.money-prefix {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
}

.money-input input {
  flex: 1;
  min-width: 0;
}

#electric-fields,
#oil-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#electric-fields[hidden],
#oil-fields[hidden] {
  display: none;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.req {
  color: var(--rent);
}

input[type="date"],
input[type="time"],
input[type="number"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
  min-height: var(--tap);
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.textarea-sm {
  min-height: 64px;
}

.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 560px;
  margin: 0 auto;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.tabbar::-webkit-scrollbar {
  display: none;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  min-width: 56px;
  min-height: 52px;
  padding: 0 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  border-radius: 12px;
  touch-action: manipulation;
  position: relative;
  z-index: 1;
}

.tab svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.is-on {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.legal-title {
  margin: 4px 0 10px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.about-copy {
  margin: 0 0 16px;
  color: var(--muted);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 12px;
}

.contact-row {
  display: block;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
}

.contact-row span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

a.contact-row:active,
a.btn:active {
  opacity: 0.88;
}

.callout {
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--rent) 12%, transparent);
  color: var(--rent);
  font-weight: 600;
  margin-bottom: 12px;
}

.todo-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 4px 0 8px;
}

.todo-add input[type="text"] {
  flex: 1 1 160px;
  min-width: 0;
}

.todo-add .btn {
  flex: 0 0 auto;
  padding: 0 16px;
}

.todo-urgent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
}

.todo-list {
  margin: 0;
}

.todo-card {
  align-items: flex-start;
  padding: 12px 12px 12px 12px;
}

.todo-card.is-urgent {
  border-left-color: var(--danger);
}

.todo-card.is-error {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--bg-elev));
}

.todo-card.is-error .todo-title {
  color: var(--danger);
}

.todo-check {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--bg-elev);
  color: var(--shop);
  display: grid;
  place-items: center;
  padding: 0;
}

.todo-check svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.todo-check[aria-pressed="true"] {
  background: color-mix(in srgb, var(--shop) 18%, transparent);
  border-color: var(--shop);
}

.todo-body {
  flex: 1;
  min-width: 0;
}

.todo-copy {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-weight: 400;
  text-decoration: none;
}

.todo-title {
  margin: 0;
  color: var(--text);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.todo-card.is-open .todo-title {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.todo-card.is-done .todo-title {
  color: var(--muted);
}

.todo-urgent-chip {
  display: inline-block;
  margin: 0 6px 0 0;
  padding: 1px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger) 22%, transparent);
  color: var(--danger);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.todo-unit {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.78rem;
}

.todo-expand {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.todo-edit-form,
.todo-complete-form {
  display: grid;
  gap: 8px;
}

.todo-edit-form textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}

.todo-expand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.todo-done-line,
.todo-done-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.todo-done-block {
  margin-top: 16px;
}

.todo-done-head {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  border: 0;
  text-align: left;
}

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

body.maps-sheet-open {
  overflow: hidden;
}

.maps-sheet {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.maps-sheet[data-maps-sheet] {
  z-index: 140;
}

.maps-sheet[data-trip-sheet] .maps-sheet-panel {
  max-height: min(96dvh, 920px);
  min-height: min(78dvh, 640px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.maps-sheet[data-trip-sheet] .live-map-wrap {
  flex: 1 0 auto;
  flex-shrink: 0;
  min-height: max(260px, 40vh);
  height: max(280px, 42vh);
}

.maps-sheet[data-trip-sheet] .trip-map,
.maps-sheet[data-trip-sheet] [data-trip-gmap] {
  height: max(280px, 42vh) !important;
  min-height: 260px !important;
}

.maps-sheet[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.maps-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(4, 12, 18, 0.62);
}

.maps-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.maps-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.maps-sheet-x {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.maps-sheet-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.maps-sheet-address {
  margin: 0 0 4px;
  font-weight: 700;
}

.maps-sheet-panel label {
  margin: 4px 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.maps-sheet-panel select {
  width: 100%;
}

.maps-sheet-panel .btn {
  width: 100%;
}

.maps-sheet-panel .btn[disabled] {
  opacity: 0.45;
}

.way-sheet-panel {
  max-height: min(92dvh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.way-trailer-readonly {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

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

.way-trailer-name {
  margin: 2px 0 0;
  font-weight: 700;
}

.way-link {
  border: 0;
  background: none;
  color: var(--accent, #5eb6ff);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 6px 0;
  min-height: 36px;
}

.maps-sheet-panel .way-link {
  width: auto;
  align-self: flex-start;
}

.way-trailer-scroll {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.return-pick-row.is-on {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #5eb6ff) 45%, transparent);
}

.return-pick-row.is-blocked {
  opacity: 0.55;
}

.way-trailer-group {
  margin: 8px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.way-spec-note {
  font-weight: 650;
}

.return-sheet-panel {
  max-height: min(92dvh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.return-sheet-panel.is-picking {
  height: min(92dvh, 760px);
  overflow: hidden;
}

.return-here-btn {
  min-height: 56px;
  font-size: 1.06rem;
  font-weight: 800;
}

.return-here-btn.is-picked,
.return-trailer-scroll .btn.is-picked {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop) 45%, transparent);
}

.return-trailer-toggle {
  font-weight: 700;
  min-height: 52px;
  position: relative;
  z-index: 2;
}

.return-sheet-panel .hint {
  color: var(--text);
  font-weight: 650;
}

.return-trailer-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1;
  position: relative;
  z-index: 2;
}

.return-trailer-picker[hidden] {
  display: none !important;
}

.return-sheet-panel [data-return-home][hidden] {
  display: none !important;
}

.return-trailer-scroll {
  display: grid;
  gap: 8px;
  flex: 1;
  min-height: 180px;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.return-trailer-scroll[hidden] {
  display: none;
}

.return-pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.return-pick-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.return-pick-copy strong {
  font-size: 0.98rem;
}

.return-pick-addr {
  color: var(--muted);
  font-size: 0.86rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 16px;
  background: rgba(4, 12, 18, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-stage {
  width: min(100%, 720px);
}

.lightbox-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}

.lightbox-track::-webkit-scrollbar {
  display: none;
}

.lightbox-slide {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.lightbox img,
.lightbox-slide img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 88px);
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  color: var(--text);
}

.lightbox-nav[hidden] {
  display: none;
}

.lightbox-nav svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

.lightbox-nav.is-prev {
  left: 10px;
}

.lightbox-nav.is-next {
  right: 10px;
}

.lightbox-nav.is-next svg {
  transform: scaleX(-1);
}

.lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 16px;
  margin: 0;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
}

.lightbox-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.legal-page {
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}

.legal-page h1 {
  margin: 8px 0 12px;
  font-size: 1.7rem;
  line-height: 1.15;
}

.legal-page .legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 18px 0 0;
}

.picked-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
}

.picked-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.picked-title {
  display: inline-block;
  margin: 2px 0 0;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}

.picked-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.picker-list {
  display: grid;
  gap: 8px;
}

.picker-hit {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.picker-hit strong {
  font-size: 1rem;
}

.picker-hit span {
  color: var(--muted);
  font-size: 0.86rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
}

.chip-btn.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.stack-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stack-head p {
  margin: 0;
  font-weight: 700;
}

.card-customer .card-body {
  display: block;
}

.card-equip {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.detail-equip {
  margin: 0 0 16px;
}

.badge-tax {
  background: color-mix(in srgb, var(--shop) 18%, transparent);
  color: var(--shop);
}

.equipment-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.equipment-toggle {
  margin: 0;
}

.tax-form-block {
  margin: 0;
}

.tax-form-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tax-form-frame img {
  max-height: 220px;
}

.tax-form-pdf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.tax-form-pdf svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.money-strip {
  margin: 0 0 12px;
  color: var(--shop);
  font-size: 0.92rem;
  font-weight: 700;
}

.part-qty {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}

.part-qty small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.part-number {
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 700;
  text-align: center;
}

.quote-list-card {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.quote-list-card .card-body {
  color: inherit;
  text-decoration: none;
}

.quote-list-card .btn {
  width: 100%;
  white-space: nowrap;
}

.quote-letterhead {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.quote-letterhead p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.quote-co {
  color: var(--text) !important;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.quote-dates,
.quote-rates,
.quote-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quote-rates {
  grid-template-columns: 1fr 1fr;
}

.quote-rates .is-optional {
  grid-column: 1 / -1;
}

.quote-rental-card,
.quote-fulfill-card {
  margin: 2px 0 8px;
  padding: 16px 14px 14px;
  border: 2px solid color-mix(in srgb, var(--shop) 58%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--shop) 10%, var(--surface-2));
}

.quote-fulfill-card {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}

.quote-fulfill-card .form-heading:first-child {
  margin-top: 0;
}

.quote-fulfill-price {
  margin: 4px 0 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.quote-totals .is-fulfill {
  color: var(--text);
}

.quote-share-preview {
  display: block;
  width: 100%;
  max-height: 52vh;
  margin: 8px 0 12px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
}

.quote-rental-card .form-heading:first-child {
  margin-top: 0;
  color: var(--text);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.quote-rental-card .quote-dates,
.quote-rental-card .quote-rates {
  margin-top: 4px;
}

.quote-rental-live {
  margin-top: 14px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--shop) 22%, var(--surface));
}

.quote-rental-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quote-rental-total {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.quote-rental-sub {
  margin: 2px 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quote-math {
  font-weight: 700;
  color: var(--text);
}

.quote-line {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.quote-line-grid {
  display: grid;
  grid-template-columns: 72px 1fr 88px;
  gap: 8px;
  align-items: end;
}

.quote-line-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.quote-totals {
  display: grid;
  gap: 8px;
  padding: 12px 0 4px;
}

.quote-totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 600;
}

.quote-totals .is-total {
  color: var(--text);
  font-size: 1.05rem;
}

.quote-dock {
  position: sticky;
  bottom: 0;
  z-index: 12;
  margin-top: 16px;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 16px);
}

.quote-sticky-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-sticky-actions .btn {
  min-height: var(--tap);
}

.quote-form-simple {
  gap: 16px;
}

.quote-form-simple label {
  font-size: 0.95rem;
  font-weight: 800;
}

.quote-form-simple input,
.quote-form-simple select,
.quote-form-simple textarea {
  min-height: 52px;
  font-size: 1.05rem;
}

.quote-who {
  display: grid;
  gap: 10px;
}

.quote-who-grid {
  display: grid;
  gap: 8px;
}

.quote-who-btn {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  min-height: 64px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  cursor: pointer;
}

.quote-who-btn.is-on {
  border-color: color-mix(in srgb, var(--shop) 48%, var(--line));
  background: color-mix(in srgb, var(--shop) 14%, var(--surface));
}

.quote-who-btn strong {
  font-size: 1.05rem;
}

.quote-who-btn span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.quote-form-simple .quote-rental-card,
.quote-form-simple .quote-fulfill-card {
  margin: 0;
}

.quote-extra {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 4px 14px 10px;
}

.quote-extra + .quote-extra {
  margin-top: 4px;
}

.quote-extra summary {
  list-style: none;
  cursor: pointer;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1rem;
}

.quote-extra summary::-webkit-details-marker {
  display: none;
}

.quote-extra summary::after {
  content: "Show";
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.quote-extra[open] summary::after {
  content: "Hide";
}

.quote-extra[open] > :not(summary) {
  margin-top: 8px;
}

.quote-totals.is-compact {
  padding-top: 4px;
}

.quote-totals.is-compact .is-total strong {
  font-size: 1.25rem;
}

.quote-length {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}

.quote-length-chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
}

.quote-length-chip.is-on {
  border-color: var(--shop);
  background: color-mix(in srgb, var(--shop) 28%, var(--surface));
}

@media (min-width: 720px) {
  body {
    background:
      radial-gradient(1000px 500px at 50% -10%, #12344c 0%, transparent 60%),
      var(--bg);
  }

  .app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

.scan-in-search {
  margin-left: 4px;
}

.qr-quick {
  margin-bottom: 12px;
}

.qr-pick {
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  min-height: 48px;
}

.qr-pick[hidden] {
  display: none;
}

.qr-pick input {
  margin: 0;
  width: 20px;
  height: 20px;
}

.qr-pick .card-body {
  padding: 0;
}

.qr-pick .card-title {
  font-size: 0.98rem;
}

.qr-pick .card-sub {
  font-size: 0.78rem;
  word-break: break-all;
}

.qr-spot {
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.qr-spot summary {
  list-style: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.qr-spot summary::-webkit-details-marker {
  display: none;
}

.qr-spot summary::after {
  content: "Show";
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.qr-spot[open] summary::after {
  content: "Hide";
}

.qr-spot-body {
  padding: 0 14px 14px;
  display: grid;
  gap: 8px;
}

.qr-spot-preview {
  width: 140px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
}

.qr-spot-preview svg {
  display: block;
  width: 124px;
  height: 124px;
}

.qr-spot-url {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  word-break: break-all;
}

.qr-print {
  display: none;
}

.scan-sheet-panel {
  max-height: min(92dvh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

[data-scan-video] {
  width: 100%;
  max-height: min(42vh, 280px);
  object-fit: cover;
  pointer-events: none;
  touch-action: none;
  border-radius: 12px;
  background: #000;
  margin: 8px 0;
}

@media print {
  .app > .topbar,
  .app > .tabbar,
  .app > .page > :not(.qr-print) {
    display: none !important;
  }
  .qr-print {
    display: block;
  }
  .qr-label {
    width: 4in;
    height: 6in;
    page-break-after: always;
    border: 1px solid #111;
    padding: 0.28in;
    text-align: center;
    color: #111;
    background: #fff;
  }
  .qr-label-brand {
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 22px;
  }
  .qr-label-sub {
    font-size: 11px;
    margin: 4px 0 10px;
  }
  .qr-label-qr svg {
    width: 2.4in;
    height: 2.4in;
  }
  .qr-label-unit {
    font-size: 36px;
    font-weight: 800;
    margin: 8px 0;
  }
  .qr-label-cta,
  .qr-label-phone {
    font-size: 14px;
    margin: 4px 0;
  }
}
