:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --border: #2a2f3a;
  --fg: #e6e8ee;
  --muted: #8b93a3;
  --accent: #5b9dff;
  --good: #3fb950;
  --bad: #f85149;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

code, .mono, pre { font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; }

/* layout */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--border);
}
.topbar .brand { font-weight: 700; color: var(--fg); }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.container { max-width: 980px; margin: 0 auto; padding: 28px 24px 64px; }

.center { min-height: 100vh; display: grid; place-items: center; }

.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.inline { display: inline; margin: 0; }
.actions { display: flex; align-items: center; gap: 8px; }

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 28px 0 12px; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* cards */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin: 16px 0;
}
.hint pre {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; overflow-x: auto; color: var(--fg);
}

/* login */
.login { width: 320px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { text-align: center; }

/* forms */
.form { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; }
input, textarea, select {
  background: var(--panel-2); color: var(--fg);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px;
  font-size: 14px; width: 100%;
}
textarea.mono { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }

fieldset.outbound {
  border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px;
  display: flex; gap: 24px; align-items: center;
}
fieldset.outbound legend { padding: 0 6px; color: var(--muted); }
fieldset.outbound input { width: 140px; }
fieldset.outbound select { width: auto; }

/* buttons */
button, .btn {
  background: var(--accent); color: #0a0d12; border: none; border-radius: 8px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
}
button:hover, .btn:hover { filter: brightness(1.08); text-decoration: none; }
button.danger { background: var(--bad); color: #fff; }
button.link {
  background: none; color: var(--accent); padding: 0; font-weight: 500;
}
.btn { display: inline-block; }
a.link { color: var(--muted); }

/* tables */
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
table.grid th { color: var(--muted); font-weight: 600; }
table.grid tbody tr:hover { background: var(--panel-2); }

/* misc */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
}
.badge.good { color: var(--good); border-color: var(--good); }
.badge.bad { color: var(--bad); border-color: var(--bad); }
.error {
  background: rgba(248, 81, 73, 0.1); border: 1px solid var(--bad);
  color: #ffb4af; padding: 10px 14px; border-radius: 8px;
}
dl.meta { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; margin: 0; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; }
.CodeMirror { border: 1px solid var(--border); border-radius: 8px; height: auto; }
