:root {
  --navy:#0e1a30;
  --navy2:#172744;
  --ink:#101b32;
  --muted:#677589;
  --line:#e4eaf2;
  --page:#f2f5f9;
  --white:#fff;
  --amber:#f59e0b;
  --orange:#ed7816;
  --blue:#4264f5;
  --green:#159c64;
  --radius:16px;
  --shadow:0 8px 25px rgba(11,28,50,.07)
}


* {
  box-sizing:border-box
}

html {
  scroll-behavior:smooth
}

body {
  margin:0;
  font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--page)
}

button,input,select {
  font:inherit
}

button {
  cursor:pointer
}

button:disabled {
  cursor:not-allowed;
  opacity:.55
}

a {
  color:#1464ac;
  text-decoration:none
}

a:hover {
  text-decoration:underline
}

h1,h2,p {
  margin-top:0
}

.topbar {
  height:72px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 clamp(18px,3vw,42px);
  background:var(--navy);
  color:white;
  box-shadow:0 3px 14px #0e1a3017
}

.brand {
  display:flex;
  align-items:center;
  gap:12px
}

.brand-icon {
  width:43px;
  height:43px;
  border-radius:13px;
  background:#ffffff12;
  display:grid;
  place-items:center;
  font-size:25px
}

.brand strong {
  font-size:21px;
  letter-spacing:-.6px;
  display:block;
  line-height:1.2
}

.brand strong span {
  color:#ffb146
}

.brand small {
  display:block;
  color:#a9b8ca;
  font-size:11px;
  letter-spacing:.15px
}

.header-right {
  display:flex;
  align-items:center;
  gap:15px
}

.city-badge {
  color:#d3dde9;
  font-size:12px
}

.status-chip {
  font-size:11px;
  font-weight:700;
  background:#f59e0b26;
  color:#ffd38e;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid #f59e0b44
}

.status-chip.ok {
  background:#18a86722;
  color:#7df3b5;
  border-color:#18a86755
}

.status-chip.warn {
  background:#f59e0b26;
  color:#ffd38e
}


.workspace {
  max-width:1620px;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(340px,440px) minmax(0,1fr);
  gap:20px;
  padding:22px;
  align-items:start
}

.sidebar {
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0
}

.intro {
  padding:10px 5px 3px
}

.eyebrow,.step-label {
  display:inline-block;
  color:#df781c;
  letter-spacing:1.1px;
  font-weight:800;
  font-size:10px
}

.intro h1 {
  font-size:clamp(25px,2.2vw,31px);
  line-height:1.2;
  letter-spacing:-1.05px;
  margin:8px 0
}

.intro h1 em {
  font-style:normal;
  color:#ec821b
}

.intro p {
  color:var(--muted);
  font-size:13px;
  margin:0
}

.panel {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:17px 18px;
  box-shadow:var(--shadow)
}

.panel-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px
}

.panel-title h2 {
  font-size:15px;
  font-weight:800;
  letter-spacing:-.2px;
  margin:0
}

.panel-title .step-label {
  color:var(--muted);
  margin-bottom:4px
}

.small-muted {
  color:#8793a4;
  font-size:11px;
  text-align:right
}

.hint {
  color:var(--muted);
  font-size:12px;
  margin:0 0 10px
}

.key-entry {
  display:flex;
  gap:7px
}

.key-entry input {
  min-width:0;
  flex:1;
  width:100%
}

.key-entry button {
  flex:0 0 auto
}

.setup-links {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:8px;
  font-size:11px
}

.link-btn {
  border:0;
  background:none;
  color:#64748b;
  padding:0;
  font-size:11px
}

.setup-dot {
  width:10px;
  height:10px;
  border-radius:50%;
  background:#f59e0b;
  box-shadow:0 0 0 4px #f59e0b1c
}

.setup-dot.ready {
  background:#16a34a;
  box-shadow:0 0 0 4px #16a34a20
}


