/* Small additions on top of the original theme CSS (webflow.css +
   overrides.css), only for things that worked differently in WordPress. */

/* Log Out is a form button here (a POST server action, so it can't be
   triggered by a stray link) — style it exactly like the sidebar links. */
.cp-link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: #ccc;
  font-weight: 600;
  font-size: 14.5px;
}
.cp-link-button:hover {
  color: #fff;
}

/* Verify-email page: inline text buttons styled like .auth-role-switch links. */
.cp-link-button.cp-inline-link {
  color: #1e1e1e;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
}
.cp-link-button.cp-inline-link:hover {
  color: #a17a00;
}
.cp-link-button.cp-inline-link:disabled {
  opacity: 0.6;
  cursor: default;
}
.cp-code-input {
  font-size: 22px;
  letter-spacing: 8px;
  text-align: center;
}

/* Pay page: the amount a gateway really bills when it differs from the total shown. */
.pay-gateway-charge {
  display: block;
  font-weight: 600;
  color: #a17a00;
}
.pay-gateway-powered .pay-gateway-charge {
  display: inline;
}
.cp-resend-wait {
  font-weight: 700;
  color: #9a9a9a;
  font-variant-numeric: tabular-nums;
}

/* City combobox: chevron so it reads as a dropdown, a "use as typed" row and hints. */
.cp-city-input {
  padding-right: 28px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231c1c1c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}
.cp-city-manual {
  font-weight: 600;
  color: #8a6400;
  background: #fffaf0;
}
.cp-city-hint {
  padding: 10px 14px;
  font-family: 'Quicksand', sans-serif;
  font-size: 12.5px;
  color: #8a8a8a;
}

/* ---- Backoffice shipment detail ---- */
.sd-back {
  margin: 0 0 8px;
  font-size: 13.5px;
}
.sd-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sd-title {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
}
.sd-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sd-header-link {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e1e1e;
  text-decoration: underline;
  text-decoration-color: #d8d2c4;
  text-underline-offset: 3px;
}
.sd-header-link:hover {
  color: #a17a00;
}
.sd-muted {
  color: #7a7a7a;
  font-size: 13px;
}
.sd-strong {
  font-weight: 700;
  color: #1c1c1c;
}
.bo-card .sd-card-title {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6400;
}
.bo-card .sd-customer {
  margin: 0 0 14px;
  font-size: 14.5px;
}
.sd-route p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.5;
}
.sd-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 0;
}
.sd-fact {
  min-width: 0;
}
.sd-fact.is-wide {
  grid-column: 1 / -1;
}
.sd-fact dt {
  font-size: 12px;
  color: #7a7a7a;
  margin-bottom: 2px;
}
.sd-fact dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: #1c1c1c;
  overflow-wrap: anywhere;
}
.sd-code {
  display: block;
  font-family: 'Inconsolata', monospace;
  font-size: 13px;
  font-weight: 500;
  background: #f7f5f0;
  border-radius: 6px;
  padding: 6px 10px;
  word-break: break-all;
}
.sd-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sd-timeline li {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 2px solid #ece7dc;
  margin-left: 5px;
}
.sd-timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.sd-timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8d2c4;
}
.sd-timeline li.is-latest::before {
  background: #f9b416;
  box-shadow: 0 0 0 3px #fdf0cc;
}
.sd-tl-head {
  display: flex;
  justify-content: space-between;
  gap: 4px 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.bo-card .sd-tl-note {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #555;
}
.sd-manage textarea {
  width: 100%;
  box-sizing: border-box;
}
.sd-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #8a8a8a;
}
@media (max-width: 600px) {
  .sd-facts {
    grid-template-columns: 1fr;
  }
  .sd-title {
    font-size: 26px;
  }
}

