:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --line: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #1a73e8;
  --ok: #12805c;
  --warn: #b45309;
  --err: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand strong { font-size: 15px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; display: inline-block; }
.dot.ok { background: #16a34a; }
.dot.err { background: var(--err); }

.actions { display: flex; gap: 8px; }

input[type="password"], input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
}
input[type="password"] { width: 260px; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,115,232,.12); }

.btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .55; cursor: default; }

main { max-width: 1080px; margin: 22px auto 40px; padding: 0 20px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.card .label { color: var(--muted); font-size: 12px; }
.card .value { font-size: 18px; font-weight: 600; margin-top: 4px; word-break: break-all; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 16px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; }

.tree { padding: 8px 8px 12px; max-height: 460px; overflow: auto; }
.node { padding: 3px 6px; border-radius: 6px; }
.node:hover { background: #f3f4f6; }
.node .name { font-weight: 500; }
.node .count { color: var(--muted); font-size: 12px; margin-left: 8px; }
.node details > summary { cursor: pointer; list-style: none; }
.node details > summary::-webkit-details-marker { display: none; }
.node details > summary::before { content: "▸"; display: inline-block; width: 14px; color: var(--muted); }
.node details[open] > summary::before { content: "▾"; }
.children { margin-left: 16px; border-left: 1px dashed var(--line); padding-left: 8px; }

table.api { width: 100%; border-collapse: collapse; }
table.api th, table.api td {
  text-align: left;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
table.api th { background: #fafbfc; font-weight: 600; color: #374151; }
table.api tr:last-child td { border-bottom: none; }
code {
  background: #f3f4f6;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.alert {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid;
  white-space: pre-wrap;
}
.alert.err { background: #fef2f2; border-color: #fecaca; color: var(--err); }
.alert.ok { background: #ecfdf5; border-color: #a7f3d0; color: var(--ok); }
.alert.warn { background: #fffbeb; border-color: #fde68a; color: var(--warn); }
.hidden { display: none; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.pad { padding: 12px; }
.foot { max-width: 1080px; margin: 0 auto 28px; padding: 0 20px; }