input:not([type=checkbox]),select {
  width:100%;
  height:38px;
  border:1px solid #dbe2eb;
  border-radius:9px;
  background:#fff;
  color:var(--ink);
  padding:0 10px;
  outline:0;
  min-width:0
}

input:focus,select:focus {
  border-color:#6582ee;
  box-shadow:0 0 0 3px #4668ee17
}

input::placeholder {
  color:#a0a9b8
}

.btn {
  border:none;
  padding:11px 13px;
  border-radius:10px;
  font-weight:800;
  font-size:12px;
  white-space:nowrap;
  transition:filter .18s,transform .18s
}

.btn:hover:not(:disabled) {
  filter:brightness(.97);
  transform:translateY(-1px)
}

.btn-navy {
  background:var(--navy);
  color:white
}

.btn-orange {
  background:linear-gradient(115deg,#ffb32e,#ef7f16);
  color:#182033;
  flex:1;
  box-shadow:0 6px 12px #ec881933
}

.btn-plain {
  background:#f2f5f9;
  color:#51627b
}

.btn-light {
  background:white;
  color:var(--ink);
  border:1px solid #e2e8f0
}

.btn-white {
  background:white;
  color:#182033
}

.btn-whatsapp {
  background:#19b36b;
  color:white
}


.location-row {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:60px;
  border-bottom:1px solid #edf0f4;
  padding:8px 0
}

.route-marker {
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  flex:0 0 27px;
  border-radius:50%;
  font-size:12px;
  font-weight:900;
  color:white
}

.origin-dot,.dot-start {
  background:#4264f5
}

.pickup-dot,.dot-pickup {
  background:#f39d16
}

.delivery-dot,.dot-delivery {
  background:#16a37e
}

.location-copy {
  flex:1;
  min-width:0
}

.location-copy strong {
  display:block;
  font-size:12px
}

.location-copy span {
  display:block;
  color:#8590a0;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:240px
}

.icon-action {
  background:#f2f6fb;
  border:1px solid #e5ebf4;
  border-radius:8px;
  padding:7px 9px;
  color:#344a71;
  font-size:11px;
  font-weight:700;
  flex:none
}

.icon-action:hover {
  background:#e8eef9
}

.check-row {
  display:flex;
  align-items:center;
  gap:10px;
  margin:11px 0 13px;
  cursor:pointer
}

.check-row input {
  width:17px;
  height:17px;
  accent-color:#f39d16
}

.check-row strong {
  display:block;
  font-size:12px
}

.check-row small {
  color:#8995a5;
  display:block;
  font-size:10px
}

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

.fields {
  display:grid;
  gap:10px
}

.two-cols {
  grid-template-columns:repeat(2,minmax(0,1fr))
}

.fields label,.target-row label {
  font-size:11px;
  font-weight:700;
  color:#59677a
}

.fields input,.fields select {
  margin-top:4px
}

.target-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:13px;
  padding-top:11px;
  border-top:1px solid #edf0f5
}

.target-row input {
  max-width:95px;
  height:34px;
  text-align:right
}


.quote-card {
  background:linear-gradient(160deg,#142641,#0e1a30);
  border-radius:var(--radius);
  padding:20px;
  color:white;
  box-shadow:0 12px 25px #0e1a3028
}

.quote-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px
}

.quote-header>span:first-child {
  font-size:10px;
  letter-spacing:1px;
  color:#b1c2d6;
  font-weight:900
}

.quote-tag {
  background:#ffffff19;
  border:1px solid #ffffff20;
  color:#dce8f2;
  border-radius:50px;
  padding:5px 9px;
  font-weight:700;
  font-size:10px
}

.price-hero {
  display:flex;
  align-items:baseline;
  gap:9px;
  margin:8px 0 0
}

.price-hero .currency {
  font-weight:900;
  color:#ffb141;
  font-size:23px
}

.price-hero #quote-price {
  font-size:clamp(50px,5vw,65px);
  font-weight:900;
  letter-spacing:-2px;
  line-height:1.15
}

