:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e37;
  --text: #e8eaed;
  --muted: #9aa0ac;
  --accent: #5b9dff;
  --accent-text: #0b0d10;
  --danger: #ff6b6b;
  --ok: #58d68d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
nav {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  overflow-x: auto;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
nav a.active, nav a:hover { color: var(--text); background: var(--panel); }
h1 { font-size: 22px; margin: 4px 0 16px; }
h2 { font-size: 17px; margin: 24px 0 10px; color: var(--muted); }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #10131a;
  color: var(--text);
  font-size: 16px;
}
textarea { min-height: 80px; resize: vertical; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
button, .btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .btn.secondary { background: #2a2e37; color: var(--text); }
button.danger, .btn.danger { background: var(--danger); color: #1a0a0a; }
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 14px; }
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: #2a2e37;
}
.pill.ok { background: rgba(88,214,141,.15); color: var(--ok); }
.pill.off { background: rgba(255,107,107,.15); color: var(--danger); }
.notice {
  background: rgba(91,157,255,.12);
  border: 1px solid rgba(91,157,255,.4);
  color: var(--accent);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
.error {
  background: rgba(255,107,107,.12);
  border: 1px solid rgba(255,107,107,.4);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
pre {
  white-space: pre-wrap;
  word-break: break-all;
  background: #10131a;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  max-height: 260px;
  overflow: auto;
}
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
form.inline { display: inline; }
