:root {
  --bg: #f5f6f8; --panel: #fff; --text: #1d2330; --muted: #6b7280; --line: #e3e6eb;
  --accent: #2563eb; --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --code: #f1f3f6;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header { display: flex; align-items: center; gap: 24px; padding: 10px 20px; background: #111827; color: #e5e7eb; flex-wrap: wrap; }
header a { color: #e5e7eb; }
header .brand { font-weight: 700; font-size: 16px; }
header nav { display: flex; gap: 16px; flex: 1; }
header .user { color: #9ca3af; }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: #fafbfc; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono, pre, code, textarea.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
pre { background: var(--code); padding: 10px; border-radius: 6px; overflow: auto; max-height: 480px; margin: 0; white-space: pre-wrap; word-break: break-word; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #e5e7eb; color: #374151; white-space: nowrap; }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.bad { background: #fee2e2; color: var(--bad); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; margin-right: 6px; }
.dot.on { background: #22c55e; }
form.inline { display: inline; }
label { display: block; font-weight: 600; margin: 8px 0 4px; font-size: 13px; }
input[type=text], input[type=password], input[type=number], select, textarea { width: 100%; padding: 7px 9px; border: 1px solid #cfd4dc; border-radius: 6px; font: inherit; background: #fff; }
textarea { min-height: 70px; }
button, .btn { display: inline-block; padding: 7px 14px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
button.secondary { background: #4b5563; }
button.danger { background: var(--bad); }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.flash.ok { background: #dcfce7; color: #14532d; }
.flash.error { background: #fee2e2; color: #7f1d1d; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 4px 12px; }
.kv div:nth-child(odd) { color: var(--muted); }
.login { max-width: 360px; margin: 80px auto; }
details summary { cursor: pointer; color: var(--accent); }