/* ---- Tracking result (public /track-shipment and the dashboard view) ---- */
.tr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tr-route {
  margin: 18px 0 2px;
  font-size: 28px;
  line-height: 1.2;
}
.tr-arrow {
  color: #f9b416;
}
.tr-countries {
  margin: 0;
  font-size: 14px;
  color: #7a7a7a;
}
.tr-problem {
  margin: 20px 0 0;
}
.tr-progress {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 26px 0 0;
  padding: 0;
}
.tr-progress li {
  position: relative;
  text-align: center;
}
/* The connecting line between dots. */
.tr-progress li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: #ece7dc;
}
.tr-progress li:first-child::before {
  display: none;
}
.tr-progress li.is-done::before,
.tr-progress li.is-current::before {
  background: #f9b416;
}
.tr-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #ece7dc;
  box-sizing: border-box;
}
.tr-progress li.is-done .tr-dot {
  background: #f9b416;
  border-color: #f9b416;
}
.tr-progress li.is-current .tr-dot {
  border-color: #f9b416;
  box-shadow: 0 0 0 4px #fdf0cc;
}
.tr-step-label {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: #9a9a9a;
}
.tr-progress li.is-done .tr-step-label,
.tr-progress li.is-current .tr-step-label {
  color: #1c1c1c;
  font-weight: 700;
}
.tr-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 26px 0 0;
  padding: 16px 18px;
  background: #faf8f3;
  border-radius: 10px;
}
.tr-facts dt {
  font-size: 12px;
  color: #7a7a7a;
}
.tr-facts dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.tr-section-title {
  margin: 30px 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6400;
}
.tr-timeline li::before {
  background: #d8d2c4;
  box-shadow: 0 0 0 1px #d8d2c4;
}
.tr-timeline li.is-latest::before {
  background: #f9b416;
  box-shadow: 0 0 0 1px #f9b416;
}
.tt-driver-note {
  font-style: italic;
}
@media (max-width: 560px) {
  .tracking-result {
    padding: 22px 18px;
  }
  .tr-route {
    font-size: 22px;
  }
  .tr-step-label {
    font-size: 10.5px;
  }
}

/* ---- Site-wide loading bar + busy buttons (components/progress-bar.tsx) ---- */
.cp-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  background: linear-gradient(90deg, transparent 0%, #f9b416 30%, #00aee1 50%, #f9b416 70%, transparent 100%);
  background-size: 50% 100%;
  background-repeat: no-repeat;
}
.cp-progress.is-active {
  opacity: 1;
  animation: cp-progress-slide 1.1s ease-in-out infinite;
}
@keyframes cp-progress-slide {
  0% { background-position: -50% 0; }
  100% { background-position: 150% 0; }
}
.cp-busy {
  pointer-events: none;
  cursor: progress;
  opacity: 0.75;
  background-image: linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 70%) !important;
  background-size: 200% 100% !important;
  animation: cp-busy-shine 1.2s linear infinite;
}
@keyframes cp-busy-shine {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}

/* The tracking card inside the dashboard sits flush left, not centred. */
.dashboard-panel .tracking-result {
  margin: 20px 0 0;
  max-width: none;
}

/* ---- Driver dashboard shipment card ---- */
.dv-card {
  background: #fff;
  border: 1px solid #e7e2d8;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.dv-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.dv-ref {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dv-date {
  font-size: 12.5px;
  color: #9a9a9a;
}
.dv-route {
  margin: 10px 0 2px;
  font-size: 22px;
  line-height: 1.25;
}
.dv-meta {
  margin: 0;
  font-size: 13.5px;
  color: #7a7a7a;
}
.dv-progress {
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 0 4px;
}
.dv-stops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.dv-stop {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid #ece7dc;
  border-radius: 12px;
  background: #faf8f3;
  min-width: 0;
}
.dv-stop.is-current {
  border-color: #f9b416;
  background: #fffaf0;
}
.dv-pin {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #1c1c1c;
}
.dv-stop.is-current .dv-pin {
  background: #f9b416;
  color: #1c1c1c;
}
.dv-stop-body {
  min-width: 0;
}
.dv-stop-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6400;
}
.dv-next-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f9b416;
  color: #1c1c1c;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.dv-stop-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1c1c1c;
}
.dv-stop-addr {
  margin: 2px 0 10px;
  font-size: 13.5px;
  color: #555;
  overflow-wrap: anywhere;
}
.dv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dv-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #ddd6c8;
  background: #fff;
  font-size: 12.5px;
  font-weight: 700;
  color: #1c1c1c;
  text-decoration: none;
}
.dv-chip:hover {
  border-color: #f9b416;
  color: #1c1c1c;
}
.dv-chip-wa {
  border-color: #b6e7c7;
  background: #eefaf2;
  color: #1e7e42;
}
.dv-note {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fdf6e3;
  font-size: 13.5px;
  color: #6b5200;
}
.dv-done {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eafaf1;
  color: #1e7e42;
  font-weight: 700;
  font-size: 14px;
}

