/* ═══════════════════════════════════════════════
   ROOT & RESET
════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0f3460;
  --navy-dark:   #0a2340;
  --navy-light:  #1a4a8a;
  --green:       #5cb85c;
  --green-hover: #4cae4c;
  --text-dark:   #0f3460;
  --text-muted:  #666;
  --border:      #dde4ef;
  --white:       #ffffff;
  --light-bg:    #f4f7fc;
  --warning-bg:  #fff8e1;
  --warning-br:  #f0a500;
  --info-bg:     #e8f3fd;
  --info-br:     #b0cfe8;
  --radius:      8px;
  --shadow:      0 8px 32px rgba(0,0,0,0.18);
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 80px;
  background:
    linear-gradient(rgba(10,20,50,0.72), rgba(10,20,50,0.72)),
    repeating-linear-gradient(
      90deg,
      transparent 0%, transparent 48%,
      rgba(255,255,255,0.04) 48%, rgba(255,255,255,0.04) 52%,
      transparent 52%, transparent 100%
    ),
    linear-gradient(160deg, #0d1b3e 0%, #1c2d55 50%, #0d1b3e 100%);
}

/* ═══════════════════════════════════════════════
   APP CONTAINER
════════════════════════════════════════════════ */
#app {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ═══════════════════════════════════════════════
   STEP CARDS
════════════════════════════════════════════════ */
.step {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 0 28px;
  overflow: hidden;
}

.step-narrow {
  width: 100%;
  max-width: 440px;
}

/* Step 1 — slightly wider to fit address field */
.step-s1 {
  width: 100%;
  max-width: 520px;
}

.step-wide {
  width: 100%;
  max-width: 940px;
  padding: 28px 32px 28px;
}

.hidden  { display: none !important; }
.active  { display: block !important; }

/* ═══════════════════════════════════════════════
   STEP 1 — TABS
════════════════════════════════════════════════ */
.tab-bar {
  display: flex;
  width: 100%;
}

.tab {
  flex: 1;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.tab-active { background: var(--green); color: var(--white); }
.tab-navy   { background: var(--navy);  color: var(--white); }
.tab:hover  { opacity: 0.9; }

/* ═══════════════════════════════════════════════
   STEP 1 — ROUTE FORM
════════════════════════════════════════════════ */
.main-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  padding: 22px 24px 16px;
  line-height: 1.3;
}

.route-block { padding: 0 20px 16px; }

.s1-addr-row { padding: 0; }
.s1-hint { padding: 0 20px 12px; display: block; }

.block-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.route-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.select-wrap {
  display: flex;
  align-items: center;
  background: var(--navy);
  border-radius: 6px;
  padding: 0 10px;
  flex: 1.4;
  min-width: 0;
  height: 46px;
  gap: 8px;
}

.flag { font-size: 20px; flex-shrink: 0; }

