:root {
  --bg: #f6f7f9; --card: #fff; --text: #1b1e23; --muted: #6b7280; --border: #e3e6ea;
  --accent: #2563eb; --danger: #dc2626; --ok: #16a34a; --warn-bg: #fff7e0;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121417; --card: #1b1e23; --text: #e8eaed; --muted: #9aa0a6; --border: #2d3138;
    --accent: #60a5fa; --danger: #f87171; --ok: #4ade80; --warn-bg: #3a3218; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, sans-serif; }
main { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { margin: 0 0 4px; } h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin: 16px 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.between { justify-content: space-between; align-items: center; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label:has(input[type=checkbox]) { flex-direction: row; align-items: center; }
select, input[type=text], input[type=password], input[type=email] { font: inherit; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--card); color: var(--text); min-width: 180px; }
button, .button { font: inherit; padding: 7px 14px; border-radius: 7px; border: 0; background: var(--accent);
  color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
button.danger { background: var(--danger); }
button.link { background: none; color: var(--danger); padding: 0 4px; }
button:disabled { opacity: .5; cursor: default; }
.status { font-weight: 600; } .status.ready { color: var(--ok); } .status.error { color: var(--danger); }
.server-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; margin: 10px 0; }
.facts div span { display: block; font-size: 12px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin: 8px 0; }
td, th { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
code { font-size: 12px; }
.warn { background: var(--warn-bg); padding: 8px 10px; border-radius: 7px; }
.err { color: var(--danger); }
dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text);
  max-width: min(760px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.5); }
.profile-body { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
#profile-qr svg { width: 240px; height: 240px; background: #fff; padding: 8px; border-radius: 8px; }
pre { background: var(--bg); padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 12px; flex: 1; min-width: 260px; }
