:root {
  --bg: #08111f;
  --panel: #0f1b2d;
  --panel-2: #14233a;
  --text: #eef5ff;
  --muted: #91a4bd;
  --line: rgba(255,255,255,.09);
  --blue: #3f8cff;
  --blue-2: #6bb0ff;
  --orange: #ff9d3f;
  --green: #3bd68b;
  --red: #ff5d6c;
  --shadow: 0 18px 50px rgba(0,0,0,.24);
  --radius: 22px;
}
*{box-sizing:border-box}
html{background:var(--bg);min-height:100%}
body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:linear-gradient(180deg,#07101d 0%,#0a1423 50%,#08111f 100%);color:var(--text);min-height:100vh;padding-bottom:env(safe-area-inset-bottom)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
a{color:var(--blue-2)}
.hidden{display:none!important}
.small{font-size:.86rem}.muted{color:var(--muted)}
.topbar{position:sticky;top:0;z-index:500;display:flex;justify-content:space-between;align-items:center;padding:calc(12px + env(safe-area-inset-top)) 16px 12px;background:rgba(8,17,31,.88);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:11px}.brand h1{margin:0;font-size:1.05rem;letter-spacing:.01em}.brand p{margin:2px 0 0;color:var(--muted);font-size:.74rem}.brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-weight:900;background:linear-gradient(145deg,var(--blue),#1e5bb5);box-shadow:0 7px 20px rgba(63,140,255,.28)}
.top-actions{display:flex;gap:8px;align-items:center}
main{width:min(980px,100%);margin:auto;padding:16px;display:grid;gap:16px}
.card{background:linear-gradient(180deg,rgba(20,35,58,.96),rgba(13,26,44,.98));border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.planner{padding:20px}.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.eyebrow{font-size:.7rem;font-weight:800;letter-spacing:.16em;color:var(--blue-2)}h2{margin:3px 0 0;font-size:1.35rem}h3{margin:0 0 8px;font-size:1rem}
.badge{display:inline-flex;align-items:center;border-radius:999px;padding:7px 10px;font-size:.75rem;font-weight:800}.badge.neutral{background:rgba(145,164,189,.15);color:var(--muted)}.badge.good{background:rgba(59,214,139,.13);color:var(--green)}.badge.bad{background:rgba(255,93,108,.13);color:var(--red)}
.location-row{display:flex;align-items:center;gap:10px;margin:18px 0 16px}
label{display:block;color:#c3d2e7;font-size:.84rem;font-weight:700;margin-bottom:7px}
.search-wrap{position:relative}.search-wrap input{padding-right:44px}
input,select,textarea{width:100%;border:1px solid rgba(255,255,255,.12);background:#0a1627;color:var(--text);border-radius:14px;padding:13px 14px;outline:none}input:focus,select:focus,textarea:focus{border-color:rgba(63,140,255,.75);box-shadow:0 0 0 3px rgba(63,140,255,.12)}textarea{min-height:110px;resize:vertical}
.clear-input{position:absolute;right:7px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:var(--muted);font-size:1.5rem;padding:4px 8px}
.suggestions{border:1px solid var(--line);border-radius:14px;background:#0d1929;box-shadow:var(--shadow);position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:700;max-height:300px;overflow-x:hidden;overflow-y:auto}.suggestion{display:block;width:100%;text-align:left;padding:12px 14px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);line-height:1.35}.suggestion:last-child{border-bottom:0}.suggestion:hover,.suggestion:focus-visible{background:rgba(255,255,255,.07);outline:none}
.planner-grid{display:grid;grid-template-columns:1fr;gap:16px;margin:18px 0}.range-line{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.range-line input{padding:0;accent-color:var(--blue)}
button,.file-button{border:1px solid transparent;border-radius:13px;padding:11px 14px;font-weight:800;transition:.18s ease;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:7px}.primary{background:linear-gradient(135deg,var(--blue),#2368d8);color:white}.primary:hover{filter:brightness(1.08)}.primary.big{width:100%;padding:15px;font-size:1rem}.secondary,.ghost,.file-button{background:rgba(255,255,255,.055);border-color:var(--line);color:var(--text)}.secondary:hover,.ghost:hover,.file-button:hover{background:rgba(255,255,255,.09)}.danger{background:rgba(255,93,108,.12);color:#ff8791;border-color:rgba(255,93,108,.18)}.icon-btn{width:40px;height:40px;padding:0;border-radius:12px;background:rgba(255,255,255,.055);border:1px solid var(--line);color:var(--text);font-size:1.25rem}.hint{font-size:.78rem;color:var(--muted);line-height:1.5;margin:12px 0 0}
.route-summary{padding:18px 20px}.route-summary-main{display:flex;align-items:center;justify-content:space-between;gap:16px}.route-metrics{display:flex;gap:18px}.route-metrics div{display:grid;text-align:right}.route-metrics strong{font-size:1.12rem}.route-metrics span{font-size:.68rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}


/* hyperMILL prospect profiles */
.prospect-filter-panel{margin:4px 0 18px;padding:14px;border:1px solid var(--line);border-radius:17px;background:rgba(63,140,255,.045)}
.filter-profile-row{display:grid;grid-template-columns:minmax(240px,1fr) minmax(220px,1fr);gap:14px;align-items:end}.filter-profile-row label{margin-top:0}.profile-summary{display:grid;gap:4px;padding:10px 12px;border-radius:13px;background:rgba(255,255,255,.035);min-height:48px}.profile-summary strong{font-size:.78rem;line-height:1.35}.filter-details{margin-top:12px;border-top:1px solid var(--line);padding-top:11px}.filter-details summary{cursor:pointer;font-weight:800;font-size:.84rem;color:var(--blue-2);user-select:none}.filter-groups{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:13px}.filter-groups fieldset{min-width:0;margin:0;border:1px solid var(--line);border-radius:14px;padding:10px 11px}.filter-groups legend{padding:0 6px;color:var(--muted);font-size:.73rem;font-weight:900;text-transform:uppercase;letter-spacing:.07em}.check-row{display:flex;align-items:flex-start;gap:9px;margin:0;padding:8px 5px;border-radius:10px;color:var(--text);font-weight:500}.check-row:hover{background:rgba(255,255,255,.035)}.check-row input{width:18px;height:18px;flex:0 0 auto;margin:1px 0 0;padding:0;accent-color:var(--blue)}.check-row span{display:grid;gap:2px;line-height:1.25}.check-row strong{font-size:.79rem}.check-row small{font-size:.69rem;color:var(--muted)}.check-row.broad-option{margin-top:5px;border-top:1px dashed var(--line);padding-top:11px}.filter-note{margin:10px 2px 0;color:var(--muted);font-size:.71rem;line-height:1.45}.match-pill{border-color:rgba(59,214,139,.2);background:rgba(59,214,139,.075);color:#8be8bb}

.radar-status{margin-top:14px;border-top:1px solid var(--line);padding-top:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.radar-status>div{display:grid;gap:2px}.radar-status strong{font-size:.82rem}.radar-status span{font-size:.76rem;color:var(--muted);line-height:1.4}.radar-status.loading strong{color:var(--blue-2)}.radar-status.good strong{color:var(--green)}.radar-status.warning strong{color:var(--orange)}.radar-status.error strong{color:var(--red)}
.map-card{padding:0;overflow:hidden;position:relative}#map{height:42vh;min-height:310px;max-height:520px;background:#0c1625}.map-legend{position:absolute;z-index:450;bottom:12px;left:12px;background:rgba(8,17,31,.87);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:12px;padding:8px 10px;display:flex;gap:10px;font-size:.72rem}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px}.dot.hot{background:var(--green)}.dot.warm{background:var(--orange)}.dot.cool{background:var(--blue)}
.prospects-section{display:grid;gap:12px}.sticky-tools{position:sticky;top:72px;z-index:430;background:rgba(8,17,31,.9);backdrop-filter:blur(14px);padding:12px 2px}.filters-inline{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.filters-inline select{width:auto;padding:9px 12px}.prospect-list{display:grid;gap:12px}.prospect-card{background:linear-gradient(180deg,rgba(20,35,58,.97),rgba(12,24,40,.98));border:1px solid var(--line);border-radius:18px;padding:15px;box-shadow:0 8px 25px rgba(0,0,0,.14)}.prospect-top{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start}.score{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;font-weight:900;font-size:1.15rem}.score.hot{background:rgba(59,214,139,.14);color:var(--green);border:1px solid rgba(59,214,139,.18)}.score.warm{background:rgba(255,157,63,.14);color:var(--orange);border:1px solid rgba(255,157,63,.2)}.score.cool{background:rgba(63,140,255,.14);color:var(--blue-2);border:1px solid rgba(63,140,255,.18)}.prospect-card h3{margin:2px 0 5px}.prospect-meta{font-size:.79rem;color:var(--muted);display:flex;flex-wrap:wrap;gap:7px}.pill{border:1px solid var(--line);background:rgba(255,255,255,.04);border-radius:999px;padding:4px 7px;font-size:.7rem}.status-pill{font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.prospect-reasons{margin:12px 0 0;display:flex;gap:6px;flex-wrap:wrap}.reason{font-size:.7rem;background:rgba(63,140,255,.09);color:#b9d8ff;border-radius:9px;padding:5px 7px}.card-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:14px}.card-actions button,.card-actions a{padding:9px 6px;border-radius:11px;font-size:.73rem}.action-link{background:rgba(255,255,255,.055);border:1px solid var(--line);color:var(--text);font-weight:800;text-decoration:none;text-align:center}.favorite-btn{font-size:1.2rem;background:transparent;border:0;color:#cbd8e9;padding:3px}.favorite-btn.active{color:#ffd66b}
.saved-section{padding:18px}.saved-preview{font-size:.85rem;margin-top:10px;line-height:1.5}.empty-state{text-align:center;padding:35px 16px;color:var(--muted)}.empty-state h3{color:var(--text)}.empty-icon{font-size:2.4rem}
.toast{position:fixed;z-index:1000;bottom:calc(22px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#17263c;border:1px solid var(--line);box-shadow:var(--shadow);padding:11px 15px;border-radius:13px;max-width:min(90vw,520px);font-size:.86rem}.loading-overlay{position:fixed;inset:0;z-index:1200;background:rgba(3,9,17,.78);backdrop-filter:blur(10px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.loading-overlay span{color:var(--muted);font-size:.85rem}.loader{width:44px;height:44px;border-radius:50%;border:4px solid rgba(255,255,255,.12);border-top-color:var(--blue);animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.modal{width:min(760px,calc(100vw - 18px));max-height:92vh;padding:0;border:1px solid var(--line);border-radius:22px;background:#0c1728;color:var(--text);box-shadow:0 28px 80px rgba(0,0,0,.55)}.modal::backdrop{background:rgba(0,0,0,.68);backdrop-filter:blur(6px)}.small-modal{width:min(600px,calc(100vw - 18px))}.modal-head{position:sticky;top:0;background:#0c1728;z-index:2;padding:16px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:start}.modal-body{padding:18px;overflow:auto}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.info-box{background:rgba(255,255,255,.035);border:1px solid var(--line);border-radius:14px;padding:12px}.info-box span{display:block;color:var(--muted);font-size:.72rem;margin-bottom:5px}.info-box strong{font-size:.9rem}.detail-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.detail-section{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.detail-section h3{margin-bottom:10px}.contact-card{border:1px solid var(--line);border-radius:13px;padding:11px;margin:8px 0;background:rgba(255,255,255,.03)}.contact-card strong{display:block}.contact-card .role{color:var(--blue-2);font-size:.78rem}.contact-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:7px;font-size:.8rem}.source-note{font-size:.74rem;color:var(--muted);word-break:break-word}.score-breakdown{display:flex;flex-wrap:wrap;gap:7px}.signal{border-radius:10px;padding:6px 8px;background:rgba(59,214,139,.08);color:#a8edca;font-size:.74rem}.website-entry{display:grid;grid-template-columns:1fr auto;gap:8px}.button-row{display:flex;gap:8px;flex-wrap:wrap}.settings-body{display:grid;gap:14px}.setting-group{border-bottom:1px solid var(--line);padding-bottom:14px}.setting-group:last-of-type{border-bottom:0}.setting-group p{color:var(--muted);line-height:1.55;font-size:.87rem}.source-list{margin:0;padding-left:18px;color:var(--muted);font-size:.85rem;line-height:1.7}.warning-box{background:rgba(255,157,63,.06);border:1px solid rgba(255,157,63,.15);border-radius:14px;padding:12px}
@media (min-width:700px){.planner-grid{grid-template-columns:1fr 1fr}.card-actions{grid-template-columns:repeat(5,1fr)}.planner{padding:24px}}
@media (max-width:700px){.filter-profile-row,.filter-groups{grid-template-columns:1fr}.profile-summary{min-height:0}}
@media (max-width:520px){main{padding:12px}.planner{padding:16px}.route-summary{padding:15px}.route-summary-main{align-items:flex-start;flex-direction:column}.radar-status{align-items:flex-start;flex-direction:column}.radar-status button{width:100%}.route-summary .section-title-row{align-items:flex-start}.route-metrics{gap:11px}.route-metrics strong{font-size:.97rem}.prospect-top{grid-template-columns:auto 1fr}.prospect-top .favorite-btn{grid-column:2;grid-row:2;justify-self:end;margin-top:-28px}.card-actions{grid-template-columns:repeat(2,1fr)}.detail-grid{grid-template-columns:1fr}.detail-actions{grid-template-columns:1fr 1fr}.sticky-tools{top:69px}.brand p{display:none}}
@media (prefers-color-scheme:light){:root{--bg:#edf3fa;--panel:#fff;--panel-2:#f6f9fd;--text:#112033;--muted:#61738a;--line:rgba(25,53,84,.11);--shadow:0 18px 50px rgba(31,60,90,.11)}html,body{background:#edf3fa}.topbar{background:rgba(237,243,250,.9)}.card,.prospect-card{background:#fff}.sticky-tools{background:rgba(237,243,250,.92)}label{color:#42566f}input,select,textarea{background:#f6f9fd;color:var(--text)}.suggestions{background:#fff;border-color:rgba(25,53,84,.16)}.suggestion:hover,.suggestion:focus-visible{background:#f1f6fc}.modal,.modal-head{background:#fff}.toast{background:#fff}.map-legend{background:rgba(255,255,255,.9)}.loading-overlay{background:rgba(232,240,248,.78)}}
.radar-status-actions{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}.radar-status-actions button{white-space:nowrap}@media (max-width:520px){.radar-status-actions{width:100%;margin-left:0}.radar-status-actions button{flex:1}}

.confidence-pill{font-weight:900}.confidence-pill.confirmed{border-color:rgba(59,214,139,.35);background:rgba(59,214,139,.14);color:#72d8a6}.confidence-pill.probable{border-color:rgba(255,157,63,.38);background:rgba(255,157,63,.12);color:#e8a25e}.confidence-pill.possible{border-color:rgba(63,140,255,.30);background:rgba(63,140,255,.10);color:#7badf6}

.data-source-row{margin-bottom:10px}.source-summary small{font-size:.67rem;color:var(--muted);line-height:1.35}.google-depth-row{margin:0 0 12px;border:1px dashed rgba(63,140,255,.25);background:rgba(63,140,255,.045)}.source-pill{font-weight:850}.source-pill.google{border-color:rgba(76,150,255,.32);background:rgba(76,150,255,.12);color:#a9d0ff}.source-pill.osm{border-color:rgba(59,214,139,.25);background:rgba(59,214,139,.08);color:#9be8c3}.source-pill.hybrid{border-color:rgba(181,129,255,.30);background:rgba(181,129,255,.10);color:#d1b6ff}.google-attribution{font-size:.68rem;color:var(--muted);margin-top:6px}.google-attribution strong{color:var(--text)}

/* V2.0 manual start location + proactive favorites */
.start-location-block{margin:18px 0 16px}.start-location-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.start-location-head label{margin-bottom:7px}.compact{padding:8px 11px!important;font-size:.78rem}.location-note{margin-top:7px;padding-left:2px}.nearby-favorites{padding:18px}.nearby-favorites-list{display:grid;gap:9px;margin-top:12px}.nearby-favorite-card{border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.035);padding:12px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.nearby-favorite-card h3{margin:0 0 4px}.nearby-favorite-meta{font-size:.76rem;color:var(--muted);display:flex;gap:7px;flex-wrap:wrap}.nearby-favorite-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.nearby-favorite-actions button,.nearby-favorite-actions a{padding:8px 10px;font-size:.72rem;border-radius:10px}.info-loading{display:flex;align-items:center;gap:8px;padding:10px 0;color:var(--muted)}.mini-loader{width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.16);border-top-color:var(--blue);animation:spin 1s linear infinite}.favorite-btn{min-width:36px;min-height:36px}.top-actions #favoritesBtn{white-space:nowrap}.top-actions #favoritesCount{display:inline-grid;place-items:center;min-width:19px;height:19px;margin-left:4px;padding:0 5px;border-radius:999px;background:rgba(255,214,107,.14);color:#ffd66b;font-size:.7rem}
@media(max-width:520px){.start-location-head{align-items:flex-end}.start-location-head .compact{max-width:140px}.nearby-favorite-card{grid-template-columns:1fr}.nearby-favorite-actions{justify-content:flex-start}.top-actions #favoritesBtn{font-size:0;padding:9px 10px}.top-actions #favoritesBtn::before{content:'★';font-size:1rem}.top-actions #favoritesCount{font-size:.68rem;margin-left:3px}}

/* V2.0 machine inventory */
.machine-list{display:grid;gap:10px;margin:10px 0 14px}.machine-card{border:1px solid rgba(148,163,184,.22);border-radius:12px;padding:10px 12px;background:rgba(15,23,42,.28)}.machine-card>div:first-child{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.machine-qty{font-size:.78rem;padding:2px 7px;border-radius:999px;background:rgba(59,130,246,.18);font-weight:800}.machine-details{margin:6px 0;line-height:1.35}.machine-card .source-note{display:inline-block;margin-top:4px}
