:root {
  --lime: #d9f43d;
  --black: #111;
  --white: #f7f7f4;
  --gray: #686866;
  --line: #d7d7d2;
  --text: #171717;
  --muted: #666561;
  --label: #55534f;
}
* {
  box-sizing: border-box;
}
html,body {
  width: 100%;
  height: 100%;
  margin: 0;
}
body {
  overflow: hidden;
  background: #e9e9e6;
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button {
  font: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease, opacity .16s ease;
}
button:not(:disabled):hover {
  filter: brightness(.96);
}
button:not(:disabled):active {
  transform: translateY(1px);
}
button:focus {
  outline: none;
}
button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
#app {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}
#map {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.leaflet-tile {
  filter: grayscale(1) contrast(.72) brightness(1.12);
}
.map-color-mode .leaflet-tile {
  filter: none;
}
.map-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(245, 245, 242, .14);
  pointer-events: none;
}
.map-top-interaction-guard {
  position: absolute;
  z-index: 15;
  top: 0;
  left: 0;
  right: 0;
  height: 96px;
  pointer-events: auto;
}
.leaflet-control-zoom {
  display: none;
}
.leaflet-control-attribution {
  display: none!important;
}
/* Top controls */
.controls-left,.controls-right {
  position: absolute;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.controls-left {
  left: 24px;
  top: 32px;
}
.controls-right {
  right: 24px;
  top: 32px;
  gap: 20px;
}
.route-mode {
  position: absolute;
  z-index: 20;
  right: 24px;
  top: 185px;
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 18px;
  background: rgba(250, 250, 248, .94);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.route-mode button {
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  border-radius: 14px;
  background: transparent;
  color: #555;
  font-size: 10px;
  font-weight: 700;
}
.route-mode button.active {
  background: var(--black);
  color: #fff;
}
.route-mode.loading button {
  pointer-events: none;
  opacity: .55;
}
.route-loader {
  display: none;
  position: absolute;
  z-index: 35;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 255, 255, .65);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: route-spin .7s linear infinite;
}
.current-location-badge {
  position: absolute;
  z-index: 18;
  left: 50%;
  top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 184px;
  height: 44px;
  padding: 0 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(17, 17, 17, .1);
  border-radius: 999px;
  background: rgba(250, 250, 248, .94);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .14);
  pointer-events: none;
}
.current-location-badge small {
  display: block;
  color: #686866;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
}
.current-location-badge strong {
  display: block;
  margin-top: 3px;
  color: #111;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
}
.current-location-marker {
  background: transparent;
  border: 0;
}
.current-location-pulse,
.current-location-pin {
  position: absolute;
  display: block;
  border-radius: 50%;
}
.current-location-pulse {
  inset: 1px;
  border: 2px solid rgba(17, 17, 17, .9);
  background: rgba(17, 17, 17, .24);
  box-shadow: 0 0 0 5px rgba(17, 17, 17, .18);
  animation: current-location-pulse 1.8s ease-out infinite;
}
.current-location-marker--pending .current-location-pulse {
  border-color: rgba(229, 57, 53, .98);
  background: rgba(229, 57, 53, .28);
  box-shadow: 0 0 0 5px rgba(229, 57, 53, .24);
  animation: current-location-pulse-pending .55s ease-out infinite;
}
.current-location-marker--pending .current-location-pin {
  border-color: #e53935;
  background: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, .18), 0 2px 7px rgba(0, 0, 0, .3);
}
.current-location-pin {
  top: 9px;
  left: 9px;
  width: 16px;
  height: 16px;
  border: 4px solid var(--lime);
  background: #111;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .3);
}
.current-location-tooltip {
  border: 0!important;
  border-radius: 4px!important;
  background: #111!important;
  color: #fff!important;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2)!important;
}
.current-location-tooltip::before {
  border-top-color: #111!important;
}
@keyframes current-location-pulse-pending {
  0% {
    transform: scale(.62);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}
@keyframes current-location-pulse {
  0% {
    transform: scale(.72);
    opacity: .85;
  }
  75%,100% {
    transform: scale(1.12);
    opacity: 0;
  }
}
.route-loading #map {
  cursor: default;
  visibility: visible;
}
.route-loading .route-loader {
  display: block;
  pointer-events: none;
}
@keyframes route-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.control {
  width: 44px;
  line-height: 1;
  padding: 0;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(250, 250, 248, .92);
  color: #333;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.control svg {
  width: 20px;
  height: 20px;
  display: block;
}
.control.active {
  background: var(--black);
  color: #fff;
}
.control.spinning svg {
  animation: locate-spin .55s ease;
}
@keyframes locate-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.control.round {
  border-radius: 50%;
  line-height: 1;
  padding: 0;
  align-items: center;
  justify-items: center;
}
.back-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Route markers */
.marker {
  position: absolute;
  z-index: 8;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(217, 244, 61, .28);
  border: 4px solid rgba(217, 244, 61, .9);
  box-shadow: 0 0 0 7px rgba(217, 244, 61, .12);
  pointer-events: none;
}
.marker.start {
  left: 31%;
  top: 61%;
}
.marker.end {
  left: 70%;
  top: 36%;
}
.route-marker {
  background: transparent;
  border: 0;
}
.route-marker span {
  display: block;
  width: 11px;
  height: 11px;
  margin: 6.5px;
  border: 2px solid;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(217, 244, 61, .2), 0 2px 5px rgba(0, 0, 0, .25);
}
/* Bottom controls remain in the same place */
.bottom-nav {
  position: absolute;
  z-index: 20;
  left: 24px;
  bottom: 24px;
  width: 210px;
  height: 50px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  background: rgba(250, 250, 248, .94);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .1);
}
.bottom-nav button {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 999px;
  background: transparent;
  color: #555;
}
.bottom-nav button.active {
  color: #fff;
  background: var(--black);
}
/* Simple map icon */
.map-icon {
  width: 29px;
  height: 25px;
}
.map-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.nav-icon {
  width: 27px;
  height: 27px;
}
.nav-icon path,
.nav-icon circle,
.nav-icon rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Delivery details panel */
.sheet-handle {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: center;
  width: calc(100% + 52px);
  height: 32px;
  margin: 0 -26px;
  padding: 4px;
  background: #f8f8f5;
  touch-action: none;
  cursor: grab;
}
.sheet-handle.dragging {
  cursor: grabbing;
}
.sheet-handle span {
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #b9b9b4;
}
.image-sheet-header {
  margin: 24px 0 0;
  padding-top: 20px;
}
.image-sheet-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}
.image-viewer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.image-frame {
  position: relative;
  flex: 1;
  min-width: 0;
  width: min(100%, 220px);
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  border-radius: 18px;
  background: #e9e9e5;
}
.image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: opacity .15s ease;
}
.image-frame.loading {
  background: linear-gradient(90deg, #e4e4df 25%, #f0f0ec 50%, #e4e4df 75%);
  background-size: 200% 100%;
  animation: image-skeleton 1.2s ease-in-out infinite;
}
.image-frame.loading img {
  opacity: 0;
}
.image-frame.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(34, 34, 34, .2);
  border-top-color: #222;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: image-spin .7s linear infinite;
}
.image-arrow {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 30px;
  line-height: 1;
}
.image-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
}
.image-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b9b9b4;
}
.image-dots span.active {
  width: 14px;
  border-radius: 999px;
  background: #222;
}
@keyframes image-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes image-skeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.delivery-panel {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-height: calc(100dvh - 24px);
  min-height: 50dvh;
  overflow: auto;
  padding: 0 26px 26px;
  background: rgba(248, 248, 245, .97);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 35px rgba(0, 0, 0, .16);
  backdrop-filter: blur(12px);
  transition: transform .25s ease;
}
.delivery-panel {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.delivery-panel::-webkit-scrollbar {
  display: none;
}
/* Delivery details loading skeleton */
.delivery-panel.is-loading .delivery-header .status-pill {
  width: 76px;
  height: 25px;
  padding: 0;
  border-radius: 20px;
  background: linear-gradient(90deg, #e4e4df 25%, #f0f0ec 50%, #e4e4df 75%);
  background-size: 200% 100%;
  animation: delivery-skeleton 1.2s ease-in-out infinite;
  font-size: 0;
}
.delivery-panel.is-loading .delivery-header .status-pill i {
  display: none;
}
.delivery-panel.is-loading .location strong,
.delivery-panel.is-loading .meta strong,
.delivery-panel.is-loading .contact-item strong,
.delivery-panel.is-loading .contact-address,
.delivery-panel.is-loading .delivery-note p {
  color: transparent;
  border-radius: 5px;
  background: linear-gradient(90deg, #e4e4df 25%, #f0f0ec 50%, #e4e4df 75%);
  background-size: 200% 100%;
  animation: delivery-skeleton 1.2s ease-in-out infinite;
}
.delivery-panel.is-loading .location strong {
  width: min(210px, 75%);
  height: 18px;
}
.delivery-panel.is-loading .meta strong {
  display: block;
  width: 105px;
  height: 15px;
}
.delivery-panel.is-loading .contact-item strong {
  width: 135px;
  height: 16px;
}
.delivery-panel.is-loading .contact-address {
  width: 85%;
  height: 13px;
  margin-top: 4px;
}
.delivery-panel.is-loading .delivery-note p {
  width: 92%;
  height: 30px;
}
@keyframes delivery-skeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.delivery-header {
  position: sticky;
  top: 32px;
  z-index: 25;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -26px 21px;
  padding: 4px 26px;
  background: #f8f8f5;
  backdrop-filter: blur(12px);
}
.delivery-header h1 {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.delivery-header .status-pill {
  flex: 0 0 auto;
  margin-top: 1px;
}
/* Route summary */
.route-summary {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  margin-bottom: 20px;
}
.route-line {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.route-line:before {
  content: "";
  position: absolute;
  top: 17px;
  height: calc(100% - 71px);
  width: 2px;
  background: var(--black);
}
.route-dot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 37px;
}
.route-dot.end {
  margin: 0;
}
.route-dot .route-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.route-dot .route-marker span {
  margin: 0;
}
.route-dot .current-location-marker {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
}
.location {
  min-height: 71px;
}
.location small {
  display: block;
  color: var(--label);
  font-size: 10px;
  margin-bottom: 5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.location strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}
.location span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.meta {
  padding: 13px 0;
}
.meta:nth-child(2) {
  padding-left: 15px;
  border-left: 1px solid var(--line);
}
.meta.delivery-type {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}
.meta label {
  display: block;
  color: var(--label);
  font-size: 9px;
  margin-bottom: 5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.meta strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.contact-item {
  min-width: 0;
  padding: 10px 0;
}
.receiver-details {
  border-top: 1px solid var(--line);
}
.contact-item + .contact-item {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.contact-item label {
  display: block;
  color: var(--label);
  font-size: 9px;
  margin-bottom: 5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.contact-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}
.contact-item .contact-address {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.contact-subitem + .contact-subitem {
  margin-top: 0;
}
.contact-subitem .contact-address {
  margin-top: 0;
}
.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0 16px;
}
.status-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 20px;
  background: #e5e5df;
  font-size: 9px;
  font-weight: 700;
  color: var(--text);
}
.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  border: 1px solid #222;
}

/* Dynamic delivery status colors */
.status-pill.status-pending {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #ffe0e0;
  color: #a32626;
  animation: statusBadgeBlinkPending .55s ease-in-out infinite;
}
.status-pill.status-pending::before,
.status-pill.status-pending::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1.5px solid rgba(229, 57, 53, .62);
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  animation: statusBadgeWave 0.55s ease-out infinite;
}
.status-pill.status-pending::after {
  animation-delay: .275s;
}
.status-pill.status-pending i {
  position: relative;
  background: #e53935;
  border-color: #8f1f1f;
  z-index: 2;
}
@keyframes statusBadgeBlinkPending {
  0%, 100% { opacity: 1; }
  50% { opacity: .48; }
}
@keyframes statusBadgeWave {
  0% { transform: scale(.7); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}
.status-pill.status-held {
  background: #ffe0e0;
  color: #a32626;
  animation: statusBadgeBlink 1.15s ease-in-out infinite;
}
.status-pill.status-held i {
  background: #e53935;
}
.status-pill.status-delivered {
  background: #def5df;
  color: #28752d;
}
.status-pill.status-delivered i {
  background: #35a13b;
}
.status-pill.status-in-transit {
  background: #dcecff;
  color: #245b9b;
}
.status-pill.status-in-transit i {
  background: #3d82d6;
}
.status-pill.status-out-for-delivery {
  background: #ebe0ff;
  color: #6637a5;
}
.status-pill.status-out-for-delivery i {
  background: #8752d1;
}
.status-pill.status-processing {
  background: #fff1c7;
  color: #8a5a00;
}
.status-pill.status-processing i {
  background: #f2b400;
}
.status-pill.status-picked-up {
  background: #d8f2f3;
  color: #226c70;
}
.status-pill.status-picked-up i {
  background: #31979d;
}
.status-pill.status-cancelled,
.status-pill.status-failed {
  background: #ffe0e0;
  color: #a32626;
}
.status-pill.status-cancelled i,
.status-pill.status-failed i {
  background: #e53935;
}
@keyframes statusBadgeBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.42;
  }
}
@media (prefers-reduced-motion: reduce) {
  .status-pill.status-held,
  .status-pill.status-pending,
    .current-location-marker--pending .current-location-pulse {
    animation: none;
  }
}
.delivery-note {
  padding: 11px 0 17px;
  border-bottom: 1px solid var(--line);
}
.delivery-note label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--label);
  letter-spacing: 0.12em;
}
.delivery-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.action {
  width: 100%;
  height: 45px;
  margin-top: 16px;
  border-radius: 24px;
  background: var(--black);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
/* Toast */
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  padding: 11px 17px;
  border-radius: 24px;
  background: var(--black);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  font-size: 12px;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media(max-width:700px) {
  .controls-left {
    left: 14px;
    top: 20px;
  }
  .controls-right {
    right: 14px;
    top: 20px;
  }
  .control {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }
  .current-location-badge {
    top: 20px;
    height: 40px;
  }
  .map-top-interaction-guard {
    height: 80px;
  }
  .route-mode {
    right: 14px;
    top: 156px;
  }
  .bottom-nav {
    left: 14px;
    bottom: 14px;
    width: 180px;
    height: 45px;
  }
  .delivery-panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 50dvh;
    max-height: 85dvh;
    padding: 0 21px 21px;
    border-radius: 25px 25px 0 0;
  }
  .sheet-handle {
    width: calc(100% + 42px);
    height: 32px;
    margin: 0 -21px;
    padding: 4px;
  }
  .delivery-header {
    position: sticky;
    top: 32px;
    z-index: 25;
    margin: 0 -21px 21px;
    padding: 4px 21px;
    background: #f8f8f5;
    backdrop-filter: blur(12px);
  }
  .delivery-header h1 {
    font-size: clamp(18px, 4vw, 18px);
  }
  .image-viewer {
    display: block;
  }
  .image-frame {
    touch-action: pan-y;
  }
  .image-arrow {
    display: none;
  }
}
:root {
  --delivery-panel-width: clamp(300px, 34vw, 390px);
  --delivery-panel-min-width: 280px;
  --delivery-panel-max-width: min(520px, 50vw);
}
@media (min-width: 701px) {
  .map-top-interaction-guard {
    left: var(--delivery-panel-width);
  }
  .current-location-badge {
    left: calc(var(--delivery-panel-width) + (100vw - var(--delivery-panel-width)) / 2);
    top: 32px;
  }
  .route-loader {
    left: calc(var(--delivery-panel-width) + (100vw - var(--delivery-panel-width)) / 2);
  }
  .sheet-handle {
    display: none;
  }
  .controls-left {
    left: calc(var(--delivery-panel-width) + 24px);
  }
  .bottom-nav {
    display: none;
  }
  #map,
 .map-tint {
    left: var(--delivery-panel-width);
    right: 0;
    width: auto;
  }
  .delivery-panel {
    position: absolute;
    z-index: 30;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    width: var(--delivery-panel-width);
    max-height: none;
    height: 100%;
    overflow: auto;
    padding: 0 clamp(18px, 2.8vw, 26px) 26px;
    background: #f8f8f5;
    backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
  }
  .delivery-panel {
    display: block !important;
  }
  .sheet-handle {
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .delivery-header {
    position: sticky;
    top: 0;
    z-index: 25;
    padding-top: 20px;
    background: #f8f8f5;
    backdrop-filter: none;
  }
  .bottom-nav {
    left: calc(var(--delivery-panel-width) + 20px);
    right: auto;
  }
}
#refreshButton.spinning svg {
  animation: logisticsRefreshSpin .6s linear infinite;
}
#refreshButton:disabled {
  pointer-events: none;
  opacity: .7;
}
@keyframes logisticsRefreshSpin {
  to {
    transform: rotate(360deg);
  }
}

