:root {
  color-scheme: dark;
  --bg: #06101d;
  --panel: #0b1828;
  --panel-2: #102238;
  --line: #21364e;
  --text: #eaf2fa;
  --muted: #8fa5bb;
  --blue: #4aa8ff;
  --green: #3ed598;
  --amber: #f7b955;
  --red: #ff6f75;
  --shadow: 0 16px 50px rgb(0 0 0 / 28%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 82% -10%, rgb(35 118 181 / 24%), transparent 36rem),
    radial-gradient(circle at -10% 20%, rgb(20 104 95 / 18%), transparent 30rem),
    var(--bg);
  color: var(--text);
}
button, input { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(14px, 3vw, 34px); border-bottom: 1px solid var(--line);
  background: rgb(6 16 29 / 88%); backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  background: linear-gradient(145deg, #35a7ff, #31d6b0); color: #03101c; font-weight: 900;
  box-shadow: 0 0 28px rgb(63 180 255 / 22%);
}
.brand-title { font-weight: 760; letter-spacing: -.02em; }
.brand-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-status { margin-left: auto; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 99px; background: var(--muted); box-shadow: 0 0 0 4px rgb(143 165 187 / 10%); }
.dot.online { background: var(--green); box-shadow: 0 0 0 4px rgb(62 213 152 / 12%); }
.dot.stale { background: var(--amber); }
.dot.offline, .dot.error { background: var(--red); }
.content { width: min(1600px, 100%); margin: 0 auto; padding: 18px clamp(12px, 2.5vw, 30px) 34px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; }
.tab, .ghost {
  border: 0; border-radius: 8px; padding: 8px 12px; background: transparent; color: var(--muted);
}
.tab.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px rgb(74 168 255 / 24%); }
.ghost { border: 1px solid var(--line); margin-left: auto; }
.ghost:hover, .tab:hover { color: var(--text); border-color: #35506e; }
.search {
  min-width: min(280px, 100%); flex: 1; max-width: 460px; padding: 9px 12px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.search:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(74 168 255 / 12%); }
.summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.metric { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(160deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow); }
.metric-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.metric-value { margin-top: 4px; font-weight: 760; font-size: 21px; font-variant-numeric: tabular-nums; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgb(11 24 40 / 90%); box-shadow: var(--shadow); }
.table-wrap { width: 100%; overflow: auto; max-height: calc(100vh - 260px); }
table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 5; padding: 10px 11px; text-align: left; color: #abc0d5; background: #102238; border-bottom: 1px solid var(--line); }
td { padding: 9px 11px; border-bottom: 1px solid rgb(33 54 78 / 70%); font-variant-numeric: tabular-nums; }
tbody tr:hover { background: rgb(74 168 255 / 6%); }
.num { text-align: right; }
.name { display: flex; align-items: center; gap: 7px; font-weight: 650; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 999px; background: rgb(143 165 187 / 10%); color: #b9cad9; }
.ok { color: var(--green); }
.warn { color: var(--amber); }
.bad { color: var(--red); }
.muted { color: var(--muted); }
.sub { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.empty, .gate { max-width: 620px; margin: 10vh auto; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.gate h1 { margin: 0 0 10px; font-size: 25px; }
.gate p { color: var(--muted); line-height: 1.55; }
.gate-row { display: flex; gap: 8px; margin-top: 18px; }
.gate input { min-width: 0; flex: 1; padding: 10px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
.primary { border: 0; border-radius: 9px; padding: 10px 14px; color: #03101c; background: linear-gradient(135deg, #4aa8ff, #43d7b3); font-weight: 720; }
.error-box { padding: 12px 14px; margin-bottom: 12px; color: #ffd4d6; border: 1px solid rgb(255 111 117 / 35%); background: rgb(255 111 117 / 8%); border-radius: 10px; }
.footer { margin-top: auto; padding: 20px; text-align: center; color: #617991; font-size: 11px; }
@media (max-width: 900px) {
  .summary { grid-template-columns: repeat(2, 1fr); }
  .metric:first-child { grid-column: span 2; }
  .brand-sub { max-width: 36vw; }
  .table-wrap { max-height: none; }
}
@media (max-width: 560px) {
  .topbar { padding: 10px 12px; }
  .top-status span:last-child { display: none; }
  .content { padding: 12px 8px 24px; }
  .toolbar { align-items: stretch; }
  .tabs { width: 100%; }
  .tab { flex: 1; }
  .search { max-width: none; width: 100%; order: 2; }
  .ghost { margin-left: 0; }
  .summary { gap: 7px; }
  .metric { padding: 10px; }
  .metric-value { font-size: 18px; }
}
