:root{
  --bg:#07101f;
  --bg2:#0a1426;
  --panel:#0c1628;
  --panel2:#101c32;
  --line:#1e2f4e;
  --line2:#2b4268;
  --text:#f5f7ff;
  --muted:#8fa0bd;
  --yellow:#ffb629;
  --yellow2:#ffd166;
  --cyan:#36dcc9;
  --green:#36d98d;
  --red:#ef5350;
  --orange:#ff914d;
  --shadow:0 18px 55px rgba(0,0,0,.34);
}

*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden}
body{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:var(--bg);
}
a{text-decoration:none;color:inherit}
button,input,select{font:inherit}

.app-shell{height:100vh;display:flex;flex-direction:column}

.topbar{
  height:72px;
  display:flex;
  align-items:center;
  gap:32px;
  padding:0 24px;
  background:rgba(6,11,23,.97);
  border-bottom:1px solid var(--line);
  z-index:1000;
}
.brand{display:flex;align-items:center;gap:11px;min-width:max-content}
.logo-box{
  width:40px;height:40px;border-radius:11px;
  background:var(--yellow);
  color:#07101f;
  display:grid;place-items:center;
  font-weight:1000;font-size:21px;
  box-shadow:0 0 28px rgba(255,182,41,.18);
}
.brand-copy{display:flex;flex-direction:column}
.brand-title{font-size:21px;font-weight:900;letter-spacing:-.02em}
.brand-title span{color:var(--yellow)}
.brand-subtitle{font-size:8px;letter-spacing:.18em;color:#6d7f9f;font-weight:900;margin-top:1px}

.nav{display:flex;gap:23px;color:#b1bfd5;font-size:14px;font-weight:650}
.nav a:hover{color:white}

.top-actions{margin-left:auto;display:flex;align-items:center;gap:14px}
.global-status{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:750}
.status-dot{width:9px;height:9px;border-radius:50%;background:#647089}
.status-dot.online{background:var(--green);box-shadow:0 0 0 5px rgba(54,217,141,.08),0 0 14px rgba(54,217,141,.45)}
.status-dot.offline{background:var(--red)}
.btn-account{padding:9px 14px;border-radius:999px;border:1px solid #33486d;background:#0c1528;font-size:13px}

.serverbar{
  height:64px;
  min-height:64px;
  display:flex;
  align-items:stretch;
  background:#091223;
  border-bottom:1px solid var(--line);
  z-index:900;
}
.server-select{
  width:270px;padding:10px 18px;
  border-right:1px solid var(--line);
  display:flex;flex-direction:column;justify-content:center;
}
.server-select select{border:0;outline:0;background:transparent;color:white;font-weight:800;margin-top:2px}
.server-select option{background:#0b1528}
.server-metric{
  min-width:150px;padding:10px 19px;
  display:flex;flex-direction:column;justify-content:center;gap:3px;
  border-right:1px solid var(--line)
}
.server-metric strong{font-size:14px}
.mini-label,.eyebrow{font-size:9px;letter-spacing:.14em;color:#6f819f;font-weight:900}
.slash{color:#6c7d9a}
.demo-chip{
  margin:auto 18px auto auto;
  color:var(--yellow);border:1px solid rgba(255,182,41,.42);
  background:rgba(255,182,41,.07);
  font-size:10px;font-weight:900;letter-spacing:.12em;
  border-radius:7px;padding:6px 8px
}

.workspace{
  flex:1;min-height:0;
  display:grid;
  grid-template-columns:320px minmax(0,1fr) 310px;
}

.panel{background:#091220;min-width:0;overflow:hidden;display:flex;flex-direction:column}
.players-panel{border-right:1px solid var(--line)}
.info-panel{border-left:1px solid var(--line)}
.panel-title-row{
  min-height:78px;padding:16px 16px 12px;
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,.035)
}
.panel-title-row.compact{min-height:70px}
.panel h1,.panel h2{margin:4px 0 0}
.panel h1{font-size:21px}
.panel h2{font-size:16px}
.count-badge{
  min-width:35px;height:29px;padding:0 9px;border-radius:999px;
  display:grid;place-items:center;
  color:var(--yellow);
  background:rgba(255,182,41,.09);
  border:1px solid rgba(255,182,41,.24);
  font-size:12px;font-weight:900
}

.search{
  height:42px;margin:12px 12px 8px;
  border:1px solid var(--line2);
  background:#07101d;border-radius:9px;
  display:flex;align-items:center;gap:8px;padding:0 11px
}
.search svg{width:17px;fill:none;stroke:#7183a2;stroke-width:2}
.search input{width:100%;border:0;outline:0;background:transparent;color:white;font-size:13px}
.search input::placeholder{color:#63718c}

.filter-row{display:flex;gap:6px;padding:0 12px 10px}
.filter{
  border:1px solid var(--line);background:transparent;color:#8192ae;
  border-radius:7px;padding:6px 9px;font-size:11px;font-weight:750;cursor:pointer
}
.filter:hover,.filter.active{color:white;background:#12203a;border-color:#304a72}

.players-list{overflow:auto;padding:0 8px 14px}
.players-list::-webkit-scrollbar{width:7px}
.players-list::-webkit-scrollbar-thumb{background:#1f2c46;border-radius:999px}
.player-row{
  min-height:58px;padding:8px;border-radius:9px;
  display:grid;grid-template-columns:34px 1fr auto;gap:9px;align-items:center;
  border:1px solid transparent;cursor:pointer
}
.player-row:hover{background:#0f192d;border-color:#182845}
.player-row.active{background:#111e36;border-color:#2c4770}
.player-avatar{
  width:34px;height:34px;border-radius:8px;display:grid;place-items:center;
  background:#1a2946;color:var(--yellow);font-size:12px;font-weight:950
}
.player-main{min-width:0}
.player-name{font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.player-meta{font-size:10px;color:#7788a7;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.player-speed{font-size:10px;color:#899ab6;text-align:right}
.player-speed b{display:block;color:white;font-size:11px}
.empty-list{padding:28px 14px;color:#72829f;text-align:center;font-size:12px}

.map-area{position:relative;min-width:0;background:#07101e}
#map{width:100%;height:100%;background:#07101e}
.leaflet-container{font-family:inherit;background:#07101e}
.leaflet-control-zoom{border:1px solid #243553!important;box-shadow:none!important}
.leaflet-control-zoom a{background:#0b1427!important;color:#d7e0f4!important;border-color:#243553!important}
.leaflet-control-attribution{background:rgba(6,10,21,.75)!important;color:#7f8da8!important}
.leaflet-control-attribution a{color:#aebcda!important}

.floating-toolbar{
  position:absolute;z-index:600;right:14px;top:14px;
  display:flex;flex-direction:column;gap:8px
}
.floating-toolbar button{
  width:40px;height:40px;border-radius:9px;
  border:1px solid #283b5f;background:rgba(9,16,31,.94);color:white;
  display:grid;place-items:center;cursor:pointer;box-shadow:var(--shadow)
}
.floating-toolbar button:hover,.floating-toolbar button.active{border-color:#55729f;background:#13213b}
.floating-toolbar svg{width:19px;fill:none;stroke:currentColor;stroke-width:1.8}

.legend{
  position:absolute;z-index:600;left:14px;bottom:14px;
  border:1px solid #273958;background:rgba(7,13,26,.94);
  border-radius:10px;padding:10px 12px;box-shadow:var(--shadow);
  font-size:10px;color:#9aacC9
}
.legend-title{font-weight:900;color:white;margin-bottom:7px}
.legend>div:not(.legend-title){display:flex;align-items:center;gap:7px;margin-top:5px}
.c{width:8px;height:8px;border-radius:50%}
.c.low{background:#36d98d}
.c.medium{background:#f3c84b}
.c.high{background:#ff914d}
.c.jam{background:#ef5350}

.map-empty{
  position:absolute;z-index:550;left:50%;top:50%;transform:translate(-50%,-50%);
  min-width:300px;max-width:420px;
  border:1px solid #273958;background:rgba(8,14,28,.91);
  border-radius:13px;padding:20px;
  display:flex;flex-direction:column;align-items:center;gap:7px;
  text-align:center;color:#8191ad;pointer-events:none
}
.map-empty strong{color:white}
.map-empty.hidden{display:none}
.loader{
  width:25px;height:25px;border:3px solid #25344f;border-top-color:var(--yellow);
  border-radius:50%;animation:spin .8s linear infinite;margin-bottom:3px
}
@keyframes spin{to{transform:rotate(360deg)}}

.truck-pin{
  width:26px;height:26px;border-radius:7px;
  background:var(--yellow);border:2px solid white;
  box-shadow:0 5px 14px rgba(0,0,0,.45);position:relative
}
.truck-pin:before{
  content:"";position:absolute;left:50%;top:-8px;transform:translateX(-50%);
  border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:8px solid var(--yellow)
}
.truck-pin.selected{background:var(--cyan)}
.truck-pin.selected:before{border-bottom-color:var(--cyan)}

.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#0b1427;color:white}
.leaflet-popup-content-wrapper{border:1px solid #293c5e}
.popup-name{font-size:13px;font-weight:900}
.popup-vtc{font-size:11px;color:#8fa0bd;margin-top:3px}
.popup-stats{display:flex;gap:8px;margin-top:7px;font-size:10px;color:#bac6d9}

.server-card,.traffic-card,.network-card{
  margin:12px;border:1px solid var(--line);background:#0d1628;border-radius:11px
}
.server-card{padding:14px}
.server-card-head{display:flex;align-items:center;justify-content:space-between}
.server-card-head>div{display:flex;flex-direction:column;gap:4px}
.server-card-head strong{font-size:13px}
.server-card-head span{color:#7788a7;font-size:10px}
.server-led{width:10px;height:10px;border-radius:50%;background:#647089}
.server-led.online{background:var(--green);box-shadow:0 0 12px rgba(54,217,141,.45)}
.server-led.offline{background:var(--red)}

.capacity-row{display:flex;justify-content:space-between;color:#8394b1;font-size:10px;margin-top:16px}
.capacity-row b{color:white}
.progress{height:6px;background:#19253d;border-radius:999px;margin-top:7px;overflow:hidden}
.progress-fill{height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,var(--yellow),var(--cyan));transition:width .35s ease}

.traffic-card{padding:14px}
.section-title{font-size:11px;font-weight:900;color:#dce5f7;margin-bottom:10px}
.zone-row{display:grid;grid-template-columns:1fr auto;gap:6px;margin-top:8px}
.zone-name{font-size:11px;color:#c3cee2}
.zone-score{font-size:10px;font-weight:900}
.zone-bar{grid-column:1/-1;height:4px;background:#19253b;border-radius:999px;overflow:hidden}
.zone-fill{height:100%;border-radius:999px}

.network-card{padding:12px;display:flex;gap:10px;color:#7f90ae}
.network-icon{
  width:24px;height:24px;border-radius:50%;border:1px solid #31486e;
  display:grid;place-items:center;color:#9eb1d0;font-weight:900;flex:none
}
.network-card strong{font-size:11px;color:#d7e0f1}
.network-card p{font-size:10px;line-height:1.5;margin:4px 0 0}

@media(max-width:1180px){
  .workspace{grid-template-columns:290px minmax(0,1fr)}
  .info-panel{display:none}
}
@media(max-width:850px){
  .nav{display:none}
  .workspace{grid-template-columns:1fr}
  .players-panel{
    position:absolute;z-index:850;top:148px;bottom:10px;left:10px;width:290px;
    border:1px solid #223454;border-radius:12px;box-shadow:var(--shadow)
  }
  .server-metric:nth-of-type(n+4){display:none}
}
@media(max-width:620px){
  .topbar{height:60px;padding:0 12px}
  .brand-title{font-size:18px}
  .btn-account{display:none}
  .serverbar{height:58px;min-height:58px}
  .server-select{width:190px;padding-left:12px}
  .server-metric{min-width:115px;padding:8px 12px}
  .workspace{height:calc(100vh - 118px)}
  .players-panel{display:none}
}