.quote-card>p {
  font-size:12px;
  color:#b7c8dc;
  margin:4px 0 17px
}

.metrics {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1px;
  background:#ffffff22;
  border:1px solid #ffffff22;
  border-radius:10px;
  overflow:hidden
}

.metrics>div {
  padding:10px;
  background:#1b2d48;
  min-width:0
}

.metrics small {
  display:block;
  color:#afc0d4;
  font-size:10px
}

.metrics strong {
  font-size:15px;
  font-weight:900;
  color:white
}

.advice {
  background:#ffffff12;
  border:1px solid #ffffff2a;
  padding:10px 12px;
  border-radius:9px;
  font-size:11px;
  margin-top:12px;
  color:#ffda9c
}

.advice.good {
  color:#8ff1b8
}

.quote-actions {
  display:flex;
  gap:8px;
  margin-top:14px
}

.quote-actions button {
  flex:1
}

.sidebar-footnote {
  font-size:10px;
  line-height:1.7;
  color:#718198;
  padding:0 5px 16px;
  margin:0
}


.map-panel {
  background:white;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  position:sticky;
  top:18px;
  box-shadow:var(--shadow)
}

.map-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:15px 18px
}

.map-header strong {
  font-size:15px;
  display:block
}

.map-header span {
  color:#8492a3;
  font-size:11px
}

.map-container {
  position:relative;
  background:#dce4e4;
  min-height:560px
}

.map-container #map {
  height:min(74vh,790px);
  min-height:560px;
  z-index:0
}

.map-tools {
  z-index:500;
  position:absolute;
  left:15px;
  top:14px;
  display:flex;
  gap:4px;
  padding:5px;
  border-radius:12px;
  box-shadow:0 8px 22px #10253f27;
  background:#fff
}

.map-mode {
  background:transparent;
  border:1px solid transparent;
  padding:9px 12px;
  border-radius:8px;
  display:flex;
  gap:6px;
  align-items:center;
  font-size:11px;
  font-weight:800;
  color:#526174
}

.map-mode.active {
  background:#f3f5fb;
  border-color:#e2e6f5;
  color:#0f2342
}

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

.map-search {
  z-index:500;
  position:absolute;
  left:15px;
  right:15px;
  top:72px;
  max-width:410px
}

.search-row {
  background:#fff;
  border:1px solid #e5ecf3;
  border-radius:12px;
  box-shadow:0 9px 24px #10253f25;
  display:flex;
  padding:5px;
  gap:5px
}

.search-row input {
  border:0!important;
  box-shadow:none!important;
  font-size:12px;
  height:35px!important
}

.search-row button {
  border:0;
  background:var(--navy);
  color:white;
  padding:5px 12px;
  font-size:11px;
  font-weight:800;
  border-radius:8px
}

.search-results {
  background:white;
  border-radius:10px;
  margin-top:5px;
  max-height:230px;
  overflow:auto;
  box-shadow:0 9px 24px #10253f30
}

.search-results button {
  border:0;
  width:100%;
  background:white;
  text-align:left;
  padding:9px 12px;
  font-size:12px;
  color:#21324a;
  border-bottom:1px solid #e8edf3
}

.search-results button:hover {
  background:#f2f5fa
}

.search-results p {
  padding:10px;
  font-size:12px;
  margin:0
}

.map-hint {
  position:absolute;
  z-index:400;
  left:15px;
  bottom:26px;
  background:#0e1a30ea;
  color:white;
  border-radius:9px;
  padding:9px 12px;
  max-width:calc(100% - 30px);
  font-size:11px;
  box-shadow:0 4px 14px #0e1a3030;
  pointer-events:none
}

.map-footer {
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 16px;
  color:#758499;
  font-size:11px
}

.map-footer strong {
  color:#253a5d
}

.legend {
  display:flex;
  align-items:center;
  gap:5px
}

.legend i {
  width:8px;
  height:8px;
  display:inline-block;
  border-radius:50%;
  margin-left:5px
}

