:root {
  --bg: #f6f7f9; --card: #fff; --text: #16181d; --muted: #6b7280; --line: #e3e6eb;
  --accent: #2357d9; --accent-text: #fff; --ok: #1f9d55; --warn: #c2410c;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111317; --card: #1a1d23; --text: #e8eaee; --muted: #9aa1ad; --line: #2b2f37;
          --accent: #5b8cff; --accent-text: #0b0d12; --ok: #3ccf7e; --warn: #fb923c; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, Segoe UI, sans-serif; }
main { max-width: 56rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
header { display: flex; align-items: baseline; gap: .6rem; margin-bottom: 1rem; }
h1 { font-size: 1.35rem; margin: 0; }
.sub { color: var(--muted); font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
input, select { font: inherit; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
button, .button { font: inherit; padding: .6rem 1.1rem; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-text); cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary, .button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--warn); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
.link { display: flex; gap: .5rem; flex-wrap: wrap; }
.link input { flex: 1 1 16rem; min-width: 0; }
.err { color: var(--warn); min-height: 1.2em; margin: .5rem 0 0; }
.notice { color: var(--muted); }
.status { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .75rem; }
.dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); }
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .panes { grid-template-columns: 1fr; } }
.pane h3 { margin: 0 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lines { height: 18rem; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; }
@media (max-width: 640px) { .lines { height: 12rem; } }
.line { margin-bottom: .6rem; }
.main { font-size: 1.05rem; }
.main.partial { color: var(--muted); }
.sub { font-size: .85rem; color: var(--muted); }
.stats { margin-top: .75rem; font: 12px ui-monospace, monospace; color: var(--muted); }
[hidden] { display: none !important; }
