:root {
  --bg: #0f1117;
  --panel: #171a23;
  --panel-2: #1e2230;
  --line: #2a2f3d;
  --text: #e8ecf4;
  --muted: #98a2b8;
  --accent: #4f8cff;
  --accent-2: #35c98f;
  --danger: #ef5b5b;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 15% -10%, #1b2b4d 0%, transparent 60%),
              radial-gradient(900px 500px at 95% 0%, #123a33 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 17, 23, .72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: .3px; }

.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #f0b429;
  box-shadow: 0 0 0 4px rgba(240, 180, 41, .15);
}
.dot.ok { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(53, 201, 143, .15); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 4px rgba(239, 91, 91, .15); }

.tag {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 1px 8px;
  border-radius: 999px;
}

.status { color: var(--muted); font-size: 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 28px 60px;
  max-width: 1320px;
  margin: 0 auto;
}
.span2 { grid-column: span 2; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  min-width: 0;
}

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.card-head.sub { margin-top: 20px; }
.card-head h2 { font-size: 14px; margin: 0; font-weight: 600; }
.hint { color: var(--muted); font-size: 12px; }

.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-row.tight { gap: 10px; }
.form-row > label { flex: 1 1 150px; }
label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
label.full { margin: 10px 0 0; }
label.inline { max-width: 260px; }
.col { display: flex; flex-direction: column; gap: 10px; }

input, select, textarea, button {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  outline: none;
  min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, .15); }
select { cursor: pointer; }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

.btn {
  cursor: pointer;
  padding: 9px 16px;
  transition: .16s ease;
  background: var(--panel-2);
}
.btn:hover { border-color: #3b4256; transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, #5b95ff, #3f7cf0); border-color: transparent; font-weight: 600; }
.btn.danger { color: #ffb4b4; border-color: rgba(239, 91, 91, .4); }
.btn.primary:hover { filter: brightness(1.06); }

.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; align-items: start; }

.picked {
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.8;
  word-break: break-all;
}

.output {
  margin: 0;
  min-height: 90px;
  max-height: 300px;
  overflow: auto;
  background: #0c0e14;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: #b9c6dd;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
.output.small { min-height: 60px; max-height: 140px; }

.kv { display: flex; flex-wrap: wrap; gap: 8px; }
.kv span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.kv b { color: var(--text); font-weight: 600; }

.table-wrap { overflow: auto; max-height: 320px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; background: rgba(255,255,255,.02); position: sticky; top: 0; }
tr:last-child td { border-bottom: none; }
td.ok { color: var(--accent-2); }
td.bad { color: var(--danger); }
.empty { color: var(--muted); text-align: center; padding: 18px; }
.mini {
  cursor: pointer;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
.mini:hover { color: #ffb4b4; border-color: rgba(239,91,91,.4); }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; padding: 16px; }
  .span2 { grid-column: span 1; }
  .two-col { grid-template-columns: 1fr; }
}
