*{box-sizing:border-box}
body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  margin:0;padding:0;
  background:#0f172a;
  color:#e5e7eb;
}
.header{
  background:radial-gradient(circle at top left,#4f46e5,#1d4ed8 40%,#020617 100%);
  color:#e5e7eb;
  padding:18px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow:0 12px 30px rgba(15,23,42,0.9);
  position:sticky;top:0;z-index:20;
}
.header-title{font-size:22px;font-weight:600}
.header-subtitle{font-size:13px;opacity:.85}
.header-right{font-size:13px}
.header-right a{
  color:#e5e7eb;text-decoration:none;margin-left:8px;
  padding:4px 10px;border-radius:999px;
  border:1px solid rgba(148,163,184,0.6);
}
.header-right a:hover{background:rgba(15,23,42,0.4)}
.page{max-width:1200px;margin:24px auto 40px;padding:0 16px}
.card{
  background:radial-gradient(circle at top left,#1f2937 0,#020617 70%);
  border-radius:14px;
  padding:18px 20px;
  box-shadow:0 18px 60px rgba(15,23,42,0.9);
  border:1px solid rgba(148,163,184,0.16);
}
.widgets{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:14px;margin-bottom:18px;
}
.widget-title{
  font-size:12px;text-transform:uppercase;
  letter-spacing:.12em;color:#9ca3af;margin-bottom:6px;
}
.widget-value{font-size:26px;font-weight:600}
.widget-meta{font-size:12px;color:#9ca3af;margin-top:4px}
.widget-pill{
  position:absolute;right:12px;top:12px;font-size:11px;
  padding:3px 8px;border-radius:999px;
  background:rgba(15,23,42,0.8);
  border:1px solid rgba(148,163,184,0.5);
}
.widget{position:relative;overflow:hidden}
.section-title{font-size:15px;font-weight:600;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.section-title .label{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#9ca3af}
.add-form{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;margin-top:6px;
}
.add-form label{font-size:12px;color:#9ca3af;display:flex;flex-direction:column;gap:4px}
input[type=text],input[type=number],input[type=password]{
  background:rgba(15,23,42,0.8);
  border-radius:9px;border:1px solid rgba(55,65,81,0.9);
  color:#e5e7eb;padding:7px 9px;font-size:13px;
}
input:focus{
  outline:none;border-color:#6366f1;
  box-shadow:0 0 0 1px rgba(99,102,241,.5);
}
.btn{
  border-radius:999px;border:none;
  background:linear-gradient(135deg,#6366f1,#4f46e5);
  color:#fff;padding:8px 16px;
  font-size:13px;cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;justify-content:center;
}
.btn:hover{filter:brightness(1.05);box-shadow:0 6px 20px rgba(79,70,229,.4)}
.btn-ghost{background:transparent;border:1px solid rgba(148,163,184,0.5);color:#e5e7eb}
.btn-sm{padding:4px 9px;font-size:12px}
.table-wrapper{
  margin-top:10px;border-radius:10px;
  overflow:hidden;border:1px solid rgba(31,41,55,0.9);
}
table{width:100%;border-collapse:collapse;background:#020617}
th,td{padding:9px 10px;font-size:12px;border-bottom:1px solid rgba(31,41,55,0.9)}
th{
  background:linear-gradient(135deg,#111827,#020617);
  text-align:left;color:#9ca3af;font-weight:500;
}
tr:nth-child(even){background:rgba(15,23,42,0.8)}
tr:hover{background:rgba(31,41,55,0.95)}
.badge{
  padding:3px 8px;border-radius:999px;
  font-size:10px;font-weight:500;
  display:inline-flex;align-items:center;gap:4px;
}
.badge-online{background:rgba(22,163,74,.16);color:#4ade80}
.badge-offline{background:rgba(220,38,38,.16);color:#fb7185}
.badge-open{background:rgba(59,130,246,.16);color:#60a5fa}
.badge-closed{background:rgba(220,38,38,.16);color:#fb7185}
.charts canvas{
  background:#020617;border-radius:10px;
  border:1px solid rgba(31,41,55,0.9);
}
.muted{font-size:11px;color:#9ca3af}
@media(max-width:768px){
  .header{flex-direction:column;align-items:flex-start;gap:6px}
}
#latencyChart {
    height: 180px !important;
    max-height: 180px !important;
    min-height: 180px !important;
    width: 100% !important;
}
.chart-box {
    height: 260px !important;
    max-height: 260px !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.badge-warning {
    background: rgba(234, 179, 8, 0.25);
    color: #facc15;
}