:root{
  --bg:#0f172a;
  --bg-soft:#111c34;
  --card:#16213e;
  --card-2:#1b294a;
  --text:#e5edf8;
  --muted:#98a6c2;
  --line:rgba(255,255,255,.08);
  --accent:#2ea8ff;
  --ok:#12b76a;
  --warn:#f5a524;
  --crit:#ef4444;
  --offline:#64748b;
  --shadow:0 10px 30px rgba(0,0,0,.22);
  --radius:18px;
  --nav-h:70px;
  --top-h:64px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:linear-gradient(180deg,var(--bg),#0b1222);color:var(--text);font-family:Arial,Helvetica,sans-serif}
a{text-decoration:none;color:inherit}
button{font:inherit}

.app-shell{
  min-height:100vh;
  padding-bottom:calc(var(--nav-h) + 16px);
}

.topbar{
  position:sticky;
  top:0;
  z-index:100;
  height:var(--top-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  background:rgba(10,16,31,.88);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}

.brand{
  font-size:22px;
  font-weight:700;
  letter-spacing:.4px;
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.mini-badge{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:var(--muted);
  font-size:13px;
}

.page{
  max-width:980px;
  margin:0 auto;
  padding:16px;
}

.hero-card{
  background:linear-gradient(135deg,#17305f,#112546);
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:18px;
  margin-bottom:16px;
}

.hero-title{
  font-size:15px;
  color:var(--muted);
  margin-bottom:8px;
}

.hero-subtitle{
  font-size:28px;
  font-weight:700;
}

.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:16px;
}

.card{
  background:linear-gradient(180deg,var(--card),var(--card-2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
  margin-bottom:16px;
}

.card-title,
.section-title{
  font-size:14px;
  color:var(--muted);
  margin-bottom:12px;
}

.card-value{
  font-size:26px;
  font-weight:700;
}

.list-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.list-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.03);
}

.list-item-main{
  min-width:0;
}

.list-title{
  font-weight:700;
  margin-bottom:4px;
}

.list-sub{
  font-size:13px;
  color:var(--muted);
  word-break:break-word;
}

.summary-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--text);
}

.summary-line{
  display:flex;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid rgba(255,255,255,.05);
  padding-bottom:8px;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:86px;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.4px;
  text-transform:uppercase;
}

.pill-ok{background:rgba(18,183,106,.16);color:#6ee7a8;border:1px solid rgba(18,183,106,.35)}
.pill-warn{background:rgba(245,165,36,.16);color:#f9c76b;border:1px solid rgba(245,165,36,.35)}
.pill-crit{background:rgba(239,68,68,.16);color:#ff8c8c;border:1px solid rgba(239,68,68,.35)}
.pill-offline{background:rgba(100,116,139,.16);color:#b8c4d6;border:1px solid rgba(100,116,139,.35)}

.empty-state{
  color:var(--muted);
  padding:8px 0;
}

.map-placeholder{
  min-height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:16px;
  color:var(--muted);
  background:rgba(255,255,255,.02);
}

.bottom-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  height:var(--nav-h);
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  background:rgba(10,16,31,.92);
  backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
  z-index:200;
}

.nav-link{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  border-radius:14px;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.nav-link.active{
  background:rgba(46,168,255,.14);
  color:#8fd4ff;
  border:1px solid rgba(46,168,255,.28);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0 16px;
  border:none;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
}

.btn-danger{
  background:#7f1d1d;
  color:#fff;
}

.kv{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.kv:last-child{
  border-bottom:none;
}

.kv-key{
  color:var(--muted);
}

.kv-val{
  text-align:right;
  word-break:break-word;
}

@media (max-width:720px){
  .grid{
    grid-template-columns:1fr;
  }

  .hero-subtitle{
    font-size:22px;
  }

  .bottom-nav{
    grid-template-columns:repeat(5,1fr);
  }

  .nav-link{
    font-size:12px;
  }
}
