.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.book-page .book-card {
  width: min(720px, 100%);
}

.booking-type-banner {
  margin: 0 0 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(11, 122, 43, 0.12);
  color: var(--green-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.booking-type-banner[data-type='parcel'] {
  background: rgba(26, 77, 58, 0.12);
  color: #1a4d3a;
}

.book-card .span-2 {
  grid-column: 1 / -1;
}

.receiver-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.receiver-fields[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .receiver-fields {
    grid-template-columns: 1fr;
  }
}

.place-field {
  position: relative;
}

.place-suggest {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  max-height: 14rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem;
  border-radius: 0.85rem;
  border: 1.5px solid rgba(18, 32, 24, 0.12);
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 32, 24, 0.12);
}

.place-suggest[hidden] {
  display: none;
}

.place-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.place-option:hover,
.place-option.is-active {
  background: rgba(11, 122, 43, 0.1);
}

.place-main {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.place-sub {
  font-size: 0.78rem;
  color: rgba(18, 32, 24, 0.55);
  line-height: 1.35;
}

.book-steps {
  margin: 0 0 1.35rem;
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  color: rgba(18, 32, 24, 0.4);
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 0.85rem;
  left: calc(50% + 1rem);
  width: calc(100% - 1.1rem);
  height: 2px;
  background: rgba(18, 32, 24, 0.1);
}

.step-item.is-done:not(:last-child)::after,
.step-item.is-active:not(:last-child)::after {
  background: rgba(11, 122, 43, 0.35);
}

.step-num {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(18, 32, 24, 0.06);
  border: 1.5px solid transparent;
  position: relative;
  z-index: 1;
}

.step-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.step-item.is-active {
  color: var(--green-deep);
}

.step-item.is-active .step-num {
  background: var(--mist);
  border-color: var(--green);
  color: var(--green-deep);
}

.step-item.is-done {
  color: var(--green);
}

.step-item.is-done .step-num {
  background: rgba(11, 122, 43, 0.14);
  color: var(--green-deep);
}

.book-step {
  animation: rise 0.35s ease-out both;
}

.step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.step-nav .btn-ghost {
  min-width: 110px;
}

.step-nav .step-next,
.step-nav .submit-btn {
  flex: 1;
  min-width: 140px;
}

.price-panel {
  text-align: center;
  padding: 0.25rem 0 0.5rem;
}

.price-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(18, 32, 24, 0.55);
}

.price-panel .fare-total {
  margin: 0.35rem 0 0.85rem;
}

.confirm-summary {
  margin: 1rem 0 0;
  display: grid;
  gap: 0.45rem;
  text-align: left;
}

.confirm-summary > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(18, 32, 24, 0.08);
  font-size: 0.9rem;
}

.confirm-summary dt {
  margin: 0;
  font-weight: 600;
  color: rgba(18, 32, 24, 0.5);
}

.confirm-summary dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}

.confirm-copy-secondary {
  margin-top: -0.5rem;
  font-size: 0.88rem;
}

#distance[readonly],
#city[readonly] {
  background: #f0f4ee;
  color: var(--ink);
  cursor: default;
}

.route-panel {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.route-status {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0.65rem 0.9rem;
  border-radius: 0.85rem;
  background: rgba(11, 122, 43, 0.08);
}

.route-status.is-loading {
  color: rgba(18, 32, 24, 0.65);
  background: rgba(18, 32, 24, 0.05);
}

.route-status.is-muted {
  color: rgba(18, 32, 24, 0.55);
  background: rgba(18, 32, 24, 0.04);
  font-weight: 500;
}

.route-status.is-error {
  color: #9b1c1c;
  background: rgba(180, 40, 40, 0.08);
}

.route-status.is-ready {
  color: var(--green-deep);
}

.route-map-wrap {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1.5px solid rgba(18, 32, 24, 0.1);
  background: #e8eee6;
  min-height: 220px;
}

.route-map {
  display: block;
  width: 100%;
  height: 240px;
  border: 0;
}

.route-open {
  display: inline-block;
  margin: 0.55rem 0.85rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-deep);
  text-decoration: none;
}

.route-open:hover {
  text-decoration: underline;
}

.fare-total {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--green-deep);
  line-height: 1.2;
  padding: 0.35rem 0;
}

.ride-types {
  margin: 1.25rem 0 0;
  padding: 0;
  border: 0;
}

.ride-types legend {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 32, 24, 0.55);
  margin-bottom: 0.65rem;
}

.ride-picker {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.ride-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.ride-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
}

.ride-sublegend {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(18, 32, 24, 0.55);
}

.ride-category-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}

.ride-subhint {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  border: 1.5px solid rgba(11, 122, 43, 0.28);
  background: var(--mist);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.ride-option {
  position: relative;
  cursor: pointer;
  min-width: 0;
}

.ride-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ride-option-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.5rem;
  padding: 0.75rem 0.65rem;
  border: 1.5px solid rgba(18, 32, 24, 0.12);
  border-radius: 0.9rem;
  background: #f7faf5;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ride-svc-img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  margin-bottom: 0.15rem;
  display: block;
}

.ride-class-option .ride-svc-img {
  width: 3rem;
  height: 3rem;
}

.ride-class-option .ride-option-body {
  min-height: 4.25rem;
  padding: 0.75rem 0.35rem;
}

.ride-option input:checked + .ride-option-body {
  border-color: var(--green);
  background: var(--mist);
  box-shadow: 0 0 0 3px rgba(11, 122, 43, 0.12);
}

.ride-option input:focus-visible + .ride-option-body {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.ride-name {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.15;
  color: var(--ink);
}

.ride-name-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(18, 32, 24, 0.5);
  line-height: 1.2;
}

