:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #5f6b76;
  --line: #dbe2e8;
  --accent: #0f62fe;
  --green: #0e7a4f;
  --amber: #b45309;
  --danger: #b42318;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-size: 18px; font-weight: 700; letter-spacing: 0; }
.status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
}
.dot.ok { background: #16a34a; }
.dot.bad { background: #dc2626; }
main {
  max-width: 1120px;
  margin: 24px auto;
  padding: 0 20px;
  display: grid;
  gap: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}
textarea, select, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
}
textarea {
  resize: vertical;
  min-height: 118px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}
.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.field.compact { width: 180px; }
.field.grow { flex: 1 1 260px; min-width: 180px; }
.actions { margin-top: 4px; }
.btn {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
  background: #eef2f5;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.amber { background: var(--amber); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.panel-head h2 { margin: 0; font-size: 16px; }
.meta { color: var(--muted); font-size: 13px; }
.summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  min-width: 112px;
  background: #f8fafc;
}
.stat b { display: block; font-size: 18px; }
.stat span { color: var(--muted); font-size: 12px; }
.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbfcfd;
}
.item .code { font-weight: 700; font-family: Consolas, monospace; }
.item .sub { color: var(--muted); font-size: 12px; margin-top: 4px; word-break: break-all; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}
.badge.ok { background: #e6f4ec; color: var(--green); }
.badge.fail { background: #fdecec; color: var(--danger, #b42318); }
.error-box {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #f5b5b5;
  border-radius: 6px;
  background: #fef3f2;
  color: var(--danger, #b42318);
}
.table-wrap {
  overflow: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; }
th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #374151;
}
.empty { color: var(--muted); padding: 26px 0; text-align: center; }
.hidden { display: none !important; }
@media (max-width: 640px) {
  main { padding: 0 12px; margin: 14px auto; }
  .topbar { padding: 12px 14px; }
  .brand { font-size: 16px; }
  .field.compact { width: 100%; }
  .btn { flex: 1 1 100%; }
}