.sidebar-resize-handle {
  display: none;
}

@media (min-width: 701px) {
  .sidebar-resize-handle {
    display: block;
    position: absolute;
    top: 0;
    right: -5px;
    z-index: 60;
    width: 10px;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: col-resize;
    touch-action: none;
  }

  .sidebar-resize-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 3px;
    width: 3px;
    height: 56px;
    border-radius: 999px;
    background: rgba(23, 29, 25, .16);
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity .18s ease, background .18s ease;
  }

  .sidebar-resize-handle:hover::after,
  .sidebar-resize-handle.dragging::after {
    opacity: 1;
    background: rgba(23, 29, 25, .34);
  }

  body.sidebar-resizing,
  body.sidebar-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
  }
}

.save-current-location-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #171d19;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.save-current-location-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.save-current-location-button:hover {
  background: #0c100e;
}
.save-current-location-button:focus-visible,
.current-location-modal button:focus-visible {
  outline: 2px solid #d9f43d;
  outline-offset: 3px;
}
.current-location-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.current-location-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.current-location-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 10, .55);
  backdrop-filter: blur(5px);
}
.current-location-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 24px;
  border: 1px solid rgba(17, 17, 17, .08);
  border-radius: 20px;
  background: #f8f8f5;
  color: #171b18;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.current-location-modal-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.current-location-modal-header {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(17, 17, 17, .1);
}
.current-location-modal-card h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.04em;
}
.current-location-modal-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.current-location-modal-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}
.current-location-modal-card span {
  display: block;
  color: #686866;
  font-size: 12px;
  line-height: 1.5;
}

#currentLocationStatusSelect {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(17, 17, 17, .14);
  border-radius: 10px;
  background: #fff;
  color: #171b18;
  font: inherit;
  font-size: 12px;
}
#currentLocationStatusSelect:focus {
  outline: none;
  border-color: rgba(17, 17, 17, .24);
  box-shadow: none;
}
.current-location-modal-card small {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: #686866;
  font-size: 11px;
  line-height: 1.45;
}
.current-location-modal-card small.is-error {
  color: #b42318;
}
.current-location-modal-card small.is-success {
  color: #247a38;
}
.current-location-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 4px;
  padding-top: 0;
  border-top: 0;
}
.current-location-modal-actions button {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
#cancelCurrentLocationButton {
  background: #e9e9e5;
  color: #171b18;
}
#confirmCurrentLocationButton {
  background: #171d19;
  color: #fff;
}
.current-location-modal-actions button:disabled {
  cursor: wait;
  opacity: .6;
}
@media (max-width: 700px) {
  .save-current-location-button {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .save-current-location-button,
  .current-location-modal {
    transition: none;
  }
}
