:root {
  --ink: #0b1620;
  --ink-soft: #16283a;
  --line: #22384d;
  --paper: #f6f8fa;
  --surface: #ffffff;
  --text: #12222f;
  --muted: #4f6275;
  --accent: #76a03c;
  /* the brand green is too light to hold white text (3.07:1). This darker tone
     reaches 5.6:1 with white and 5.1:1 on the paper background. */
  --accent-strong: #52712a;
  --accent-soft: #8db353;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(11, 22, 32, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 0.75rem;
}

.wrap {
  width: min(1140px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.82rem;
}

/* header */
.site-header {
  background: var(--ink);
  color: #e8eef4;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  /* the name is the anchor of the header: it never truncates, the nav gives way */
  flex: 0 0 auto;
}

.brand span {
  overflow: visible;
  text-overflow: clip;
}

.brand span {
  color: var(--accent);
}

.site-header .wrap {
  width: min(1400px, calc(100% - 2rem));
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.3rem;
  font-size: 0.92rem;
  color: #dbe6ef;
  margin-left: auto;
  min-width: 0;
}

/* the links read as buttons: a real tap target, a visible edge on hover, and a
   focus ring that matches the rest of the site */
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(219, 230, 239, 0.16);
  border-radius: 999px;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(168, 209, 122, 0.16);
  border-color: rgba(168, 209, 122, 0.6);
  color: #ffffff;
  text-decoration: none;
}

.nav a:focus-visible {
  outline: 2px solid #a8d17a;
  outline-offset: 2px;
}

.nav a[aria-current="page"] {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
}

.nav a:hover {
  color: #fff;
}

.header-cta {
  flex-shrink: 0;
}

/* the order badge and the quote button sit together on the right */
.recent-order {
  margin-left: auto;
}



/* buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.05rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent-strong);
  color: #fff;
}

.btn-accent:hover {
  background: #456120;
}

.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: var(--line);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* hero */
.hero {
  background: linear-gradient(160deg, #0b1620 0%, #14283a 100%);
  color: #eef4f9;
  padding: 3.2rem 0 3.6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 0.6rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.9rem;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #33475b;
  max-width: 46ch;
}

/* on the dark hero the lede needs the pale tone; elsewhere it must stay dark */
.hero .lede {
  color: #c3d2df;
}

.lede.narrow {
  max-width: 60ch;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.ticks li::before {
  content: "→";
  color: var(--accent);
  margin-right: 0.5rem;
}

.hero-card {
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  font-size: 1.15rem;
}

/* forms */
.quote-form {
  display: grid;
  gap: 0.85rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.28rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.field span {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(118, 160, 60, 0.35);
  border-color: var(--accent);
}

/* custom select */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  font-weight: 600;
  cursor: pointer;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235b7186' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.field select:hover {
  border-color: #b9c7d4;
  background-color: #fbfdff;
}

.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.18);
}

.field select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.field select option {
  color: var(--text);
  background: #fff;
}

.form-note,
.form-error {
  font-size: 0.8rem;
  margin: 0;
}

.form-note {
  color: var(--muted);
}

