:root {
  --bg: #f5f5f7; --card: #ffffff; --text: #1d1d1f; --muted: #6e6e73; --line: #e5e5ea;
  --accent: #0071e3; --green: #1a7f37; --orange: #b25000; --red: #c9281e;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --card: #1c1c1e; --text: #f5f5f7; --muted: #98989d; --line: #38383a; --accent: #2997ff; --green: #30d158; --orange: #ff9f0a; --red: #ff453a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 22px; font-weight: 600; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.err { color: var(--red); font-size: 13px; min-height: 1em; margin: 8px 0; }
.card { background: var(--card); border-radius: 12px; padding: 4px 0; margin-top: 16px; overflow-x: auto; }
.card .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.login { max-width: 380px; margin: 12vh auto 0; padding: 28px; }
.login form { display: flex; gap: 8px; margin-top: 16px; }
.login input { flex: 1; }
.bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 16px; border-top: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 500; }
td.mono, .mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; }
td .sub { color: var(--muted); font-size: 12px; }
button { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.small { padding: 3px 9px; font-size: 12.5px; }
button.danger { color: var(--red); }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; width: 100%; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ok { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.warn { color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }
.bad { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.off { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
dialog { border: none; border-radius: 14px; padding: 24px; width: min(480px, 92vw); background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
dialog form { display: flex; flex-direction: column; gap: 12px; }
dialog label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
dialog label.inline { flex-direction: row; align-items: center; }
dialog label.inline input { width: auto; }
dialog .actions { justify-content: flex-end; }
