:root {
  --bg: #0f1420; --card: #1a2130; --ink: #e7ecf3; --muted: #8b97a8;
  --accent: #4f8cff; --danger: #e05555; --ok: #3fb950; --warn: #d29922;
  --line: #2a3446;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, Segoe UI, Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: #131a28; border-bottom: 1px solid var(--line); }
.topbar nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; color: var(--ink); }
.brand span { color: var(--accent); font-weight: 500; font-size: 13px; }
.who { color: var(--muted); }
.wrap { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 18px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
label { display: block; margin: 10px 0; color: var(--muted); font-size: 13px; }
input[type=text], input[type=tel], input[type=password], input[type=number] {
  width: 100%; margin-top: 4px; padding: 10px; background: #0d1320; border: 1px solid var(--line);
  border-radius: 8px; color: var(--ink); font-size: 15px;
}
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 16px; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.danger { background: var(--danger); }
.btn-link { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 14px; padding: 0; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row input { width: auto; }
.row input.grow { flex: 1; min-width: 160px; }
.row input.num { width: 80px; }
form.inline { display: inline; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash-info { background: #16324f; }
.flash-success { background: #14351f; }
.flash-error { background: #3a1720; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tbl th { color: var(--muted); font-weight: 500; }
.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 14px 6px 0; }
.kv td { padding: 6px 0; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; border: 1px solid var(--line); }
.tag-active { background: #14351f; border-color: #1f6b32; }
.tag-pending { background: #3a3212; border-color: #7a6a1f; }
.tag-error, .tag-revoked { background: #3a1720; border-color: #7a2030; }
.tag-proxy { background: #16324f; }
.tag-direct { background: #24303f; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 3px 10px; border-radius: 18px; font-size: 13px; background: #24303f; }
.chip-proxy { background: #16324f; }
.chip-direct { background: #24303f; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.switch { display: flex; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.switch input { margin-top: 3px; }
.switch em { display: block; font-style: normal; }
.foot { text-align: center; color: var(--muted); padding: 24px; font-size: 12px; }

/* Узлы / команды установки */
select { margin-top: 4px; padding: 10px; background: #0d1320; border: 1px solid var(--line);
  border-radius: 8px; color: var(--ink); font-size: 15px; }
.field { display: flex; flex-direction: column; }
.field.grow { flex: 1; min-width: 200px; }
.field label { margin-bottom: 4px; }
.cmd-card { border-color: var(--accent); }
.cmd-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
pre.cmd { flex: 1; min-width: 240px; margin: 6px 0; padding: 10px 12px; background: #0b1120;
  border: 1px solid var(--line); border-radius: 8px; color: #cfe3ff; font-size: 13px;
  white-space: pre-wrap; word-break: break-all; overflow-x: auto; }
code { background: #0b1120; padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.link { color: var(--accent); cursor: pointer; font-size: 13px; }
.actions-vertical { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 4px; }