.form-error {
  background: #fdecea;
  border: 1px solid #f5c2bd;
  color: #8f1d14;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}

/* bands and sections */
.band {
  background: var(--ink-soft);
  color: #dbe6ef;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.1rem 0;
  font-size: 0.9rem;
}

.trust-row strong {
  display: block;
  font-size: 1rem;
  color: #fff;
}

.trust-row span {
  color: #9fb2c2;
  font-size: 0.8rem;
}

.section {
  padding: 3rem 0;
}

.section-title {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin-bottom: 1.4rem;
}

.page-title {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin-bottom: 1rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  counter-reset: step;
}

.steps li {
  background: var(--surface);
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 1.1rem;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: rgba(118, 160, 60, 0.12);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.steps h3 {
  font-size: 1.02rem;
}

.steps p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 1.15rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.02rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* quote layout */
.quote-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.6rem;
  align-items: start;
}

.quote-side {
  position: sticky;
  top: 90px;
}

.price-card {
  background: var(--surface);
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.price {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0.2rem 0 0.4rem;
}

.breakdown {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.breakdown li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #e3eaf0;
  padding-bottom: 0.35rem;
}

.breakdown li span:first-child {
  color: var(--muted);
}

/* tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #edf2f6;
  vertical-align: top;
}

.table th {
  background: #f0f4f8;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

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

/* faq */
.faq {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.faq div {
  background: var(--surface);
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.faq dt {
  font-weight: 650;
  margin-bottom: 0.3rem;
}

.faq dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* prose */
.prose {
  max-width: 72ch;
}

.prose h2 {
  font-size: 1.15rem;
  margin-top: 1.6rem;
}

.prose p {
  color: var(--muted);
}

/* cta row */
.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* footer */
.site-footer {
  background: var(--ink);
  color: #b9c7d4;
  margin-top: 2rem;
  padding: 2.4rem 0;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.6rem;
}

.footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.footer-heading {
  color: #fff;
  font-weight: 650;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.site-footer a {
  display: block;
  margin-bottom: 0.35rem;
}

.site-footer a:hover {
  color: #fff;
}

@media (max-width: 900px) {

  .hero-grid,
  .quote-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .quote-side {
    position: static;
  }
}

.badge {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #eef2f6;
  color: var(--muted);
  vertical-align: middle;
}

/* "free" money and reassurances */
.is-free {
  color: #166534;
  font-weight: 700;
}

.badge-unpaid {
  background: #fdecea;
  color: #8f1d14;
}

.badge-partial {
  background: #fef3c7;
  color: #92400e;
}

.badge-free {
  background: #dcfce7;
  color: #166534;
}

.badge-quoted {
  background: #eef2ff;
  color: #3730a3;
}

.badge-confirmed {
  background: #e0f7f5;
  color: #0f766e;
}

.badge-contract_draft {
  background: #eef2f6;
  color: #33475b;
}

.badge-assigned {
  background: #f3e8ff;
  color: #6b21a8;
}

.badge-picked_up {
  background: #ffedd5;
  color: #9a3412;
}

.badge-delivered {
  background: #e0f2fe;
  color: #075985;
}

.badge-paid {
  background: #dcfce7;
  color: #166534;
}

.badge-cancelled {
  background: #fdecea;
  color: #8f1d14;
}

.two-up {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.form-section {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0.6rem 0 -0.2rem;
  border-top: 1px solid #edf2f6;
  padding-top: 0.7rem;
}

.form-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

/* shown right after a booking is submitted */
.call-banner {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1.4rem;
  padding: 1.1rem 1.3rem;
  border: 2px solid #16a34a;
  border-radius: var(--radius);
  background: #dcfce7;
  text-align: center;
}

.call-banner strong {
  color: #166534;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.call-banner span {
  color: #15803d;
  font-size: 0.95rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.timeline li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  background: #f4f7fa;
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline li.reached {
  flex-wrap: wrap;
  background: rgba(26, 127, 75, 0.1);
  color: #14663c;
}

.timeline li.reached strong {
  color: #14663c;
}

.timeline li.reached.is-cancelled {
  background: rgba(178, 48, 48, 0.1);
  color: #9a2b2b;
}

.timeline li.reached.is-cancelled strong {
  color: #9a2b2b;
}

/* indeterminate progress under the current stage */
.progress-bar {
  position: relative;
  flex: 1 0 100%;
  height: 6px;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: rgba(26, 127, 75, 0.18);
  overflow: hidden;
}

.progress-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1a7f4b, #35b573);
  animation: progress-sweep 1.8s ease-in-out infinite;
}

@keyframes progress-sweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(350%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar span {
    width: 100%;
    animation: none;
  }
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.chip {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #d7e0e8;
  font-size: 0.8rem;
  color: var(--muted);
  background: #fff;
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

.mt {
  margin-top: 1.4rem;
}

.invoice-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

@media print {

  .site-header,
  .site-footer,
  .no-print {
    display: none;
  }
}

.flash {
  background: #eef7ee;
  border: 1px solid #b9dfc0;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1.2rem;
}

.flash p {
  margin: 0.3rem 0 0;
}

.password {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: #fff;
  border: 1px dashed #9cc9a5;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
}

.inline-form {
  display: inline;
  margin: 0 0.25rem 0 0;
}

/* clickable order rows */
.rows-clickable tbody tr {
  position: relative;
  cursor: pointer;
}

.rows-clickable tbody tr:hover {
  background: #f6f9fc;
}

.row-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.row-link {
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
}

.row-link:hover,
.row-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

/* order detail */
.detail-table th {
  width: 190px;
  background: #f7fafc;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  vertical-align: top;
}

.detail-table td {
  vertical-align: top;
}

.tracking-card {
  margin-top: 1.2rem;
}

.copy-field {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--text);
  background: #fbfdff;
}

/* lead pipeline badges */
.badge-new {
  background: #fff4e5;
  color: #8a4b00;
}

.badge-contacted {
  background: #eef2f6;
  color: #33475b;
}

.badge-quote_sent {
  background: #eef2ff;
  color: #3730a3;
}

.badge-closed {
  background: #eef2f6;
  color: #475569;
}

/* detail modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
  padding: 1.2rem;
}

.modal:target {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 22, 32, 0.55);
}

.modal-card {
  position: relative;
  max-width: 760px;
  margin: 3vh auto;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.6rem;
  box-shadow: 0 24px 60px rgba(11, 22, 32, 0.35);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.modal-head h2 {
  margin: 0.1rem 0 0.2rem;
  font-size: 1.35rem;
}

.modal-close {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}

.modal-close:hover {
  background: #f1f5f9;
  color: var(--text);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.status-actions button.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 105px;
  max-width: 165px;
  width: auto;
  min-height: 46px;
  padding: 0.5rem 0.4rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.status-actions button.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 22, 32, 0.12);
  border-color: var(--chip-active);
}

.status-actions button.chip.active {
  background: var(--chip-active);
  border-color: var(--chip-active);
  color: #fff;
  box-shadow: 0 4px 14px rgba(11, 22, 32, 0.18);
}

/* cancelled is a branch, not a step: park it on the far right */
.status-actions button.chip-status-cancelled {
  margin-left: auto;
}

@media (max-width: 720px) {
  .status-actions button.chip {
    flex: 1 1 90px;
  }
}

/* lead photo */
.lead-photo {
  display: block;
  max-width: 100%;
  max-height: 420px;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  object-fit: contain;
  background: #f7fafc;
}

/* lead photo gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

.photo-grid a {
  display: block;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  overflow: hidden;
  background: #f7fafc;
}

.photo-grid .lead-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: none;
  border-radius: 0;
  margin: 0;
}

.photo-grid a:hover .lead-photo {
  opacity: 0.9;
}

.btn-inline {
  justify-self: start;
}

.condition-alert {
  color: #b42318;
  font-weight: 700;
}

/* quote summary */
.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 1.8rem;
  align-items: start;
}

.summary-main {
  min-width: 0;
}

.summary-side {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 0.9rem;
}

.summary-side-title {
  font-size: 1.15rem;
  margin: 0 0 0.1rem;
}

.summary-notice {
  background: #eef6ff;
  border: 1px solid #cfe3fb;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.2rem;
}

.summary-notice strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 0.2rem;
}

.summary-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.6rem;
  margin-bottom: 1.2rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.summary-meta span {
  display: grid;
  gap: 0.1rem;
}

.summary-meta strong {
  color: var(--text);
  font-size: 0.95rem;
}

.summary-price-card {
  background: var(--surface);
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
}

.summary-price-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.summary-price-head .eyebrow {
  margin: 0;
}

.summary-price {
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin: 0.35rem 0 0.35rem;
}

.summary-help {
  border-top: 1px solid #e3eaf0;
  padding-top: 1rem;
}

.summary-help p {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.summary-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid #e3eaf0;
}

.summary-trust div {
  display: grid;
  gap: 0.15rem;
}

.summary-trust strong {
  font-size: 0.9rem;
}

.summary-trust span {
  color: var(--muted);
  font-size: 0.8rem;
}

.summary-next {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid #e3eaf0;
}

.summary-card {
  background: var(--surface);
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.summary-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.summary-rows {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.summary-rows div {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.88rem;
}

.summary-rows dt {
  color: var(--muted);
}

/* inline editing from the customer's quote summary */
.summary-rows .summary-row-edit dd {
  min-width: 0;
}

.summary-edit-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.summary-view {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.5rem;
}

.summary-editor {
  display: none;
  margin-top: 0.5rem;
  text-align: left;
}

.summary-edit-toggle:checked ~ .summary-view {
  display: none;
}

.summary-edit-toggle:checked ~ .summary-editor {
  display: block;
}

/* deliberately large: people edit these when they cannot read small type */
.summary-editor input,
.summary-editor select {
  font-size: 1.15rem;
  padding: 0.7rem 0.75rem;
}

.summary-editor .field span {
  font-size: 0.78rem;
}

.summary-editor-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.summary-rows dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.summary-due {
  background: #f5f8fb;
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
}

.summary-due>div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-due strong {
  font-size: 1.8rem;
  color: var(--ink);
}

.summary-due p {
  margin: 0.3rem 0 0;
}

@media (max-width: 900px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-side {
    position: static;
  }
}

.summary-next .steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .summary-next .steps {
    grid-template-columns: 1fr;
  }
}

/* booking page */
.book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 1.6rem;
  align-items: start;
}

.book-form-card {
  background: var(--surface);
  border: 1px solid #e3eaf0;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.book-form-card .section-title {
  margin-bottom: 0.3rem;
}

.book-form-card>.muted {
  margin-bottom: 1.2rem;
}

.book-side {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 1rem;
}

@media (max-width: 900px) {
  .book-layout {
    grid-template-columns: 1fr;
  }

  .book-side {
    position: static;
  }
}

.form-section-date {
  font-weight: 700;
}

/* booking photo upload */
.photo-upload {
  margin-top: 0.2rem;
}

.photo-drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.15rem;
  padding: 1.4rem 1rem;
  border: 1.5px dashed #c7d4e0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff, #f5f9fc);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.photo-drop:hover,
.photo-drop:focus-within {
  border-color: var(--accent);
  background: #fff8f2;
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.12);
}

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

.photo-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(118, 160, 60, 0.3);
}

.photo-drop strong {
  font-size: 0.98rem;
}

.photo-sub {
  color: var(--muted);
  font-size: 0.8rem;
}

/* custom date picker */
.date-picker {
  position: relative;
}

.date-trigger {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #d8e2ec;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.date-trigger:hover {
  border-color: var(--accent);
}

.date-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.16);
}

.date-trigger.is-invalid,
.date-trigger.is-invalid:hover {
  border-color: #b23030;
  box-shadow: 0 0 0 3px rgba(178, 48, 48, 0.16);
}

.date-picker .field-error {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #b23030;
}

.date-value {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-icon {
  color: var(--accent);
  flex: 0 0 auto;
}

.date-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 300px;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(12, 35, 56, 0.18);
  padding: 0.85rem;
  display: none;
}

.date-picker.is-open .date-popover {
  display: block;
}

.date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.date-title {
  font-size: 0.95rem;
}

.date-nav {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: #f2f6fa;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.date-nav:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}

.date-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.date-weekdays span {
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.date-day {
  border: 0;
  background: transparent;
  border-radius: 8px;
  height: 2.1rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
}

.date-day:hover:not(:disabled) {
  background: #eef5e2;
  color: var(--accent);
}

.date-day.is-today {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.date-day.is-selected {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.date-day.is-past,
.date-day:disabled {
  color: #c2ccd6;
  cursor: not-allowed;
}

.date-day.is-empty {
  cursor: default;
}

.date-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px solid #edf2f6;
}

.date-foot button {
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}

.date-foot button:hover {
  background: #eef5e2;
}

.sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}

.sort-link:hover,
.sort-link.active {
  color: var(--accent);
}

/* chat widget */
.chat-widget {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 80;
  font-size: 0.9rem;
}

.chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(118, 160, 60, 0.35);
}

.chat-toggle:hover {
  background: #d95a12;
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.6rem);
  width: 320px;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(11, 22, 32, 0.25);
  padding: 1rem;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.chat-head strong {
  display: block;
  font-size: 1rem;
}

.chat-sub {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.chat-close {
  border: 0;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.chat-form {
  display: grid;
  gap: 0.55rem;
}

.chat-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.chat-form input,
.chat-form textarea {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.chat-form input:focus,
.chat-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.14);
}

.chat-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.chat-status {
  margin: 0;
  min-height: 1.1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 520px) {
  .chat-widget {
    right: 0.8rem;
    bottom: 0.8rem;
  }

  .chat-panel {
    width: calc(100vw - 1.6rem);
  }
}

/* full-width order status filter */
.filter-row-orders {
  display: grid;
  /* one row for however many statuses exist, instead of a fixed column count */
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 0.4rem;
  width: 100%;
}

.filter-row-orders .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.55rem 0.5rem;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.15;
}

@media (max-width: 900px) {
  .filter-row-orders {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .filter-row-orders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.35rem;
}

.edit-stack {
  display: grid;
  gap: 0.35rem;
}

/* per-row field editing in the order modal */
.row-edit-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.field-view {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.field-value {
  min-width: 0;
}

.field-edit-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.15rem 0.45rem;
  line-height: 1.2;
  font-size: 1rem;
  background: #fff;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.field-edit-btn:hover,
.field-edit-btn:focus-visible {
  background: var(--accent);
  color: #fff;
}

/* date urgency in dispatch views */
/* money rows on the Carrier assigned step */
/* wide order tables scroll instead of pushing the page sideways */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.invoice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.invoice-action {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e3eaf0;
  border-radius: 10px;
  background: #fff;
}

.invoice-action .invoice-amount {
  width: 100%;
}

/* The invoice amount is derived from the broker/carrier fee, never typed here. */
.invoice-action .invoice-amount input[readonly] {
  background: #f4f7fa;
  color: #46586a;
  border-style: dashed;
  cursor: default;
}

.invoice-action-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 520px) {
  .invoice-actions {
    grid-template-columns: 1fr;
  }
}

.invoice-cell {
  display: grid;
  gap: 0.2rem;
  justify-items: start;
  max-width: 160px;
}

.invoice-cell .invoice-to {
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  line-height: 1.25;
}

/* orders whose delivery ETA is today or overdue */
.rows-clickable tr.row-due td,
.rows-clickable tr.row-due td a {
  color: #8a0303;
}

.rows-clickable tr.row-due {
  background: #fdecea;
}

.price-mark {
  display: inline-block;
  background: #fef9c3;
  color: #7c2d12;
  padding: 0.05rem 0.4rem;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #fcd34d;
}

.due-red {
  color: #8a0303;
  font-weight: 700;
}

.due-orange {
  color: #ea580c;
  font-weight: 700;
}

.fee-input.is-missing {
  border-color: #8a0303;
  box-shadow: 0 0 0 2px rgba(138, 3, 3, 0.12);
}

.due-yellow {
  color: #ca8a04;
  font-weight: 700;
}

.field-edit-btn--alert {
  color: #b23030;
  border-color: #b23030;
}

.field-edit-btn--alert:hover,
.field-edit-btn--alert:focus-visible {
  background: #b23030;
  color: #fff;
}

.field-editor {
  display: none;
  margin-top: 0.35rem;
}

.row-edit-toggle:checked~.field-view {
  display: none;
}

.row-edit-toggle:checked~.field-editor {
  display: block;
}

.field-editor input,
.field-editor select,
.field-editor textarea {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 1px solid #d8e2ec;
  border-radius: 7px;
  font: inherit;
  font-size: 0.85rem;
  background: #fff;
}

.field-editor textarea {
  resize: vertical;
}

.field-editor .field span {
  font-size: 0.68rem;
}

.field-editor-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.45rem;
}

/* payment method select */
select.payment-select {
  padding-left: 2.2rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  background-color: #fff;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235b7186' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b7186' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E");
  background-position: right 0.65rem center, left 0.65rem center;
  background-size: 12px 8px, 16px 16px;
  background-repeat: no-repeat, no-repeat;
}

select.payment-select:hover {
  border-color: #b9c7d4;
  background-color: #fbfdff;
}

select.payment-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.18);
}

