:root {
  --bg: #0b0f1a;
  --bg-2: #111827;
  --panel: #151c2e;
  --panel-2: #1b2438;
  --border: #263049;
  --text: #e6ebf5;
  --muted: #8b98b4;
  --accent: #24d3a5;
  --accent-2: #6c8cff;
  --warn: #ffb454;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 26, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 26px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: 15px; color: #05131a; font-weight: 900;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted); padding: 8px 14px; border-radius: 9px; font-weight: 500; font-size: 14px;
}
.nav-links a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--panel-2); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding: 74px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 30% auto -10%; height: 500px;
  background: radial-gradient(circle at 30% 30%, rgba(36, 211, 165, .18), transparent 60%),
              radial-gradient(circle at 70% 20%, rgba(108, 140, 255, .16), transparent 60%);
  filter: blur(10px); pointer-events: none;
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.5px; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0 0 26px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px;
  font-weight: 600; font-size: 14px; border: 1px solid var(--border); color: var(--text); background: var(--panel);
  cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #05131a; border: none; }
.btn.primary:hover { filter: brightness(1.08); }

/* ── Sections / grid ─────────────────────────────────────────────────── */
section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; margin: 0; }
.section-head .sub { color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 4px; font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: .2px; }
.card .value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .value.small { font-size: 22px; }
.card .unit { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.card .meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
.card.accent-t { border-top: 2px solid var(--accent); }
.card.accent-n { border-top: 2px solid var(--accent-2); }
.card.accent-p { border-top: 2px solid var(--warn); }

.stat-icon { float: right; opacity: .55; }

/* progress bar */
.bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; margin-top: 12px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; background: var(--panel-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }
td.mono, .mono { font-family: var(--mono); font-size: 13px; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); color: var(--muted); background: var(--bg-2);
}
.badge.ok { color: var(--accent); border-color: rgba(36,211,165,.4); background: rgba(36,211,165,.08); }
.badge.off { color: var(--muted); }
.badge.warn { color: var(--warn); border-color: rgba(255,180,84,.4); background: rgba(255,180,84,.08); }

.muted { color: var(--muted); }
.center { text-align: center; }
.empty { color: var(--muted); padding: 26px; text-align: center; font-size: 14px; }

/* ── Search ──────────────────────────────────────────────────────────── */
.search { display: flex; gap: 10px; }
.search input {
  flex: 1; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font-size: 14px; font-family: var(--mono);
}
.search input:focus { outline: none; border-color: var(--accent); }

/* ── Feature cards ───────────────────────────────────────────────────── */
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .ico {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(108,140,255,.12); color: var(--accent-2); font-weight: 800;
}
.feature h4 { margin: 0 0 4px; font-size: 15px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ── Footer ──────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); margin-top: 40px; padding: 30px 0;
  color: var(--muted); font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ── Misc ────────────────────────────────────────────────────────────── */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(36,211,165,.15); margin-right: 8px; }
.dot.red { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,107,107,.15); }
.refresh { color: var(--muted); font-size: 12px; }
iframe.explorer-frame {
  width: 100%; height: 78vh; border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
}
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sh { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.copy { cursor: pointer; }
.copy:hover { color: var(--accent); }

@media (max-width: 640px) {
  .nav-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .nav-links { width: 100%; }
  .card .value { font-size: 24px; }
}
