:root {
  color-scheme: light;
  --ink: #172524;
  --muted: #546866;
  --line: #d7e2df;
  --surface: #fff;
  --page: #f4f7f5;
  --accent: #14594e;
  --danger: #96351f;
  font: 15px/1.5 system-ui, "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); }
[hidden] { display: none !important; }
.top { display: flex; align-items: center; gap: 20px; padding: 14px clamp(18px, 4vw, 52px); background: #172e2a; color: #e0ede8; }
.top a { color: white; text-decoration: none; font-weight: 700; }
.top span { font-size: .86rem; color: #b7d0c8; }
.top button { margin-left: auto; }
main { max-width: 1500px; margin: 0 auto; padding: 36px clamp(18px, 4vw, 52px); }
.heading, .dialog-head, .actions, .filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.heading { margin-bottom: 20px; }
h1, h2, h3, p { margin: 0 0 10px; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.12; }
h2 { font-size: 23px; }
h3 { font-size: 16px; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .13em; }
.muted { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 8px 11px; }
button { cursor: pointer; font-weight: 600; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #388878; outline-offset: 2px; }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.danger, .error { color: var(--danger); }
.login { max-width: 430px; background: white; border: 1px solid var(--line); padding: 22px; }
form { display: grid; gap: 12px; justify-items: start; }
form label { width: 100%; }
label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
input, textarea, select { width: 100%; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: white; margin-bottom: 22px; }
.stats div { display: grid; gap: 5px; padding: 14px 19px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: none; }
.stats span { color: var(--muted); }
.stats strong { font-size: 28px; font-variant-numeric: tabular-nums; }
.filters { justify-content: flex-start; align-items: end; margin-bottom: 12px; }
.filters label:first-child { flex: 1 0 min(100%, 220px); }
.filters span { margin-left: auto; font-size: .8rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: white; }
table { border-collapse: collapse; width: 100%; min-width: 830px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
th { background: #eaf2ee; font-size: .82rem; }
td small { display: block; color: var(--muted); }
.link { padding: 0; background: none; border: none; text-decoration: underline; color: var(--accent); }
.badge { display: inline-block; border-radius: 4px; background: #e9edec; padding: 2px 7px; font-size: .8rem; white-space: nowrap; }
.badge.online { color: #125b43; background: #d9efe4; }
.badge.degraded { color: #774015; background: #f8e8d3; }
dialog { width: min(580px, calc(100% - 24px)); max-height: calc(100% - 24px); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 24px; }
dialog::backdrop { background: #11292375; }
.drawer { height: 100%; max-height: 100%; margin: 0 0 0 auto; width: min(630px, 100%); border-radius: 0; }
dialog section, dialog details { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 15px; }
dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); row-gap: 6px; margin: 14px 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.commands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.commands small { display: block; min-height: 1.5em; color: var(--muted); overflow-wrap: anywhere; }
.records { list-style: none; padding: 0; margin: 0; max-height: 290px; overflow: auto; }
.records li { padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.records li button { margin-left: 8px; padding: 3px 7px; }
output { display: block; padding: 10px; border: 1px solid var(--line); background: var(--page); user-select: all; font-family: monospace; overflow-wrap: anywhere; }
#code { font-size: 2rem; font-weight: 700; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
@media (max-width: 650px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats div:nth-child(even) { border-right: none; }
  .top { gap: 9px; }
  .top span { display: none; }
}