/* Action area */
.driver-status-form.dv-form {
  display: block;
  margin-top: 18px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: #faf8f3;
}
.dv-form-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dv-form-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.dv-geo {
  margin: 0;
  font-size: 12px;
  color: #9a9a9a;
}
.dv-geo.is-on {
  color: #1e7e42;
}
.dv-geo.is-on::before {
  content: "\25CF  ";
}
.dv-form-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.dv-form-fields.has-photo {
  grid-template-columns: 1fr 200px;
}
.dv-form .dv-form-fields textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
  min-height: 64px;
}
.dv-photo {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  border: 1.5px dashed #d8cfba;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.dv-photo:hover {
  border-color: #f9b416;
}
.dv-photo.has-file {
  border-style: solid;
  border-color: #8fd3a8;
  background: #f2fbf5;
}
.dv-photo input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dv-photo-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1c1c1c;
}
.dv-photo-sub {
  font-size: 12px;
  color: #8a8a8a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dv-primary {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px 20px;
  font-size: 16px;
}
.dv-failed {
  display: block;
  margin: 10px auto 0;
  padding: 4px 8px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #b3401f;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 680px) {
  .dv-card {
    padding: 18px 16px;
  }
  .dv-stops,
  .dv-form-fields.has-photo {
    grid-template-columns: 1fr;
  }
  .dv-route {
    font-size: 19px;
  }
}

/* ---- Dashboard navigation on phones/tablets (≤991px, where the header
   collapses too): a compact header row — who you are, Track, Log Out —
   above one swipeable row of pill tabs, instead of the stacked desktop
   sidebar. Same markup for the customer, driver and backoffice sidebars. ---- */
