:root {
  --bg: #0f1115;
  --panel: #181c22;
  --panel2: #12161b;
  --line: #232830;
  --fg: #e6e6e6;
  --muted: #8b93a1;
  --ok: #3fb950;
  --bad: #f85149;
  --warn: #d29922;
  --blue: #388bfd;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
}
header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; }
.brand span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.hint { color: var(--muted); }
.hint.ok { color: var(--ok); }
.hint.bad { color: var(--bad); }
.tabs { display: flex; gap: 4px; padding: 10px 16px 0; border-bottom: 1px solid var(--line); }
.tabs button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 14px;
}
.tabs button.active { color: var(--fg); border-bottom-color: var(--blue); }
main { padding: 18px 20px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }

.split { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.aside { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; height: fit-content; }
.aside-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ds-list { display: flex; flex-direction: column; gap: 6px; }
.ds-item {
  text-align: left;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.ds-item.active { border-color: var(--blue); background: #17202e; }

.form-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.box-title { font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field > span { color: var(--muted); font-size: 12px; }
input, select, textarea {
  background: #0b0d10;
  border: 1px solid #2b323c;
  color: var(--fg);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
input:disabled { opacity: 0.6; }
textarea { resize: vertical; }
.btns { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
button {
  background: #2b323c;
  border: 0;
  color: var(--fg);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
button.primary { background: var(--blue); color: #fff; }
button.danger { background: #4a1d1d; color: #ff9c9c; }
button.btn-sm { padding: 5px 10px; font-size: 12px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.run-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.result { background: #0b0d10; border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: #b9c2cf; max-height: 360px; overflow: auto; white-space: pre-wrap; font-size: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font-size: 22px; font-weight: 600; margin-top: 6px; }
.bar { height: 10px; background: #0b0d10; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #388bfd, #3fb950); width: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
code { background: #0b0d10; padding: 2px 6px; border-radius: 4px; }
