:root {
  --fg: #111827; --muted: #6b7280; --line: #e5e7eb; --bg: #f9fafb;
  --card: #fff; --accent: #2563eb; --ok: #047857; --bad: #b91c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0; font: 14px/1.5 system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--fg); background: var(--bg);
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; text-decoration: none; color: var(--fg); }
.brand span { color: var(--muted); font-weight: 400; }
nav { display: flex; gap: 14px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
nav a:hover { color: var(--accent); }
main { max-width: 980px; margin: 20px auto; padding: 0 16px 60px; }
h2 { font-size: 18px; margin: 0 0 14px; }
h3 { font-size: 15px; margin: 0 0 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 14px;
}
.card.narrow { max-width: 460px; margin: 40px auto; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--bad); }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; background: #fff;
}
input[type=file] { padding: 5px; }
textarea { resize: vertical; }
button, .btn {
  display: inline-block; padding: 7px 13px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--fg);
  font: inherit; font-size: 13px; cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover { border-color: var(--accent); color: var(--accent); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .btn.primary:hover { color: #fff; opacity: .92; }
button.danger { color: var(--bad); border-color: #fecaca; }
button.danger:hover { background: #fef2f2; }
button.small { padding: 4px 9px; font-size: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--card); }
.tbl th, .tbl td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fcfcfd; }
.tbl tr:last-child td { border-bottom: none; }
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 99px;
  background: #f3f4f6; font-size: 11px; color: var(--muted);
}
.pill.ok { background: #ecfdf5; color: var(--ok); }
.kv { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); word-break: break-word; }
.kv dd { margin: 0; word-break: break-word; }
.page { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.field { margin-bottom: 12px; }
.field[hidden] { display: none; }
.field .readonly { padding: 6px 9px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); }
.field table { width: 100%; font-size: 12px; border-collapse: collapse; }
.field table td, .field table th { padding: 4px 6px; border: 1px solid var(--line); }
.unknown { color: var(--bad); }
.hint { color: var(--muted); font-size: 11px; margin-top: 3px; }
.hint.warn { color: #b45309; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px);
  background: #111827; color: #fff; padding: 9px 16px; border-radius: 8px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }
@media (max-width: 620px) {
  .tbl th:nth-child(2), .tbl td:nth-child(2),
  .tbl th:nth-child(4), .tbl td:nth-child(4) { display: none; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 8px; }
}