.leaflet-container {
  font:inherit
}

.pin-bubble {
  width:37px;
  height:37px;
  border-radius:15px 15px 15px 2px;
  border:3px solid #fff;
  box-shadow:0 4px 15px #0004;
  display:grid;
  place-items:center;
  transform:rotate(-45deg);
  color:white;
  font-size:15px;
  font-weight:900
}

.pin-bubble span {
  transform:rotate(45deg)
}

.pin-origin {
  background:#4264f5
}

.pin-pickup {
  background:#ef9512
}

.pin-delivery {
  background:#12a47b
}

.leaflet-div-icon {
  background:transparent;
  border:0
}

#toast {
  position:fixed;
  bottom:22px;
  left:50%;
  transform:translate(-50%,30px);
  background:#172744;
  color:white;
  border-radius:10px;
  padding:10px 17px;
  z-index:2000;
  box-shadow:0 10px 25px #0003;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s,transform .2s;
  font-size:12px;
  text-align:center;
  max-width:min(92vw,510px)
}

#toast.show {
  opacity:1;
  transform:translate(-50%,0)
}

#toast.error {
  background:#a33838
}


@media(max-width:1100px) {
  .workspace {
    grid-template-columns:minmax(310px,400px) minmax(0,1fr);
    gap:13px;
    padding:14px
  }

  .map-container #map {
    height:calc(100vh - 175px);
    min-height:580px
  }

  .map-tools {
    flex-wrap:wrap
  }

  .map-search {
    top:72px
  }

  .sidebar {
    gap:11px
  }

  .panel {
    padding:15px
  }


}


@media(max-width:800px) {
  .topbar {
    height:65px;
    padding:0 15px
  }

  .city-badge {
    display:none
  }

  .brand strong {
    font-size:19px
  }

  .workspace {
    display:flex;
    flex-direction:column;
    padding:12px;
    gap:12px
  }

  .map-panel {
    position:static;
    width:100%;
    order:1
  }

  .sidebar {
    order:2;
    width:100%;
    display:flex;
    flex-direction:column
  }

  .intro {
    order:-2;
    padding:10px 6px 0
  }

  .setup-panel {
    order:-1
  }

  .places-panel {
    order:0
  }

  .options-panel {
    order:2
  }

  .quote-card {
    order:1
  }

  .sidebar-footnote {
    order:3
  }

  .map-container {
    min-height:380px
  }

  .map-container #map {
    height:48vh;
    min-height:380px;
    max-height:540px
  }

  .map-header {
    padding:10px 12px
  }

  .map-search {
    left:10px;
    right:10px;
    top:65px;
    max-width:390px
  }

  .map-tools {
    left:10px;
    top:10px
  }

  .map-hint {
    left:10px;
    bottom:10px
  }

  .map-footer {
    font-size:10px
  }

  .intro h1 {
    font-size:26px
  }

  .panel {
    padding:14px
  }


}


@media(max-width:450px) {
  .workspace {
    padding:8px
  }

  .brand small {
    font-size:10px
  }

  .status-chip {
    font-size:10px;
    padding:6px 8px
  }

  .map-header span {
    font-size:10px
  }

  .map-container #map {
    height:45vh;
    min-height:350px
  }

  .map-tools {
    left:7px;
    right:7px;
    justify-content:space-between;
    top:8px
  }

  .map-mode {
    padding:8px 9px
  }

  .map-search {
    top:57px;
    left:7px;
    right:7px
  }

  .map-hint {
    left:7px;
    bottom:10px
  }

  .map-footer {
    display:block;
    line-height:1.7
  }

  .map-footer>span {
    display:block
  }

  .price-hero #quote-price {
    font-size:57px
  }

  .quote-actions {
    flex-direction:row
  }

  .quote-actions button {
    font-size:11px;
    padding:10px 6px
  }


}


@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    animation:none!important;
    transition:none!important
  }


}