@media (max-width: 991px) {
  .dashboard-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "user track out"
      "nav nav nav";
    align-items: center;
    column-gap: 8px;
    padding: 14px 0 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  }
  .dashboard-user {
    grid-area: user;
    min-width: 0;
    padding: 0 0 0 16px;
    margin: 0;
    border: 0;
  }
  .dashboard-user-name {
    font-size: 15px;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-user-role {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    /* A guest's long "checking out as a guest…" line stays on one line. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-nav-divider {
    display: none;
  }

  /* Main sections: one horizontally scrolling row of pills. */
  .dashboard-sidebar > .dashboard-nav:not(.dashboard-nav-secondary) {
    grid-area: nav;
    flex-direction: row;
    gap: 8px;
    margin-top: 14px;
    padding: 0 16px 2px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .dashboard-sidebar > .dashboard-nav::-webkit-scrollbar {
    display: none;
  }
  .dashboard-sidebar > .dashboard-nav:not(.dashboard-nav-secondary) .dashboard-nav-link {
    flex: 0 0 auto;
    width: auto;
    scroll-snap-align: start;
    padding: 8px 14px;
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    background: #262626;
    color: #d6d6d6;
    font-size: 13px;
    white-space: nowrap;
  }
  .dashboard-sidebar > .dashboard-nav:not(.dashboard-nav-secondary) .dashboard-nav-link.active {
    background: #f9b416;
    border-color: #f9b416;
    color: #1c1c1c;
  }

  /* Track a Shipment + Log Out: small buttons on the header row. */
  .dashboard-nav-secondary {
    grid-area: track;
    flex-direction: row;
    overflow: visible;
  }
  .dashboard-nav-secondary .dashboard-nav-link,
  .dashboard-nav-bottom a,
  .dashboard-nav-bottom .cp-link-button {
    display: inline-block;
    width: auto;
    padding: 6px 12px;
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    background: transparent;
    color: #d6d6d6;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
  }
  .dashboard-nav-secondary .dashboard-nav-link:hover,
  .dashboard-nav-bottom a:hover,
  .dashboard-nav-bottom .cp-link-button:hover {
    border-color: #f9b416;
    color: #fff;
    background: transparent;
  }
  .dashboard-nav-bottom {
    grid-area: out;
    margin: 0;
    padding: 0 16px 0 0;
    border: 0;
  }
  .dashboard-nav-bottom form {
    margin: 0;
  }
}

/* Very narrow phones: shorten "Track a Shipment" to save room. */
@media (max-width: 400px) {
  .dashboard-nav-secondary .dashboard-nav-link {
    font-size: 0;
  }
  .dashboard-nav-secondary .dashboard-nav-link::after {
    content: "Track";
    font-size: 12px;
  }
}

@media (max-width: 991px) {
  /* Fade the right edge so it's clear the tab row scrolls. */
  .dashboard-sidebar > .dashboard-nav:not(.dashboard-nav-secondary) {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    padding-right: 32px;
  }
}

/* ---- Backoffice pricing: default + per-country rates ---- */
.pr-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
}
.pr-list {
  border: 1px solid #ece7dc;
  border-radius: 10px;
  overflow: hidden;
}
.pr-row + .pr-row {
  border-top: 1px solid #ece7dc;
}
.pr-row summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.pr-row summary::-webkit-details-marker {
  display: none;
}
.pr-row[open] summary,
.pr-row summary:hover {
  background: #faf8f3;
}
.pr-country {
  font-weight: 700;
  min-width: 140px;
}
.pr-sum {
  flex: 1;
  font-size: 13.5px;
  color: #555;
}
.pr-edit {
  font-size: 13px;
  font-weight: 700;
  color: #8a6400;
}
.pr-form {
  padding: 4px 16px 16px;
  background: #faf8f3;
}
.pr-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pr-actions .dv-failed {
  margin: 0;
}
.pr-add-title {
  margin: 24px 0 8px;
}
@media (max-width: 700px) {
  .pr-fields {
    grid-template-columns: 1fr;
  }
  .pr-row summary {
    flex-wrap: wrap;
  }
}

/* ---- Driver GPS status bar ---- */
.gps-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #ece7dc;
  background: #fff;
}
.gps-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #b3401f;
}
.gps-bar.is-on .gps-dot {
  background: #1e7e42;
  box-shadow: 0 0 0 4px #dff3e6;
}
.gps-bar.is-wait .gps-dot {
  background: #f9b416;
  animation: cp-live-pulse 1.8s infinite;
}
.gps-text {
  flex: 1;
  min-width: 0;
}
.gps-title {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
}
.gps-detail {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #6b6b6b;
}
.gps-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gps-enable {
  background: #f9b416;
  border-color: #f9b416;
}
.gps-wake {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
@media (max-width: 600px) {
  .gps-bar {
    flex-wrap: wrap;
  }
  .gps-buttons {
    width: 100%;
    padding-left: 24px;
  }
}

/* ---- Exact location pin picker (shipment form) ---- */
.pin-picker {
  margin: 4px 0 8px;
}
.pin-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.pin-open {
  background: none;
  border: 1.5px dashed #d8cfba;
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #1c1c1c;
  cursor: pointer;
  text-align: left;
}
.pin-open:hover {
  border-color: #f9b416;
}
.pin-open span {
  font-weight: 500;
  color: #8a8a8a;
}
.pin-badge {
  font-weight: 700;
  color: #1e7e42;
}
.pin-panel {
  padding: 14px;
  border: 1px solid #ece7dc;
  border-radius: 10px;
  background: #fff;
}
.pin-help {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: #555;
}
.pin-gps {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #1e7e42;
}
.pin-map {
  height: 280px;
  margin: 12px 0;
  border-radius: 8px;
  cursor: crosshair;
}
.pin-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pin-coords {
  font-family: 'Inconsolata', monospace;
  font-size: 13px;
  color: #6b6b6b;
}
.dv-pinned {
  margin: -6px 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #1e7e42;
}
.pin-lookup {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #8a6400;
}

/* ---- Backoffice live map ---- */
.fleet-map {
  height: 460px;
  margin: 20px 0 8px;
  border-radius: 12px;
  border: 1px solid #ece7dc;
}
.cp-fleet-marker {
  overflow: visible;
}
.cp-fleet-label {
  position: absolute;
  left: 20px;
  top: -3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1c1c1c;
  color: #fff;
  font: 700 11.5px/1.5 'Quicksand', sans-serif;
  white-space: nowrap;
}
.live-ok {
  color: #1c6fd9;
  font-weight: 700;
}
.cp-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cp-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e8f1fd;
  color: #1c6fd9;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.cp-live-badge:hover {
  background: #d6e7fb;
}