/* keep the footer at the bottom of the page */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.site-footer {
  margin-top: auto;
}

/* status-colored order filters with counts */
.filter-row-orders .chip {
  justify-content: space-between;
  gap: 0.45rem;
  border-color: transparent;
}

.chip-status-all {
  --chip-bg: #eef2f6;
  --chip-fg: #33475b;
  --chip-active: #0b2230;
}

.chip-status-quoted {
  --chip-bg: #eef2ff;
  --chip-fg: #3730a3;
  --chip-active: #3730a3;
}

.chip-status-confirmed {
  --chip-bg: #e0f7f5;
  --chip-fg: #0f766e;
  --chip-active: #0f766e;
}

.chip-status-contract_draft {
  --chip-bg: #eef2f6;
  --chip-fg: #33475b;
  --chip-active: #33475b;
}

.chip-status-assigned {
  --chip-bg: #f3e8ff;
  --chip-fg: #6b21a8;
  --chip-active: #6b21a8;
}

.chip-status-picked_up {
  --chip-bg: #ffedd5;
  --chip-fg: #9a3412;
  --chip-active: #9a3412;
}

.chip-status-delivered {
  --chip-bg: #e0f2fe;
  --chip-fg: #075985;
  --chip-active: #075985;
}

.chip-status-paid {
  --chip-bg: #dcfce7;
  --chip-fg: #166534;
  --chip-active: #166534;
}

.chip-status-cancelled {
  --chip-bg: #fdecea;
  --chip-fg: #8f1d14;
  --chip-active: #8f1d14;
}

.filter-row-orders .chip {
  background: var(--chip-bg);
  color: var(--chip-fg);
}

.filter-row-orders .chip.active {
  background: var(--chip-active);
  color: #fff;
}

.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.filter-row-orders .chip.active .chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* optional timestamp fields in the order editor */
.edit-set {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.edit-set input {
  width: auto;
}

/* custom transport/condition dropdowns */
.pretty-select {
  position: relative;
  width: 100%;
}

.pretty-select-native {
  display: none;
}

.pretty-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid #d7e0e8;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pretty-select-trigger:hover {
  border-color: #b9c7d4;
  background: #fbfdff;
}

.pretty-select-trigger:focus-visible,
.pretty-select.is-open .pretty-select-trigger {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.18);
}

.pretty-select-value {
  min-width: 0;
  line-height: 1.25;
}

.pretty-select-chevron {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #5b7186;
  transition: transform 0.15s ease;
}

.pretty-select.is-open .pretty-select-chevron {
  transform: rotate(180deg);
}

.pretty-select-list {
  position: absolute;
  z-index: 70;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(12, 35, 56, 0.18);
  max-height: 240px;
  overflow-y: auto;
}

.pretty-select-option {
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  outline: none;
  line-height: 1.3;
}

.pretty-select-option:hover,
.pretty-select-option:focus {
  background: #eef5e2;
  color: var(--accent);
}

.pretty-select-option.is-selected {
  background: #eef5e2;
  color: var(--accent);
  font-weight: 700;
}

.pretty-select-option.is-selected::after {
  content: "✓";
  float: right;
  margin-left: 0.5rem;
}

.pretty-select-list {
  right: auto;
  min-width: 100%;
  width: max-content;
  max-width: min(320px, calc(100vw - 2rem));
}

