
:root{
  --bg-grad: radial-gradient(1200px 600px at 10% 0%, #0e1a2b 0%, #0b1220 40%, #070d19 100%);
  --panel:#fff; --accent:#2563eb; --accent-2:#0a74da;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;background:var(--bg-grad);color:#0b1220}
.header{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;color:#e6eefb}
.title{font-weight:700;letter-spacing:.4px}
.subtitle{font-size:12px;opacity:.8}
.container{display:grid;grid-template-columns:520px 1fr;gap:16px;padding:0 16px 16px}
.panel{background:var(--panel);padding:12px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.2)}
#map{height:calc(100vh - 96px);border-radius:12px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.row{display:flex;gap:8px;align-items:center;margin:8px 0;flex-wrap:wrap}
.row label{width:120px;min-width:100px;font-size:12px;color:#334}
.row input,.row select,.row button,.row textarea{flex:1;padding:10px 12px;border:1px solid #ccd;border-radius:10px;outline:none}
.btn{background:var(--accent);color:white;border:none;border-radius:10px;padding:10px 12px;cursor:pointer}
.btn.secondary{background:#4c566a}
.btn.ghost{background:#fff;color:#0b1220;border:1px solid #e5e7eb}
.btn.toggle-on{background:#065f46}
.btn.toggle-off{background:#991b1b}
.small{font-size:12px;opacity:.85}
.list{max-height:220px;overflow:auto;border:1px solid #e5e7eb;padding:6px;border-radius:10px;background:#fff}
.item{padding:6px;border-bottom:1px dashed #e0e0e0}
.item:last-child{border-bottom:none}
.sep{height:1px;background:#e5e7eb;margin:8px 0}
.badge{display:inline-block;padding:2px 8px;border-radius:12px;color:#fff;font-size:12px}
.badge.green{background:#2e7d32}.badge.yellow{background:#f9a825}.badge.orange{background:#ef6c00}.badge.red{background:#c62828}
.legend{display:flex;gap:8px;flex-wrap:wrap}
.legend .key{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:4px 8px}
.state{font-weight:600}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:20px;background:#111827;color:#fff;padding:8px 12px;border-radius:10px;opacity:0;transition:opacity .2s ease;z-index: 1000}
.toast.show{opacity:0.95}
.kv{display:grid;grid-template-columns:120px 1fr;gap:6px}
.kv div{padding:4px 0}

.layer-toggles{display:flex;gap:8px;flex-wrap:wrap}
.layer-toggles label{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:6px 10px}

@media (max-width: 980px){
  .container{grid-template-columns:1fr}
  #map{height:60vh}
  .row label{width:90px;min-width:90px}
}
@supports (height: 100dvh){
  #map{height:calc(100dvh - 96px)}
}
