:root{
  --bg:#07131d;--panel:#0b1b27;--card:#102634;--card2:#0d2230;--line:#1d3d50;
  --text:#f4f8fb;--muted:#93a9b7;--accent:#38bdf8;--accent2:#7dd3fc;--ok:#34d399;
  --shadow:0 18px 50px rgba(0,0,0,.28);--radius:18px;
}
*{box-sizing:border-box}
html,body,#app{margin:0;width:100%;height:100%;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}
body{overflow:hidden}
button,input{font:inherit}
button{cursor:pointer}
.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(7,19,29,.96);position:relative;z-index:1000}
.brand{display:flex;align-items:center;gap:12px}
.brand img{width:38px;height:38px;object-fit:contain}
.brand strong{display:block;font-size:15px;letter-spacing:.12em}
.brand span{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.top-actions{display:flex;gap:9px;align-items:center}
.brand-link{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;border-radius:10px;text-decoration:none!important;font-size:10px!important;font-weight:900;letter-spacing:.05em;border:1px solid rgba(255,255,255,.16)}
.labs-link{background:#f8fafc;color:#07131d!important}
.deltop-link{background:#0e7490;color:white!important;border-color:#38bdf8}
.brand-link:hover{filter:brightness(1.08)}
.apps-strip{height:42px;display:flex;align-items:center;gap:8px;padding:0 18px;border-bottom:1px solid rgba(255,255,255,.08);background:#081721;position:relative;z-index:950;overflow-x:auto;white-space:nowrap}
.apps-strip::-webkit-scrollbar{height:0}
.apps-label{font-size:8px;font-weight:900;letter-spacing:.14em;color:#65818f;margin-right:3px}
.apps-strip a{display:inline-flex;align-items:center;padding:6px 10px;border:1px solid #24465a;border-radius:999px;color:#d8e8ef;text-decoration:none;font-size:10px;font-weight:750;background:#0c2230}
.apps-strip a:hover{border-color:#38bdf8;color:white;background:#123246}
.workspace{height:calc(100% - 110px);display:grid;grid-template-columns:360px 1fr}
.panel{background:linear-gradient(180deg,#0b1b27 0%,#091823 100%);border-right:1px solid rgba(255,255,255,.08);padding:18px;overflow:auto;z-index:700;box-shadow:var(--shadow)}
.hero{padding:7px 6px 14px}
.eyebrow{font-size:10px;letter-spacing:.17em;color:var(--accent2);font-weight:700}
.hero h1{font-size:24px;line-height:1.08;margin:8px 0 9px}
.hero p{margin:0;color:var(--muted);font-size:13px;line-height:1.5}
.card{background:linear-gradient(180deg,rgba(18,43,58,.96),rgba(13,34,48,.96));border:1px solid rgba(255,255,255,.075);border-radius:var(--radius);padding:14px;margin:10px 0;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.card label,.card-title{font-size:12px;font-weight:700;color:#dce8ee}
.card-title{margin-bottom:10px}
.input-row{display:grid;grid-template-columns:1fr 42px;gap:8px;margin-top:9px}
input{width:100%;background:#081923;border:1px solid #24465a;color:white;border-radius:12px;padding:11px 12px;outline:none}
input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(56,189,248,.12)}
.icon-btn,.primary-btn,.secondary-btn{border:0;border-radius:12px;color:white}
.icon-btn{background:#16435b;font-size:19px}
.icon-btn:hover{background:#1a5471}
.primary-btn{width:100%;background:linear-gradient(135deg,#0e7490,#0284c7);padding:12px 14px;font-weight:750}
.primary-btn:hover{filter:brightness(1.08)}
.secondary-btn{width:100%;margin-top:9px;padding:10px 12px;background:#123246;border:1px solid #28566d;text-align:left}
.secondary-btn.active{background:#075985;border-color:#38bdf8}
.switch-row{display:flex;align-items:center;justify-content:space-between;padding:8px 0;font-weight:500!important}
.switch-row span{display:flex;align-items:center;gap:9px}
.switch-row input{width:18px;height:18px;accent-color:#0ea5e9}
.line-sample{width:20px;height:4px;border-radius:2px;display:inline-block}.line-sample.free{background:#00d4ff}.line-sample.toll{background:#ff6b35}
.km-sample{display:inline-flex;align-items:center;justify-content:center;min-width:27px;height:18px;padding:0 4px;border-radius:5px;background:#fff;color:#111827;border:2px solid #facc15;font-size:8px;font-weight:900;line-height:1}
.export-card p{font-size:12px;color:var(--muted);line-height:1.45;margin:0 0 11px}
.export-card small{display:block;margin-top:9px;color:#6f8795;line-height:1.35}
.panel-footer{display:flex;align-items:center;gap:8px;padding:12px 6px 5px;color:var(--muted);font-size:11px}
.status-dot{width:8px;height:8px;border-radius:50%;background:#64748b}
.status-dot.ok{background:var(--ok);box-shadow:0 0 0 4px rgba(52,211,153,.1)}
.status-dot.warn{background:#fbbf24;box-shadow:0 0 0 4px rgba(251,191,36,.1)}
.map-wrap{position:relative;min-width:0}
#map{position:absolute;inset:0;background:#dbe6eb}
.map-badge{position:absolute;right:14px;bottom:14px;z-index:650;background:rgba(7,19,29,.88);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:8px 11px;display:flex;flex-direction:column;gap:2px;box-shadow:var(--shadow)}
.map-badge strong{font-size:9px;color:#7dd3fc;letter-spacing:.12em}
.map-badge span{font-size:10px;color:#d2e0e7}
.loading-badge{position:absolute;left:50%;top:16px;transform:translateX(-50%);z-index:700;background:rgba(7,19,29,.88);border:1px solid rgba(255,255,255,.12);border-radius:999px;padding:9px 14px;font-size:11px;box-shadow:var(--shadow)}
.hidden{display:none!important}
.search-results{margin-top:8px;border:1px solid #24465a;border-radius:12px;overflow:hidden;max-height:220px;overflow-y:auto}
.search-item{padding:10px 11px;border-bottom:1px solid rgba(255,255,255,.07);background:#081923;font-size:12px;color:#dce8ee;cursor:pointer}
.search-item:last-child{border-bottom:0}
.search-item:hover{background:#123246}
.result-card{border-color:rgba(56,189,248,.3)}
.result-main{font-size:18px;font-weight:800;margin-bottom:5px}
.result-sub{color:var(--muted);font-size:12px;line-height:1.5}
.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:11px}
.metric{background:#081923;border-radius:11px;padding:9px}
.metric b{display:block;font-size:10px;color:#6f8795;margin-bottom:3px}
.metric span{font-size:12px;color:#eef7fb}
.leaflet-control-zoom a{background:#0b1b27!important;color:white!important;border-color:#24465a!important}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#0b1b27;color:#eaf4f8}
.leaflet-popup-content{font-size:12px;line-height:1.4}
@media(max-width:820px){
  .topbar{height:60px;padding:0 10px}.brand img{width:32px;height:32px}.brand span{display:none}.top-actions{gap:5px}.brand-link{padding:7px 8px;font-size:8px!important}.apps-strip{height:40px;padding:0 10px}.apps-label{display:none}
  .workspace{height:calc(100% - 100px);display:block}.panel{position:absolute;left:10px;top:10px;bottom:10px;width:min(330px,calc(100vw - 20px));border:1px solid rgba(255,255,255,.1);border-radius:20px;z-index:800;padding:13px;max-height:calc(100% - 20px)}
  .map-wrap{height:100%}.hero h1{font-size:21px}.card{padding:12px}
}

.dual-input-row{display:grid;grid-template-columns:1.2fr .8fr;gap:8px;margin-top:9px}.compact-top{margin-top:9px}.helper-text{display:block;margin-top:8px;color:#6f8795;line-height:1.35;font-size:11px}

.basemap-switch{position:absolute;right:14px;top:14px;z-index:750;display:flex;background:rgba(7,19,29,.92);padding:4px;border:1px solid rgba(255,255,255,.14);border-radius:13px;box-shadow:var(--shadow);backdrop-filter:blur(10px)}
.base-btn{border:0;background:transparent;color:#a9beca;border-radius:9px;padding:8px 13px;font-size:11px;font-weight:800;letter-spacing:.02em}
.base-btn.active{background:#f8fafc;color:#07131d}
.road-legend{position:absolute;left:14px;bottom:14px;z-index:650;display:flex;gap:12px;align-items:center;background:rgba(7,19,29,.88);border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:8px 10px;font-size:10px;color:#dce8ee;box-shadow:var(--shadow);backdrop-filter:blur(8px)}
.road-legend span{display:flex;align-items:center;gap:5px}
.legend-line{display:inline-block;width:19px;height:4px;border-radius:3px}
.legend-line.free{background:#00d4ff}.legend-line.toll{background:#ff6b35}
.legend-km{display:inline-flex;align-items:center;justify-content:center;height:17px;min-width:25px;padding:0 3px;border-radius:4px;background:#fff;color:#111827;border:2px solid #facc15;font-size:7px;font-weight:900}
.km-label-icon{background:transparent!important;border:0!important}
.km-badge{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;min-width:56px;height:24px;padding:0 7px;border-radius:7px;background:rgba(255,255,255,.96);color:#111827;border:2px solid #facc15;font-size:10px;font-weight:900;line-height:1;letter-spacing:.01em;box-shadow:0 2px 8px rgba(0,0,0,.38)}
.satellite-mode .km-badge{background:rgba(8,15,20,.93);color:#fff;border-color:#ffd43b;text-shadow:0 1px 1px #000}
.road-popup .road-chip{display:inline-block;margin-right:7px;padding:2px 6px;border-radius:999px;font-size:9px;font-weight:900;letter-spacing:.06em}
.popup-free{background:#083d4a;color:#6ee7ff}.popup-toll{background:#55200e;color:#ffb08f}
@media(max-width:820px){.basemap-switch{right:10px;top:10px}.road-legend{left:auto;right:10px;bottom:10px;gap:8px;padding:7px 8px}.road-legend span{font-size:9px}.km-badge{min-width:52px;height:22px;font-size:9px}}

.location-btn{display:flex;align-items:center;justify-content:center;text-align:center;font-weight:750}
.location-btn:disabled{opacity:.65;cursor:progress}
.selected-road-card{border-color:rgba(56,189,248,.28)}
.selected-road-head{display:flex;align-items:center;gap:8px;font-size:18px}
.selected-road-name{font-size:12px;color:#dce8ee;margin-top:7px;line-height:1.35}
.selected-road-meta{font-size:10px;color:#6f8795;margin-top:5px}
.export-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.secondary-action-btn{border:1px solid #28566d;border-radius:12px;background:#123246;color:white;padding:12px 10px;font-weight:750}
.secondary-action-btn:hover{background:#17445d}
.km-badge{min-width:72px;max-width:170px;height:auto;min-height:24px;padding:4px 7px;flex-direction:column;gap:1px}
.km-main{display:block;font-size:10px;font-weight:900;line-height:1.1}
.km-road-name{display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;font-weight:700;opacity:.78;line-height:1.1}
@media(max-width:820px){.export-grid{grid-template-columns:1fr}.km-road-name{max-width:128px}}

.selected-road-range{margin-top:7px;font-size:11px;font-weight:800;color:#d9f4ff}
.endpoint-start .endpoint-end 
.row-title{display:flex;align-items:center;justify-content:space-between}
.tiny-close{width:24px;height:24px;border:1px solid #2a4c5f;border-radius:8px;background:#0a1b26;color:#9fb5c1;font-size:17px;line-height:1}
.tiny-close:hover{color:white;border-color:#4b7185}
.road-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.road-action-grid .primary-btn,.road-action-grid .secondary-action-btn{min-height:42px}
.point-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.gps-hero{padding:12px;border:1px solid rgba(56,189,248,.35);border-radius:13px;background:linear-gradient(135deg,rgba(14,116,144,.22),rgba(2,132,199,.1));margin-bottom:12px}
.gps-hero span{display:block;font-size:9px;letter-spacing:.13em;font-weight:900;color:#7dd3fc}
.gps-hero strong{display:block;font-size:18px;line-height:1.15;margin-top:5px;color:white}
.gps-hero small{display:block;font-size:10px;color:#a9beca;margin-top:5px}
.delta-toast{position:fixed;left:50%;bottom:28px;z-index:5000;transform:translate(-50%,15px);padding:10px 14px;border-radius:999px;background:#f8fafc;color:#07131d;font-size:11px;font-weight:850;box-shadow:0 12px 35px rgba(0,0,0,.35);opacity:0;pointer-events:none;transition:.2s ease}
.delta-toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:820px){.road-action-grid,.point-actions{grid-template-columns:1fr}.apps-strip a{font-size:9px;padding:6px 9px}}

.mobile-panel-btn,.mobile-panel-backdrop,.mobile-panel-head{display:none}
@media(max-width:820px){
  .workspace{position:relative;overflow:hidden}
  .map-wrap{position:absolute;inset:0;height:auto}
  .panel{
    display:block;
    left:8px;
    top:8px;
    bottom:8px;
    width:min(350px,calc(100vw - 28px));
    max-height:none;
    transform:translateX(calc(-100% - 24px));
    transition:transform .24s ease;
    z-index:930;
    box-shadow:0 18px 55px rgba(0,0,0,.48);
    will-change:transform;
  }
  body.mobile-panel-open .panel{transform:translateX(0)}
  .mobile-panel-btn{
    display:inline-flex;
    align-items:center;
    gap:7px;
    position:absolute;
    left:10px;
    top:10px;
    z-index:920;
    border:1px solid rgba(255,255,255,.2);
    border-radius:12px;
    padding:10px 13px;
    background:rgba(7,19,29,.94);
    color:white;
    font-size:11px;
    font-weight:850;
    box-shadow:0 8px 24px rgba(0,0,0,.3);
    backdrop-filter:blur(9px)
  }
  body.mobile-panel-open .mobile-panel-btn{opacity:0;pointer-events:none}
  .mobile-panel-backdrop{
    position:absolute;
    inset:0;
    z-index:925;
    background:rgba(0,0,0,.36);
    backdrop-filter:blur(1px)
  }
  body.mobile-panel-open .mobile-panel-backdrop{display:block}
  .mobile-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    position:sticky;
    top:-13px;
    z-index:10;
    margin:-13px -13px 10px;
    padding:12px 13px 10px;
    background:rgba(9,24,35,.98);
    border-bottom:1px solid rgba(255,255,255,.08)
  }
  .mobile-panel-head strong{font-size:11px;letter-spacing:.08em}
  .mobile-panel-head button{
    width:32px;
    height:32px;
    border-radius:10px;
    border:1px solid #31566a;
    background:#102b3b;
    color:white;
    font-size:21px;
    line-height:1
  }
  .basemap-switch{top:10px;right:10px}
  .loading-badge{top:58px}
}

@media(max-width:820px){.leaflet-top.leaflet-left{top:50px}}

.km-label-icon{pointer-events:none!important}

/* Public products navigation */
.apps-strip{
  height:68px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:8px 16px;
  background:linear-gradient(90deg,#07131d 0%,#0a1d29 52%,#07131d 100%);
  border-bottom:1px solid rgba(125,211,252,.16);
  overflow:hidden;
}
.apps-heading{
  min-width:132px;
  display:flex;
  flex-direction:column;
  gap:3px;
  padding-right:13px;
  border-right:1px solid rgba(255,255,255,.09);
}
.apps-heading .apps-label{
  display:block;
  margin:0;
  color:#7dd3fc;
  font-size:8px;
  font-weight:950;
  letter-spacing:.14em;
}
.apps-heading small{
  color:#718a98;
  font-size:9px;
  line-height:1.15;
}
.public-apps{
  display:flex;
  gap:9px;
  min-width:0;
  flex:1;
  overflow-x:auto;
  scrollbar-width:none;
}
.public-apps::-webkit-scrollbar{display:none}
.public-app{
  flex:0 0 auto;
  min-width:205px;
  height:50px;
  display:grid!important;
  grid-template-columns:34px 1fr auto;
  align-items:center!important;
  gap:8px;
  padding:6px 9px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:13px!important;
  background:linear-gradient(145deg,rgba(20,49,66,.92),rgba(11,31,43,.94))!important;
  color:white!important;
  box-shadow:0 5px 18px rgba(0,0,0,.16);
  transition:transform .16s ease,border-color .16s ease,background .16s ease!important;
}
.public-app:hover{
  transform:translateY(-1px);
  border-color:rgba(125,211,252,.55)!important;
  background:linear-gradient(145deg,rgba(25,65,86,.98),rgba(13,39,54,.98))!important;
}
.public-app-icon{
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  font-size:13px;
  font-weight:950;
  color:#06141e;
  background:#7dd3fc;
  box-shadow:0 0 0 3px rgba(125,211,252,.08);
}
.public-app-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.public-app-copy strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  line-height:1.1;
  letter-spacing:.01em;
}
.public-app-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#88a1af;
  font-size:8px;
  line-height:1.1;
}
.public-app-status{
  align-self:start;
  margin-top:1px;
  padding:3px 5px;
  border-radius:999px;
  font-size:6.5px;
  font-weight:950;
  letter-spacing:.07em;
  white-space:nowrap;
}
.public-app--released .public-app-icon{background:#a7f3d0}
.public-app--released .public-app-status{background:rgba(52,211,153,.14);color:#6ee7b7;border:1px solid rgba(52,211,153,.28)}
.public-app--live .public-app-icon{background:#7dd3fc}
.public-app--live .public-app-status{background:rgba(56,189,248,.14);color:#7dd3fc;border:1px solid rgba(56,189,248,.28)}
.public-app--beta .public-app-icon{background:#fde68a}
.public-app--beta .public-app-status{background:rgba(250,204,21,.12);color:#fde68a;border:1px solid rgba(250,204,21,.25)}
.workspace{height:calc(100% - 136px)}
.brand-link{box-shadow:0 4px 16px rgba(0,0,0,.16)}
.labs-link{border-color:#fff!important}
.deltop-link{box-shadow:0 0 0 1px rgba(56,189,248,.08),0 5px 18px rgba(2,132,199,.15)}

@media(max-width:820px){
  .apps-strip{
    height:58px;
    padding:6px 9px;
    gap:7px;
    overflow-x:auto;
  }
  .apps-heading{display:none}
  .public-apps{gap:7px;overflow:visible}
  .public-app{
    min-width:154px;
    height:46px;
    grid-template-columns:30px 1fr;
    gap:7px;
    padding:6px 8px!important;
  }
  .public-app-icon{width:28px;height:28px;border-radius:9px;font-size:11px}
  .public-app-copy strong{font-size:10px}
  .public-app-copy small{display:none}
  .public-app-status{
    grid-column:2;
    grid-row:2;
    justify-self:start;
    margin-top:-5px;
    padding:2px 4px;
    font-size:5.5px;
  }
  .workspace{height:calc(100% - 118px)}
}

/* =========================================================
   DELTA LABS PRODUCT SKIN · v5
   Shared visual language with deltalabs.mx
   ========================================================= */
:root{
  --ink:#f3f7f6;
  --muted:#8c9c9f;
  --teal:#23c5b5;
  --teal-bright:#5ce5d6;
  --night:#061014;
  --night-2:#09171c;
  --line:rgba(201,237,232,.16);
  --green:#78d879;
  --yellow:#e2c94c;
  --blue:#6db8ff;
  --paper:#e8ebe5;
  --paper-ink:#152629;
  --sans:"Aptos","Inter","Segoe UI",Arial,sans-serif;
  --display:"Space Grotesk","Aptos Display","Segoe UI",sans-serif;
  --mono:"IBM Plex Mono","Cascadia Code",Consolas,monospace;
  --radius:2px;
  --shadow:0 24px 70px rgba(0,0,0,.32);
}
html,body,#app{background:var(--night);color:var(--ink);font-family:var(--sans)}
::selection{background:var(--teal);color:var(--night)}

/* Header / brand */
.topbar{
  height:78px;
  padding:0 4vw;
  justify-content:flex-start;
  gap:0;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(6,16,20,.88);
  backdrop-filter:blur(18px);
}
.labs-brand{width:150px;height:48px;display:flex;align-items:center;overflow:hidden;flex:none}
.labs-brand img{width:100%;height:auto;filter:invert(1) brightness(4)}
.product-lockup{
  height:42px;
  margin-left:25px;
  padding-left:25px;
  border-left:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.product-lockup-icon{
  width:38px;height:38px;
  display:grid;place-items:center;
  border:1px solid rgba(92,229,214,.28);
  background:#071519;
}
.product-lockup-icon img{width:27px;height:27px}
.product-lockup>div{display:grid;gap:5px}
.product-code{
  color:#728589;
  font:600 8px/1 var(--mono);
  letter-spacing:.13em;
  white-space:nowrap;
}
.product-lockup strong{
  font:580 15px/1 var(--display);
  letter-spacing:.045em;
  white-space:nowrap;
}
.top-actions{margin-left:auto;gap:clamp(15px,2vw,30px)}
.top-actions a{
  color:#b9c5c7!important;
  background:none!important;
  border:0!important;
  padding:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  font:500 12px/1 var(--sans)!important;
  letter-spacing:0!important;
  text-decoration:none!important;
  transition:color .2s ease;
}
.top-actions a:hover{color:white!important}
.top-actions .deltop-link{
  min-height:40px;
  padding:0 17px!important;
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(92,229,214,.48)!important;
  color:var(--teal-bright)!important;
  font:600 11px/1 var(--mono)!important;
  letter-spacing:.04em!important;
}

/* Public products: compact Delta Labs product index */
.apps-strip{
  height:64px;
  padding:0 4vw;
  gap:0;
  background:#081419;
  border-bottom:1px solid var(--line);
  overflow:hidden;
}
.apps-heading{
  min-width:170px;
  padding-right:22px;
  border-right:1px solid var(--line);
  gap:5px;
}
.apps-heading .apps-label{
  color:var(--teal-bright);
  font:600 8px/1 var(--mono);
  letter-spacing:.16em;
}
.apps-heading small{color:#65797d;font:9px/1.2 var(--sans)}
.public-apps{
  height:100%;
  gap:0;
  overflow-x:auto;
}
.public-app{
  min-width:230px;
  height:100%;
  padding:0 18px!important;
  grid-template-columns:36px 1fr auto;
  gap:12px;
  border:0!important;
  border-right:1px solid var(--line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transition:background .22s ease,padding .22s ease!important;
}
.public-app:hover{
  transform:none!important;
  padding-left:23px!important;
  background:rgba(35,197,181,.055)!important;
  border-color:var(--line)!important;
}
.public-app-icon{
  width:34px;height:34px;
  display:grid;place-items:center;
  background:#071519!important;
  border:1px solid rgba(92,229,214,.22);
  border-radius:0;
  box-shadow:none;
}
.public-app-icon img{width:27px;height:27px}
.public-app-copy{gap:5px}
.public-app-copy strong{font:570 12px/1 var(--display);color:var(--ink)}
.public-app-copy small{font:9px/1 var(--sans);color:#788b8f}
.public-app-status{
  margin:0;
  padding:0;
  border:0!important;
  background:none!important;
  font:600 7px/1.15 var(--mono);
  letter-spacing:.08em;
}
.public-app-status::before{
  content:"";
  display:inline-block;
  width:5px;height:5px;
  margin-right:6px;
  border-radius:50%;
  background:currentColor;
  box-shadow:0 0 8px currentColor;
}
.public-app--released .public-app-status,.public-app--live .public-app-status{color:var(--green)}
.public-app--beta .public-app-status{color:var(--yellow)}

/* Main workspace */
.workspace{height:calc(100% - 142px);grid-template-columns:370px 1fr}
.panel{
  background:#071316;
  border-right:1px solid var(--line);
  padding:20px;
  box-shadow:none;
}
.hero{padding:10px 3px 20px;border-bottom:1px solid var(--line);margin-bottom:14px}
.eyebrow{
  color:var(--teal-bright);
  font:600 9px/1 var(--mono);
  letter-spacing:.19em;
}
.hero h1{
  margin:12px 0 10px;
  color:var(--ink);
  font:570 28px/.98 var(--display);
  letter-spacing:-.035em;
}
.hero p{color:#91a2a5;font-size:12px;line-height:1.65}

.card{
  margin:0;
  padding:17px 3px;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.card label,.card-title{
  color:#aebbbc;
  font:600 9px/1 var(--mono);
  letter-spacing:.09em;
  text-transform:uppercase;
}
.card-title{margin-bottom:12px}
.input-row,.dual-input-row{margin-top:11px}
input{
  min-height:43px;
  padding:10px 12px;
  color:var(--ink);
  background:#081519;
  border:1px solid var(--line);
  border-radius:0;
  font:12px/1 var(--sans);
}
input::placeholder{color:#5f7479}
input:focus{
  border-color:var(--teal);
  box-shadow:0 0 0 1px rgba(35,197,181,.22);
}
.icon-btn,.primary-btn,.secondary-btn,.secondary-action-btn{
  border-radius:0!important;
  transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;
}
.icon-btn{
  background:#0b282b;
  color:var(--teal-bright);
  border:1px solid rgba(92,229,214,.22);
}
.icon-btn:hover{background:#103537}
.primary-btn{
  min-height:43px;
  background:var(--teal);
  color:#031313;
  font:650 9px/1 var(--mono);
  letter-spacing:.07em;
  text-transform:uppercase;
}
.primary-btn:hover{background:var(--teal-bright);filter:none}
.secondary-btn,.secondary-action-btn{
  background:#081519;
  border:1px solid var(--line);
  color:#b8c6c8;
  font:600 9px/1.25 var(--mono);
  letter-spacing:.04em;
}
.secondary-btn{text-align:left}
.secondary-btn:hover,.secondary-action-btn:hover{background:rgba(35,197,181,.055);border-color:rgba(92,229,214,.45);color:white}
.secondary-btn.active{background:rgba(35,197,181,.09);border-color:var(--teal);color:var(--teal-bright)}
.helper-text,.export-card small{color:#647b80;font:10px/1.45 var(--sans)}
.export-card p{color:#87999c;font-size:11px}
.switch-row{font:500 11px/1.2 var(--sans)!important;color:#b8c5c7}
.switch-row input{accent-color:var(--teal)}
.search-results{border:1px solid var(--line);border-radius:0;background:#081519}
.search-item{background:#081519;border-bottom:1px solid var(--line);color:#c4d0d1}
.search-item:hover{background:rgba(35,197,181,.06)}
.selected-road-card{border-color:var(--line)}
.selected-road-head{font:570 18px/1 var(--display)}
.selected-road-name{color:#b9c5c7}
.selected-road-meta{color:#6d8286;font-family:var(--mono)}
.selected-road-range{color:var(--teal-bright);font:600 10px/1 var(--mono)}
.tiny-close{border-radius:0;background:#081519;border-color:var(--line);color:#87999c}
.gps-hero{
  border-radius:0;
  border-color:rgba(92,229,214,.28);
  border-left:2px solid var(--teal);
  background:rgba(35,197,181,.055);
}
.gps-hero span{color:var(--teal-bright);font-family:var(--mono)}
.result-card{border-color:var(--line)}
.result-main{font:570 20px/1.05 var(--display)}
.result-sub{color:#8c9c9f}

/* Map furniture */
.basemap-switch{
  background:rgba(6,16,20,.88);
  border:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
  backdrop-filter:blur(14px);
}
.base-btn{
  border-radius:0;
  color:#839598;
  font:600 9px/1 var(--mono);
  letter-spacing:.07em;
  text-transform:uppercase;
}
.base-btn.active{background:var(--teal);color:#031313}
.road-legend,.map-badge,.loading-badge{
  border-radius:0;
  background:rgba(6,16,20,.88);
  border:1px solid var(--line);
  box-shadow:none;
  backdrop-filter:blur(14px);
}
.map-badge strong{color:var(--teal-bright);font-family:var(--mono)}
.map-badge span{color:#aebbbc}
.road-legend{color:#b7c5c7;font-family:var(--mono)}
.legend-line.free,.line-sample.free{background:var(--teal-bright)}
.legend-line.toll,.line-sample.toll{background:var(--yellow)}
.legend-km,.km-sample{
  border-color:var(--teal-bright);
  background:#071519;
  color:var(--teal-bright);
  border-radius:0;
}
.km-badge{
  border-radius:0;
  background:rgba(6,16,20,.93);
  border:1px solid var(--teal-bright);
  color:var(--ink);
  box-shadow:0 7px 18px rgba(0,0,0,.28);
}
.satellite-mode .km-badge{background:rgba(6,16,20,.94);border-color:var(--teal-bright)}
.km-main{font-family:var(--mono);letter-spacing:.02em}
.km-road-name{color:#8fa2a5}
.leaflet-control-zoom a{
  background:#071519!important;
  color:var(--teal-bright)!important;
  border-color:var(--line)!important;
  border-radius:0!important;
}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#071519;color:var(--ink)}
.leaflet-popup-content-wrapper{border-radius:0;border:1px solid var(--line)}
.popup-free{background:rgba(35,197,181,.1);color:var(--teal-bright)}
.popup-toll{background:rgba(226,201,76,.1);color:var(--yellow)}
.endpoint-start .endpoint-end .delta-toast{border-radius:0;background:var(--teal-bright);color:#031313;font-family:var(--mono)}

/* Mobile drawer in Delta Labs style */
.mobile-panel-btn{
  border-radius:0!important;
  background:rgba(6,16,20,.94)!important;
  border-color:rgba(92,229,214,.35)!important;
  color:var(--teal-bright)!important;
  font:600 9px/1 var(--mono)!important;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.mobile-panel-head{background:rgba(6,16,20,.98)!important;border-color:var(--line)!important}
.mobile-panel-head strong{color:var(--teal-bright);font-family:var(--mono)}
.mobile-panel-head button{border-radius:0!important;background:#081519!important;border-color:var(--line)!important;color:var(--ink)!important}

@media(max-width:820px){
  .topbar{height:64px;padding:0 12px}
  .labs-brand{width:106px;height:38px}
  .product-lockup{margin-left:12px;padding-left:12px;height:34px;gap:8px}
  .product-lockup-icon{width:30px;height:30px}
  .product-lockup-icon img{width:22px;height:22px}
  .product-code{display:none}
  .product-lockup strong{font-size:10px;letter-spacing:.04em}
  .top-actions a:not(.deltop-link){display:none}
  .top-actions .deltop-link{
    min-height:32px;
    padding:0 9px!important;
    font-size:7px!important;
  }
  .apps-strip{height:54px;padding:0;overflow-x:auto}
  .apps-heading{display:none}
  .public-apps{overflow-x:auto}
  .public-app{min-width:154px;height:54px;padding:0 10px!important;grid-template-columns:30px 1fr;gap:7px}
  .public-app:hover{padding-left:10px!important}
  .public-app-icon{width:28px;height:28px}
  .public-app-icon img{width:22px;height:22px}
  .public-app-copy strong{font-size:9px}
  .public-app-copy small{display:none}
  .public-app-status{grid-column:2;grid-row:2;font-size:5.5px;margin-top:-7px}
  .workspace{height:calc(100% - 118px)}
  .panel{
    left:0;top:0;bottom:0;
    width:min(355px,calc(100vw - 24px));
    border-radius:0;
    border:0;
    border-right:1px solid var(--line);
    padding:14px;
  }
  .hero h1{font-size:24px}
  .road-legend{display:none}
}

/* Header navigation icons · Delta Labs */
.top-actions a{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
}
.nav-icon{
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 16px;
  color:currentColor;
  opacity:.82;
  transition:opacity .2s ease,transform .2s ease;
}
.nav-icon svg{
  width:16px;
  height:16px;
  display:block;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.top-actions a:hover .nav-icon{
  opacity:1;
  transform:translateY(-1px);
}
.top-actions .deltop-link .nav-icon{
  color:var(--teal-bright);
  opacity:1;
}
@media(max-width:820px){
  .top-actions .deltop-link{
    gap:6px!important;
  }
  .top-actions .deltop-link .nav-icon{
    width:14px;
    height:14px;
    flex-basis:14px;
  }
  .top-actions .deltop-link .nav-icon svg{
    width:14px;
    height:14px;
  }
}

.nav-icon img{width:16px;height:16px;display:block;object-fit:contain}
@media(max-width:820px){.top-actions .deltop-link .nav-icon img{width:14px;height:14px}}

/* RFN · Red Ferroviaria Nacional */
.rail-switch{color:#c1cad3!important}
.rail-line-sample,.legend-rail{
  width:21px;
  height:0;
  display:inline-block;
  border-top:3px dashed var(--blue);
}
.rail-km-sample,.legend-rail-km{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:27px;
  height:18px;
  padding:0 4px;
  border:1px solid var(--blue);
  background:#071519;
  color:var(--blue);
  font:700 7px/1 var(--mono);
}
.rail-km-label-icon{background:transparent!important;border:0!important;pointer-events:none!important}
.rail-km-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:82px;
  height:22px;
  padding:0 6px;
  white-space:nowrap;
  border:1px solid rgba(109,184,255,.88);
  background:rgba(6,14,20,.93);
  color:#cce4ff;
  box-shadow:0 5px 14px rgba(0,0,0,.26);
  font:700 8px/1 var(--mono);
}
.rail-popup b{color:var(--blue);font:600 13px/1.2 var(--display)}
.rail-popup span{color:#b1c0c5;font-size:11px}
.rail-popup small{color:#738991;font:9px/1.4 var(--mono)}
.road-legend{gap:10px;flex-wrap:wrap;max-width:min(760px,calc(100% - 340px))}
@media(max-width:1050px){.road-legend{max-width:470px}}

/* Selected railway */
.selected-rail-card{border-color:rgba(109,184,255,.20)}
.selected-rail-head{display:flex;align-items:center;gap:9px;margin-bottom:9px}
.selected-rail-head strong{font:570 17px/1.1 var(--display);color:var(--ink)}
.rail-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:20px;
  padding:0 6px;
  border:1px solid rgba(109,184,255,.42);
  background:rgba(109,184,255,.10);
  color:var(--blue);
  font:700 7px/1 var(--mono);
  letter-spacing:.08em;
}
.selected-rail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:12px 0 10px;
}
.selected-rail-grid span{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
  color:#aebbbc;
  font-size:10px;
  line-height:1.25;
}
.selected-rail-grid b{
  color:#6f858a;
  font:600 7px/1 var(--mono);
  letter-spacing:.08em;
  text-transform:uppercase;
}
@media(max-width:820px){
  .selected-rail-grid{grid-template-columns:1fr}
}

/* Header nav icons · embedded + visible */
.top-actions .nav-icon{
  width:28px!important;
  height:28px!important;
  flex:0 0 28px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid rgba(185,197,199,.18);
  background:rgba(255,255,255,.025);
  opacity:1!important;
}
.top-actions .nav-icon img{
  width:20px!important;
  height:20px!important;
  display:block!important;
  object-fit:contain!important;
  opacity:1!important;
  visibility:visible!important;
}
.top-actions .deltop-link .nav-icon{
  border-color:rgba(92,229,214,.30);
  background:rgba(35,197,181,.055);
}
.top-actions a:hover .nav-icon{
  border-color:rgba(92,229,214,.42);
  background:rgba(35,197,181,.07);
}
@media(max-width:820px){
  .top-actions .deltop-link .nav-icon{
    width:24px!important;
    height:24px!important;
    flex-basis:24px!important;
  }
  .top-actions .deltop-link .nav-icon img{
    width:17px!important;
    height:17px!important;
  }
}

/* Header icons · CSS-only, guaranteed visible */
.top-actions .nav-icon{
  width:30px!important;
  height:30px!important;
  flex:0 0 30px!important;
  display:inline-grid!important;
  place-items:center!important;
  border:1px solid rgba(92,229,214,.32)!important;
  background:#0b1f24!important;
  color:#eaf8f6!important;
  opacity:1!important;
  overflow:hidden!important;
}
.top-actions .nav-glyph{
  display:block!important;
  width:100%!important;
  text-align:center!important;
  font-family:"Cascadia Code","Segoe UI Symbol","Segoe UI",sans-serif!important;
  font-size:18px!important;
  line-height:28px!important;
  font-weight:700!important;
  color:#eaf8f6!important;
  opacity:1!important;
  visibility:visible!important;
}
.top-actions .nav-icon-products .nav-glyph{font-size:19px!important}
.top-actions .nav-icon-support .nav-glyph{
  font-size:16px!important;
  border:1px solid currentColor;
  border-radius:50%;
  width:17px!important;
  height:17px!important;
  line-height:15px!important;
}
.top-actions .nav-icon-topografia .nav-glyph{
  color:var(--teal-bright)!important;
  font-size:21px!important;
}
.top-actions a:hover .nav-icon{
  background:#103036!important;
  border-color:var(--teal-bright)!important;
}
@media(max-width:820px){
  .top-actions .deltop-link .nav-icon{
    width:26px!important;
    height:26px!important;
    flex-basis:26px!important;
  }
  .top-actions .deltop-link .nav-glyph{
    line-height:24px!important;
    font-size:18px!important;
  }
}

/* Unified road + rail search */
.search-item{
  display:flex;
  align-items:flex-start;
  gap:9px;
}
.search-kind{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  min-height:18px;
  padding:0 5px;
  margin-top:1px;
  border:1px solid var(--line);
  font:700 6.5px/1 var(--mono);
  letter-spacing:.07em;
}
.search-kind--rail{
  color:var(--blue);
  border-color:rgba(109,184,255,.38);
  background:rgba(109,184,255,.08);
}
.search-kind--road{
  color:var(--teal-bright);
  border-color:rgba(92,229,214,.32);
  background:rgba(35,197,181,.06);
}
.search-label{
  min-width:0;
  color:#c5d0d2;
  font-size:10px;
  line-height:1.35;
}
.search-item--rail:hover{background:rgba(109,184,255,.055)}

/* Combined road + railway proximity result */
.infra-near{
  margin-top:10px;
  padding:11px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.018);
}
.infra-near:first-child{margin-top:0}
.infra-near--road{border-color:rgba(92,229,214,.16)}
.infra-near--rail{border-color:rgba(109,184,255,.20);background:rgba(109,184,255,.025)}
.infra-near--empty{opacity:.72}
.infra-near-head{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.infra-near-head strong{
  min-width:0;
  color:var(--ink);
  font:600 12px/1.25 var(--display);
}

/* Mobile header collision fix */
@media(max-width:820px){
  .topbar{
    display:grid!important;
    grid-template-columns:96px minmax(0,1fr) 34px!important;
    align-items:center!important;
    gap:8px!important;
    padding:0 8px!important;
    overflow:hidden!important;
  }
  .labs-brand{
    width:96px!important;
    min-width:96px!important;
    margin:0!important;
  }
  .labs-brand img{
    max-width:96px!important;
    width:96px!important;
    height:auto!important;
  }
  .product-lockup{
    min-width:0!important;
    max-width:none!important;
    margin-left:0!important;
    padding-left:8px!important;
    gap:6px!important;
    overflow:hidden!important;
  }
  .product-lockup-icon{
    width:26px!important;
    height:26px!important;
    flex:0 0 26px!important;
  }
  .product-lockup-icon img{
    width:18px!important;
    height:18px!important;
  }
  .product-lockup > div{
    min-width:0!important;
    overflow:hidden!important;
  }
  .product-lockup strong{
    display:block!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:9px!important;
    letter-spacing:.03em!important;
  }
  .top-actions{
    width:34px!important;
    min-width:34px!important;
    margin-left:0!important;
    gap:0!important;
    justify-content:flex-end!important;
  }
  .top-actions a:not(.deltop-link){
    display:none!important;
  }
  .top-actions .deltop-link{
    display:inline-flex!important;
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    justify-content:center!important;
    align-items:center!important;
    overflow:hidden!important;
  }
  .top-actions .deltop-link > span:last-child{
    display:none!important;
  }
  .top-actions .deltop-link .nav-icon{
    width:26px!important;
    height:26px!important;
    flex:0 0 26px!important;
    margin:0!important;
  }
}
