/* Polished, responsive Discord-like styling */
:root{
  --bg: #0b0f14;
  --bg-2: #0e141b;
  --panel: #131a22;
  --panel-2: #151e28;
  --text: #e8eef5;
  --muted: #9aa7b3;
  --good: #2ea043;
  --warn: #d29922;
  --bad:  #f85149;
  --nodata: rgba(255,255,255,.12);
  --border-c: rgba(255,255,255,.06);
  --radius-lg: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background: radial-gradient(1200px 600px at 20% -10%, rgba(62,94,255,.08), transparent),
                     radial-gradient(900px 500px at 90% 0%, rgba(46,160,67,.06), transparent),
                     var(--bg);
  color:var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Helvetica Neue, Arial, Noto Sans;
  letter-spacing:.1px;
}

.container{ max-width:1100px; margin:0 auto; padding: 0 18px; }
.row{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }

.site-header{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(19,26,34,.85), rgba(19,26,34,.55));
  border-bottom: 1px solid var(--border-c);
}
.site-header .brand{ font-weight:800; letter-spacing:.3px; padding:14px 0; font-size:18px; }

.banner{ padding:14px 0; border-bottom:1px solid var(--border-c); }
.banner .muted{ margin-top:4px; }
.banner.good{ background: rgba(46,160,67,.10); }
.banner.warn{ background: rgba(210,153,34,.10); }
.banner.bad{  background: rgba(248,81,73,.10); }

main.container{ display:grid; gap:18px; padding:20px 0; }
.grid{ display:grid; grid-template-columns: 1.2fr .8fr; gap:18px; }
@media (max-width: 920px){ .grid{ grid-template-columns: 1fr; } }

.card{
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border-c);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.section-title{ font-weight:800; margin-bottom:12px; font-size:16px; }

.pill{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 14px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--border-c);
  border-radius:999px; font-weight:700;
}
.dot{ width:10px; height:10px; border-radius:50%; background:var(--warn); }
.dot.ok{ background: var(--good); }
.dot.bad{ background: var(--bad); }

.service-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.svc-name{ font-weight:800; font-size:17px; }
.svc-right{ display:flex; gap:8px; align-items:center; }

.kpis{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
  margin-top:14px;
}
.kpi{
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border-c);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.kpi-label{ color:var(--muted); font-size:12px; }
.kpi-value{ font-weight:800; margin-top:6px; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.support{
  display:none; margin-top:14px; padding:12px;
  border-radius: var(--radius-sm);
  background: rgba(248,81,73,.12); border:1px solid rgba(248,81,73,.35);
  font-weight:700;
}
.support a{ color:#ffb3b0; text-decoration:none; }

.table{ width:100%; border-collapse:separate; border-spacing:0; margin-top:10px; font-size:14px; }
.table th,.table td{ padding:10px 8px; text-align:left; border-bottom:1px solid var(--border-c); }
.table th{ color:var(--muted); font-size:12px; }

.controls{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
button{
  background: rgba(255,255,255,.06); color:var(--text); border:1px solid rgba(255,255,255,.14);
  border-radius:10px; padding:9px 14px; font:inherit; cursor:pointer; font-weight:600;
}
button:hover{ background: rgba(255,255,255,.10); }

.muted{ color:var(--muted); }
.tiny{ font-size:12px; }

.uptime-grid{ display:grid; grid-template-columns: repeat(30, 14px); gap:5px; align-items:center; }
.uptime-grid .cell{ width:14px; height:14px; border-radius:4px; background:rgba(255,255,255,.08); border:1px solid var(--border-c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.box{ display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:6px; vertical-align:-2px; }
.box.ok{ background: var(--good); }
.box.warn{ background: var(--warn); }
.box.bad{ background: var(--bad); }
.box.nod{ background: var(--nodata); }

.site-footer{ border-top:1px solid var(--border-c); padding:20px 0; }

/* Mobile tweaks */
@media (max-width: 720px){
  .container{ padding: 0 12px; }
  .section-title{ font-size: 15px; margin-bottom: 10px; }
  .grid{ grid-template-columns: 1fr; gap: 14px; }
  .kpis{ grid-template-columns: 1fr; gap: 10px; }
  .svc-name{ font-size: 16px; }
  .pill{ padding: 8px 12px; }
  .card{ padding: 14px; border-radius: 14px; }
  .table{ font-size: 13px; }
  .table th,.table td{ padding: 8px 6px; }
  .controls{ gap: 6px; }
  button{ width: 100%; padding: 10px 12px; }
  .uptime-grid{ grid-template-columns: repeat(15, 14px); }
}
@media (max-width: 420px){
  .site-header .brand{ font-size: 16px; }
  .kpi-value{ font-size: 16px; }
  .uptime-grid{ grid-template-columns: repeat(12, 12px); gap: 4px; }
  .uptime-grid .cell{ width: 12px; height: 12px; }
}
#latencyChart{ width: 100%; height: auto; display: block; }


/* Scrollable log table */
.table-wrap{
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--border-c);
  border-radius: 10px;
}
.table-wrap .table{
  margin-top: 0;
}