.country-dd {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  width: 100%;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.country-dd option { background: var(--navy); color: var(--white); }

.select-wrap::after {
  content: '▾';
  color: var(--white);
  font-size: 14px;
  flex-shrink: 0;
  pointer-events: none;
}

.postcode-field {
  flex: 1;
  height: 46px;
  background: var(--navy);
  border: none;
  border-radius: 6px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0 12px;
  outline: none;
  cursor: text;
  min-width: 0;
}

.postcode-field::placeholder { color: rgba(255,255,255,0.6); font-weight: 600; }

/* Postcode field loader spinner */
.postcode-loader {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  pointer-events: none;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Tick shown after successful geocode */
.postcode-tick {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #5cb85c;
  font-size: 16px;
  font-weight: 900;
  pointer-events: none;
  line-height: 1;
}

/* ═══════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════ */
.btn {
  display: block;
  width: auto;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, opacity 0.2s;
}

.btn-full   { width: 100%; }
.btn-green  { background: var(--green);  color: var(--white); }
.btn-green:hover:not(:disabled)  { background: var(--green-hover); }
.btn-navy   { background: var(--navy);   color: var(--white); }
.btn-navy:hover:not(:disabled)   { background: var(--navy-light); }
.btn-outline {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--navy); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.step-narrow .btn,
.step-s1 .btn { margin: 4px 20px 0; width: calc(100% - 40px); }
.step-wide .btn-full { margin-top: 10px; }

/* ═══════════════════════════════════════════════
   SPLIT LAYOUT
════════════════════════════════════════════════ */
.split {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.split-left  { flex: 1; min-width: 0; }
.split-right { flex: 1.2; min-width: 0; }

.split-40-60 .split-left  { flex: 1; }
.split-40-60 .split-right { flex: 1.4; }

/* ═══════════════════════════════════════════════
   MAP BOX
════════════════════════════════════════════════ */
.map-box {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-bg);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════
   STEP 2 — PALLET GRID
════════════════════════════════════════════════ */
.step-heading {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
}

.pallet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-help {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.btn-help:hover { background: var(--navy-light); }

.pallet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.pallet-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.pallet-card:hover { border-color: var(--navy-light); }

.pallet-card.selected {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.qty-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--navy);
  border-radius: 6px;
  padding: 2px 6px;
  gap: 2px;
}

.qty-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 16px;
  text-align: center;
}

.qty-num {
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  min-width: 14px;
  text-align: center;
}

.pallet-icon {
  width: 64px;
  height: 52px;
  margin: 10px auto 8px;
  display: block;
}

.pallet-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 4px;
  border: none;
  position: relative;
  top: -1px;
}

.total-items {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.note-box {
  background: var(--info-bg);
  border: 1px solid var(--info-br);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-dark);
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.info-i {
  background: var(--navy);
  color: var(--white);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ═══════════════════════════════════════════════
   STEP 3 — CALENDAR
════════════════════════════════════════════════ */
.calendar {
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  user-select: none;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--navy-dark);
}

.cal-month {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.cal-nav {
  background: none;
  border: none;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  opacity: 0.7;
}
.cal-nav:hover { opacity: 1; }

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--navy);
}

.cal-day-name {
  text-align: center;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--navy);
  padding: 6px;
  gap: 4px;
}

.cal-cell {
  text-align: center;
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  color: rgba(255,255,255,0.3);
  cursor: default;
}

.cal-cell.available {
  color: var(--white);
  cursor: pointer;
}
.cal-cell.available:hover { background: rgba(255,255,255,0.15); }

.cal-cell.selected {
  background: var(--green);
  color: var(--white);
  font-weight: 800;
}

.cal-cell.today-earliest {
  outline: 2px solid var(--green);
}

/* ═══════════════════════════════════════════════
   STEP 3 — SERVICE CARDS
════════════════════════════════════════════════ */
.no-date-msg {
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}

.service-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
}

.service-card:hover { border-color: var(--navy-light); }

.service-card.selected {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.service-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--navy);
  margin-bottom: 6px;
}

.service-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}

.service-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.warning-box {
  background: var(--warning-bg);
  border: 1px solid var(--warning-br);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: #7a5800;
  margin-top: 10px;
  line-height: 1.5;
}

.price-summary {
  margin: 20px 0 4px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dark);
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 0;
}

.price-total {
  font-size: 14px;
  font-weight: 800;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 8px;
}

/* ═══════════════════════════════════════════════
   STEP 4 — INFO PANELS
════════════════════════════════════════════════ */
.info-col { padding-right: 8px; }

.info-section { margin-bottom: 18px; }

.info-section h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.info-section p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.green-link { color: var(--green); text-decoration: none; }
.green-link:hover { text-decoration: underline; }