.date-picker.align-right .date-popover {
  left: auto;
  right: 0;
}

.date-popover {
  width: var(--date-popover-width, 300px);
  /* 100% is the field width: the calendar can never stick out of the page. */
  max-width: min(100%, calc(100vw - 2rem));
  box-sizing: border-box;
}

.date-picker.align-top .date-popover {
  top: auto;
  bottom: calc(100% + 6px);
}

/* keep long date labels inside the hero form */
.field {
  min-width: 0;
}

.date-picker {
  min-width: 0;
}

.date-trigger {
  gap: 0.4rem;
  padding: 0.62rem 0.65rem;
  font-size: 0.85rem;
}

.date-value {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.date-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* keep the custom dropdown inside the field on mobile */
@media (max-width: 640px) {
  .pretty-select-list {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .pretty-select-option {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* uploaded photo thumbnails */
.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.photo-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e3eaf0;
  background: #f2f6fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-fallback {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.photo-count {
  margin: 0.45rem 0 0;
}

.photo-error {
  margin: 0.45rem 0 0;
}

.photo-thumb {
  position: relative;
}

.photo-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 22, 32, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.photo-remove:hover {
  background: #8f1d14;
}

.photo-warning {
  margin: 0.45rem 0 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid #f0d39a;
  border-radius: 8px;
  background: #fff8e8;
  color: #8a5a00;
  font-size: 0.8rem;
}

/* staff performance */
.staff-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0;
}

.staff-stat {
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.staff-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--text);
}

.staff-stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.chart-card {
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
}

.chart-card h3 {
  margin: 0 0 0.6rem;
}

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

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

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

.filter-row-orders .chip {
  justify-content: center;
  font-weight: 700;
  text-align: center;
}

.chart-card {
  position: relative;
}

.chart-tooltip {
  position: absolute;
  z-index: 90;
  max-width: 280px;
  padding: 0.6rem 0.7rem;
  background: #0b2230;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(11, 22, 32, 0.3);
  font-size: 0.75rem;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.12s ease;
}

.chart-tooltip.is-visible {
  opacity: 1;
}

.chart-tooltip strong {
  display: block;
  font-size: 0.82rem;
}

.chart-tooltip .muted {
  color: #b9c7d4;
}

.chart-tooltip dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.6rem;
  margin: 0.35rem 0 0;
}

.chart-tooltip dt {
  color: #b9c7d4;
  font-weight: 400;
}

.chart-tooltip dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

/* quote wizard */
.quote-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.quote-step-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--muted);
  cursor: default;
}

.quote-step-indicator.completed {
  cursor: pointer;
}

.quote-step-num {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2f6;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.quote-step-indicator.active .quote-step-num {
  background: var(--accent-strong);
  color: #fff;
}

.quote-step-indicator.completed .quote-step-num {
  background: var(--ink);
  color: #fff;
  font-size: 0;
}

.quote-step-indicator.completed .quote-step-num::before {
  content: "✓";
  font-size: 0.8rem;
}

.quote-step-label {
  font-size: 0.76rem;
  font-weight: 600;
}

.quote-step-indicator.active .quote-step-label {
  color: var(--text);
}

.quote-step-dots {
  flex: 1;
  border-top: 1px dashed #d7e0e8;
}

.quote-step {
  display: grid;
  gap: 0.85rem;
}

.quote-step[hidden] {
  display: none;
}

.step-actions {
  display: flex;
  gap: 0.6rem;
}

.step-actions .btn {
  flex: 1;
}

@media (min-width: 640px) {
  .quote-step[data-step="3"] .field-row .field>span {
    display: block;
    min-height: 2.3em;
  }
}

.field select.vehicle-select {
  appearance: auto;
  -webkit-appearance: auto;
  background-image: none;
  padding-right: 0.65rem;
}

/* small info badge with a hover/focus description */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.3rem;
  border-radius: 50%;
  background: #e3eaf0;
  color: #33475b;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}

.info-tip-body {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: #0b1620;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  z-index: 30;
}

.info-tip:hover .info-tip-body,
.info-tip:focus .info-tip-body {
  opacity: 1;
  visibility: visible;
}

/* visible choice cards (transport, vehicle condition) instead of dropdowns */
.choice-picker {
  display: grid;
  gap: 0.45rem;
}

.choice-picker--row {
  grid-template-columns: 1fr 1fr;
}

.choice-picker--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

/* narrower cards so the three conditions fit on one line */
.choice-picker--three .choice-card {
  padding: 0.5rem 0.55rem;
}

.choice-picker--three .choice-card strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.choice-picker--three .choice-note {
  font-size: 0.7rem;
  line-height: 1.25;
}

@media (max-width: 640px) {
  .choice-picker--row,
  .choice-picker--three {
    grid-template-columns: 1fr;
  }
}

.choice-option {
  position: relative;
  display: grid;
}

.choice-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice-card {
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.choice-card strong {
  font-size: 0.9rem;
  color: #0b1620;
}

.choice-note {
  font-size: 0.78rem;
  color: var(--muted);
}

.choice-option:hover .choice-card {
  border-color: var(--accent);
}

.choice-option input:checked + .choice-card {
  border-color: var(--accent);
  background: #eef5e2;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice-option input:focus-visible + .choice-card {
  outline: 2px solid rgba(118, 160, 60, 0.35);
  outline-offset: 1px;
}

/* vehicle year dropdown */
.year-dropdown {
  position: relative;
}

.year-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #d8e2ec;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: #0b1620;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* the shared chevron carries `margin: 0 auto` for the combobox; here it must sit flush right */
.year-trigger .vehicle-combobox-chevron {
  margin: 0;
  flex: none;
}

.year-trigger:hover {
  border-color: var(--accent);
}

.year-dropdown.is-open .year-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.18);
}

.year-list {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  background: #fff;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(11, 22, 32, 0.14);
}

.year-list[hidden] {
  display: none;
}

.year-option {
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #0b1620;
  cursor: pointer;
}

.year-option:hover,
.year-option:focus {
  background: #f3f6f9;
}

.year-option.is-selected {
  background: #eef5e2;
  font-weight: 700;
}

.vehicle-combobox {
  position: relative;
}

.vehicle-combobox-input {
  width: 100%;
  padding: 0.55rem 2.2rem 0.55rem 0.65rem;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  font: inherit;
  color: #0b1620;
  background: #fff;
}

.vehicle-combobox-input::placeholder {
  color: #6b7c8c;
  opacity: 1;
}

.vehicle-combobox-input:focus {
  outline: 2px solid rgba(118, 160, 60, 0.35);
  border-color: var(--accent);
}

.vehicle-combobox-input:disabled {
  background: #f6f8fa;
  color: var(--muted);
}

.vehicle-combobox-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  background: none;
  cursor: pointer;
}

.vehicle-combobox-toggle:disabled {
  cursor: default;
  opacity: 0.4;
}

.vehicle-combobox-chevron {
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #6b7c8c;
}

.vehicle-combobox-list {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 0.25rem;
  list-style: none;
  background: #fff;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(11, 22, 32, 0.14);
}

.vehicle-combobox-list[hidden] {
  display: none;
}

.vehicle-combobox-option {
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #0b1620;
  cursor: pointer;
}

.vehicle-combobox-option:hover,
.vehicle-combobox-option.is-active {
  background: #f3f6f9;
}

.vehicle-combobox-option.is-selected {
  background: #eef5e2;
  color: #0b1620;
  font-weight: 700;
}

.vehicle-combobox-option.is-custom {
  color: #0b1620;
  font-weight: 700;
}

.vehicle-combobox-empty {
  padding: 0.5rem 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* status change confirmation + in-card loader */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 60;
}

.confirm-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  transition: max-width 0.18s ease;
}

.confirm-card.is-loading {
  max-width: 560px;
  background: #080c16;
  padding: 0.9rem 0.9rem 0.5rem;
}

