/* ========== GLOBAL DARK THEME ========== */
body {
  font-family: Arial, sans-serif;
  background: #0d0d0d;
  color: #eee;
  margin: 0;
  padding: 20px;
  display: flex;
  gap: 20px;
  height: 100vh;
  box-sizing: border-box;
}
h2 { color: #0078ff; margin: 0 0 10px 0; }
button {
  background: #0078ff;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover { background: #0a9aff; }
button.danger { background: #ff3344; }
button:disabled { background: #444; cursor: not-allowed; }

input, select, textarea {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #eee;
  border-radius: 5px;
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
}
textarea { resize: vertical; }
pre {
  background: #111;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  color: #ddd;
}
.panel {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  margin-bottom: 15px;
}
.sidebar {
  width: 320px;
  overflow-y: auto;
}
.main {
  flex: 1;
  overflow-y: auto;
}
.kv { display: flex; gap: 6px; margin-bottom: 6px; }
.kv input { flex: 1; }
.muted { color: #999; font-size: 13px; }

/* JSON viewer */
.json-viewer { background: #111; padding: 12px; border-radius: 8px; overflow:auto; max-height:480px; }
.j-node { line-height: 1.6; }
.j-key { color: #66ccff; }
.j-string { color: #88ff88; }
.j-number { color: #ffd966; }
.j-boolean { color: #ff9966; }
.j-null { color: #bbb; }
.j-toggle { cursor: pointer; display: inline-block; width: 18px; text-align: center; color: #777; }
.j-collapsed > .j-children { display: none; }
.j-meta { color: #777; font-size: 12px; margin-left: 6px; }

@media (max-width:900px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; }
}