/* Pinned pickup (A) / delivery (B) stops on tracking maps */
.cp-stop-pin {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1c1c1c;
  border: 3px solid #f9b416;
  box-sizing: border-box;
  color: #fff;
  font: 700 12px/1 'Quicksand', sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ---- Back Office mailbox ---- */
.mail-count {
  display: inline-block;
  min-width: 20px;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f9b416;
  color: #1c1c1c;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}
.mail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.mail-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.mail-folders {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mail-folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  color: #333;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.mail-folder:hover {
  background: #f3efe6;
}
.mail-folder.active {
  background: #1c1c1c;
  color: #fff;
}
.mail-main {
  min-width: 0;
  background: #fff;
  border: 1px solid #ece7dc;
  border-radius: 12px;
  padding: 16px;
}
.mail-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.mail-search input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid #ddd6c8;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
}
.mail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mail-list li + li {
  border-top: 1px solid #f0ece3;
}
.mail-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 8px;
  color: #444;
  text-decoration: none;
  font-size: 14px;
}
.mail-row:hover {
  background: #faf8f3;
}
.mail-row.is-unread {
  color: #111;
  font-weight: 700;
}
.mail-row.is-unread .mail-who::before {
  content: "\25CF  ";
  color: #1c6fd9;
}
.mail-who,
.mail-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-snippet {
  color: #8a8a8a;
  font-weight: 400;
}
.mail-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: #777;
  white-space: nowrap;
}
.mail-bounced {
  color: #b3401f;
  font-weight: 700;
}
.mail-view-subject {
  margin: 4px 0 12px;
  font-size: 22px;
}
.mail-view-head {
  margin: 0 0 14px;
  font-size: 13.5px;
}
.mail-view-head div {
  display: flex;
  gap: 10px;
  padding: 2px 0;
}
.mail-view-head dt {
  width: 48px;
  color: #8a8a8a;
}
.mail-view-head dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.mail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.mail-actions form {
  margin: 0;
}
.mail-frame {
  width: 100%;
  height: 560px;
  border: 1px solid #ece7dc;
  border-radius: 10px;
  background: #fff;
}
.mail-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14px;
  margin: 0;
}
.mail-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.mail-attachments .sd-card-title {
  width: 100%;
  margin: 0;
}
.mail-compose h3 {
  margin: 0 0 12px;
}
.mail-compose-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f0ece3;
}
.mail-compose-row label {
  font-size: 13px;
  color: #777;
}
.mail-compose input:not([type="submit"]):not([type="file"]),
.mail-compose textarea {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  padding: 6px 0;
  font: inherit;
  font-size: 14px;
  background: transparent;
  outline: none;
}
.mail-from {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mail-from input:first-child {
  max-width: 180px;
  border-right: 1px solid #ece7dc !important;
}
.mail-from input:nth-child(2) {
  max-width: 120px;
  text-align: right;
}
.mail-from span {
  color: #555;
  font-size: 14px;
}
.mail-compose textarea {
  margin-top: 12px;
  min-height: 260px;
  resize: vertical;
}
.mail-compose-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.mail-compose-foot input[type="submit"] {
  margin-left: auto;
}
.mail-attach {
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 800px) {
  .mail-layout {
    grid-template-columns: 1fr;
  }
  .mail-folders {
    flex-direction: row;
    overflow-x: auto;
  }
  .mail-folder {
    white-space: nowrap;
  }
  .mail-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .mail-subject {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
.mail-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mail-toolbar .mail-search {
  flex: 1;
  min-width: 220px;
  margin: 0;
}
.mail-toolbar form {
  margin: 0;
}
.mail-from-fixed {
  font-size: 14px;
  color: #333;
}

/* ---- Printable documents: shipping label (4x6 in) and receipt (A4) ---- */
.doc-screen {
  min-height: 100vh;
  background: #e9e6df;
  padding: 0 0 40px;
}
.doc-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: #1c1c1c;
  color: #fff;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
}
.doc-hint {
  margin-left: 12px;
  color: #aaa;
  font-size: 12.5px;
}
.doc-toolbar-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}
.label-svg svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Label */
.label-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
}
.label-sheet {
  box-sizing: border-box;
  width: 4in;
  height: 6in;
  padding: 0.18in;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  display: flex;
  flex-direction: column;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10pt;
  line-height: 1.3;
  break-after: page;
}
.label-sheet p {
  margin: 0;
}
.label-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: #000;
  margin: -0.18in -0.18in 0;
}
.label-logo {
  height: 26px;
}
.label-service {
  text-align: right;
  color: #fff;
  font-size: 9pt;
  display: flex;
  flex-direction: column;
}
.label-service strong {
  font-size: 13pt;
}
.label-block {
  padding: 6px 0;
  border-bottom: 1px solid #000;
}
.label-tag {
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label-name {
  font-weight: 700;
  font-size: 11pt;
}
.label-to .label-name {
  font-size: 14pt;
}
.label-city {
  font-size: 13pt;
  font-weight: 700;
}
.label-country {
  font-size: 13pt;
  font-weight: 700;
  text-transform: uppercase;
}
.label-facts {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.2fr;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid #000;
}
.label-facts div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.label-facts span {
  font-size: 7.5pt;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.label-facts strong {
  font-size: 9.5pt;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.label-codes {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 0.95in;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
}
.label-barcode .label-svg {
  height: 0.95in;
}
.label-tracking {
  margin-top: 4px !important;
  text-align: center;
  font: 700 13pt/1.1 'Courier New', monospace;
  letter-spacing: 0.12em;
}
.label-qr {
  text-align: center;
  font-size: 7pt;
}
.label-qr .label-svg {
  width: 0.95in;
  height: 0.95in;
}
.label-foot {
  font-size: 7pt;
  text-align: center;
  padding-top: 4px;
  border-top: 1px solid #000;
}

/* Receipt */
.receipt-sheet {
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  margin: 24px auto 0;
  padding: 18mm 16mm;
  background: #fff;
  color: #1c1c1c;
  font-family: 'Quicksand', Arial, sans-serif;
  font-size: 10.5pt;
  line-height: 1.45;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.receipt-sheet p {
  margin: 0;
}
.receipt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #0d0d0d;
  border-bottom: 4px solid #f9b416;
  border-radius: 6px 6px 0 0;
}
.receipt-brand img {
  height: 38px;
}
.receipt-title {
  text-align: right;
  color: #fff;
}
.receipt-title h1 {
  margin: 0;
  font-size: 22pt;
  line-height: 1;
  color: #fff;
}
.receipt-title p {
  color: #ccc;
  font-size: 9.5pt;
  margin-top: 4px;
}
.receipt-paid {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border: 2px solid #4cc77a;
  border-radius: 4px;
  color: #4cc77a;
  font-weight: 800;
  font-size: 9pt;
  letter-spacing: 0.12em;
}
.receipt-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #e3ded3;
}
.receipt-tag {
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a6400;
  margin-bottom: 4px !important;
}
.receipt-strong {
  font-weight: 700;
}
.receipt-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin: 18px 0;
  background: #faf8f3;
  border-radius: 8px;
}
.receipt-arrow {
  font-size: 20pt;
  color: #f9b416;
}
.receipt-table {
  width: 100%;
  border-collapse: collapse;
}
.receipt-table th {
  text-align: left;
  font-size: 8.5pt;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  border-bottom: 2px solid #1c1c1c;
  padding: 8px 6px;
}
.receipt-table td {
  padding: 10px 6px;
  border-bottom: 1px solid #ece7dc;
  vertical-align: top;
}
.receipt-table .num {
  text-align: right;
  white-space: nowrap;
}
.receipt-sub {
  font-size: 9pt;
  color: #666;
}
.receipt-total td {
  font-size: 13pt;
  font-weight: 800;
  border-bottom: 2px solid #1c1c1c;
}
.receipt-payment {
  margin: 16px 0;
  font-size: 10pt;
}
.receipt-payment code {
  font-size: 9pt;
  word-break: break-all;
}
.receipt-foot {
  display: grid;
  grid-template-columns: 2.4in 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #e3ded3;
}
.receipt-barcode .label-svg {
  height: 0.6in;
}
.receipt-barcode p {
  text-align: center;
  font: 700 10pt 'Courier New', monospace;
  letter-spacing: 0.1em;
  margin-top: 4px !important;
}
.receipt-thanks {
  font-size: 9pt;
  color: #555;
}

@media print {
  .doc-toolbar,
  .cp-progress,
  nextjs-portal {
    display: none !important;
  }
  .doc-screen {
    background: #fff;
    padding: 0;
    min-height: 0;
  }
  .label-stack {
    display: block;
    padding: 0;
  }
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .label-sheet {
    border: 0;
    margin: 0;
  }
  .label-sheet:last-child {
    break-after: auto;
  }
  .receipt-sheet {
    margin: 0;
    box-shadow: none;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
.sd-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.booking-print-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 14px !important;
  font-size: 14px;
  font-weight: 600;
}
.booking-print-links a {
  color: #1c1c1c;
  text-decoration: underline;
}
.dv-print {
  font-size: 12.5px;
  font-weight: 700;
  color: #8a6400;
  text-decoration: underline;
}

/* kg / lb switch */
.weight-unit {
  display: inline-flex;
  border: 1px solid #d8d2c4;
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  margin-left: 8px;
}
.weight-unit button {
  border: 0;
  background: #fff;
  padding: 2px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #777;
  cursor: pointer;
}
.weight-unit button.is-on {
  background: #1c1c1c;
  color: #fff;
}
.shipnow-preset-charge {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #8a6400;
}
/* Six package types: three per row on wide screens, two on phones. */
.shipnow-preset-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 600px) {
  .shipnow-preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Home quote box: kg | lb switch sitting inside the weight field, like the "km" label. */
#lpq-widget .lpq-unit-field {
  position: relative;
  width: 100%;
}
#lpq-widget .lpq-unit-field input[type="number"] {
  padding-right: 96px;
}
#lpq-widget .lpq-unit-switch {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  background: #fff;
}
#lpq-widget .lpq-unit-switch button {
  padding: 4px 11px;
  font-size: 12.5px;
}
/* Phones: one column so city/postal fields aren't squeezed. */
@media (max-width: 520px) {
  #lpq-widget .lpq-row-2col {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
/* Weight shown in two units on the label */
.label-facts {
  grid-template-columns: 1.35fr 1.3fr 1fr;
}
/* Home quote box header whenever its column is narrow (phones up to small laptops): title first, currency below. */
@media (max-width: 1199px) {
  #lpq-widget {
    padding: 22px 18px;
  }
  #lpq-widget .lpq-header {
    flex-direction: column;
    align-items: stretch;
  }
  #lpq-widget .lpq-currency-wrap {
    align-items: stretch;
    flex-shrink: 1;
    min-width: 0;
  }
  #lpq-widget select.lpq-currency-select {
    width: 100%;
  }
  #lpq-widget .lpq-cur-note {
    text-align: left;
    max-width: none;
  }
}