.confirm-rows {
  display: grid;
  gap: 0.4rem;
  margin: 0.6rem 0 1rem;
}

.confirm-rows div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.confirm-rows dt {
  color: var(--muted);
}

.confirm-rows dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.confirm-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.confirm-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.confirm-actions .btn {
  flex: 1;
  text-align: center;
}

.confirm-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.confirm-loading iframe {
  width: 100%;
  height: 300px;
  border: 0;
  background: transparent;
}

.load-caption {
  color: #c7d5e3;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.confirm-backdrop[hidden],
.confirm-loading[hidden] {
  display: none;
}

/* additional vehicles in the instant quote */
.extra-vehicle {
  margin: 0.8rem 0;
  padding: 0.8rem 0.9rem;
  border: 1px dashed #d7e0e8;
  border-radius: 10px;
  background: #fbfdff;
}

.extra-vehicle legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.extra-vehicle .field-row {
  margin-bottom: 0.5rem;
}

.extra-vehicles:empty {
  display: none;
}

/* folded first vehicle once a second one is added */
.vehicle-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0.4rem 0 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  background: #fbfdff;
  font-size: 0.9rem;
  font-weight: 600;
}

.vehicle-summary[hidden] {
  display: none;
}

/* extra-vehicle condition reads like the pretty-select dropdowns */
.extra-vehicle select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.72rem 2rem 0.72rem 0.8rem;
  border: 1px solid #d8e2ec;
  border-radius: 10px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235b7186' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 12px 8px;
  font: inherit;
  color: #0b1620;
  cursor: pointer;
}

.extra-vehicle select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.18);
}

/* vehicle list on the quote summary */
.unit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.unit-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e3eaf0;
  border-radius: 10px;
  background: #fbfdff;
}

.unit-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.unit-label {
  display: grid;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.unit-label strong {
  font-size: 0.9rem;
}

.unit-price {
  font-weight: 700;
  white-space: nowrap;
}

/* remove a vehicle from the quote summary */
.unit-remove {
  display: inline-flex;
  margin: 0;
}

.unit-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid #e3c8c4;
  border-radius: 50%;
  background: #fff;
  color: #8f1d14;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.unit-remove-btn:hover {
  background: #fdecea;
  border-color: #d98b82;
}

/* contract preview modal */
.modal-card-wide {
  max-width: 980px;
}

.contract-frame {
  width: 100%;
  height: 68vh;
  border: 1px solid #e3eaf0;
  border-radius: 10px;
  background: #fff;
}

/* invoice cards: send form plus mark-paid action */
.invoice-card {
  display: grid;
  gap: 0.4rem;
}

.invoice-card .invoice-action {
  height: 100%;
}

.invoice-paid {
  margin: 0;
}

.badge-sent {
  background: #e0f2fe;
  color: #075985;
}

/* money collected across the two invoices */
.invoice-total {
  margin: 0.6rem 0 0;
  font-size: 0.88rem;
  color: #33475b;
}

.invoice-total strong {
  color: #166534;
}

/* compact order table: merged route/distance and invoice columns */
.rows-clickable th,
.rows-clickable td {
  padding: 0.55rem 0.6rem;
}

.rows-clickable th {
  font-size: 0.72rem;
}

.rows-clickable {
  font-size: 0.86rem;
}

.th-sub {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.th-sep {
  color: #b6c4d2;
  font-weight: 400;
}

.invoice-pair {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.2rem 0.4rem;
}

.invoice-pair-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.invoice-pair .badge {
  justify-self: start;
}

/* one block per vehicle in an order */
.unit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.6rem;
}

.unit-card {
  padding: 0.65rem 0.8rem;
  border: 1px solid #e3eaf0;
  border-radius: 10px;
  background: #fbfdff;
}

.unit-card-head {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b7186;
}

.unit-card-rows {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.unit-card-rows div {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.unit-card-rows dt {
  color: var(--muted);
}

.unit-card-rows dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

/* vehicle cards: edit / delete tools and the add card */
.unit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.unit-card-top .unit-card-head {
  margin: 0;
}

.unit-card-tools {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.unit-card-tools form {
  margin: 0;
}

.unit-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #fff;
  color: #33475b;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.unit-tool:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.unit-tool-danger {
  color: #8f1d14;
  border-color: #e3c8c4;
}

.unit-tool-danger:hover {
  background: #fdecea;
  border-color: #d98b82;
  color: #8f1d14;
}

.unit-card-add {
  border-style: dashed;
  background: #fbfdff;
}

.unit-card-add form {
  display: grid;
  gap: 0.4rem;
}

.unit-card .field-editor {
  margin-top: 0.4rem;
}

/* search across the orders table */
.orders-search {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  flex-wrap: wrap;
}

.orders-search-input {
  flex: 1;
  min-width: 220px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d8e2ec;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  color: #0b1620;
  background: #fff;
}

.orders-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.18);
}

/* folded history in the order modal */
.history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px dashed #d7e0e8;
  border-radius: 10px;
  background: #fbfdff;
  color: #33475b;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.history-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.history-sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
}

.history-body {
  margin-top: 0.6rem;
}

/* taller, stateful "Save and move" button */
.btn-tall {
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
  font-size: 0.95rem;
}

.btn-danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.btn-danger:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}

/* signed contract uploads */
.contract-box {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.contract-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.contract-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #e3eaf0;
  border-radius: 8px;
  background: #fbfdff;
}

.contract-name {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.85rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* on a phone the file name takes its own line instead of one letter per row */
@media (max-width: 560px) {
  .contract-row {
    align-items: flex-start;
  }

  .contract-name,
  .contract-row > .muted.small {
    flex: 1 1 100%;
  }
}

.contract-row form {
  margin: 0;
}

.contract-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.5rem;
}

.contract-file {
  flex: 1;
  min-width: 220px;
}

.contract-file input {
  padding: 0.45rem;
  font-size: 0.82rem;
}

/* compact signed-contract drop zone */
.contract-drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.2rem;
  width: 100%;
  padding: 1.5rem 1rem;
  border: 1.5px dashed #c7d4e0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff, #f5f9fc);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.contract-drop.is-dragging {
  border-color: var(--accent);
  background: #f2f8ea;
  box-shadow: 0 0 0 4px rgba(118, 160, 60, 0.18);
}

.contract-drop:hover,
.contract-drop:focus-within {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(118, 160, 60, 0.12);
}

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

.contract-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #e8f0dd;
  color: #4d6b21;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.contract-drop-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #33475b;
}

.contract-drop-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.contract-upload {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}

.contract-upload .btn {
  justify-self: start;
}

/* arrows between the pipeline status chips */
.status-arrow {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  flex: 0 0 auto;
  color: #9fb0c0;
  font-size: 0.95rem;
  line-height: 1;
  user-select: none;
}

/* a required field that is still empty: louder label, back to normal once filled */
.detail-table tr.row-required th {
  font-weight: 700;
  font-size: calc(0.82rem + 2px);
  color: #8a0303;
}

/* required rows shake when someone tries to advance without them */
@keyframes row-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-5px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  90% { transform: translateX(2px); }
}

.detail-table tr.is-shaking th,
.detail-table tr.is-shaking td {
  animation: row-shake 0.55s ease-in-out;
  background: #fff1ef;
}

.detail-table tr.is-shaking th {
  color: #8a0303;
}

.inbox-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid #d7e0e8;
  background: #fff;
  color: #33475b;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(11, 22, 32, 0.12);
}

.inbox-bell:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.inbox-bell.has-alerts {
  border-color: #b91c1c;
  color: #b91c1c;
  animation: bell-pulse 1.4s ease-in-out infinite;
}

@keyframes bell-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(11, 22, 32, 0.12); }
  50% { box-shadow: 0 0 0 6px rgba(185, 28, 28, 0.16); }
}

.inbox-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}

