:root {
  --bg: #0f1115;
  --panel: #141822;
  --panel2: #10141d;
  --text: #e7eaf0;
  --muted: #aab2c2;
  --faint: #7c859a;
  --border: #22283a;
  --accent: #7aa2ff;
  --bad: #ff6b6b;
  --good: #57d3a6;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% 10%, rgba(122,162,255,0.16), transparent 60%),
              radial-gradient(900px 700px at 90% 20%, rgba(87,211,166,0.10), transparent 55%),
              var(--bg);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel), transparent 20%);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand__title { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.brand__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.shell {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 14px;
  padding: 14px;
  height: calc(100vh - 64px - 44px);
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; height: auto; }
}

.panel {
  background: linear-gradient(180deg, color-mix(in oklab, var(--panel), transparent 0%), color-mix(in oklab, var(--panel2), transparent 0%));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel__head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.panel__title { font-weight: 700; font-size: 14px; }
.panel__meta { color: var(--muted); font-size: 12px; white-space: nowrap; }

.filters {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 170px auto;
  gap: 10px;
}

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

.input, .select {
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  outline: none;
}

.input::placeholder { color: color-mix(in oklab, var(--muted), transparent 20%); }

.btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in oklab, var(--border), white 8%);
  background: rgba(0,0,0,0.16);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.btn:hover { border-color: color-mix(in oklab, var(--border), white 18%); }
.btn--ghost { background: transparent; }

.list {
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px 10px 12px;
  background: rgba(0,0,0,0.14);
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.item:hover { border-color: color-mix(in oklab, var(--border), white 16%); }
.item--active { border-color: color-mix(in oklab, var(--accent), white 6%); box-shadow: 0 0 0 1px rgba(122,162,255,0.18) inset; }

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--border), white 10%);
  background: rgba(122,162,255,0.10);
  color: color-mix(in oklab, var(--accent), white 6%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.detail { padding: 14px; overflow: auto; min-height: 0; }
.detail__empty { height: 100%; display: grid; place-items: center; }

.hint {
  border: 1px dashed color-mix(in oklab, var(--border), white 10%);
  background: rgba(0,0,0,0.12);
  border-radius: 14px;
  padding: 14px;
  max-width: 680px;
}

.hint__title { font-weight: 700; margin-bottom: 6px; }
.hint__text { color: var(--muted); font-size: 13px; line-height: 1.45; }
.code {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: var(--text);
  overflow: auto;
}

.detail__grid {
  display: grid;
  gap: 12px;
}

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.kv__k { color: var(--muted); font-size: 12px; }
.kv__v { min-width: 0; }

.section { border-top: 1px solid var(--border); padding-top: 10px; }
.section__title { font-weight: 700; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pre {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  overflow: auto;
  font-size: 12px;
  line-height: 1.5;
}

.footer {
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  background: color-mix(in oklab, var(--panel), transparent 22%);
  position: sticky;
  bottom: 0;
}

.footer__left { display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px rgba(124,133,154,0.15); }
.dot--good { background: var(--good); box-shadow: 0 0 0 3px rgba(87,211,166,0.16); }
.dot--bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(255,107,107,0.16); }
