:root {
  --bg: #f7f8fa;
  --card: #fff;
  --text: #1c2430;
  --muted: #6b7684;
  --line: #e2e6ea;
  --accent: #128c7e;
  --danger: #c0392b;
  --warn: #b7791f;
  --ok: #1e8449;
}
* { box-sizing: border-box; }
body { margin: 0; font: 13px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--text); padding: 10px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
h2 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hint { color: var(--muted); font-weight: normal; font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.hidden { display: none !important; }
.error { color: var(--danger); }
label { display: block; margin: 8px 0; font-weight: 600; font-size: 12px; }
input, select, textarea { width: 100%; margin-top: 3px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-weight: normal; background: #fff; }
input[type="checkbox"] { width: auto; margin-right: 6px; }
textarea { resize: vertical; }
details { margin: 6px 0; }
summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.row input { margin-top: 0; }
button { padding: 7px 12px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
button:disabled { opacity: .5; cursor: default; }
button.secondary { background: #dfe4ea; color: var(--text); }
button.danger { background: var(--danger); }
button.small { padding: 4px 8px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.chip { background: #e8f5f2; color: #075e54; padding: 2px 7px; font-size: 11px; font-weight: 500; }
.preview { background: #f1f5f4; border-radius: 6px; padding: 8px; white-space: pre-wrap; margin: 6px 0; }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 11px; color: #fff; background: #777; }
.pill.good { background: var(--ok); }
.pill.warn { background: var(--warn); }
.pill.bad { background: var(--danger); }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
#barFill { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.log { list-style: none; padding: 0; margin: 8px 0 0; max-height: 200px; overflow: auto; font-size: 12px; }
.log li { padding: 2px 0; border-bottom: 1px solid var(--line); }
.log li.ok { color: var(--ok); }
.log li.error { color: var(--danger); }
.log li.warn { color: var(--warn); }
.replies { list-style: none; padding: 0; margin: 6px 0 0; }
.replies li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.replies .meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.replies .text { margin: 3px 0 5px; white-space: pre-wrap; }
.row.between { justify-content: space-between; }