.inbox-panel {
  position: absolute;
  top: 2.9rem;
  right: 0;
  width: 320px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e3eaf0;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(11, 22, 32, 0.18);
}

.inbox-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid #edf2f6;
  font-size: 0.82rem;
}

.inbox-clear {
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.inbox-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.inbox-list li + li {
  border-top: 1px solid #edf2f6;
}

.inbox-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.6rem;
  padding: 0.6rem 0.8rem;
  color: #10161c;
  text-decoration: none;
}

.inbox-list a:hover {
  background: #f7fafc;
}

.inbox-list span {
  grid-column: 1;
  font-size: 0.76rem;
  color: var(--muted);
}

.inbox-list em {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-style: normal;
  font-weight: 700;
  font-size: 0.82rem;
}

.inbox-empty {
  padding: 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* the "Mark all seen" button answers instead of acting */
.inbox-note {
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid #edf2f6;
  background: #fff5f5;
  color: #b91c1c;
  font-size: 0.8rem;
  font-weight: 700;
}

/* sound state hint in the inbox panel */
.inbox-sound {
  width: 100%;
  border: none;
  border-bottom: 1px solid #edf2f6;
  background: #fffbeb;
  color: #92400e;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  text-align: left;
  cursor: pointer;
}

.inbox-sound:hover {
  background: #fef3c7;
}

/* client-side step validation: shake + red message */
.field.is-shaking,
.choice-picker.is-shaking,
.date-picker.is-shaking {
  animation: row-shake 0.55s ease-in-out;
}

.step-alert {
  margin: 0.6rem 0 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e3c8c4;
  border-radius: 8px;
  background: #fdecea;
  color: #b91c1c;
  font-size: 0.84rem;
  font-weight: 700;
}

/* pagination under the orders table */
.list-more {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  margin-top: 0.9rem;
}

.list-more p {
  margin: 0;
}

/* folded, already-answered details on the booking form */
.book-sum-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.7rem;
  border: 1px solid #e3eaf0;
  border-radius: 10px;
  background: #f7fafc;
}

.book-sum-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #33475b;
  overflow-wrap: anywhere;
}

.book-sum-view .btn {
  flex: none;
}

/* the president's card on the contact page */
.contact-person {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.4rem;
  align-items: center;
  margin: 1.4rem 0 2rem;
  padding: 1.1rem;
  border: 1px solid #e3eaf0;
  border-radius: 14px;
  background: #fff;
}

.contact-person-photo {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 10px;
  display: block;
}

.contact-person-copy h2 {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.5rem;
}

.contact-person-copy p {
  margin: 0 0 0.5rem;
}

.contact-person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

@media (max-width: 720px) {
  .contact-person {
    grid-template-columns: 1fr;
  }

  .contact-person-photo {
    height: 260px;
  }
}

/* photo galleries */
.photo-gallery {
  display: grid;
  gap: 0.9rem;
  margin: 1.8rem 0;
}