.ride-rate {
  font-size: 0.85rem;
  color: rgba(18, 32, 24, 0.6);
}

.fare-breakdown {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  background: rgba(11, 122, 43, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.fare-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(18, 32, 24, 0.7);
}

.fare-breakdown .fare-sum {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(11, 122, 43, 0.15);
  color: var(--ink);
  font-size: 1rem;
}

.center-hint {
  text-align: center;
  margin-top: 0.85rem;
}

.confirm-panel {
  text-align: center;
  animation: rise 0.45s ease-out both;
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(18, 32, 24, 0.55);
}

.field-hint.is-ok {
  color: var(--green);
}

.field-hint.is-muted {
  color: rgba(18, 32, 24, 0.5);
}

.field-hint.is-error {
  color: #9b1c1c;
}

.searching-panel {
  margin: 0.5rem 0 1.25rem;
  padding: 1.25rem 1rem;
  border-radius: 1rem;
  background: rgba(11, 122, 43, 0.06);
}

.search-spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.85rem;
  border: 3px solid rgba(11, 122, 43, 0.18);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.searching-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-deep);
}

.driver-found-panel {
  margin: 0.35rem 0 1.1rem;
  text-align: left;
}

.confirm-accepted {
  margin-bottom: 0.85rem !important;
  color: var(--green-deep) !important;
  font-weight: 600;
}

.driver-found-panel .confirm-meta {
  margin-bottom: 0;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(11, 122, 43, 0.06);
}

.driver-found-panel .confirm-meta > div {
  border-bottom-color: rgba(11, 122, 43, 0.12);
}

.driver-found-panel .confirm-meta > div:last-child {
  border-bottom: none;
}

.confirm-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.confirm-code {
  margin: 0.4rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--green-deep);
}

.confirm-copy {
  margin: 0 auto 1.25rem;
  max-width: 34ch;
  color: rgba(18, 32, 24, 0.65);
  font-size: 0.95rem;
}

.confirm-meta {
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.55rem;
  text-align: left;
}

.confirm-meta > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(18, 32, 24, 0.08);
  font-size: 0.92rem;
}

.confirm-meta dt {
  margin: 0;
  font-weight: 600;
  color: rgba(18, 32, 24, 0.5);
}

.confirm-meta dd {
  margin: 0;
  color: var(--ink);
  word-break: break-word;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn-ghost,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid rgba(18, 32, 24, 0.15);
  background: transparent;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s;
}

/* display:inline-flex above would otherwise keep [hidden] buttons visible */
.confirm-actions [hidden],
.btn-ghost[hidden],
.btn-danger[hidden] {
  display: none !important;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--green);
}

#invoice-btn:not([hidden]),
.btn-ghost.is-primary-action {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

#invoice-btn:not([hidden]):hover,
.btn-ghost.is-primary-action:hover {
  background: var(--green-bright, #1fa64a);
  border-color: var(--green-bright, #1fa64a);
  color: #fff;
}

.btn-danger {
  border-color: rgba(180, 40, 40, 0.35);
  color: #9b1c1c;
}

.btn-danger:hover {
  background: rgba(180, 40, 40, 0.08);
}

.trip-panel .confirm-code {
  margin-bottom: 0.5rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  background: rgba(11, 122, 43, 0.12);
  color: var(--green-deep);
}

.status-pill.status-complete {
  background: rgba(11, 122, 43, 0.18);
  color: var(--green-deep);
}

.status-pill.status-cancelled {
  background: rgba(180, 40, 40, 0.12);
  color: #9b1c1c;
}

.status-pill.status-pending {
  background: rgba(200, 140, 20, 0.15);
  color: #8a5a00;
}

.status-pill.status-accepted {
  background: rgba(11, 122, 43, 0.15);
  color: var(--green-deep);
}

.status-pill.status-started {
  background: rgba(20, 120, 180, 0.14);
  color: #0b5f86;
}

.track-form {
  margin-bottom: 0.5rem;
}

@media (max-width: 700px) {
  .confirm-meta > div,
  .confirm-summary > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .step-list {
    gap: 0.2rem;
  }

  .step-num {
    width: 1.55rem;
    height: 1.55rem;
    font-size: 0.72rem;
  }

  .step-label {
    font-size: 0.65rem;
  }

  .step-item:not(:last-child)::after {
    top: 0.75rem;
    left: calc(50% + 0.9rem);
    width: calc(100% - 0.95rem);
  }

  .step-nav {
    flex-direction: column-reverse;
    gap: 0.6rem;
  }

  .step-nav .btn-ghost,
  .step-nav .step-next,
  .step-nav .submit-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .ride-grid {
    grid-template-columns: 1fr;
  }

  .ride-class-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .ride-class-option .ride-option-body {
    min-height: 3.85rem;
    padding: 0.65rem 0.25rem;
  }

  .ride-name {
    font-size: 0.98rem;
  }

  .ride-name-sub {
    font-size: 0.58rem;
  }

  .ride-option-body {
    padding: 1rem 1.05rem;
  }

  .route-map {
    height: 200px;
  }

  .route-map-wrap {
    min-height: 180px;
  }

  .fare-total {
    font-size: 1.55rem;
  }

  .confirm-actions {
    flex-direction: column;
    width: 100%;
  }

  .confirm-actions .btn-ghost,
  .confirm-actions .btn-danger,
  .confirm-actions .cta,
  .confirm-actions a {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .place-suggest {
    max-height: 12rem;
  }

  .place-option {
    padding: 0.8rem 0.85rem;
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .step-label {
    font-size: 0.6rem;
  }

  .confirm-code {
    font-size: 1.65rem;
  }
}