.declare-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.pallet-decl-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.pallet-decl-type {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.pallet-decl-counter {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

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

.contents-select {
  flex: 1.5;
  height: 42px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
}

.contents-select option { background: var(--navy); }

.value-input {
  flex: 1;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  outline: none;
  width:0;
}
.value-input:focus { border-color: var(--navy); }
.value-input::placeholder { color: #bbb; font-size: 12px; }

.toc-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 14px;
  padding: 12px;
  background: var(--light-bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.toc-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--navy);
}

.toc-row label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════
   STEPS 5 & 6 — ADDRESS FORMS
════════════════════════════════════════════════ */
.addr-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.addr-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.cant-find {
  font-size: 12px;
  color: var(--navy);
  text-decoration: underline;
  display: block;
  text-align: right;
  margin-bottom: 8px;
}
.cant-find:hover { color: var(--green); }

.addr-search-wrap {
  position: relative;
  margin-bottom: 10px;
}

.addr-search {
  width: 100%;
  height: 46px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0 40px 0 14px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.addr-search::placeholder { color: rgba(255,255,255,0.55); }

.addr-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

.addr-parsed {
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

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

.pf-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-weight: 600;
}

.pf-val {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.form-field {
  display: block;
  width: 100%;
  height: 46px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  outline: none;
  margin-bottom: 8px;
  font-family: inherit;
}
.form-field::placeholder { color: rgba(255,255,255,0.55); }
textarea.form-field { height: auto; padding: 12px 14px; resize: vertical; }

.phone-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.phone-cc {
  height: 46px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  min-width: 120px;
  appearance: none;
}
.phone-cc option { background: var(--navy); }

.phone-num {
  flex: 1;
  height: 46px;
  background: var(--navy);
  color: var(--white);
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.phone-num::placeholder { color: rgba(255,255,255,0.55); }
.phone-num.invalid { border-color: #e53935; }

.phone-err {
  font-size: 12px;
  color: #e53935;
  margin-bottom: 8px;
  margin-top: -2px;
}

.addr-form .btn-full { margin-top: 10px; }

/* ═══════════════════════════════════════════════
   STEP 7 — OVERVIEW
════════════════════════════════════════════════ */
.overview-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--light-bg);
}

.ov-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.ov-value {
  font-size: 13px;
  color: var(--text-dark);
  line-height: 1.6;
}

.ov-bold { font-weight: 700; }

.ov-addr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.ov-addr-col h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.ov-addr-col p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.ov-pricing-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
  color: var(--text-dark);
}

.ov-pricing-total {
  font-weight: 800;
  font-size: 14px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 6px;
}

.consignment-note {
  width: 100%;
  height: 80px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
  outline: none;
  background: var(--navy);
  color: var(--white);
  margin-top: 8px;
}
.consignment-note::placeholder { color: rgba(255,255,255,0.55); }

/* ═══════════════════════════════════════════════
   STEP 7 — CONTACT SECTION
════════════════════════════════════════════════ */
.contact-section {
  margin-top: 18px;
  border-top: 2px solid var(--border);
  padding-top: 18px;
}

.contact-heading {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.contact-intro {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  transition: background 0.2s;
}
.contact-item:hover { background: var(--navy-light); }

.contact-icon { font-size: 22px; flex-shrink: 0; }

.contact-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 3px;
}

.contact-number {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.5px;
}

.contact-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}
.contact-divider::before,
.contact-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

#contact-form .form-field { margin-bottom: 8px; }

.contact-msg {
  height: 90px !important;
  resize: vertical;
  padding-top: 12px !important;
}

.contact-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius);
  padding: 16px;
  color: #2e7d32;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  margin-top: 12px;
}

/* ═══════════════════════════════════════════════
   MAINTENANCE OVERLAY
════════════════════════════════════════════════ */
#maintenance-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,50,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.maintenance-card {
  background: var(--white);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow);
}

.maintenance-icon {
  font-size: 52px;
  margin-bottom: 18px;
  display: block;
}

.maintenance-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
}

.maintenance-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════
   HELP MODAL
════════════════════════════════════════════════ */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 32px;
  max-width: 560px;
  width: 92%;
  position: relative;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-close:hover { color: var(--navy); }

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.help-table th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.help-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
}

.help-table tr:last-child td { border-bottom: none; }
.help-table tr:nth-child(even) td { background: var(--light-bg); }

/* ═══════════════════════════════════════════════
   AUTOCOMPLETE DROPDOWN
════════════════════════════════════════════════ */
.ac-wrap { position: relative; }
.ac-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid #ddd; border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  z-index: 9999; max-height: 240px; overflow-y: auto;
}
.ac-item { padding: 10px 14px; font-size: 14px; cursor: pointer; border-bottom: 1px solid #f5f5f5; color: #333; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.focused { background: #f0f7ff; color: #0f3460; }
.ac-item-main { font-weight: 500; }
.ac-item-sub  { font-size: 12px; color: #999; margin-top: 2px; }

/* ═══════════════════════════════════════════════
   LEAFLET OVERRIDES
════════════════════════════════════════════════ */
.leaflet-container { font-family: inherit; }

/* ═══════════════════════════════════════════════
   STEP 1 — FULL ADDRESS INPUTS
════════════════════════════════════════════════ */
.s1-addr-field {
  display: block;
  width: 100%;
  height: 42px;
  background: #f4f7fc;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 0 36px 0 12px;
  outline: none;
  cursor: text;
}
.s1-addr-field::placeholder { color: rgba(15,52,96,0.45); font-weight: 500; }
.s1-addr-field:focus { border-color: var(--navy); }

.s1-addr-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}
.s1-addr-clear:hover { color: var(--navy); }

.s1-parsed {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
}

.s1-parsed-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.s1-pval {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}

.s1-pval-pc {
  background: var(--green);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
}

.s1-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  padding: 0 20px;
}