.photo-gallery--3 {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-item {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f6;
  box-shadow: 0 10px 30px rgba(11, 22, 32, 0.08);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
  color: #33475b;
  background: #fff;
}

.photo-gallery--3 .gallery-item img {
  height: 220px;
}

@media (max-width: 860px) {
  .photo-gallery,
  .photo-gallery--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .photo-gallery,
  .photo-gallery--3 {
    grid-template-columns: 1fr;
  }
}

/* click-to-enlarge gallery */
.gallery-item {
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(11, 22, 32, 0.18);
  outline: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(8, 14, 20, 0.92);
  backdrop-filter: blur(3px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-body {
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 90vh;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #dfe8f0;
  font-size: 0.85rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* alert sound picker in the inbox panel */
.inbox-test {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: none;
  border-bottom: 1px solid #edf2f6;
  background: #f7fafc;
  color: #33475b;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.inbox-test:hover {
  background: #eef4f8;
  color: var(--accent);
}

/* delivery reminder toast: amber, not red — it is a warning, not a lead */


/* live countdown next to the ETAs */
.eta-countdown {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #eef4f8;
  color: #33475b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eta-countdown.is-soon {
  background: #fef3c7;
  color: #92400e;
}

.eta-countdown.is-overdue {
  background: #fdecea;
  color: #b91c1c;
}

/* read notifications stay on screen, just dimmed */


/* explicit picker for mobile, where the label trick is unreliable */
.contract-pick {
  justify-self: start;
  margin-top: -0.3rem;
}

/* social and review links */
.social-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0;
  padding: 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d7e0e8;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(11, 22, 32, 0.18);
}

.social-links img {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
}

/* unread notifications: red dot + bold, read ones stay in the list */
.inbox-list a {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  grid-template-areas:
    "dot title amount"
    "dot sub amount";
  gap: 0.1rem 0.45rem;
  align-items: start;
}

.inbox-list a strong {
  grid-area: title;
}

.inbox-list a span:not(.inbox-dot) {
  grid-area: sub;
}

.inbox-list a em {
  grid-area: amount;
  align-self: center;
}

.inbox-dot {
  grid-area: dot;
  width: 7px;
  height: 7px;
  margin-top: 0.42rem;
  border-radius: 50%;
  background: transparent;
}

.inbox-list a.is-unread .inbox-dot {
  background: #b91c1c;
}

.inbox-list a.is-unread strong {
  font-weight: 800;
  color: #10161c;
}

.inbox-list a:not(.is-unread) strong {
  font-weight: 600;
  color: #33475b;
}

.inbox-list a:not(.is-unread) {
  opacity: 0.72;
}

/* conversion by source: readable rows instead of a wide table */
.source-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid #eef2f6;
}

.source-row:last-of-type {
  border-bottom: none;
}

.source-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.source-head strong {
  font-size: 0.95rem;
}

.source-tag {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #eef4f8;
  color: #4a6274;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.source-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.source-bar-booked,
.source-bar-paid {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
}

.source-bar-booked {
  background: #33475b;
  opacity: 0.35;
}

.source-bar-paid {
  background: #76a03c;
}

.source-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.source-stats div {
  display: grid;
  gap: 0.05rem;
}

.source-stats strong {
  font-size: 0.9rem;
  color: #10161c;
}

.source-stats span {
  font-size: 0.66rem;
  color: #6b7f90;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.source-total {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 2px solid #eef2f6;
  font-size: 0.78rem;
  color: #4a6274;
}

@media (max-width: 720px) {
  .source-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem 0.5rem;
  }
}

/* spend form under the channel rows */
.spend-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid #eef2f6;
}

.spend-form .field {
  flex: 1 1 10rem;
  margin: 0;
}

.source-tag.is-up {
  background: #eaf4dc;
  color: #4d7020;
}

.source-tag.is-down {
  background: #fdecea;
  color: #b91c1c;
}

/* schedule: one row per order, bar runs pickup → delivery across three weeks */
.cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.cal-nav {
  display: flex;
  gap: 0.4rem;
}

.gantt-scroll {
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.gantt {
  min-width: 820px;
  display: grid;
  gap: 0.2rem;
}

.gantt-head,
.gantt-row {
  display: grid;
  grid-template-columns: 11rem repeat(var(--gantt-days, 21), minmax(2.1rem, 1fr));
  gap: 0.15rem;
  align-items: center;
}

.gantt-corner {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7b8fa1;
  padding-left: 0.2rem;
}

.gantt-day {
  display: grid;
  gap: 0.02rem;
  justify-items: center;
  padding: 0.15rem 0;
  border-left: 1px solid #eef2f6;
  font-size: 0.62rem;
  color: #7b8fa1;
}

.gantt-day strong {
  font-size: 0.72rem;
  color: #33475b;
}

.gantt-day.is-week {
  border-left: 2px solid #d7e0e8;
}

.gantt-day.is-today {
  background: #f4f9ec;
  border-radius: 6px;
}

.gantt-day.is-today strong {
  color: #4d7020;
}

.gantt-row {
  padding: 0.15rem 0;
}

.gantt-label {
  display: grid;
  gap: 0.02rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  text-decoration: none;
  color: #26333f;
  background: #f7fafc;
}

.gantt-label strong {
  font-size: 0.74rem;
}

.gantt-label span {
  font-size: 0.68rem;
  color: #6b7f90;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-track {
  position: relative;
  height: 1.6rem;
  display: flex;
  align-items: center;
}

.gantt-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  height: 1.25rem;
  padding: 0 0.45rem;
  border-radius: 6px;
  background: #dfe7ee;
  color: #10161c;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.gantt-bar:hover {
  filter: brightness(0.96);
}

.gantt-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-cap {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10161c;
  flex: none;
}

.gantt-cap.end {
  margin-left: auto;
}

/* status colours */
.gantt-quoted { background: #e3e9ef; }

.gantt-confirmed { background: #d6e6f7; }

.gantt-contract_draft { background: #e2dbf5; }

.gantt-assigned { background: #fbe6c8; }

.gantt-picked_up { background: #cdeae4; }

.gantt-delivered { background: #dcecc4; }

.gantt-paid { background: #c7e3c3; }

/* settled order: deeper green than Payments, so the two read apart */
.chip-status-paid_in_full {
  --chip-bg: #c7e3c3;
  --chip-fg: #1f5d22;
  --chip-active: #1f5d22;
}

.badge-paid_in_full,
.status-paid_in_full {
  background: #2f7d32;
  color: #fff;
}

.gantt-paid_in_full { background: #b7dcb3; }

/* preview + send sit side by side under each invoice */
.invoice-send-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.35rem;
}

/* gantt: grid lines and hover highlighting */
.gantt {
  position: relative;
}

.gantt-row {
  position: relative;
  border-bottom: 1px solid #eef2f6;
  border-radius: 4px;
}

.gantt-row:hover {
  background: #f4f9ec;
}

.gantt-cell {
  height: 1.9rem;
  border-left: 1px solid #f0f4f8;
  pointer-events: auto;
}

.gantt-cell.is-week {
  border-left: 1px solid #dde5ec;
}

.gantt-cell.is-today {
  background: rgba(118, 160, 60, 0.06);
}

.gantt-day {
  border-left: 1px solid #f0f4f8;
}

.gantt-track {
  z-index: 2;
}

.gantt-cursor {
  position: absolute;
  z-index: 1;
  background: rgba(118, 160, 60, 0.10);
  border-left: 1px solid rgba(118, 160, 60, 0.35);
  border-right: 1px solid rgba(118, 160, 60, 0.35);
  pointer-events: none;
  border-radius: 3px;
}

.invoice-hint {
  display: block;
  margin-top: 0.3rem;
}

@media (max-width: 620px) {
  .header-inner {
    gap: 0.6rem;
  }

  .brand {
    font-size: 1rem;
  }

  .header-cta {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }
}

/* chat: the apps people already use, above the message form */
.chat-actions {
  display: grid;
  gap: 0.45rem;
  margin: 0.2rem 0 0.7rem;
}

.chat-action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e3eaf0;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chat-action:hover {
  border-color: var(--accent);
  background: #f7fbf2;
}

.chat-whatsapp svg {
  color: #25d366;
}

.chat-telegram svg {
  color: #2aabee;
}

.chat-call svg {
  color: var(--accent);
}

.chat-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #7b8fa1;
}

.zip-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.zip-note.is-ok {
  color: #4d7020;
}

.zip-note.is-bad {
  color: #b23030;
}

input.is-invalid {
  border-color: #b23030;
}

.breakdown-sum {
  border-top: 1px solid #e3eaf0;
  padding-top: 0.35rem;
  margin-top: 0.15rem;
  font-weight: 700;
}

/* the order this device already booked, offered back in the header */
.recent-order {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  background: #76a03c;
  border: 1px solid #5e8a2b;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(12, 35, 56, 0.18);
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.recent-order:hover,
.recent-order:focus-visible {
  background: #648c30;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(12, 35, 56, 0.26);
  color: #fff;
}

.recent-order-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  flex: none;
}

.recent-order-text {
  display: grid;
  line-height: 1.15;
}

.recent-order-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.9;
}

.recent-order strong {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.recent-order-cta {
  font-size: 0.78rem;
  font-weight: 700;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  opacity: 0.95;
}

@media (max-width: 720px) {
  .recent-order-cta {
    display: none;
  }

  .recent-order {
    padding: 0.45rem 0.65rem;
    gap: 0.45rem;
  }

  .recent-order-icon {
    width: 26px;
    height: 26px;
  }

  .recent-order strong {
    font-size: 0.9rem;
  }
}

@media (max-width: 520px) {
  .recent-order-label {
    display: none;
  }
}

/* every order saved on this device */
.my-orders {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.my-order {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e3eaf0;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.my-order:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(12, 35, 56, 0.10);
}

.my-order-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.my-order-head strong {
  font-size: 1.05rem;
}

.my-order p {
  margin: 0;
}

.my-order-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: #10161c;
}

.my-order-cta {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

/* destructive action, only offered on cancelled orders */
.card-danger {
  border-color: #f0c9c9;
  background: #fffafa;
}

.card-danger h3 {
  color: #b23030;
}

.btn-danger {
  background: #b23030;
  color: #fff;
  border: 1px solid #9d2828;
}

.btn-danger:hover {
  background: #9d2828;
  color: #fff;
}

.row-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  /* the row-wide link overlay must not swallow clicks on this cell */
  position: relative;
  z-index: 2;
}

/* anything interactive inside a clickable row stays above the overlay */
.rows-clickable tbody td form,
.rows-clickable tbody td button,
.rows-clickable tbody td input,
.rows-clickable tbody td select {
  position: relative;
  z-index: 2;
}

.row-actions form {
  margin: 0;
}

.bulk-cancel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  margin: 0.6rem 0 0.9rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #f0c9c9;
  border-radius: 10px;
  background: #fffafa;
}

/* the toggle itself */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.4rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid #d7e0e8;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(12, 35, 56, 0.10);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 640px) {
  .theme-toggle {
    width: 2.4rem;
    padding: 0;
    justify-content: center;
  }

  .theme-toggle span {
    display: none;
  }
}

/* the dispatcher block: a face next to the promise that a human answers */
.dispatch-block {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.dispatch-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(11, 22, 32, 0.16);
}

.dispatch-copy p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.dispatch-copy .section-title {
  margin-bottom: 0.9rem;
}

.dispatch-facts {
  list-style: none;
  margin: 1.1rem 0 1.3rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.dispatch-facts li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--muted);
}

.dispatch-facts li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.dispatch-facts strong {
  color: var(--text);
}

@media (max-width: 720px) {
  .dispatch-block {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .dispatch-photo {
    max-width: 280px;
    justify-self: center;
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

/* ---------- readability pass on the public pages ---------- */
/* The site is read on phones in sunlight and on laptops at arm's length. The base
   size goes up one step so every rem-based size follows: 13.1px labels become
   13.9px, 12.5px notes become 13.3px. The admin console sets its own base. */
html:not([data-admin]) {
  font-size: 17px;
}

/* Small print is still small print: give the quietest lines a floor and enough
   contrast to pass WCAG AA on the paper background. */
html:not([data-admin]) .muted,
html:not([data-admin]) .choice-note,
html:not([data-admin]) .form-note,
html:not([data-admin]) .photo-sub {
  color: var(--muted);
}

html:not([data-admin]) .muted.small,
html:not([data-admin]) .form-note,
html:not([data-admin]) .choice-note {
  font-size: 0.8rem;
}

/* light text belongs to the dark hero only: .lede and .ticks also appear on
   light sections, where this made them nearly invisible */
html:not([data-admin]) .hero .ticks li,
html:not([data-admin]) .hero .lede {
  color: #dbe6ef;
}

html:not([data-admin]) .hero .ticks li {
  font-size: 0.95rem;
}

/* the trust band is dark, so its quiet line stays light */
html:not([data-admin]) .trust-row span {
  color: #b6c7d6;
}

html:not([data-admin]) .trust-row strong {
  color: #ffffff;
}

/* the eyebrow sits on two very different backgrounds: light green on the dark hero,
   the darker green everywhere else */
html:not([data-admin]) .hero .eyebrow {
  color: #a8d17a;
}

html:not([data-admin]) .dispatch-copy .eyebrow {
  color: var(--accent-strong);
}

/* the wordmark now takes its full width, so the nav tightens instead of wrapping
   onto a second line between tablet and desktop */


/* ---------- reviews ---------- */
.review-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.review-card {
  display: grid;
  gap: 0.3rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #e3eaf0;
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.review-card:hover,
.review-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(11, 22, 32, 0.12);
  transform: translateY(-2px);
}

.review-platform {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.review-card strong {
  font-size: 1.1rem;
}

.review-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.review-strip {
  border-top: 1px solid #e3eaf0;
  background: #f2f6f9;
  padding: 1.1rem 0;
}

.review-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.review-strip-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.review-strip-text strong {
  color: var(--text);
}

.review-strip-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* the logo keeps its proportions next to the wordmark */
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  .brand-logo {
    height: 32px;
  }
}

/* on a phone the logo, the full name and both header buttons must still fit */
@media (max-width: 520px) {
  html:not([data-admin]) .wrap {
    width: calc(100% - 1.5rem);
  }

  .site-header .wrap {
    width: calc(100% - 1rem);
  }

  .header-inner {
    gap: 0.3rem;
  }

  .brand {
    font-size: 0.85rem;
  }

  .brand-logo {
    height: 26px;
  }

  .mobile-menu > summary {
    padding: 0.3rem 0.55rem;
    font-size: 0.85rem;
  }

  .header-cta {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }

  .brand {
    font-size: 0.9rem;
    gap: 0.35rem;
  }

  .brand-logo {
    height: 28px;
  }

  .header-cta {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
}

/* with the logo back, the header is tight between 901 and 1440: the order badge
   gives up a little padding so the nav keeps one line */
@media (min-width: 901px) and (max-width: 1440px) {
  .recent-order {
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
  }

  .recent-order-label {
    font-size: 0.62rem;
  }
}

/* ---------- review quotes ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.review-quote {
  margin: 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid #e3eaf0;
  border-radius: 14px;
  background: var(--surface);
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.review-stars {
  margin: 0;
  color: #d98324;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}

.review-quote blockquote {
  margin: 0;
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.55;
}

.review-quote figcaption {
  color: var(--muted);
  font-size: 0.85rem;
}

.review-score {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.review-score-stars {
  color: #d98324;
  letter-spacing: 0.08em;
}

.review-score strong {
  color: var(--text);
  font-size: 1.15rem;
}

/* one review visible, the rest behind a toggle: the landing page stays short */
.review-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.review-more {
  margin-top: 0.9rem;
  border: 1px solid #e3eaf0;
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.review-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  cursor: pointer;
  font-weight: 650;
  color: var(--text);
  list-style: none;
}

.review-more > summary::-webkit-details-marker {
  display: none;
}

.review-more > summary:hover {
  background: #f4f8fb;
}

.review-more > summary:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: -2px;
}

.review-more-chevron {
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex: none;
}

.review-more[open] .review-more-chevron {
  transform: rotate(-135deg);
}

.review-more .review-grid {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
}

@media (max-width: 640px) {
  .review-grid--single {
    max-width: none;
  }
}

/* the platform tag on a review card */
.review-source {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  border: 1px solid #d7e0e8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  vertical-align: 1px;
}

/* Google and Yelp sit as two compact panels side by side, each one card */
.review-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.2rem;
}

.review-block {
  padding: 0.9rem 1rem;
  border: 1px solid #e3eaf0;
  border-radius: 14px;
  background: var(--surface);
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

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

.review-score-link {
  margin-left: 0.15rem;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--accent-strong);
  text-decoration: none;
}

.review-score-link:hover,
.review-score-link:focus-visible {
  text-decoration: underline;
}

.review-block .review-grid--single {
  margin: 0;
}

/* inside the panel the review is plain text: no nested card, no extra border */
.review-block .review-quote {
  padding: 0;
  border: 0;
  background: transparent;
  gap: 0.35rem;
}

.review-block .review-quote blockquote {
  font-size: 0.9rem;
  line-height: 1.45;
}

.review-block .review-stars {
  font-size: 0.92rem;
}

.review-block .review-more {
  margin: 0;
  border: 0;
  border-top: 1px solid #e9eff4;
  border-radius: 0;
  background: transparent;
}

.review-block .review-more > summary {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--accent-strong);
}

.review-block .review-more > summary:hover {
  background: transparent;
  text-decoration: underline;
}

.review-block .review-more .review-grid {
  padding: 0 0 0.2rem;
  gap: 0.6rem;
}

.review-block .review-more .review-quote {
  padding: 0.6rem 0.7rem;
  border: 1px solid #e9eff4;
  border-radius: 10px;
}

.review-block .review-score {
  font-size: 0.88rem;
  gap: 0.35rem;
}

/* Eight buttons, the wordmark and two actions cannot share a 1280px row at 15.6px.
   Under 1440 the links step down a little and Blog moves to the footer, which keeps
   every other label at full length instead of truncating the brand. */
@media (max-width: 1440px) {
  .nav {
    font-size: 0.86rem;
  }

  .nav a {
    padding: 0.28rem 0.5rem;
  }

  .nav a[href="/blog"] {
    display: none;
  }
}

/* the short label only appears when the full one cannot fit next to everything else */
.nav-short {
  display: none;
}

@media (max-width: 1250px) {
  .nav-long {
    display: none;
  }

  .nav-short {
    display: inline;
  }
}

@media (max-width: 1600px) {
  .recent-order-label,
  .recent-order-cta {
    display: none;
  }
}

/* under 1100px even the short labels run out of room next to the brand: the buttons
   wrap inside the header instead of shrinking or overlapping it */
@media (max-width: 1100px) {
  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* the order badge stays out of the way until the device actually has an order:
   `display: inline-flex` was beating the [hidden] attribute */
.recent-order[hidden] {
  display: none;
}

/* ---------- phone menu ---------- */
.mobile-menu {
  display: none;
  position: relative;
  margin-left: auto;
}

.mobile-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.3rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(219, 230, 239, 0.22);
  border-radius: 999px;
  color: #e6edf3;
  font-weight: 650;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
}

.mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.mobile-menu > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.mobile-menu[open] > summary::after {
  transform: rotate(-135deg) translateY(-1px);
}

.mobile-menu > summary:focus-visible {
  outline: 2px solid #a8d17a;
  outline-offset: 2px;
}

.mobile-menu-panel {
  /* pinned to the viewport, not to the button: on a narrow screen the panel would
     otherwise hang off the left edge */
  position: fixed;
  left: 0.5rem;
  right: 0.5rem;
  top: 4.25rem;
  width: auto;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem;
  border: 1px solid rgba(219, 230, 239, 0.16);
  border-radius: 14px;
  background: #0b1620;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 70;
}

.mobile-menu-panel a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: #e6edf3;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.mobile-menu-panel a:hover,
.mobile-menu-panel a:focus-visible {
  background: rgba(168, 209, 122, 0.16);
  color: #fff;
}

@media (max-width: 900px) {
  .mobile-menu {
    display: block;
  }
}

/* on a phone the order badge lives inside the menu: the header only has room for
   the wordmark, the menu and the quote button */
@media (max-width: 520px) {
  .recent-order {
    display: none !important;
  }

  .brand {
    font-size: 0.8rem;
  }

  .brand-logo {
    height: 24px;
  }
}

.mobile-menu-order {
  display: block;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.2rem;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.mobile-menu-order[hidden] {
  display: none;
}

.mobile-menu-order strong {
  font-weight: 700;
}
