
:root{
  --bg:#081018;--panel:rgba(8,16,24,.88);--line:rgba(255,255,255,.10);
  --text:#e8eef5;--muted:#8fa1b4;--accent:#ffb703;--hot:#ff3d00;
}
*{box-sizing:border-box}
html,body,#map{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text)}
#map{position:absolute;inset:0}
.glass{background:var(--panel);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--line);box-shadow:0 12px 40px rgba(0,0,0,.28)}
.topbar{position:absolute;z-index:5;left:18px;right:18px;top:16px;height:72px;border-radius:14px;display:flex;align-items:center;justify-content:space-between;padding:10px 16px}
.eyebrow{font-size:10px;letter-spacing:.18em;color:#7f93a8;font-weight:700}
h1{font-size:21px;margin:2px 0 0;font-weight:650;letter-spacing:-.02em}
.topstats{display:flex;gap:25px}.topstats div{text-align:right}.topstats span{display:block;font-size:19px;font-weight:700}.topstats small{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}
.leftpanel{position:absolute;z-index:5;left:18px;top:104px;width:270px;bottom:92px;border-radius:14px;padding:15px;overflow:auto}
.section{padding:0 0 15px;margin:0 0 14px;border-bottom:1px solid var(--line)}.section:last-child{border:0;margin-bottom:0}
.section>label:first-child{display:block;font-size:10px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.10em;margin-bottom:8px}
.segmented,.quickrange{display:flex;gap:5px}
button,select,input{font:inherit}
button,.segmented button,.quickrange button{border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);border-radius:8px;cursor:pointer}
.segmented button{flex:1;padding:8px;font-size:12px}.segmented .active,.quickrange .active{background:#203246;border-color:#46627c}
.quickrange button{flex:1;padding:6px 2px;font-size:10px;font-weight:700}
.switchline{display:flex!important;align-items:center;gap:8px;color:#c7d2dc!important;font-size:12px!important;text-transform:none!important;letter-spacing:0!important;margin:8px 0!important}
.switchline input{accent-color:var(--accent)}
input[type=text],#search,select,input[type=date]{width:100%;background:#0c1722;color:var(--text);border:1px solid var(--line);padding:9px;border-radius:8px;outline:none}
.dategrid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:7px}.dategrid input{min-width:0;font-size:11px}
#searchResults{max-height:130px;overflow:auto}.search-item{padding:7px 4px;border-bottom:1px solid rgba(255,255,255,.06);font-size:11px;cursor:pointer}.search-item:hover{color:var(--accent)}
.footnote{font-size:10px;color:var(--muted);line-height:1.5}
.legend{position:absolute;z-index:5;right:18px;bottom:92px;width:170px;border-radius:12px;padding:10px}
#legendTitle{font-size:9px;color:var(--muted);letter-spacing:.13em;font-weight:700;margin-bottom:7px}
.gradient{height:8px;border-radius:99px;background:linear-gradient(90deg,#16304a,#1677a7,#ffe066,#ff8a00,#ff2e00)}
.legendlabels{display:flex;justify-content:space-between;color:var(--muted);font-size:9px;margin-top:4px}
.timeline{position:absolute;z-index:5;left:18px;right:18px;bottom:16px;height:60px;border-radius:14px;padding:8px 13px;display:flex;gap:12px;align-items:center}
#play{width:38px;height:38px;border-radius:50%;font-size:14px}
.timeline-main{flex:1}.timeline-head,.timeline-dates{display:flex;justify-content:space-between;font-size:9px;color:var(--muted)}#timelineLabel{color:var(--text);font-weight:650}
#timelineRange{width:100%;height:16px;accent-color:#ff8a00}
.status{position:absolute;z-index:6;right:18px;top:104px;border-radius:9px;padding:7px 10px;font-size:10px;color:var(--muted)}
.maplibregl-popup-content{background:#0a1520!important;color:#e9f0f7!important;border:1px solid rgba(255,255,255,.12);border-radius:10px!important;padding:12px!important;box-shadow:0 14px 40px rgba(0,0,0,.45)!important}
.maplibregl-popup-tip{border-top-color:#0a1520!important;border-bottom-color:#0a1520!important}
.popup-title{font-size:15px;font-weight:750}.popup-sub{font-size:10px;color:#9db0c3;margin-bottom:9px}
.popup-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.popup-grid div{background:rgba(255,255,255,.04);padding:6px;border-radius:6px}.popup-grid b{display:block;font-size:12px}.popup-grid span{font-size:9px;color:#8799aa}
.maplibregl-ctrl-bottom-right{bottom:70px}
@media(max-width:760px){.leftpanel{width:220px}.topstats div:nth-child(-n+2){display:none}.topbar{right:10px;left:10px}.leftpanel{left:10px}.timeline{left:10px;right:10px}.legend{display:none}}

.subswitches{
  margin-left:18px;
  padding-left:9px;
  border-left:1px solid rgba(255,255,255,.08);
}
.subswitches .switchline{
  margin:5px 0!important;
  color:#9fb0c1!important;
  font-size:11px!important;
}
.filterhint{
  margin-top:7px;
  padding:7px 8px;
  border-radius:7px;
  background:rgba(255,255,255,.035);
  color:#7f93a8;
  font-size:9.5px;
  line-height:1.35;
}

.rate-control{padding:2px 0 7px}
.rate-head{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#9fb0c1;margin-bottom:5px}
.rate-head b{color:#ffb703;font-size:13px}
#targetRate{width:100%;accent-color:#ffb703}
.rate-input-row{display:flex;align-items:center;gap:6px;margin-top:5px}
#targetRateNumber{width:82px!important;background:#0c1722;color:#e8eef5;border:1px solid rgba(255,255,255,.1);padding:6px 7px;border-radius:7px}
.rate-input-row span{font-size:11px;color:#8fa1b4}

.site-panel{position:absolute;z-index:7;right:18px;top:104px;bottom:92px;width:min(630px,calc(100vw - 330px));border-radius:14px;padding:14px;overflow:auto;transition:opacity .18s ease,transform .18s ease}
.site-panel.hidden{opacity:0;pointer-events:none;transform:translateX(20px)}
.site-panel-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid rgba(255,255,255,.09);padding-bottom:10px;margin-bottom:10px}
.site-panel h2{font-size:21px;margin:2px 0 0}
.site-panel-sub{font-size:10px;color:#8fa1b4;margin-top:2px}
.close-panel{width:31px;height:31px;border-radius:8px;font-size:22px;line-height:1}
.site-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:14px}
.site-kpis div{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06);border-radius:8px;padding:8px}
.site-kpis b{font-size:15px;display:block}.site-kpis span{color:#8295a7;font-size:9px;text-transform:uppercase;letter-spacing:.05em}
.site-section-title{font-size:9px;color:#8fa1b4;font-weight:700;letter-spacing:.12em;margin:14px 0 7px}

.site-heatmap{display:grid;grid-template-columns:31px repeat(24,minmax(12px,1fr));gap:2px;align-items:center}
.hm-corner,.hm-hour,.hm-day{font-size:7px;color:#72869a;text-align:center}
.hm-day{font-size:9px;font-weight:700;color:#9fb0c1;text-align:left}
.hm-cell{height:22px;border-radius:3px;background:
  color-mix(in srgb,#ff3d00 calc(var(--heat)*100%),#122333);border:1px solid rgba(255,255,255,.035);
  display:flex;align-items:center;justify-content:center;font-size:7px;color:rgba(255,255,255,.82)}
.hm-cell[style*="--heat: 0"]{background:#0d1823;color:transparent}
.mini-legend{display:flex;align-items:center;gap:6px;justify-content:flex-end;font-size:8px;color:#718497;margin-top:5px}
.mini-legend div{width:85px;height:5px;border-radius:99px;background:linear-gradient(90deg,#122333,#ffc400,#ff3d00)}

.site-windows,.site-days{display:grid;gap:4px}
.window-row{display:grid;grid-template-columns:23px 1.2fr .8fr .8fr;align-items:center;gap:6px;background:rgba(255,255,255,.035);border-radius:6px;padding:7px 8px;font-size:10px}
.window-row .rank{width:20px;height:20px;display:grid;place-items:center;border-radius:5px;background:#203246;color:#ffb703;font-weight:700}
.window-row span{color:#94a6b7}
.day-row{display:grid;grid-template-columns:35px 1fr 1fr 42px;gap:7px;padding:6px 7px;border-bottom:1px solid rgba(255,255,255,.05);font-size:10px}
.day-row span{color:#91a3b5}.empty-state{padding:10px;background:rgba(255,255,255,.035);border-radius:7px;color:#8799aa;font-size:10px}
@media(max-width:900px){
  .site-panel{left:250px;right:10px;width:auto}
  .site-heatmap{grid-template-columns:28px repeat(24,12px);overflow-x:auto}
}