/* ═══════════════════════════════════════════════
   STEP 1 — DISTANCE BOX
════════════════════════════════════════════════ */
.step1-distance-box {
  margin: 0 20px 10px;
  background: var(--info-bg);
  border: 1px solid var(--info-br);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-dark);
  line-height: 1.6;
}
.step1-distance-box strong { color: var(--navy); }

/* ═══════════════════════════════════════════════
   STEP 2 — VEHICLE SELECTION
════════════════════════════════════════════════ */
.vehicle-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.vehicle-section-heading {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.vehicle-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.vehicle-card:hover { border-color: var(--navy-light); }

.vehicle-card.selected {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
  background: var(--light-bg);
}

.vehicle-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

.vehicle-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.3px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.vehicle-price {
  display: none;
}

/* ═══════════════════════════════════════════════
   STEP 3 — DISTANCE INFO
════════════════════════════════════════════════ */
.distance-box {
  background: var(--info-bg);
  border: 1px solid var(--info-br);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.6;
}

.distance-box strong { color: var(--navy); }

/* ═══════════════════════════════════════════════
   STEP 3 — SLOT CARDS
════════════════════════════════════════════════ */
.slot-panel { margin-bottom: 8px; }

.slot-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.slot-card:hover { border-color: var(--navy-light); }

.slot-card.selected {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
  background: var(--light-bg);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3px;
}

.slot-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.5px;
}

.slot-price {
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
  white-space: nowrap;
  margin-left: 8px;
}

.slot-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.slot-date {
  font-size: 11px;
  color: var(--navy);
  font-weight: 600;
  margin-top: 3px;
}

.slot-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin: 10px 0 6px;
}

/* ═══════════════════════════════════════════════
   STEP 7 — FINAL T&C + PDF
════════════════════════════════════════════════ */
.final-toc-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 10px;
  padding: 12px;
  background: var(--light-bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.final-toc-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--navy);
}

.final-toc-row label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}

.btn-pdf {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--navy);
  margin-top: 8px;
}
.btn-pdf:hover { background: var(--light-bg); }

/* ═══════════════════════════════════════════════
   STEP 7 — FINAL SPLIT LAYOUT
════════════════════════════════════════════════ */
.final-split {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.final-left {
  flex: 1;
  min-width: 0;
  position: sticky;
  top: 20px;
}

.final-right {
  flex: 1.1;
  min-width: 0;
}

/* ═══════════════════════════════════════════════
   STEP 7 — FORM SECTIONS
════════════════════════════════════════════════ */
.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  background: var(--light-bg);
}

.form-section-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.info-section-compact p { margin-bottom: 4px; }

/* ═══════════════════════════════════════════════
   FEW THINGS SECTION
════════════════════════════════════════════════ */
.few-things-section {
  width: 100%;
  max-width: 940px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.few-things-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ═══════════════════════════════════════════════
   PRINT / PDF
════════════════════════════════════════════════ */
@media print {
  body {
    background: white !important;
    padding: 0 !important;
  }
  #app { justify-content: flex-start; }
  .step { box-shadow: none !important; max-width: 100% !important; }
  .final-right,
  .few-things-section,
  .btn,
  .cal-nav { display: none !important; }
  .final-split { flex-direction: column; }
  .final-left { position: static; }
  .overview-section { break-inside: avoid; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 720px) {
  body { padding: 20px 10px 60px; }
  .split { flex-direction: column; }
  .final-split { flex-direction: column; }
  .final-left { position: static; }
  .step-wide { padding: 20px 16px 20px; }
  .map-box { height: 260px; }
  .pallet-grid { grid-template-columns: repeat(2, 1fr); }
  .parsed-grid { grid-template-columns: 1fr; }
  .ov-addr-grid { grid-template-columns: 1fr; }
  .split-40-60 .split-left,
  .split-40-60 .split-right { flex: 1 1 100%; }
  .few-things-section { margin: 16px auto 0; }
}

@media (max-width: 400px) {
  .pallet-grid { grid-template-columns: repeat(2, 1fr); }
  .route-row { flex-direction: column; }
  .select-wrap, .postcode-field { width: 100%; }
}
