:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --border: #243049;
  --text: #e8eefc;
  --muted: #93a0b8;
  --primary: #6c7cff;
  --live: #22c55e;
  --verify: #f59e0b;
  --disabled: #ef4444;
  --error: #64748b;
  --unknown: #38bdf8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a2750 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6c7cff, #22d3ee);
  font-size: 22px;
}
h1 { margin: 0; font-size: 1.25rem; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }
.badge {
  border: 1px solid #355; background: #142033;
  color: #9fd; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem;
}
.badge.live-mode {
  border-color: #166534; background: #052e16; color: #86efac;
}
.notice {
  background: #0f1a30;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
  font-size: 0.92rem;
}
.notice code {
  background: #1a2744;
  padding: 1px 6px;
  border-radius: 4px;
  color: #c7d2fe;
}
.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 800px) {
  .panel { grid-template-columns: 1fr; }
}
.col {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.col-head span { margin-right: auto; }
textarea {
  flex: 1;
  width: 100%;
  resize: vertical;
  min-height: 200px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1324;
  color: var(--text);
  padding: 12px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}
textarea:focus { outline: 1px solid #4f5fd6; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
button {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }
button.primary {
  background: linear-gradient(135deg, #6c7cff, #7c3aed);
  color: #fff;
  min-width: 120px;
}
button.ghost {
  background: #1a2744;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-weight: 500;
  font-size: 0.85rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 0.85rem;
}
.field input {
  min-width: 240px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b1324;
  color: var(--text);
  padding: 8px 10px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat span { color: var(--muted); font-size: 0.82rem; }
.stat b { font-size: 1.4rem; }
.stat.live b { color: var(--live); }
.stat.verify b { color: var(--verify); }
.stat.disabled b { color: var(--disabled); }
.stat.error b { color: #94a3b8; }
.stat.unknown b { color: var(--unknown); }
.detail {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.detail h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}
.detail pre {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 0.82rem;
  color: #cbd5e1;
  font-family: ui-monospace, Consolas, monospace;
}
footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}
footer code {
  background: #1a2744;
  padding: 1px 6px;
  border-radius: 4px;
}
