/* Vigil — interface styles. No build step: this file is served as-is from the binary. */
/* The palette (v0.99.5 refreshed): cleaner, deeper surfaces with less of the green tint, a livelier teal accent, the
   statuses apart by lightness too (the warning — a light amber over the norm, for the colour-blind and dim screens). */

:root {
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --bg: #f2f5f4;
  --surface: #ffffff;
  --surface-2: #f6f8f8;
  --ink: #16201d;
  --muted: #556360;
  --line: #dfe5e3;
  --line-strong: #c4cecb;
  --accent: #0b7a72;
  --accent-soft: #dcf1ee;
  --accent-ink: #ffffff;
  --ok: #2a7d3f;
  --ok-soft: #e9f6ec;
  --warn: #9a5c00;
  --warn-soft: #fdf0d5;
  --bad: #c42b2b;
  --bad-soft: #fde4e2;
  --info: #2f64d0;
  --info-soft: #e5edfc;
  --focus: #0b7a72;

  --font: "Segoe UI Variable Text", "Segoe UI", "SF Pro Text", -apple-system, system-ui, Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 8px;
  --rail-w: 240px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --bg: #0e1413;
  --surface: #151d1b;
  --surface-2: #1b2523;
  --ink: #e3ebe8;
  --muted: #97a5a0;
  --line: #24302d;
  --line-strong: #33423e;
  --accent: #3cc7b9;
  --accent-soft: rgba(60, 199, 185, .14);
  --accent-ink: #04201d;
  --ok: #5ccf86;
  --ok-soft: rgba(92, 207, 134, .14);
  --warn: #ffcb52;
  --warn-soft: rgba(255, 203, 82, .14);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, .14);
  --info: #7aa7ff;
  --info-soft: rgba(122, 167, 255, .14);
  --focus: #7fd3c9;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --bg: #0e1413;
    --surface: #151d1b;
    --surface-2: #1b2523;
    --ink: #e3ebe8;
    --muted: #97a5a0;
    --line: #24302d;
    --line-strong: #33423e;
    --accent: #3cc7b9;
    --accent-soft: rgba(60, 199, 185, .14);
    --accent-ink: #04201d;
    --ok: #5ccf86;
    --ok-soft: rgba(92, 207, 134, .14);
    --warn: #ffcb52;
    --warn-soft: rgba(255, 203, 82, .14);
    --bad: #ff6b6b;
    --bad-soft: rgba(255, 107, 107, .14);
    --info: #7aa7ff;
    --info-soft: rgba(122, 167, 255, .14);
    --focus: #7fd3c9;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .86em; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
small { font-size: .82em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* not in icons.svg: Firefox ignores its <style> in <use> */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.status-bad { color: var(--bad); }
.status-warn { color: var(--warn); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }

.rail {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 18px 12px 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 10px 18px; color: var(--ink);
  font-weight: 700; font-size: 19px; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius);
  color: var(--ink); position: relative;
}
.nav-link:hover { background: var(--surface); text-decoration: none; }
.nav-link.is-active { background: var(--surface); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav-link.is-active .ico { color: var(--accent); }
.nav-link small { margin-left: auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.nav-sec { margin-top: 10px; }
.nav-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: var(--radius);
  font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; user-select: none; }
.nav-sec-head::-webkit-details-marker { display: none; }
.nav-sec-head:hover { color: var(--ink); background: var(--surface); }
.nav-sec-head .ico { width: 14px; height: 14px; transition: transform .15s; transform: rotate(-90deg); }
.nav-sec[open] > .nav-sec-head .ico { transform: none; }
.nav-sec:not([open]):has(.is-active) > .nav-sec-head { color: var(--accent); }
.rail-foot { margin-top: auto; padding: 16px 10px 0; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.ver-pill { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; line-height: 20px; }
.ver-pill > span { padding: 0 8px; }
.ver-pill > span + span { border-left: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; }
.ver-pill > .env-badge { border-radius: 0 999px 999px 0; line-height: 20px; vertical-align: baseline; }
.env-badge { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: 1px; }
.env-dev { background: var(--warn-soft, #fdf0d5); color: var(--warn, #9a6700); }
.env-prod { background: var(--ok-soft, #dcf3e8); color: var(--ok, #1a7f4b); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: var(--bg); position: sticky; top: 0; z-index: 5;
}
.topbar-title { font-size: 20px; font-weight: 650; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar-actions form { margin: 0; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn.rail-toggle { display: none; }
.me { display: flex; align-items: center; gap: 9px; padding: 4px 8px; border-radius: var(--radius); color: var(--ink); }
.me:hover { background: var(--surface); text-decoration: none; }
.me-text { display: grid; line-height: 1.2; }
.me-text small { color: var(--muted); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--accent-soft); color: var(--accent);
}
.content { padding: 24px 28px 48px; width: 100%; min-width: 0; }

/* ---------- flash & notices ---------- */
.flash {
  margin: 16px 28px 0; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid; transition: opacity .4s;
}
.content .flash, .panel-body .flash, .login .flash { margin: 0 0 14px; }
.flash-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash-error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.flash.is-hidden { opacity: 0; pointer-events: none; }
.notice { background: var(--warn-soft); padding: 10px 14px; border-radius: var(--radius); margin: 0 0 16px; }

/* ---------- panels & layout ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.panel + .panel { margin-top: 20px; }
.cols .panel + .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; font-weight: 650; }
.panel-head > :last-child:not(h2) { margin-left: auto; }
.panel-body { padding: 16px 18px; }
.panel-narrow { max-width: 560px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; margin-top: 20px; }
.cols:first-child { margin-top: 0; }
.cols-wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
/* Panels of one row grow to the same height; their last actions sit at the bottom (v0.11.4). */
.cols-even { align-items: stretch; }
.cols-even > .panel { display: flex; flex-direction: column; }
.cols-even > .panel > .panel-body { flex: 1; display: flex; flex-direction: column; }
.cols-even .panel-foot { margin-top: auto; padding-top: 12px; }
.import-list { margin: 0 0 12px; padding-left: 18px; list-style: disc; }
.import-list li + li { margin-top: 4px; }
/* v0.31.0: «Импорт и экспорт» — the list of imports and exports, the form of the chosen one. */
.io-hub { display: grid; grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); gap: 16px; align-items: start; }
.io-nav { padding: 8px; position: sticky; top: 12px; }
.io-group { margin: 10px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.io-group:first-child { margin-top: 4px; }
.io-link { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 6px; color: inherit; text-decoration: none; }
.io-link .ico { flex: none; margin-top: 2px; color: var(--muted); }
.io-link span { display: flex; flex-direction: column; min-width: 0; }
.io-link small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.io-link:hover { background: var(--surface-2); }
.io-link.is-on { background: var(--accent-soft); }
.io-link.is-on b, .io-link.is-on .ico { color: var(--accent); }
.io-main { min-width: 0; }
.io-hub > .panel { margin: 0; } /* v0.67.5: the list and the form start on one line */
.io-facts { margin: 12px 0; padding-left: 18px; list-style: disc; color: var(--muted); }
.io-facts li + li { margin-top: 4px; }
.io-also { border-top: 1px solid var(--line); }
.io-sub { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
@media (max-width: 860px) {
  .io-hub { grid-template-columns: minmax(0, 1fr); }
  .io-nav { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px; }
  .io-group { grid-column: 1 / -1; }
}
.stack { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); }
.stack form { margin: 0; }
/* Actions one under another (v0.60.9: the password reset with its field beside the disable button). */
.stack-rows { flex-direction: column; align-items: flex-start; }
.stack-rows .stack-gap { margin-top: 10px; } /* the disabling apart from the other actions */
.crumbs { margin: 0 0 14px; color: var(--muted); }

@keyframes trace { to { stroke-dashoffset: 0; } }

.tiles { display: grid; margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tile { display: grid; gap: 2px; padding: 14px 18px; color: var(--ink); border-right: 1px solid var(--line); }
.tile:last-child { border-right: 0; }
.tile-link:hover { background: var(--surface-2); text-decoration: none; }
.tile-label { color: var(--muted); font-size: 13px; }
.tile-value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.tile-value small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tile-note { color: var(--muted); font-size: 12.5px; }

.feed { list-style: none; margin: 0; padding: 4px 0; }
.feed-item { display: flex; align-items: baseline; gap: 10px; padding: 7px 18px; }
.feed-item + .feed-item { border-top: 1px solid var(--line); }
.feed-main, .c-line .gp-value, .filters .gp-value, .gw-sum-v, .gw-vname, .hbar-label, .chart-bar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-time { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); }
.dot-bad { background: var(--bad); }
.dot-off { background: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
[type="color"] { min-width: 44px; padding: 2px; }
.gw-page td select { min-width: 92px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.table th a { color: inherit; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .c { text-align: center; }
.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.empty-row { text-align: center !important; color: var(--muted); padding: 32px !important; }
.cell-actions { text-align: right; }
.cell-actions form { margin: 0; }
.ua { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details { font-size: 13px; color: var(--muted); }
.kv { white-space: nowrap; }
.matrix td:first-child { min-width: 240px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn, .badge-maint, .sev-label.sev-warning, .state-pill.sp-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); }
.pager-links { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pager-size { display: flex; align-items: center; gap: 2px; }
.pager-size .muted { margin-right: 4px; }
.pager-num { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px;
  border-radius: var(--radius); color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
a.pager-num:hover { background: var(--accent-soft); }
.pager-num.is-on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pager-gap { padding: 0 4px; color: var(--muted); }

/* ---------- toolbar & filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar-end { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.search { position: relative; display: flex; align-items: center; }
.search .ico { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 34px; width: 260px; }
.inline { display: flex; align-items: center; gap: 6px; color: var(--muted); }

/* ---------- forms ---------- */
input, select, textarea {
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 7px 10px; min-height: 36px;
}
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; flex: none;
  accent-color: var(--accent); vertical-align: middle; cursor: pointer;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
/* v0.60.3: the lists of the selects are drawn by the page (customizable select, Chrome and Edge 135+) — rounded,
   in the colours of the theme; other browsers keep their own list. A select with several lines or choices is as it was. */
@supports (appearance: base-select) {
  select:not([multiple]):not([size]), select:not([multiple]):not([size])::picker(select) { appearance: base-select; }
  /* A long choice in a narrow field is cut before the arrow, as in the browser's own field. */
  select:not([multiple]):not([size]) {
    display: block; overflow: hidden; white-space: nowrap; padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a958f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
  }
  select::picker-icon { display: none; }
  ::picker(select) {
    background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .3); padding: 4px; margin-top: 4px;
  }
  select option { padding: 7px 10px; border-radius: 6px; gap: 8px; }
  select option::checkmark { display: none; }
  select option:hover, select option:focus-visible { background: var(--accent-soft); outline: none; }
  select option:checked { font-weight: 600; }
  select option:disabled { opacity: .45; }
  select hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
  /* The list of actions: no «Выберите действие…» in it, the count on the right. */
  .act-select option[value=""] { display: none; }
  .act-select option .act-n { margin-left: auto; padding-left: 16px; color: var(--muted); font-size: 12px; font-weight: 400; }
}
.form { display: grid; gap: 16px; max-width: 520px; }
.form-full { max-width: none; grid-template-columns: minmax(0, 1fr); } /* a form across its panel (v0.20.8) */
.field { display: grid; gap: 5px; }
.field > span { font-weight: 600; font-size: 14px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select { width: 100%; }
.hint { color: var(--muted); }
.has-error input, .has-error select { border-color: var(--bad); }
.field-error { margin: 0; color: var(--bad); font-size: 13.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  min-height: 36px; padding: 6px 14px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn-danger-ghost:hover { background: var(--bad-soft); }
.btn-sm { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.btn-wide { width: 100%; }

.props { display: grid; grid-template-columns: minmax(auto, 45%) 1fr; gap: 8px 20px; margin: 0; }
.props dt { color: var(--muted); }
.props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.secret { display: flex; align-items: center; gap: 12px; margin: 16px 0; padding: 12px 14px; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.secret code { font-size: 17px; letter-spacing: .04em; user-select: all; overflow-wrap: anywhere; }
.secret .btn { margin-left: auto; }

/* ---------- dialog ---------- */
.confirm { border: 1px solid var(--line); border-radius: 10px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); }
.confirm.confirm-wide { width: min(1400px, calc(100vw - 32px)); } /* v0.89.2: the rebinding of an agent, a long question */
.confirm::backdrop { background: rgb(10 20 18 / .45); }
.confirm form { padding: 20px 22px; }
.confirm h2 { font-size: 17px; }
.confirm p { margin: 10px 0 18px; }
.confirm .actions { justify-content: flex-end; }

/* ---------- empty / error ---------- */
.empty { text-align: center; padding: 64px 16px; }
.empty-code { font-size: 64px; font-weight: 700; color: var(--line-strong); margin: 0; letter-spacing: -.03em; }
.empty h2 { margin: 6px 0 10px; }
.empty p { max-width: 52ch; margin: 0 auto 20px; }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login { width: min(380px, 100%); }
.login-mark { height: 60px; margin: 0 -8px 10px; }
.login-mark svg { width: 100%; height: 100%; }
.login-mark path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 700; stroke-dashoffset: 700; animation: trace 1.4s ease-out forwards; }
.login-title { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.login-sub { margin: 2px 0 26px; color: var(--muted); }
.login .form { max-width: none; }
.login-foot { margin-top: 28px; color: var(--muted); font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cols, .cols-wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; z-index: 20; left: 0; top: 0; width: min(280px, 86vw);
    background: var(--bg); transform: translateX(-100%); transition: transform .2s ease, visibility 0s linear .2s;
    box-shadow: 0 0 0 100vmax transparent; visibility: hidden;
  }
  .rail.is-open { transform: none; box-shadow: 0 0 0 100vmax rgb(10 20 18 / .4); visibility: visible; transition-delay: 0s; }
  .icon-btn.rail-toggle { display: inline-grid; }
  .topbar { padding: 10px 14px; }
  .topbar-title { font-size: 17px; }
  .content { padding: 16px 14px 40px; }
  .flash { margin: 12px 14px 0; }
  .me-text { display: none; }
  .search input, .filters, .search { width: 100%; }
  .toolbar-end { margin-left: 0; }
  .tile { border-right: 0; border-bottom: 1px solid var(--line); }
  .tile:last-child { border-bottom: 0; }
}
/* v0.96.0: one rule for those who asked for less motion (before: some of the transitions only). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* ---------- v0.2: monitoring ---------- */
.panel-gap, .tiles-gap { margin-top: 20px; }
.tile-value.st-up { color: var(--ok); }
.tile-value.st-degraded { color: var(--warn); }
.tile-value.st-down { color: var(--bad); }

.state-pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 1px 9px 1px 7px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.state-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state-pill.st-up { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.state-pill.st-degraded { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.state-pill.st-down { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.state-pill.st-pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* Overview on the dashboard: one sentence and a proportional status bar. */
.overview { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px 18px; }
.overview-state { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.015em; }
.overview-state.st-up { color: var(--ok); }
.overview-state.st-degraded { color: var(--warn); }
.overview-state.st-down { color: var(--bad); }
.overview-state.st-unknown { color: var(--muted); }
.overview-meta { margin: 4px 0 14px; color: var(--muted); }
.overview-bar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.overview-bar span { flex: 0 0 0; min-width: 0; }
.overview-bar span[data-grow]:not([data-grow="0"]) { min-width: 6px; }
.summary .overview { border: 0; padding: 4px 14px 14px; }
.summary .tiles { margin: 0 14px 14px; }
.seg-up { background: var(--ok); }
.seg-degraded { background: var(--warn); }
.seg-down { background: var(--bad); }
.seg-unknown { background: var(--line-strong); }

/* Monitoring board: one tile per host, left edge carries the status. */

.stat b { font-size: 18px; color: var(--ink); margin-right: 4px; }
.stat.st-down b { color: var(--bad); }
.stat.st-degraded b { color: var(--warn); }
.stat.st-up b { color: var(--ok); }
.board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }

.chips, .legend-ctl, .gw-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; }
.chip:hover { text-decoration: none; border-color: var(--line-strong); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.is-on { background: var(--accent-soft); border-color: var(--accent); }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; cursor: pointer; }

/* Host / check header */
.hosthead { flex-wrap: wrap; gap: 16px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; box-shadow: inset 4px 0 0 var(--line-strong); }
.hosthead.st-up { box-shadow: inset 4px 0 0 var(--ok); }
.hosthead.st-degraded { box-shadow: inset 4px 0 0 var(--warn); }
.hosthead.st-down { box-shadow: inset 4px 0 0 var(--bad); }
.hosthead-main { flex: 1 1 360px; min-width: 0; }
.hosthead-main p { margin: 0 0 6px; }
.hosthead-addr { color: var(--muted); }
.hosthead-desc { max-width: 80ch; overflow-wrap: anywhere; }
.hosthead-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hosthead-actions form { margin: 0; }

.tag { display: inline-block; padding: 0 7px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; margin: 1px 0; }
.tag:hover { text-decoration: none; color: var(--ink); }
.tag-group { border-color: transparent; }

.row-off td, .row-off td a { color: var(--muted); }
.msg { max-width: 460px; overflow-wrap: anywhere; }
.cell-check { width: 36px; }

.cell-actions { white-space: nowrap; }
.cell-actions form, .cell-actions a { display: inline-block; vertical-align: middle; }
.table-compact td, .table-compact th { padding: 6px 12px; font-size: 14px; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.bulkbar[hidden] { display: none; }
.empty-inline p { margin: 0 0 10px; }
.type-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-col { display: grid; gap: 20px; align-content: start; }
.pre { margin: 0; white-space: pre-wrap; }
.mono { font-size: 13.5px; }

/* Severity markers */
.sev { flex: none; width: 4px; align-self: stretch; border-radius: 2px; background: var(--line-strong); }
.sev-warning { background: var(--warn); }
.sev-average { background: color-mix(in srgb, var(--warn) 50%, var(--bad)); }
.sev-high, .sev-disaster { background: var(--bad); }
.sev-information { background: var(--info); }
.sev-label { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); }
.sev-label.sev-average { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 50%, var(--bad)); }
.sev-label.sev-disaster { background: var(--bad); color: #111; }
.sev-label.sev-information { background: var(--info-soft); color: var(--info); }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; max-width: 1200px; margin-bottom: 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-fit { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field-wide { grid-column: 1 / -1; }
/* A form across a full-width panel, as wide as the panels around it (v0.20.8). */
.form-grid-full { max-width: none; }
.form-stack { display: grid; gap: 16px; align-content: start; }
.form-stack > .field { margin: 0; }
.form-grid > .field, .form-grid > .check { align-self: start; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }
.field textarea { width: 100%; resize: vertical; }
.checklist { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
/* A checkbox or radio is clicked by its box and its text only, never by the empty rest of the line
   (grid and flex columns stretch their items, v0.9.5). */
.check, label.inline, .check-row label { width: fit-content; max-width: 100%; }
.form-section { font-weight: 650; color: var(--muted); }
.form-wide { max-width: 720px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 18px; }
.inline-form .field { flex: 1 1 220px; }
.type-list { list-style: none; margin: 0; padding: 0; }
.type-list li + li { border-top: 1px solid var(--line); }
.type-list a { display: grid; gap: 2px; padding: 14px 18px; color: var(--ink); }
.type-list a:hover { background: var(--surface-2); text-decoration: none; }

/* Segmented control */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
/* Final audit 0.60.5: a long row of tabs (the formats of import) scrolls inside itself, not the page. */
.seg { max-width: 100%; overflow-x: auto; }
/* A button with a long text in a narrow column wraps instead of leaving it. */
.btn-wrap { white-space: normal; max-width: 100%; text-align: left; }
.seg-btn { border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; padding: 4px 10px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn[aria-pressed="true"], a.seg-btn[aria-current] { background: var(--accent); color: var(--accent-ink); }

/* Chart */
.chart { position: relative; padding: 10px 14px 6px; min-height: 260px; }
.chart-empty { margin: 0; padding: 100px 0; text-align: center; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-base { stroke: var(--line-strong); stroke-width: 1; }
.chart-label { fill: var(--muted); font-size: 11.5px; font-family: var(--font); }
.chart-cross { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 8px 10px; font-size: 13px; box-shadow: 0 4px 14px rgb(0 0 0 / .12); min-width: 160px; }
.chart-tip b { display: block; margin-bottom: 2px; }
/* v0.98.52: the marks of the charts */
.mark-line { stroke: var(--c); stroke-width: 1; stroke-dasharray: 3 3; }
.mark-band { fill: var(--c); fill-opacity: .1; }
.mark-pin { fill: var(--c); cursor: pointer; }
.mark-n { font-size: 10px; fill: var(--muted); }
.mark-n-left { text-anchor: end; }
.mark-pin:focus-visible { outline: none; stroke: var(--ink); stroke-width: 1.5; }
.mark-bad { --c: var(--bad); } .mark-warn { --c: var(--warn); } .mark-info { --c: var(--muted); }
.mark-tip { pointer-events: auto; max-width: 340px; max-height: 260px; overflow-y: auto; }
.mark-row + .mark-row { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.mark-row small { display: block; color: var(--muted); }
.mark-switches { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.mark-switch { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
/* v0.98.53: the notes of the charts — the button, the window, the tags and the actions of a hint, the time chosen */
.mark-note-btn { margin-left: auto; }
.mark-switches .hint { align-self: center; }
.note-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.note-dialog form { display: grid; gap: 12px; }
.note-dialog .field, .note-when > * { min-width: 0; }
.note-dialog input:not([type="radio"]), .note-dialog textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.note-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note-where { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.note-where legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note-actions .btn-danger { margin-right: auto; }
.note-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.note-tags span { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; }
.note-do { display: flex; gap: 12px; margin-top: 4px; }
.is-noting .chart-hit { cursor: copy; }
.is-noting [data-mchart] svg { touch-action: none; } /* the time of a note with a finger: no scroll */
@media (max-width: 480px) { .note-when { grid-template-columns: 1fr; } }

@media (max-width: 800px) {
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr 1fr; }
  .overview-state { font-size: 21px; }
}
@media (max-width: 480px) {
  .board { grid-template-columns: 1fr; }
}

/* ---------- v0.2.1: monitoring toolbar, group picker, sections ---------- */

.st-text-up { color: var(--ok); }
.st-text-degraded { color: var(--warn); }
.st-text-down { color: var(--bad); }

.dropdown { position: relative; }
.dropdown > summary, .levels-more > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker, .levels-more > summary::-webkit-details-marker { display: none; }
.levels-more[open] > summary { display: none; }

/* applied filters the search form has no field for (?host=, ?check=, ?object_id=) */
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 14px; font-size: 14px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 12px; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink); max-width: 100%; }
.filter-chip-label { color: var(--muted); }
.filter-chip-value { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
  color: var(--muted); font-size: 16px; line-height: 1; }
.filter-chip-x:hover { background: var(--surface); color: var(--bad); text-decoration: none; }

.board-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 16px; }
.board-tabs .seg:last-child { margin-left: auto; }
a.seg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 14px; color: var(--ink); }
a.seg-btn:hover { text-decoration: none; background: var(--surface-2); }
a.seg-btn b { font-weight: 650; }
a.seg-btn b.tab-new { padding: 0 6px; border-radius: 9px; background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); font-size: 11.5px; } /* v0.98.92: resolved in a day */
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } /* v0.98.92: from — to, one field */
.date-pair input { min-width: 0; }
a.seg-btn[aria-current] b { color: inherit; }

@media (max-width: 800px) {
  .board-tabs .seg:last-child { margin-left: 0; }
}

/* --- v0.3: agents and metrics --- */
.series-1 { --c: var(--s1); } .series-2 { --c: var(--s2); } .series-3 { --c: var(--s3); } .series-4 { --c: var(--s4); }
.series-5 { --c: var(--s5); } .series-6 { --c: var(--s6); } .series-7 { --c: var(--s7); } .series-8 { --c: var(--s8); }
.series-ok { --c: var(--ok); } .series-warn { --c: var(--warn); } .series-bad { --c: var(--bad); } .series-unknown { --c: var(--line-strong); }
.mline { fill: none; stroke: var(--c); stroke-width: var(--lw, 1.8); stroke-linejoin: round; stroke-linecap: round; }
.mline.is-dash { stroke-dasharray: 6 4; } .mline.is-dots { stroke-dasharray: 0 5; }
.mline-dot { fill: var(--c); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: none; color: var(--ink);
  font: inherit; font-size: 12.5px; padding: 2px 8px; border-radius: 999px; cursor: pointer; }
.legend-item:hover { border-color: var(--line); }
.legend-item b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend-item.is-off { color: var(--muted); }
.legend-item.is-off .legend-swatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.legend-swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: none; display: inline-block; }
.tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.chart-grid-2 .panel { min-width: 0; margin: 0; }
.stack-col > .panel { margin: 0; }
.chart-grid-2 .chart { min-height: 240px; }
/* v0.73.7: the chart of a check (the template check-chart): a graph of a fixed height, two axes. */
.chart.check-chart { height: 300px; min-height: 0; padding: 10px 14px; }
.tiles + .timebar { margin-top: 20px; }
/* v0.73.7: the cards of the graphs of a host are as high as their row; the chart takes the room a
   neighbour with a long legend leaves (data-mchart-grow, mchart.js), not empty space under it. */
.chart-grid-2 > .panel:has(> .chart[data-mchart-grow]), .mh-charts > .panel:has(> .chart[data-mchart-grow]) { display: flex; flex-direction: column; }
.chart-grid-2 > .panel > .chart[data-mchart-grow], .mh-charts > .panel > .chart[data-mchart-grow] { flex: 1 1 auto; }
/* v0.24.4: Syslog graphs — the columns stay even when the cards are few, so one graph has the
   width of a card, not of the page; narrow screens get one column as everywhere. */
.chart-grid-2.chart-grid-compact { grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
@media (max-width: 560px) { .chart-grid-2 { grid-template-columns: 1fr; } }
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 24px 0 12px; }
.content > .section-head:first-child { margin-top: 0; } /* v0.98.94: the first of the page — under its padding only (the home page) */
.section-head h2 { margin: 0; font-size: 17px; }
.section-head .seg, .section-head > .menu { margin-left: auto; }
.tile-value.lvl-warn, .lvl-warn { color: var(--warn); }
.tile-value.lvl-bad, .lvl-bad { color: var(--bad); }
.meter { display: block; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; min-width: 80px; }
.meter > span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 3px; }
.meter.lvl-warn > span { background: var(--warn); }
.meter.lvl-bad > span { background: var(--bad); }
.meter-cell { min-width: 140px; }
.meter-cell small { display: block; margin-top: 4px; }
/* v0.88.5: one row an item, down the panel — a long name of a Windows service wrapped in a column of 200 px
   and its state ended up in the middle of the row */
.state-list { list-style: none; margin: 0; padding: 0; }
.state-list li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 0; border-bottom: 1px solid var(--line); }
.state-list li:last-child { border-bottom: 0; }
.state-list li .dot { flex: none; }
.state-list li .state-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.state-list li b { margin-left: auto; flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.state-group { margin: 0 0 2px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.state-group + .state-list { margin-bottom: 0; }
.state-list + .state-group { margin-top: 14px; }
.dot-warn { background: var(--warn); }
.cmd { position: relative; display: flex; align-items: flex-start; gap: 10px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px; margin: 8px 0 14px; }
.cmd pre { margin: 0; flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd .btn { flex: none; }
.textarea-mono { font-family: var(--mono); font-size: 13px; min-height: 110px; }

/* --- v0.4: problems, triggers, notifications --- */
.sevbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.sevbar-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--muted); font-size: 13px; }
.sevbar-item b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sevbar-note { align-self: center; color: var(--muted); font-size: 13px; }
.sevbar-item.has { border-color: var(--line-strong); }
.sevbar-item:hover { text-decoration: none; background: var(--surface-2); }
.prow td:first-child { box-shadow: inset 3px 0 0 var(--line-strong); }
.sevrow-warning td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.sevrow-average td:first-child { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--warn) 50%, var(--bad)); }
.sevrow-high td:first-child, .sevrow-disaster td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.sevrow-information td:first-child { box-shadow: inset 3px 0 0 var(--info); }
/* a problem resolved a moment ago, kept on dashboards for a while (v0.8.1) */
.prow-resolved td { background: var(--ok-soft); }
.prow-resolved td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.prow-resolved a.strong, .prow-resolved td a { color: var(--ok); }
.prow-resolved .sev-label { opacity: .6; }
@media (prefers-reduced-motion: no-preference) {
  .prow-resolved td { animation: resolved-in 1.2s ease-out; }
  @keyframes resolved-in { from { background: color-mix(in srgb, var(--ok) 35%, transparent); } }
}
.live-stamp { margin: 12px 0 0; text-align: right; }
.bulkbar input[name="comment"] { min-width: 240px; flex: 1; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 4px 16px; padding: 10px 16px; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-size: 13px; }
.timeline .tl-text { min-width: 0; overflow-wrap: anywhere; }
.timeline .tl-text p { margin: 4px 0 0; white-space: pre-wrap; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; } }
.expr { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.state-ok { color: var(--ok); }
.state-pending { color: var(--warn); }
.state-problem { color: var(--bad); font-weight: 600; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 700px) { .form-row-3 { grid-template-columns: 1fr; } }
.chat-list td code { user-select: all; }
.problem-title { margin: 6px 0 4px; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.actions-start { justify-content: flex-start; flex-wrap: wrap; }
.board-tabs.tabs-left .seg:last-child { margin-left: 0; }
.board-tabs .tabs-end { margin-left: auto; }
.table td.msg { min-width: 240px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.form-row-3 .field { align-content: start; align-self: start; }
.form-row-3 .field select { align-self: start; }

/* v0.5: templates, SNMP credentials, import/export */
.lead { margin: 0 0 16px; max-width: 75ch; }
code.macro { white-space: nowrap; }
.params-inline { display: block; max-width: 48ch; overflow-wrap: anywhere; color: var(--muted); }
.tpl-links, .plain-list { list-style: none; margin: 0; padding: 0; }
.tpl-links li + li { margin-top: 6px; }
.plain-list li { margin-top: 4px; }
fieldset.snmp-v2, fieldset.snmp-v3 { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 14px 0 0; }
fieldset.snmp-v2 legend, fieldset.snmp-v3 legend { padding: 0 6px; color: var(--muted); }
[data-snmp-for][hidden] { display: none; }
.chg { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--surface-2); }
.chg-create { background: var(--ok-soft, var(--surface-2)); }
.chg-update { background: var(--warn-soft); }
.chg-delete { background: var(--bad-soft, var(--surface-2)); }
.panel-body > .field + .field, .panel-body > .field + .actions { margin-top: 12px; }
.import-table td:first-child { width: 120px; }
.import-table td:nth-child(2) { width: 40%; }
@media (max-width: 800px) { .col-params { display: none; } }
/* template link rules */
/* "Где применяется" (v0.17.0): host lists of a template scroll inside the section, so the page
   stays short with hundreds of hosts; the hint of the filter takes its own line. */
.tpl-host-scroll { max-height: min(60vh, 34rem); overflow: auto; }
.tpl-host-scroll thead th, .dash-scroll thead th, .chart-stats-wrap.is-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.tpl-filter-hint { flex-basis: 100%; }
.cond-chip { display: inline-block; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; margin: 2px 2px 2px 0; }
[hidden] { display: none !important; }
/* A problem that depends on a root problem (v0.53.0). */
.dep-note { color: var(--muted); }
.dep-note a { color: inherit; text-decoration: underline dotted; }
.poll-note { color: var(--warn); }
.perm-list { display: grid; gap: 4px; max-height: 360px; overflow: auto; }
.perm-list code { font-size: 11px; }
/* v0.34.2: the role form uses the whole width; the permissions are a grid of aligned rows
   (checkbox, title, identifier). */
.role-form .form-grid { max-width: none; }
.role-copy { font-size: 11.5px; font-weight: 500; }
.role-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.perm-fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.perm-fieldset > legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 2px 24px; }
.perm-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.perm-item:hover { background: var(--surface-2); }
.perm-item:has(input:checked) { background: var(--accent-soft); }
.perm-item input { margin: 0; }
.perm-item code { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.perm-item.is-off { opacity: .55; cursor: not-allowed; }
/* v0.34.3: access to hosts in the user card — two options as cards, the groups in a picker */
.scope-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; margin-bottom: 14px; }
.scope-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.scope-option input { margin-top: 3px; }
.scope-option span { display: grid; gap: 2px; }
.scope-groups { margin-bottom: 8px; }
.panel-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; }
/* a permission of a role that cannot be changed here (built-in, or with rights the user lacks) */
.matrix-ro { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  border: 1.5px solid var(--line-strong); border-radius: 4px; vertical-align: middle; }
.matrix-ro.is-on { background: var(--ok); border-color: var(--ok); color: #111; }
.matrix-ro .ico { width: 13px; height: 13px; stroke-width: 3; }
.tabs { margin: 0; }
.tab { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
/* dashboards */
/* Dashboards: a 24-column grid with fixed row height; positions come from app.js (v0.6.10). */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) {
  .dash-grid { grid-template-columns: repeat(24, minmax(0, 1fr)); grid-auto-rows: 36px; }
  .dash-grid.is-placed > .dash-w { grid-column: var(--x) / span var(--w); grid-row: var(--y) / span var(--h); }
  /* v0.72.1: before the script places them, the widgets stand at their place by classes (no inline styles: CSP). */
  .dash-w { grid-column: span 12; grid-row: span 8; }
  .dx-1{grid-column-start:1} .dx-2{grid-column-start:2} .dx-3{grid-column-start:3} .dx-4{grid-column-start:4} .dx-5{grid-column-start:5} .dx-6{grid-column-start:6} .dx-7{grid-column-start:7} .dx-8{grid-column-start:8} .dx-9{grid-column-start:9} .dx-10{grid-column-start:10} .dx-11{grid-column-start:11} .dx-12{grid-column-start:12} .dx-13{grid-column-start:13} .dx-14{grid-column-start:14} .dx-15{grid-column-start:15} .dx-16{grid-column-start:16} .dx-17{grid-column-start:17} .dx-18{grid-column-start:18} .dx-19{grid-column-start:19} .dx-20{grid-column-start:20} .dx-21{grid-column-start:21} .dx-22{grid-column-start:22} .dx-23{grid-column-start:23} .dx-24{grid-column-start:24}
  .dw-1{grid-column-end:span 1} .dw-2{grid-column-end:span 2} .dw-3{grid-column-end:span 3} .dw-4{grid-column-end:span 4} .dw-5{grid-column-end:span 5} .dw-6{grid-column-end:span 6} .dw-7{grid-column-end:span 7} .dw-8{grid-column-end:span 8} .dw-9{grid-column-end:span 9} .dw-10{grid-column-end:span 10} .dw-11{grid-column-end:span 11} .dw-12{grid-column-end:span 12} .dw-13{grid-column-end:span 13} .dw-14{grid-column-end:span 14} .dw-15{grid-column-end:span 15} .dw-16{grid-column-end:span 16} .dw-17{grid-column-end:span 17} .dw-18{grid-column-end:span 18} .dw-19{grid-column-end:span 19} .dw-20{grid-column-end:span 20} .dw-21{grid-column-end:span 21} .dw-22{grid-column-end:span 22} .dw-23{grid-column-end:span 23} .dw-24{grid-column-end:span 24}
  .dh-1{grid-row-end:span 1} .dh-2{grid-row-end:span 2} .dh-3{grid-row-end:span 3} .dh-4{grid-row-end:span 4} .dh-5{grid-row-end:span 5} .dh-6{grid-row-end:span 6} .dh-7{grid-row-end:span 7} .dh-8{grid-row-end:span 8} .dh-9{grid-row-end:span 9} .dh-10{grid-row-end:span 10} .dh-11{grid-row-end:span 11} .dh-12{grid-row-end:span 12} .dh-13{grid-row-end:span 13} .dh-14{grid-row-end:span 14} .dh-15{grid-row-end:span 15} .dh-16{grid-row-end:span 16} .dh-17{grid-row-end:span 17} .dh-18{grid-row-end:span 18} .dh-19{grid-row-end:span 19} .dh-20{grid-row-end:span 20} .dh-21{grid-row-end:span 21} .dh-22{grid-row-end:span 22} .dh-23{grid-row-end:span 23} .dh-24{grid-row-end:span 24}
  .dy-1{grid-row-start:1} .dy-2{grid-row-start:2} .dy-3{grid-row-start:3} .dy-4{grid-row-start:4} .dy-5{grid-row-start:5} .dy-6{grid-row-start:6} .dy-7{grid-row-start:7} .dy-8{grid-row-start:8} .dy-9{grid-row-start:9} .dy-10{grid-row-start:10} .dy-11{grid-row-start:11} .dy-12{grid-row-start:12} .dy-13{grid-row-start:13} .dy-14{grid-row-start:14} .dy-15{grid-row-start:15} .dy-16{grid-row-start:16} .dy-17{grid-row-start:17} .dy-18{grid-row-start:18} .dy-19{grid-row-start:19} .dy-20{grid-row-start:20} .dy-21{grid-row-start:21} .dy-22{grid-row-start:22} .dy-23{grid-row-start:23} .dy-24{grid-row-start:24}
  .dy-25{grid-row-start:25} .dy-26{grid-row-start:26} .dy-27{grid-row-start:27} .dy-28{grid-row-start:28} .dy-29{grid-row-start:29} .dy-30{grid-row-start:30} .dy-31{grid-row-start:31} .dy-32{grid-row-start:32} .dy-33{grid-row-start:33} .dy-34{grid-row-start:34} .dy-35{grid-row-start:35} .dy-36{grid-row-start:36} .dy-37{grid-row-start:37} .dy-38{grid-row-start:38} .dy-39{grid-row-start:39} .dy-40{grid-row-start:40} .dy-41{grid-row-start:41} .dy-42{grid-row-start:42} .dy-43{grid-row-start:43} .dy-44{grid-row-start:44} .dy-45{grid-row-start:45} .dy-46{grid-row-start:46} .dy-47{grid-row-start:47} .dy-48{grid-row-start:48}
  .dy-49{grid-row-start:49} .dy-50{grid-row-start:50} .dy-51{grid-row-start:51} .dy-52{grid-row-start:52} .dy-53{grid-row-start:53} .dy-54{grid-row-start:54} .dy-55{grid-row-start:55} .dy-56{grid-row-start:56} .dy-57{grid-row-start:57} .dy-58{grid-row-start:58} .dy-59{grid-row-start:59} .dy-60{grid-row-start:60} .dy-61{grid-row-start:61} .dy-62{grid-row-start:62} .dy-63{grid-row-start:63} .dy-64{grid-row-start:64} .dy-65{grid-row-start:65} .dy-66{grid-row-start:66} .dy-67{grid-row-start:67} .dy-68{grid-row-start:68} .dy-69{grid-row-start:69} .dy-70{grid-row-start:70} .dy-71{grid-row-start:71} .dy-72{grid-row-start:72}
  .dy-73{grid-row-start:73} .dy-74{grid-row-start:74} .dy-75{grid-row-start:75} .dy-76{grid-row-start:76} .dy-77{grid-row-start:77} .dy-78{grid-row-start:78} .dy-79{grid-row-start:79} .dy-80{grid-row-start:80} .dy-81{grid-row-start:81} .dy-82{grid-row-start:82} .dy-83{grid-row-start:83} .dy-84{grid-row-start:84} .dy-85{grid-row-start:85} .dy-86{grid-row-start:86} .dy-87{grid-row-start:87} .dy-88{grid-row-start:88} .dy-89{grid-row-start:89} .dy-90{grid-row-start:90} .dy-91{grid-row-start:91} .dy-92{grid-row-start:92} .dy-93{grid-row-start:93} .dy-94{grid-row-start:94} .dy-95{grid-row-start:95} .dy-96{grid-row-start:96}
  .dy-97{grid-row-start:97} .dy-98{grid-row-start:98} .dy-99{grid-row-start:99} .dy-100{grid-row-start:100} .dy-101{grid-row-start:101} .dy-102{grid-row-start:102} .dy-103{grid-row-start:103} .dy-104{grid-row-start:104} .dy-105{grid-row-start:105} .dy-106{grid-row-start:106} .dy-107{grid-row-start:107} .dy-108{grid-row-start:108} .dy-109{grid-row-start:109} .dy-110{grid-row-start:110} .dy-111{grid-row-start:111} .dy-112{grid-row-start:112} .dy-113{grid-row-start:113} .dy-114{grid-row-start:114} .dy-115{grid-row-start:115} .dy-116{grid-row-start:116} .dy-117{grid-row-start:117} .dy-118{grid-row-start:118} .dy-119{grid-row-start:119} .dy-120{grid-row-start:120}
  .dy-121{grid-row-start:121} .dy-122{grid-row-start:122} .dy-123{grid-row-start:123} .dy-124{grid-row-start:124} .dy-125{grid-row-start:125} .dy-126{grid-row-start:126} .dy-127{grid-row-start:127} .dy-128{grid-row-start:128} .dy-129{grid-row-start:129} .dy-130{grid-row-start:130} .dy-131{grid-row-start:131} .dy-132{grid-row-start:132} .dy-133{grid-row-start:133} .dy-134{grid-row-start:134} .dy-135{grid-row-start:135} .dy-136{grid-row-start:136} .dy-137{grid-row-start:137} .dy-138{grid-row-start:138} .dy-139{grid-row-start:139} .dy-140{grid-row-start:140} .dy-141{grid-row-start:141} .dy-142{grid-row-start:142} .dy-143{grid-row-start:143} .dy-144{grid-row-start:144}
  .dy-145{grid-row-start:145} .dy-146{grid-row-start:146} .dy-147{grid-row-start:147} .dy-148{grid-row-start:148} .dy-149{grid-row-start:149} .dy-150{grid-row-start:150} .dy-151{grid-row-start:151} .dy-152{grid-row-start:152} .dy-153{grid-row-start:153} .dy-154{grid-row-start:154} .dy-155{grid-row-start:155} .dy-156{grid-row-start:156} .dy-157{grid-row-start:157} .dy-158{grid-row-start:158} .dy-159{grid-row-start:159} .dy-160{grid-row-start:160} .dy-161{grid-row-start:161} .dy-162{grid-row-start:162} .dy-163{grid-row-start:163} .dy-164{grid-row-start:164} .dy-165{grid-row-start:165} .dy-166{grid-row-start:166} .dy-167{grid-row-start:167} .dy-168{grid-row-start:168}
  .dy-169{grid-row-start:169} .dy-170{grid-row-start:170} .dy-171{grid-row-start:171} .dy-172{grid-row-start:172} .dy-173{grid-row-start:173} .dy-174{grid-row-start:174} .dy-175{grid-row-start:175} .dy-176{grid-row-start:176} .dy-177{grid-row-start:177} .dy-178{grid-row-start:178} .dy-179{grid-row-start:179} .dy-180{grid-row-start:180} .dy-181{grid-row-start:181} .dy-182{grid-row-start:182} .dy-183{grid-row-start:183} .dy-184{grid-row-start:184} .dy-185{grid-row-start:185} .dy-186{grid-row-start:186} .dy-187{grid-row-start:187} .dy-188{grid-row-start:188} .dy-189{grid-row-start:189} .dy-190{grid-row-start:190} .dy-191{grid-row-start:191} .dy-192{grid-row-start:192}
  .dy-193{grid-row-start:193} .dy-194{grid-row-start:194} .dy-195{grid-row-start:195} .dy-196{grid-row-start:196} .dy-197{grid-row-start:197} .dy-198{grid-row-start:198} .dy-199{grid-row-start:199} .dy-200{grid-row-start:200} .dy-201{grid-row-start:201} .dy-202{grid-row-start:202} .dy-203{grid-row-start:203} .dy-204{grid-row-start:204} .dy-205{grid-row-start:205} .dy-206{grid-row-start:206} .dy-207{grid-row-start:207} .dy-208{grid-row-start:208} .dy-209{grid-row-start:209} .dy-210{grid-row-start:210} .dy-211{grid-row-start:211} .dy-212{grid-row-start:212} .dy-213{grid-row-start:213} .dy-214{grid-row-start:214} .dy-215{grid-row-start:215} .dy-216{grid-row-start:216}
  .dy-217{grid-row-start:217} .dy-218{grid-row-start:218} .dy-219{grid-row-start:219} .dy-220{grid-row-start:220} .dy-221{grid-row-start:221} .dy-222{grid-row-start:222} .dy-223{grid-row-start:223} .dy-224{grid-row-start:224} .dy-225{grid-row-start:225} .dy-226{grid-row-start:226} .dy-227{grid-row-start:227} .dy-228{grid-row-start:228} .dy-229{grid-row-start:229} .dy-230{grid-row-start:230} .dy-231{grid-row-start:231} .dy-232{grid-row-start:232} .dy-233{grid-row-start:233} .dy-234{grid-row-start:234} .dy-235{grid-row-start:235} .dy-236{grid-row-start:236} .dy-237{grid-row-start:237} .dy-238{grid-row-start:238} .dy-239{grid-row-start:239} .dy-240{grid-row-start:240}
  .dash-grid > .dash-empty { grid-column: 1 / -1; grid-row: span 2; }
}
@media (max-width: 899px) { .dash-grid > .dash-w { min-height: 260px; } }
.dash-grid > .dash-w { margin: 0; }
.dash-w { min-width: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.dash-w:has(> .dash-head details.menu[open]) { overflow: visible; z-index: 30; } /* v0.99.18: ⧉ and ☆ of the head — not cut by the widget */
.dash-head { padding: 8px 12px; min-height: 40px; gap: 8px; }
.dash-head h2 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.dash-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.dash-tools { display: flex; gap: 2px; align-items: center; }
.dash-tools form { margin: 0; }
.dash-grid.is-editing .dash-head { flex-wrap: wrap; row-gap: 2px; }
/* v0.99.14: drag and resize — of the grid of 24 columns only (a phone: one column, the page scrolls by the title) */
@media (min-width: 900px) {
  .dash-grid.is-editing .dash-head, .dash-grid.is-editing .dash-sec-head { cursor: move; touch-action: none; user-select: none; }
}
@media (max-width: 899px) { .dash-resize { display: none; } }
/* v0.98.77: a narrow widget in the edit mode — its tools under its title, not over it */
.dash-grid.is-editing .dash-head h2 { flex: 1 1 9em; }
.dash-grid.is-editing .dash-tools { margin-left: auto; }
.dash-grid.is-editing .dash-w { outline: 1px dashed var(--line-strong); outline-offset: -1px; }
body.is-dragging-widget { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.dash-w.is-dragging, .dash-w.is-resizing { z-index: 5; box-shadow: 0 10px 30px rgb(0 0 0 / .25); opacity: .92; }
.dash-w.is-dragging { will-change: transform; }
/* v0.99.19: where the widget dragged will stand */
.dash-ph { grid-column: var(--x) / span var(--w); grid-row: var(--y) / span var(--h); border: 2px dashed var(--accent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, transparent); pointer-events: none; }
.dash-grid.is-active { background-image: linear-gradient(to right, color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px);
  background-size: calc((100% + 12px) / 24) 100%; }
.dash-resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, var(--muted) 50%, var(--muted) 60%, transparent 60%, transparent 70%, var(--muted) 70%, var(--muted) 80%, transparent 80%); }
.dash-headline .spacer { flex: 1; }
/* v0.98.86: the variables — a line under the buttons, each of one height whatever is chosen: its label (grey) and its
   value in one frame, «▾» — the window of the choice, «×» — back to all (the host, the group: .mp-pill of the picker;
   their own — a select or a field in the same frame); a phone — one under another, as wide as the screen. */
.dash-vars { gap: 8px; }
.dash-pick { margin: 0; }
.mp-pill, .dash-vars label.inline { display: inline-flex; align-items: stretch; height: 30px; max-width: 320px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); font-size: 13px; overflow: hidden; color: var(--ink); gap: 0; }
.mp-pill.is-set { border-color: var(--accent); }
.mp-select { display: flex; width: 100%; max-width: none; height: 38px; font-size: 14px; } /* v0.98.88: a unit of the wizard — as a select */
.mp-select .mp-pill-open { flex: 1; padding: 0 12px; }
.mp-select .mp-pill-open i { margin-left: auto; }
.mp-pill-open { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 8px 0 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.mp-pill-open b, .dash-vars label.inline > span { display: flex; align-items: center; padding: 0 9px; align-self: stretch; font-weight: 500; color: var(--muted);
  background: var(--surface-2); border-right: 1px solid var(--line); white-space: nowrap; }
.mp-pill-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-pill-open i { font-style: normal; font-size: 11px; color: var(--muted); }
.mp-pill-x { padding: 0 9px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); font: inherit; cursor: pointer; }
.mp-pill-open:hover, .mp-pill-x:hover { background: var(--surface-2); }
.dash-vars label.inline :is(select, input) { height: 100%; border: 0; border-radius: 0; background: transparent; min-width: 0; padding: 0 8px; font-size: 13px; }
.gp-item:disabled { color: var(--muted); cursor: default; } /* off: grey, its note — why, not a warning */
.gp-item:disabled .mp-note { color: var(--muted); }
@media (max-width: 640px) {
  .dash-vars { flex-direction: column; align-items: stretch; }
  .mp-pill, .dash-vars label.inline { display: flex; width: 100%; max-width: none; }
  .mp-pill-open { flex: 1; }
  .mp-pill-open i { margin-left: auto; }
}
.dash-edit-hint { font-size: 12.5px; }
.timebar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 14px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.timebar-custom { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.timebar-custom input { padding: 4px 6px; font-size: 13px; }
.timebar-now { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* v0.33.0: one time bar for every page of graphs — shifts, a period of one's own. */
.timebar-shift .seg-btn { min-width: 32px; }
.timebar-shift .seg-btn:disabled { opacity: .45; cursor: default; }
.timebar-pick { position: relative; }
.timebar-pick > summary { list-style: none; cursor: pointer; border: 1px solid var(--line-strong); border-radius: var(--radius); display: inline-block; }
.timebar-pick > summary::-webkit-details-marker { display: none; }
.timebar-pick.is-on > summary { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-color: transparent; }
.timebar-pick[open] { flex-basis: 100%; order: 10; }
.timebar-pick[open] > .timebar-custom { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.timebar-custom .hint { width: 100%; }
@media (max-width: 640px) {
  .timebar-now { margin-left: 0; width: 100%; }
}

/* New host form: new group, templates, quick checks, copying (v0.6.1) */
.new-group { display: flex; align-items: center; gap: 10px; margin-top: 10px; max-width: 520px; }
.new-group .hint { white-space: nowrap; font-size: 13px; }
.new-group input { flex: 1; min-width: 0; }
.setup-section { max-width: 900px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; margin: 0 0 14px; }
.setup-section[open], .setup-section.setup-open { padding-bottom: 14px; }
.setup-section > h3.setup-title { margin: 12px 0 8px; font-size: 15px; }
.setup-section [data-mpick] { margin: 0 0 8px; }
.setup-section > summary { cursor: pointer; padding: 12px 0; list-style-position: inside; }
.setup-section > summary .hint { font-size: 13px; }
.setup-title { font-weight: 600; }
.setup-section > p.hint { margin: 0 0 10px; font-size: 13px; }
.setup-section .form-grid { margin-bottom: 0; }
.setup-section fieldset.field + fieldset.field { margin-top: 12px; }
.setup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.setup-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.setup-item:hover { background: var(--surface-2); }
.setup-item input { margin-top: 3px; }
.setup-name { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.setup-name small { font-size: 12px; }
.setup-name .badge { font-size: 11px; vertical-align: 1px; }
@media (max-width: 640px) {
  .new-group { flex-direction: column; align-items: stretch; gap: 4px; }
}

/* Host form v0.6.2: OS detection, group picker, optional parameters */
.field > label:first-child:not(.check), .field > label.check:first-of-type { font-weight: 600; font-size: 14px; }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row input { flex: 1; min-width: 0; }
.input-row .btn { white-space: nowrap; }
.detect-os { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; }
.detect-os select { width: auto !important; padding: 2px 6px; }
.detect-ok { color: var(--ok); }
.detect-err { color: var(--bad); }
.gp-current { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gp-current .btn { max-width: 100%; }
.gp-value { font-weight: 600; overflow-wrap: anywhere; }
.gp-value.is-empty { font-weight: 400; color: var(--muted); }
.gp-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 48px)); padding: 0; display: none; }
.gp-dialog[open] { display: flex; flex-direction: column; }
.gp-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.gp-head h2 { margin: 0; font-size: 17px; }
.gp-head input { width: 100%; }
.gp-list { overflow-y: auto; padding: 6px; flex: 1; min-height: 120px; }
.gp-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 8px 10px; border: 0;
  border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.gp-item:hover, .gp-item.is-active { background: var(--surface-2); }
.gp-item.is-selected { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.gp-item small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.gp-empty { padding: 14px 10px; color: var(--muted); }
.gp-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }

/* Host form layout (v0.6.3) */
.host-grid { gap: 14px 20px; }
.host-col { display: grid; gap: 12px; align-content: start; }
.params-field { gap: 6px; }
.params-field > label.check { font-weight: 600; font-size: 14px; }
.params-body { display: grid; gap: 5px; }
.host-grid .hint { font-size: 12.5px; }
.host-grid fieldset.field legend { margin-bottom: 5px; }
.host-grid .gp-current { min-height: 38px; }
.host-grid textarea[name=description] { min-height: 86px; }
@media (max-width: 760px) { .host-grid { grid-template-columns: minmax(0, 1fr); } }
/* The forms of a host and of a website monitor (v0.40.17): across the whole page — the fields, the interfaces and the
   templates use the width of the screen; an interface card is wide enough for a long name of
   credentials. */
[data-host-form] .form-grid, [data-host-form] .setup-section, [data-wide-form] .form-grid { max-width: none; }
[data-host-form] .iface-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
[data-host-form] .iface-card .form-grid { grid-template-columns: minmax(0, 1fr) 110px; }
@media (max-width: 520px) { [data-host-form] .iface-grid { grid-template-columns: minmax(0, 1fr); } }

/* Host addresses (v0.6.5) */

/* Hosts filter (v0.6.7; v0.90.1: tags in one line, whole over the form while focused) */
.host-filter { margin-bottom: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; padding: 16px 18px 4px; }
.filter-wide { grid-column: span 2; }
.filter-grid .field > label:first-child, .filter-grid .field > span { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 13px; }
.filter-grid .hint { font-weight: 400; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-grid .hint b { color: var(--accent); }
.filter-switches { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px 24px; position: relative; margin-top: 8px; padding-top: 14px; }
.filter-switches::before { content: ""; position: absolute; inset: 0 -18px auto; border-top: 1px solid var(--line); }
@media (min-width: 1650px) { .filter-switches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; } .filter-status { grid-column: span 2; } .filter-status + .filter-status { grid-column: auto; } }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 18px; border-top: 1px solid var(--line); }
.filter-actions .filter-add { margin-left: auto; }
.status-checks { display: flex; gap: 5px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.check-chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.host-filter .field:has(> .tokens) { grid-template-rows: auto 38px; }
.host-filter .token { flex: none; flex-wrap: nowrap; }
.host-filter .tokens { flex-wrap: nowrap; overflow: hidden; }
.host-filter .tokens:not(:focus-within)::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 48px; background: linear-gradient(90deg, transparent, var(--surface)); pointer-events: none; }
.host-filter .tokens:focus-within { align-self: start; z-index: 20; height: auto; flex-wrap: wrap; overflow: visible; box-shadow: 0 12px 28px rgb(0 0 0 / .3); }
.tokens { position: relative; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 0 6px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: text; }
.tokens:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
/* "a|b" — any of the tags (v0.51.5): a visible "или" between them. */
/* v0.57.2: a long tag or "a|b|c…" wraps inside its cell or field, an "или" stays with its tag. */
.tag, .cond-chip, .mp-chip { max-width: 100%; overflow-wrap: anywhere; }
.token-sep { white-space: nowrap; display: inline-block; margin: 0 5px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--surface);
  font-size: 10.5px; font-weight: 700; line-height: 16px; letter-spacing: .02em; vertical-align: 1px; }
.token .token-or { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-weight: 600; line-height: 1; }
.token .token-or:hover, .token .token-or:focus-visible { color: var(--accent); }
.tokens input { flex: 1; min-width: 80px; border: 0 !important; outline: 0; padding: 4px; background: transparent; box-shadow: none !important; }
.token { display: inline-flex; flex-wrap: wrap; max-width: 100%; min-width: 0; overflow-wrap: anywhere; align-items: center; gap: 2px; padding: 1px 4px 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.token button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.search-suggest { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; width: 100%; min-width: 220px; max-height: 300px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / .12); padding: 4px; }
.suggest-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink);
  font: inherit; padding: 6px 10px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.suggest-item:hover, .suggest-item.is-active { background: var(--surface-2); }
.suggest-more { padding: 6px 10px; font-size: 12px; }
@media (max-width: 1100px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .filter-grid { grid-template-columns: minmax(0, 1fr); } .filter-wide { grid-column: auto; } .status-checks { flex-wrap: wrap; } }

/* Metric catalogue (v0.6.6) */
.metric-pick { max-width: 100%; font-size: 13px; }
.graph-section { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.graph-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.graph-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 6px; flex-wrap: wrap; }
.graph-row:nth-child(odd) { background: var(--surface-2); }
.graph-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.graph-main .mono { overflow-wrap: anywhere; }
.graph-actions { display: flex; gap: 6px; align-items: center; }
.graph-actions form { margin: 0; }
.graph-items { display: grid; gap: 8px; }
.graph-item { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.graph-item input { width: 100%; }
@media (max-width: 760px) { .graph-item { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; border-bottom: 1px solid var(--line); } }

/* Hosts table, Zabbix-like (v0.6.8) */
.status-ok { color: var(--ok); }
.hosts-table td { vertical-align: top; }
.hosts-table .num { white-space: nowrap; }
.count-link { color: var(--accent); white-space: nowrap; }
.count-link b { font-weight: 600; color: var(--muted); }
.host-name-cell { min-width: 180px; }
.host-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.host-tags .tag { font-size: 11.5px; }
.host-tpl-cell { max-width: 220px; font-size: 13px; }
.muted-link { color: var(--muted); text-decoration: underline dotted; }
.avail-protos { display: inline-flex; flex-wrap: nowrap; gap: 4px; }
.host-name-cell a.strong { overflow-wrap: anywhere; }
.avail { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: #fff; }
.avail-up { background: var(--ok); }
.avail-down { background: var(--bad); }
.avail-unknown { background: var(--muted); }
.avail-degraded { background: var(--warn); } /* v0.53.0: some checks of the interface pass */
.page-back { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; }
.page-back .crumbs { margin: 0; }

/* Dashboard widgets of v0.6.11: certificates and domains, problems by host group, host picker. */
.dash-scroll { overflow: auto; flex: 1; min-height: 0; }
.dash-scroll > .table { margin: 0; }
.md > :first-child { margin-top: 0; } .md p, .md ul, .md ol, .md pre, .md blockquote, .md .table-wrap { margin: 0 0 10px; }
.md pre { background: var(--surface-2); padding: 8px 10px; border-radius: 6px; overflow: auto; } .md blockquote { border-left: 3px solid var(--line-strong); padding-left: 10px; color: var(--muted); margin-left: 0; } .md ul, .md ol { padding-left: 1.4em; } .md hr { border: 0; border-top: 1px solid var(--line); }
.dash-more { margin: 6px 12px 10px; }
.cell-sub { display: block; font-size: 12px; }
.exp { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.exp b { font-variant-numeric: tabular-nums; }
.exp small { font-size: 12px; color: var(--muted); }
.exp-ok b { color: var(--ok); }
.exp-warn b { color: var(--warn); }
.exp-bad b { color: var(--bad); }
.gsev th.gsev-h, .gsev td.gsev-c { text-align: center; width: 1%; white-space: nowrap; }
.gsev td.gsev-c { padding: 3px 4px; }
.gsev-n { position: relative; display: inline-block; min-width: 46px; padding: 3px 10px; border-radius: 4px;
  font-weight: 600; color: #1b1b1b; cursor: default; outline-offset: 2px; }
.gsev-disaster { background: #e45959; color: #111; }
.gsev-high { background: #e97659; color: #111; }
.gsev-average { background: #ffa059; color: #111; }
.gsev-warning { background: #ffc859; color: #111; }
.gsev-information { background: #7499ff; color: #111; } /* = --info in the dark theme */
.gsev-pop { display: none; position: fixed; z-index: 50; max-height: 60vh; overflow: hidden auto; padding: 6px; width: max-content; max-width: calc(100vw - 16px);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(0 0 0 / .3); text-align: left; font-weight: 400; cursor: auto; }
.gsev-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.gsev-n:hover > .gsev-pop, .gsev-n:focus-within > .gsev-pop { display: block; }
.gsev-pop .table { margin: 0; }
.gsev-pop .table td, .gsev-pop .table th { font-size: 13px; padding: 5px 8px; }
.gsev-pop a.gsev-name { display: inline-block; padding: 1px 6px; border-radius: 3px; text-decoration: none; }
.gsev-pop > a.hint { display: block; padding: 6px 8px 2px; }

/* v0.6.15: widget views — tiles, horizontal bars, overall status; home page menu. */
.wtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); flex: 1; min-height: 0; }
.wtile { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 16px; color: var(--ink);
  border-right: 1px solid var(--line); min-width: 0; }
.wtile:last-child { border-right: 0; }
.wtile:hover { background: var(--surface-2); text-decoration: none; }
.wtile.st-up .tile-value { color: var(--ok); }
.wtile.st-degraded .tile-value { color: var(--warn); }
.wtile.st-down .tile-value { color: var(--bad); }
.wtile.tile-sev .tile-value { display: inline-block; align-self: flex-start; padding: 0 10px; border-radius: 4px; }
.hbars { display: grid; gap: 6px; padding: 10px 14px 12px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) auto; gap: 10px; align-items: center; color: var(--ink); font-size: 13.5px; }
.hbar:hover { text-decoration: none; }
.hbar:hover .hbar-label { text-decoration: underline; }
.hbar:not([href]):hover .hbar-label { text-decoration: none; }
.hbar-track { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.hbar-track > span { flex: 0 0 0; min-width: 0; }
.hcells .hbar-track { gap: 1px; }
.vcols { display: flex; gap: 6px; min-width: 0; min-height: 150px; }
.vcols > a, .vtrack { flex: 1; display: flex; flex-direction: column; min-width: 0; text-align: center; }
.hbar-fill:not([data-grow="0"]) { min-width: 3px; }
.hbar-val { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; min-width: 3ch; }
.fill-up { background: var(--ok); }
.fill-degraded { background: var(--warn); }
.fill-down { background: var(--bad); }
.fill-unknown { background: var(--line-strong); }
.gauge { height: 10px; margin: 4px 0 2px; }
.wsevbar { padding: 10px 14px 4px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 280px; padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgb(0 0 0 / .18); }
.menu-pop form { margin: 0; }
.menu-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 4px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.menu-item:hover { background: var(--surface-2); }
.menu-pop .hint { margin: 2px 10px 6px; }

/* v0.6.16: Веб-мониторинг. */
.credfilters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 12px 14px; }
.credfilters .field { min-width: 170px; flex: 1 1 170px; margin: 0; }
.credfilters .actions { margin: 0; }
.sites td { vertical-align: middle; }
.site-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--line-strong); vertical-align: 1px; }
.sd-up { background: var(--ok); } .sd-down { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.sd-warn { background: var(--warn); } .sd-paused { background: transparent; border: 2px solid var(--muted); width: 9px; height: 9px; }
.state-pill.sp-up { background: var(--ok-soft); color: var(--ok); } .state-pill.sp-down { background: var(--bad-soft); color: var(--bad); }
.beats { display: inline-flex; gap: 2px; align-items: flex-end; height: 22px; }
.beat { width: 5px; height: 20px; border-radius: 2px; background: var(--ok); opacity: .85; }
.beat:hover { opacity: 1; transform: scaleY(1.1); }
.beat-bad { background: var(--bad); }
.beats-wide .beats { height: 30px; flex-wrap: wrap; }
.beats-wide .beat { width: 7px; height: 28px; }
.tag-group { background: var(--accent-soft); color: var(--accent); }
.sitehead { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding: 16px 20px; border-left: 4px solid var(--line-strong); }
.sitehead h2 { margin: 0 0 6px; font-size: 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sitehead p { margin: 4px 0; }
.st-border-up { border-left-color: var(--ok); } .st-border-down { border-left-color: var(--bad); } .st-border-warn { border-left-color: var(--warn); }
.sitehead-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.sitehead-actions form { margin: 0; }
.sitestats .wtile { border-bottom: 1px solid var(--line); }
.sitestats .tile-value.exp b { font-weight: inherit; }
.form-section { margin: 6px 0 12px; font-size: 15px; }
.checks-line { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.section-head .spacer { flex: 1; }
.sitestats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.add-menu .menu-pop { min-width: 340px; max-height: 70vh; overflow: auto; }
.add-menu > summary.btn { display: inline-flex; gap: 6px; align-items: center; }
a.menu-item, .dash-more-menu .menu-item { display: grid; gap: 1px; text-decoration: none; }
a.menu-item small, .dash-more-menu .menu-item small { font-size: 12px; }
.kind-badge { display: inline-block; white-space: nowrap; padding: 0 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; text-align: left; margin-top: 12px; }
/* «Эхолот» — the mark of the ICMP Ping constructor (v0.35.0). */
.echo-mark { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); vertical-align: middle; }
.echo-mark .ico { width: 16px; height: 16px; }
.echo-mark-lg { padding: 10px 14px 10px 12px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--line); }
.echo-mark-lg .ico { width: 30px; height: 30px; stroke-width: 1.6; }
.echo-word { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.echo-head { display: flex; gap: 16px; align-items: center; margin: 0 0 16px; }
.echo-head h2 { margin: 0 0 4px; }
.echo-head p { margin: 0; max-width: 80ch; }
.icmp-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) 110px 110px 28px; gap: 10px; align-items: end; margin-bottom: 8px; }
.icmp-source { display: flex; gap: 18px; margin-bottom: 12px; }
.icmp-chart-move { display: flex; gap: 2px; padding-bottom: 4px; }
@media (max-width: 720px) { .icmp-row { grid-template-columns: 1fr 1fr; } .echo-head { flex-direction: column; align-items: flex-start; } }
.io-report { border-top: 1px solid var(--line); }
.kind-card { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
.kind-card:hover { border-color: var(--accent); text-decoration: none; }
.kind-pick { margin-top: 4px; }
.kind-pick .kind-card { cursor: pointer; }
.kind-pick input { margin: 0 4px 0 0; vertical-align: -1px; }
.iface-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.iface-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; display: grid; gap: 8px; align-content: start; }
.iface-card h4 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.iface-card .field { margin: 0; }
.iface-card .form-grid { grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; }
.iface-grid + .setup-section, .iface-pick + .setup-section { margin-top: 16px; }
.setup-kind { margin: 14px 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.setup-kind .muted { text-transform: none; font-weight: 400; letter-spacing: 0; }
.form-section:not(:first-child), .form-block { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-block > .form-section { margin-top: 0; padding-top: 0; border-top: 0; }
.sev-label.sev-high, .badge-bad, .tag-not { background: var(--bad-soft); color: var(--bad); }

/* ---------- multi-select picker (route groups and tags) ---------- */
.mp-current { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 38px; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.mp-chip { display: inline-flex; align-items: center; gap: 2px; padding-right: 2px; }
.mp-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 4px; font: inherit; font-size: 15px; line-height: 1; opacity: .65; border-radius: 3px; }
.mp-x:hover, .mp-x:focus-visible { opacity: 1; background: var(--line); }
.mp-dialog { width: min(620px, calc(100vw - 32px)); }
/* v0.98.20: the groups on the left, their hosts on the right; one above the other on a phone. */
.mp-wide { width: min(920px, calc(100vw - 32px)); height: min(640px, calc(100vh - 48px)); }
.mp-panes { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); flex: 1; min-height: 0; }
.mp-pane { border-right: 1px solid var(--line); }
.mp-item { align-items: center; }
/* The name keeps its width (up to 55 %) and wraps by words; a long hint takes the rest, two lines at
   most, the whole text in the tooltip (v0.8.6: a long description squeezed the name to a letter column). */
.mp-main { display: inline-flex; align-items: center; gap: 10px; flex: 0 1 auto; max-width: 55%; min-width: 0; overflow-wrap: break-word; }
.mp-box { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 4px; position: relative; }
.mp-item.is-on .mp-box { background: var(--accent); border-color: var(--accent); }
.mp-item.is-on .mp-box::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mp-item.is-on { font-weight: 600; }
.mp-item small { flex: 1 1 0; min-width: 0; text-align: right; white-space: normal;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.mp-note { font-style: normal; font-size: 12px; color: var(--warn); font-weight: 400; }
.mp-group { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mp-foot-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .mp-panes { grid-template: minmax(0, 34%) minmax(0, 1fr) / none; } .mp-pane { border: 0; border-bottom: 1px solid var(--line); }
  .gp-foot { flex-direction: column; align-items: stretch; } .mp-foot-btns { justify-content: stretch; } .mp-foot-btns .btn { flex: 1; }
  .mp-item { flex-direction: column; align-items: stretch; gap: 2px; } .mp-main { max-width: none; } .mp-item small { flex: none; text-align: left; padding-left: 26px; } .mp-single .mp-item small { padding-left: 0; } }

/* ---------- "Графики" → dashboard ---------- */
.to-dash { margin-bottom: 14px; }
.to-dash-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.to-dash-row > b { align-self: center; margin-right: 4px; }
.to-dash-row .field { min-width: 200px; flex: 1 1 200px; max-width: 320px; }
.to-dash .hint.panel-body, .to-dash-more { padding-top: 0; margin: 0; }

/* ---------- web monitors: tags and copy ---------- */

.site-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.site-tags .tag { font-size: 11.5px; }
.tag-of { border-style: dashed; }
.row-copy { width: 24px; height: 24px; margin-left: 4px; vertical-align: middle; opacity: .55; }
.row-copy .ico { width: 14px; height: 14px; }
.site-row:hover .row-copy, .row-copy:focus-visible { opacity: 1; }
.copy-note { margin: -4px 0 12px; }

/* ---------- hosts list: web monitors ---------- */
.avail-web { background: var(--accent); }

/* ---------- route sending window (v0.7.3) ---------- */
.send-time { display: block; margin-bottom: 6px; }
.send-time span { display: block; font-size: .85em; color: var(--muted); margin-bottom: 2px; }
.send-time input { width: 100%; }
.send-window-note { color: var(--muted); margin: 4px 0 0; }
.retention-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.retention-clean { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  /* narrow screens: "Назад · current · Вперёд" without the other page numbers */
  .pager-links a.pager-num, .pager-links .pager-gap { display: none; }
}
/* choice of severity levels (v0.8.3) */
.sev-pick-pop { left: 0; right: auto; min-width: 220px; display: grid; gap: 2px; padding: 8px 10px; }
.sev-pick-pop .check, .sev-checks .check { display: flex; align-items: center; gap: 8px; padding: 4px 2px; margin: 0; width: auto; }
.sev-pick-actions { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.sev-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; border: 0; margin: 0; padding: 0; }
.sev-checks legend { width: 100%; padding: 0; margin-bottom: 4px; font-weight: 600; }
/* the quick filter buttons over the problems list are toggles (v0.8.4) */
.sevbar-item.is-on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sevbar-item.is-on::before { content: "✓"; color: var(--accent); font-weight: 700; }

/* v0.8.7: interfaces of a host are added from a searchable list */
.iface-remove { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1;
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer; }
.iface-remove:hover, .iface-remove:focus-visible { background: var(--surface-2); color: var(--ink); }
.code-block { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); margin: 6px 0 10px; }

/* v0.8.8: submenus in the main menu (credentials of all kinds) */
.nav-sub-head { cursor: pointer; list-style: none; user-select: none; }
.nav-sub-head::-webkit-details-marker { display: none; }
.nav-sub-chev { margin-left: auto; width: 14px; height: 14px; color: var(--muted); transition: transform .15s; transform: rotate(-90deg); }
.nav-sub[open] > .nav-sub-head .nav-sub-chev { transform: none; }
.nav-sub:not([open]):has(.is-active) > .nav-sub-head { color: var(--accent); }
.nav-sub-list { margin: 1px 0 2px 19px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-sub-list .nav-link { padding: 6px 10px; font-size: 14px; }

/* v0.8.10: the host's interfaces in the head of the host page */

.iface-chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); background: var(--surface-2); white-space: nowrap; }
a.iface-chip:hover { text-decoration: none; border-color: var(--accent); }
.iface-chip .dot { margin: 0; }

/* v0.8.11: the head of a host page — state and actions on top, facts in a labelled grid */
.hosthead { display: block; }
.hosthead-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.hosthead-top .hosthead-state { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hostfacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px; margin: 0; }
.hf { min-width: 0; }
.hf dt { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.hf dd { margin: 0; overflow-wrap: anywhere; line-height: 1.45; }
.hf-wide { grid-column: 1 / -1; }
.hf-addr { font-size: 14px; font-weight: 600; }
.hf-ips { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.hf-ips code { font-size: 13px; }
.hf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hf-chips .tag { margin: 0; }
.hf .hosthead-desc { white-space: pre-line; color: var(--ink); }
.hf-chips .iface-chip { white-space: normal; max-width: 100%; border-radius: 8px; }
.hf-ifaces { grid-column: span 2; }
@media (max-width: 640px) {
  .hostfacts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
  .hf-ifaces { grid-column: 1 / -1; }
  .hf-chips, .hf-ips { gap: 4px 6px; }
}

/* v0.8.13: the watched value of an "Отслеживание изменений" monitor. */
.watchbox { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; padding: 16px 20px; }
.watchbox .watch-cur, .watchbox .watch-next { display: grid; gap: 4px; }
.watchbox .watch-next form { margin: 6px 0 0; }
.watch-val { font-size: 26px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.watch-new { border-left: 4px solid var(--warn); }
.watch-new .watch-next .watch-val { color: var(--warn); }
.watch-how { flex: 1 1 260px; margin: 0; max-width: 60ch; }
.iface-pick > .mp-current { margin: 0; }
.iface-pick > .iface-hint { display: block; margin: 0; }
.iface-pick > .iface-grid { margin-top: 12px; }
/* Picker items with a description are cards (v0.8.21): the name on top, the description under it,
   left-aligned at the name, two lines at most — the text no longer jumps between a right-aligned
   column and a wrapped tail. */
.mp-item.mp-card { flex-direction: column; align-items: stretch; gap: 4px; padding: 9px 12px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 6px; }
.mp-item.mp-card .mp-main { max-width: none; }
.mp-item.mp-card small { flex: none; text-align: left; padding-left: 26px; line-height: 1.4; }
.mp-item.mp-card:hover, .mp-item.mp-card.is-active { border-color: var(--line-strong); }
.mp-item.mp-card.is-on small { color: var(--muted); }
.mp-item:disabled { cursor: default; opacity: .6; }
.mp-dialog .gp-list { padding: 8px 10px; }
/* An error under a field of an inline form does not push the field up (v0.8.22): it hangs under the
   input, the form gets room for it, the inputs and the button stay on one line. */
.inline-form .field { position: relative; }
.inline-form .field-error { position: absolute; left: 0; right: 0; top: 100%; margin-top: 3px; font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inline-form:has(.field-error) { padding-bottom: 32px; }
/* The problems list of "Problems by group" (v0.8.26): long names and host names wrap instead of
   widening the list past the screen; the time and the duration stay on one line. */
.gsev-pop .table { width: 100%; }
/* v0.60.5: the list sits in a cell of the counts (nowrap): its text wraps again, or a long host name pushed
   «Длительность» out of the list. */
.gsev-pop { white-space: normal; }
.gsev-pop td:nth-child(2) { min-width: 150px; }
.gsev-pop td:nth-child(3) { min-width: 160px; white-space: normal; overflow-wrap: anywhere; }
.gsev-pop.is-up::before { top: auto; bottom: -8px; }
.gsev-pop.is-narrow thead { display: none; }
.gsev-pop.is-narrow table, .gsev-pop.is-narrow tbody, .gsev-pop.is-narrow tr { display: block; width: 100%; }
.gsev-pop.is-narrow tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.gsev-pop.is-narrow td { display: block; padding: 0 !important; border: 0; min-width: 0; }
.gsev-pop.is-narrow td:nth-child(3) { grid-column: 1 / -1; grid-row: 1; }
.gsev-pop.is-narrow td:nth-child(1), .gsev-pop.is-narrow td:nth-child(2) { color: var(--muted); font-size: 12px; }
.gsev-pop.is-narrow td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; font-size: 12px; }
.gsev-pop.is-narrow td:nth-child(2) { grid-column: 1; grid-row: 3; }
/* The SNMP collection editor (v0.9.0): compact rows, details folded. */
.collect .c-sec { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.collect .c-sec h3 { margin: 0 0 6px; font-size: 15px; }
.c-row, .c-table { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin: 0 0 8px; background: var(--surface); }
.c-table { background: var(--surface-2); padding: 10px 12px; margin-bottom: 12px; }
.c-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; }
.c-line + .c-line, .c-line2 { margin-top: 6px; }
.c-line .field { margin: 0; min-width: 0; flex: 1 1 140px; }
.c-line .field > span { font-size: 12px; }
/* v0.98.21: the chosen value of a compact row (credentials; v0.98.22 — a filter) on one line, a long name
   cut (the whole in its tooltip). */
.c-line .gp-current, .filters .gp-current { flex-wrap: nowrap; min-width: 0; }
.c-line .gp-current .btn, .filters .gp-current .btn { flex: none; }
.c-line .field input, .c-line .field select, .c-line .field textarea { padding-top: 5px; padding-bottom: 5px; }
.c-line .c-key { flex: 0 1 130px; }
.c-line .c-oid { flex: 2 1 260px; }
.c-line .c-expr { flex: 3 1 320px; }
.c-line .c-type { flex: 0 1 140px; }
.c-line .c-metric { flex: 1.5 1 200px; }
.c-line .c-title { flex: 1.3 1 170px; }
.c-line .c-unit { flex: 0 1 110px; }
.c-line .c-num { flex: 0 1 100px; }
.c-line .c-enum { flex: 2 1 220px; }
.c-oid .hint { display: block; margin-top: 2px; }
/* The main line of a value or a column: one row of fixed columns. */
.c-row > .c-line:first-child { display: grid; grid-template-columns: 120px minmax(170px, 1.5fr) 120px minmax(150px, 1.2fr) minmax(130px, 1fr) 30px; align-items: start; }
.c-row > .c-line:first-child .field { flex: none; }
.c-row > .c-line:first-child .c-x { margin-top: 19px; align-self: start; }
.c-oid .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.c-row > .c-line.c-formula { grid-template-columns: 120px minmax(220px, 2.2fr) 130px minmax(150px, 1.2fr) 30px; }
.c-row > .c-line.c-graph { grid-template-columns: minmax(170px, 1fr) minmax(240px, 2fr) 80px minmax(150px, 0.8fr) 30px; }
.c-line .c-agg select { width: 100%; }
@media (max-width: 900px) {
  .c-row > .c-line:first-child, .c-row > .c-line.c-formula, .c-row > .c-line.c-graph { grid-template-columns: 1fr 1fr; }
  .c-row > .c-line:first-child .c-x { margin-top: 0; justify-self: end; grid-column: 2; }
}
.c-x { flex: none; align-self: flex-end; width: 30px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.c-x:hover { color: var(--bad); border-color: var(--bad); }
.c-more { margin-top: 4px; }
.c-more > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 2px 0; }
.c-more[data-set] > summary { color: var(--ink); }
.c-more[open] > summary { margin-bottom: 6px; }
.c-table > .field { margin: 8px 0 0; }
.c-table textarea { width: 100%; }
.c-cols { margin-top: 10px; }
.c-actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.c-mibs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 4px; }
.c-errors { margin: 6px 0 0; padding-left: 18px; }
/* The iteration of the API constructor (v0.13.0): the requests the form builds. */
.c-it-preview { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.c-it-preview .c-errors { color: var(--bad); }
.c-it-list { margin: 4px 0 0; padding-left: 18px; overflow-wrap: anywhere; }
.c-json textarea { width: 100%; margin-top: 8px; }
.c-json { margin: 12px 0; }
.c-src { max-width: 340px; overflow-wrap: anywhere; font-size: 12px; }
.c-test { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.c-test .field { margin: 0; min-width: 260px; }
[data-test-out] h4 { margin: 14px 0 6px; font-size: 14px; }

/* Message styles (v0.9.1) */
.btn-xs { min-height: 24px; padding: 1px 8px; font-size: 12px; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.style-form, .style-form .form-grid { max-width: none; }
.style-bar { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 4px; }
.style-bar .hint { margin: 0; flex: 1; }
.style-info { width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%; font: italic 700 16px Georgia, serif; flex: none; justify-content: center; }
.style-kind { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.style-kind.has-error { border-color: var(--bad); }
.style-kind-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.style-kind-head h3 { margin: 0; font-size: 15px; }
.style-kind-tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.style-kind-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .style-kind-body { grid-template-columns: 1fr; } }
.style-kind textarea { width: 100%; min-height: 0; font-size: 13px; line-height: 1.45; resize: vertical; }
.tg-preview { background: var(--surface-2); border-radius: 10px; padding: 10px; min-height: 100%; }
.tg-msg { background: var(--surface); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 8px 12px; white-space: pre-wrap;
  overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; max-width: 560px; }
.tg-msg:empty::before { content: "пусто — строки не будет"; color: var(--muted); }
.tg-msg a { color: var(--accent); }
.tg-msg blockquote { border-left: 3px solid var(--accent); margin: 2px 0; padding-left: 8px; }
.tg-msg pre { margin: 2px 0; white-space: pre-wrap; }
.tg-msg tg-spoiler { background: var(--line-strong); color: transparent; border-radius: 3px; }
.style-keys { width: min(780px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 48px)); }
/* Info dialogs opened by an "i" button (v0.20.2) */
.info-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 48px)); }
.info-body { padding: 4px 16px 12px; }
.info-body h3 { font-size: 15px; margin: 14px 0 4px; }
.info-body p { margin: 6px 0; }
.style-keys .gp-head .hint { margin: 0; }
.style-keys td { vertical-align: top; }
.style-keys td:first-child { white-space: nowrap; }

/* Host metrics page (v0.9.4) */
.mh-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 18px; }
.mh-title { flex: 1; min-width: 200px; }
.mh-title h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.mh-title p { margin: 2px 0 0; font-size: 13px; }
.mh-stale-count { color: var(--warn); }
.mh-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: 14px; margin-bottom: 14px; }
.mh-charts .panel { margin: 0; }
.mh-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 20px 0 12px; }
.mh-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.mh-jump a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--ink); text-decoration: none; background: var(--surface); }
.mh-jump a:hover { border-color: var(--accent); color: var(--accent); }
.mh-jump span { color: var(--muted); margin-left: 2px; }
.mh-group { margin-bottom: 14px; scroll-margin-top: 16px; }
.mh-group .panel-head { gap: 8px; }
.mh-group .panel-head h2 { font-size: 15px; }
.mh-all { margin-left: auto; }
.mh-table td, .mh-table th { vertical-align: middle; }
.mh-table tbody tr:hover { background: var(--surface-2); }
.mh-cb { width: 34px; padding-right: 0 !important; }
.mh-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.mh-human { flex-basis: 100%; font-weight: 600; font-size: 13.5px; }
.mh-name code { font-size: 12px; color: var(--muted); background: none; padding: 0; }
.mh-label { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.mh-val { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mh-val b { font-weight: 650; }
.mh-table tr.mh-stale td { color: var(--muted); }
.mh-table tr.mh-stale .mh-human, .mh-table tr.mh-stale .mh-val b { color: var(--muted); font-weight: 500; }
.mh-table tr.mh-stale .mh-label { background: var(--surface-2); color: var(--muted); }
.mh-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 -6px 18px rgb(0 0 0 / .06); margin-top: 6px; }
.mh-count { font-weight: 600; font-size: 13px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.mh-bar-end { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.mh-note { margin: 10px 2px 0; }
@media (max-width: 700px) {
  .mh-table th:nth-child(5), .mh-table td:nth-child(5) { display: none; }
  .mh-jump { margin-left: 0; }
}
.mh-src { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* Metric charts (v0.9.5): statistics like Zabbix, bars view, precise hover */
.chart-grid, .chart-base, .chart-cross { shape-rendering: crispEdges; }
.chart-grid-v { stroke-dasharray: 2 4; opacity: .7; }
.mband { fill: var(--c); fill-opacity: .12; stroke: none; }
.mline-hover { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
.chart-tip .tip-row { gap: 8px; padding: 1px 0; }
.chart-tip .tip-row b { display: inline; margin: 0 0 0 auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.chart-tip .tip-row small { color: var(--muted); font-size: 11.5px; }
.tip-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.chart-views { position: absolute; top: 8px; right: 14px; z-index: 1; display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.chart-views button { border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: 11.5px; padding: 2px 8px; cursor: pointer; }
.chart-views button + button { border-left: 1px solid var(--line); }
.chart-views button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chart:has(.chart-views) .chart-svg, .chart:has(.chart-views) .chart-bars { margin-top: 24px; }
/* v0.30.0: the comparison with the period before — a toggle under the chart. */
.chart-compare { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font: inherit;
  font-size: 11.5px; padding: 2px 8px; cursor: pointer; margin: 6px 0 2px; }
.chart-pick { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font: inherit;
  font-size: 11.5px; line-height: 1.4; padding: 2px 8px; cursor: pointer; }
.chart-pick:hover, .chart-compare:hover { color: inherit; border-color: var(--muted); }
.chart-pick[aria-pressed="true"], .chart-compare[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; border-color: transparent; }
.chart-stats-wrap { margin-top: 6px; overflow-x: auto; }
.chart-stats { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.chart-stats th { font-weight: 500; color: var(--muted); text-align: right; padding: 3px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.chart-stats th:first-child { text-align: left; }
.chart-stats td { text-align: right; padding: 2px 8px; white-space: nowrap; color: var(--muted); }
.chart-stats td:first-child { text-align: left; width: 100%; max-width: 0; }
.chart-stats td.is-last { color: var(--ink); font-weight: 600; }
.chart-stats .legend-item { max-width: 100%; display: inline-flex; align-items: flex-start; padding: 1px 4px; margin-left: -4px; text-align: left; }
.chart-stats .legend-item .legend-swatch { flex: none; margin-top: 4px; }
/* The name of a series wraps to two lines and only then ends with "…" (v0.14.1); the whole
   description is in the tooltip. */
.chart-stats .legend-text { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.chart-stats .legend-item:disabled { cursor: default; border-color: transparent; color: var(--ink); }
.chart-stats tr.is-off td { opacity: .45; }
.chart-stats tr.is-off .legend-swatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.chart-stats tbody tr:hover td { background: var(--surface-2); }
.chart-bars { display: grid; gap: 8px; padding: 6px 0 2px; align-content: start; }
.chart-bar { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.chart-bar-track { position: relative; height: 12px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.chart-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--c); }
.chart-bar-fill.is-warn { background: var(--warn); }
.chart-bar-fill.is-bad { background: var(--bad); }
.chart-bar-peak { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); opacity: .55; border-radius: 1px; }
.chart-bar b { min-width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.top-pie { display: grid; grid-template-columns: minmax(80px, 140px) 1fr; gap: 14px; align-items: center; }
.top-seg { fill: none; stroke: var(--c, var(--line)); stroke-width: 7; }
.top-pie .legend-swatch { background: var(--c, var(--line)); }
.graph-list { padding: 4px 12px 8px; }
.has-c .graph-num, .graph-val.has-c { color: var(--c); }
.has-c .hbar-fill, .meter.has-c > span { background: var(--c); }
.top-map { fill: var(--surface-2); stroke: var(--surface); stroke-width: .4; }
.top-map use + use { fill: var(--s1); }
.chart-bars-note { margin: 8px 0 0; font-size: 12px; }
.chart-label-day { font-weight: 600; fill: var(--ink); }

/* Content monitor (v0.9.8): what to check in the response */
.w-content { margin-top: 4px; }
.cm-switch { margin: 2px 0 14px; }
.cm-switch .seg-btn { display: inline-flex; align-items: center; padding: 6px 14px; font-size: 13.5px; position: relative; }
.cm-switch .seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
.cm-switch .seg-btn:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.cm-switch .seg-btn:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.cm-radios { display: grid; gap: 4px; margin-top: 6px; }
.w-content [data-cm="rules"] > .hint { margin: 0 0 12px; }

/* Audit log in words (v0.9.9) */
.audit-action { min-width: 220px; }
.audit-subject { color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.audit-details summary { cursor: pointer; max-width: 420px; overflow-wrap: anywhere; }
.audit-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 2px; color: var(--ink); }
.audit-kv dt { color: var(--muted); }
.audit-kv dd { margin: 0; overflow-wrap: anywhere; }
.audit-block { display: block; white-space: pre-line; max-height: 320px; overflow: auto; }

/* Language switch in the header (v0.10.0) */
/* Language switch (v0.12.2): both languages, the current one filled. */
.lang-seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.lang-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 26px; padding: 0 8px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 12px/1 var(--font); letter-spacing: .04em; cursor: pointer; }
.lang-btn:hover { color: var(--ink); background: var(--accent-soft); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-btn.is-on { background: var(--accent); color: var(--accent-ink); cursor: default; }

/* HTTP/API constructor (v0.11.0) */
.c-row > .c-line.c-apival { grid-template-columns: minmax(180px, 1.6fr) 130px minmax(180px, 1.4fr) minmax(150px, 1.2fr) 30px; }
@media (max-width: 900px) { .c-row > .c-line.c-apival { grid-template-columns: 1fr 1fr; } }
.api-c .c-sub { margin: 12px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.api-c .c-sec h3 .badge { margin-left: 6px; vertical-align: 1px; }
.api-c .c-line .check { align-self: center; margin: 0 6px; }
.api-paths .hint { margin: 6px 0 0; }
.api-reset { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.api-sample { margin-top: 10px; }
.api-sample pre { max-height: 320px; overflow: auto; }
.text-values td.mono { white-space: nowrap; }

/* Presets of the API constructor (v0.11.1) */
.api-import { margin-bottom: 16px; }
.api-import > summary { cursor: pointer; list-style: none; }
.api-import > summary::-webkit-details-marker { display: none; }
.api-import > summary h2::before { content: "▸ "; color: var(--muted); }
.api-import[open] > summary h2::before { content: "▾ "; }
.api-import-src { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); gap: 10px 14px; align-items: end; }
.api-template-source .api-import-src { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.6fr); align-items: start; }
.api-template-source .api-import-or { padding-top: 34px; }
.api-import-or { color: var(--muted); padding-bottom: 30px; }
@media (max-width: 760px) { .api-import-src, .api-template-source .api-import-src { grid-template-columns: 1fr; } .api-import-or, .api-template-source .api-import-or { padding: 0; } }
.api-import-sections { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 0; padding: 0; margin: 12px 0 4px; }
.api-import-sections legend { font-size: 13px; color: var(--muted); margin-bottom: 4px; padding: 0; }
.api-note { margin-bottom: 12px; }
.api-host-links { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* v0.16.0: the chooser of a chart with more series than it shows */
.chart-choose { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .85rem; margin-bottom: .35rem; }
.chart-choose-panel { border: 1px solid var(--line); border-radius: 8px; padding: .5rem; margin-bottom: .5rem; display: grid; gap: .5rem; }
.chart-choose-panel input[type=search] { width: 100%; }
.chart-choose-list { max-height: 14rem; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .15rem .75rem; font-size: .85rem; }
.chart-choose-item { display: flex; align-items: center; gap: .35rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-choose-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .85rem; }
.chart:has(.chart-views) .chart-choose { padding-right: 120px; min-height: 22px; }
/* v0.16.1: a chart is as tall as its series need — no reserved room once it is drawn; a long
   legend scrolls instead of stretching the page. */
.chart.is-ready, .chart-grid-2 .chart.is-ready { min-height: 0; }
.chart.is-ready .chart-empty { padding: 36px 0; }
.chart-stats-wrap.is-scroll { max-height: 272px; overflow-y: auto; }
/* v0.29.0: with an aggregation the table has more columns — on a narrow screen it scrolls inside
   the card (.chart-stats-wrap), the names of the series keep their room. */
@media (max-width: 560px) {
  .chart-stats td:first-child { width: auto; max-width: none; min-width: 120px; }
}
.chart-bars.is-scroll { max-height: 340px; overflow-y: auto; }
.chart-choose-item.is-stale { color: var(--muted); }
.chart-choose .status-warn, .chart-choose .badge { font-size: 12px; }

/* Tabs of a page (v0.18.0: the host page). Without JavaScript the nav stays hidden and every
   section is shown. */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tabs a { padding: 9px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ink); font-weight: 600; text-decoration: none; border-radius: var(--radius) var(--radius) 0 0; }
.tabs a:hover { background: var(--surface-2); text-decoration: none; }
.tabs a.is-on { border-bottom-color: var(--accent); color: var(--accent); }
.tabs a small { color: var(--muted); font-weight: 500; margin-left: 3px; }
.tab-pane[hidden] { display: none; }
/* Actions in a row of a table: buttons and small forms side by side. */
.row-actions { white-space: nowrap; }
/* The actions of a notification route (v0.51.4): the test and the copy in one row. */
/* A chosen trigger not of the chosen templates (v0.52.1). */
.mp-chip.mp-chip-warn { background: var(--warn-soft); color: var(--ink); }
.mp-filter-note { padding: 4px 10px 8px; text-align: left; }
.route-actions { display: inline-flex; align-items: center; gap: 4px; }
.route-actions .icon-btn { display: inline-grid; width: 30px; height: 30px; }
.row-actions > * { margin-left: 4px; }

/* Side panel (v0.18.0): a page in a frame at the right edge, over the page it was opened from. */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100vh; max-height: 100vh; width: min(760px, 100vw); max-width: 100vw;
  padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--bg); color: var(--ink); box-shadow: -12px 0 32px rgb(0 0 0 / .18); }
.drawer[open] { display: flex; flex-direction: column; }
.drawer::backdrop { background: rgb(10 20 18 / .35); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-head h2 { font-size: 17px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-head .icon-btn { font-size: 22px; line-height: 1; }
.drawer-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
.panel-mode { background: var(--bg); }
.panel-mode .content { padding: 16px; max-width: none; }
.panel-mode .page-back, .panel-mode .crumbs { display: none; }
.panel-mode .form-wide{ max-width: none; }

/* v0.20.8: phone width — nothing wider than the screen. */
@media (max-width: 760px) {
  .filters select { max-width: 100%; }
  .panel-head { flex-wrap: wrap; }
  .hosthead-actions .btn { white-space: normal; max-width: 100%; text-align: left; }
}

/* v0.36.10: the allowed addresses of a credential — a summary in the side column, the list with
   its add and search forms under the form. */
/* Credentials (v0.40.14): new — one form across the page, the fields and the allowed addresses
   side by side; existing — three blocks one under another across the page: the form, its use,
   the allowed addresses. */
.cred-new-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px 28px; align-items: start; }
.cred-new-hosts { margin: 0; }
.cred-new-hosts textarea { min-height: 150px; }
.cred-new-hosts .hint { margin: 6px 0 0; }
.cred-stack { display: grid; gap: 20px; }
.cred-stack > .panel + .panel { margin-top: 0; }
/* v0.88.5: one column, every panel the full width of the page (the fields were kept to 1200 px) */
.cred-stack .form-grid { max-width: none; }
@media (max-width: 900px) { .cred-new-grid { grid-template-columns: 1fr; } }
/* The filter of the triggers of a template (v0.40.20): all or those switched off. */
.trig-filter { display: inline-flex; gap: 4px; margin-right: 8px; }
.trig-filter .is-on { border-color: var(--accent); color: var(--accent); }
.cred-hosts-tools { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cred-hosts-add, .cred-hosts-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; flex: 1 1 360px; min-width: 0; }
.cred-hosts-add .field, .cred-hosts-search .field { flex: 1 1 220px; min-width: 0; margin: 0; }
.cred-hosts-warn, .cred-probe { padding-bottom: 0; }
.cred-hosts-warn .notice, .cred-probe p { margin: 0; }
.cred-probe code, .cred-open code { overflow-wrap: anywhere; }
.cred-hosts-table td:first-child code { font-size: 13px; }
.cred-hosts-table .cred-any td { background: var(--warn-soft); }
.cred-hosts-table td.row-actions, .cred-hosts-table th.row-actions { width: 1%; text-align: right; }
#hosts .bulkbar { border-radius: 0; }
/* v0.36.12: tags in a column of their own (lists of credentials and MIB modules). */
.cell-tags { min-width: 180px; max-width: 320px; }
.cell-tags .site-tags { margin-top: 0; }

/* ---------- v0.40.1: wide forms of notifications ---------- */
/* Two columns of blocks (a route: where and when on the left, which problems on the right). */
.form-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; align-items: start; }
.form-col .form-grid { max-width: none; }
@media (max-width: 1100px) {
  .form-cols { grid-template-columns: 1fr; }
  .form-cols > .form-col + .form-col > .form-block:first-child { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
}
/* Numbered how-to steps (a new Telegram bot). */
ol.steps { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 8px; }
ol.steps li { padding-left: 4px; }
/* Host groups (v0.50.2): the description in a column of its own; a new group and an edited one are
   small forms in their rows, the counts of the row stay in view. */
.groups-table th:nth-child(1) { width: 24%; }
.groups-table th:nth-child(2) { width: 32%; }
.groups-table .cell-desc { max-width: 0; }
.groups-table .cell-desc span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-compact { gap: 2px; }
.field-compact input:not([type="checkbox"]):not([type="radio"]) { min-height: 30px; padding: 4px 8px; font-size: 14px; }
.row-form td { vertical-align: top; background: var(--surface-2, transparent); }
.row-form .cell-actions { padding-top: 10px; }
.row-new td { border-bottom: 1px solid var(--line-strong); }
.row-new td.muted { padding-top: 14px; }
@media (max-width: 720px) {
  .groups-table th:nth-child(1), .groups-table th:nth-child(2) { width: auto; }
  .groups-table .cell-desc { max-width: 220px; }
}
.groups-table tr[id] { scroll-margin-top: 140px; }
/* v0.55.1: the columns of the groups are told apart — a line between them, the rows striped, the
   counts aligned as numbers. */
.groups-table th + th, .groups-table td + td { border-left: 1px solid var(--line); }
.groups-table thead th { border-bottom: 1px solid var(--line-strong); }
.groups-table tbody tr:nth-child(even):not(.row-form) { background: var(--surface-2); }
.groups-table tbody tr:not(.row-form):hover { background: var(--accent-soft); }
.groups-table td:nth-child(3), .groups-table td:nth-child(4), .groups-table td:nth-child(5) { font-variant-numeric: tabular-nums; }
.groups-table .cell-note { font-size: 12px; white-space: nowrap; }
/* The legend of a graph (v0.50.3, "legend-field"): the mode, the template, its variables and the
   preview of the names of the series. */
.legend-field { min-width: 0; }
.legend-ctl select { flex: 0 1 250px; }
.legend-ctl input { flex: 1 1 240px; min-width: 0; }
.legend-vars { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.legend-preview { margin-top: 6px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 8px; font-size: 13px; }
.legend-preview p { margin: 2px 0; }
.legend-list { margin: 2px 0; padding-left: 18px; }
.legend-list li { overflow-wrap: anywhere; }
.c-line.c-graph-legend { display: block; }
.legend-graph { margin-top: 10px; }

/* v0.57.0: the lists of a picker are hidden until app.js turns them into chips (theme.js sets the class). */
.mpick-wait [data-mpick] > div[data-mpick-src] { display: none; }
/* v0.57.0: the route form — the tabs "where to send" and "conditions"; a block of conditions in two columns. */
.route-cond-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 36px; align-items: start; margin-bottom: 8px; }
.route-cond-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (max-width: 1100px) { .route-cond-cols { grid-template-columns: 1fr; } }
/* v0.57.1: tabs marked by the server (.tabs-early): shown before app.js; without JavaScript (no .js) — no tabs, every section. */
html:not(.js) .tabs-early, .js .tab-off { display: none; }
.js .tab-off:target { display: block; }
/* v0.57.1: the chosen values of a picker as cards (data-mpick-cards): a line with the count and the buttons, a grid of cards. */
.mp-current.mp-cards { display: grid; gap: 8px; }
.mp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-count { font-weight: 600; margin-right: 4px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.mp-card-sel { display: flex; align-items: flex-start; gap: 4px; min-width: 0; padding: 6px 4px 6px 10px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface-2); }
.mp-card-sel.mp-card-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.mp-card-text { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.mp-card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mp-card-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.mp-card-more { border: 1px dashed var(--line); border-radius: var(--radius); background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 10px; text-align: left; }
.mp-card-more:hover { background: var(--surface-2); }
.form-col > .form-block:first-child, #route-conds > .form-block:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
/* v0.58.2: the end of a mute next to its button. */
.mute-ctl { display: inline-flex; gap: 6px; align-items: center; }
.mute-ctl select, .mute-ctl input { width: auto; }
/* v0.58.3: the problem's actions — the choice, the term of a mute, the reason, one button; the hint of
   «Отправить по текущим маршрутам» under the button, as its description */
.problem-actions .mute-ctl { display: flex; flex-wrap: wrap; }
.problem-actions .mute-ctl select { flex: 1 1 16rem; }
.resend-hint { display: block; margin-top: 6px; }
.problem-actions [data-act-submit]:disabled { opacity: .5; cursor: not-allowed; }
/* v0.58.5: the term of a mute only for «Заглушить» (app.js marks it); without JavaScript it is always shown */
.js [data-act-only]:not(.act-on) { display: none; }
/* v0.58.1: the route form — send the open problems on save. */
.route-resend { margin: 16px 0 0; display: grid; gap: 4px; }
/* v0.56.2: the routes list: a route with its own conditions; the tooltip names their kinds. */
.cond-own { border-bottom: 1px dotted var(--muted); cursor: help; white-space: nowrap; }
/* v0.56.0: the blocks of conditions of a route: "or" blocks, the except block, the preview. */
.route-or { margin: 14px 0 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.route-or > legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-weight: 600; }
.route-or-sep { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; letter-spacing: .04em; }
.route-add-or { margin: 12px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.route-except { margin: 14px 0 0; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--radius); }
.route-except > summary { cursor: pointer; font-weight: 600; }
.route-except[open] > summary { margin-bottom: 8px; }
.route-preview { margin: 14px 0 0; }
.route-preview .notice { margin-top: 8px; }
.route-preview-list { margin: 6px 0; padding-left: 18px; }
.route-preview-list li { margin: 2px 0; }

/* v0.58.8: a period chosen with the mouse on a graph */
.chart-zoom { fill: var(--accent); fill-opacity: .16; stroke: var(--accent); stroke-width: 1; pointer-events: none; }
.chart-zoom.is-note { fill: var(--s7); stroke: var(--s7); } /* v0.98.53: the time of a note */
.chart-zoom-label { position: absolute; z-index: 5; transform: translateY(-100%); display: grid; gap: 1px; padding: 3px 9px;
  background: var(--surface); border: 1px solid var(--accent); border-radius: 6px; font-size: 12px; white-space: nowrap; pointer-events: none; }
.chart-zoom-label small { color: var(--muted); font-size: 11px; }
.is-selecting { user-select: none; }
.is-selecting .chart-tip { display: none; }

/* v0.98.8: «Веб-мониторинг» — the tree of the folders beside the monitors of the folder chosen */
/* The list: the columns have their widths and the name takes the rest; a cell is of two lines; the last checks
   that do not fit are cut from the old end. The tree is shown while the list has room beside it — by the width
   of the page, not of the window; without it the folder is chosen in the filter. */
.sites { table-layout: fixed; min-width: 640px; }
.webwrap { container-type: inline-size; }
.sites .c-state { width: 232px; } .sites .c-up { width: 140px; } .sites .c-lat { width: 96px; } .sites .c-exp { width: 116px; }
.site-name { display: flex; align-items: center; min-width: 0; }
.site-name .site-dot { flex: none; }
.site-name .strong, .site-what { overflow-wrap: anywhere; }
.sites .beats { display: flex; justify-content: flex-end; overflow: hidden; }
@container (max-width: 1099px) { .sites .c-state { width: 172px; } }
@container (max-width: 779px) { .sites .c-state { width: 172px; } }

/* v0.59.3: the bulk actions of the problems — as on the problem page */
.bulk-act { flex-wrap: wrap; }
.bulk-act .act-select { width: 23rem; max-width: 100%; } /* v0.60.3: the longest action fits */
.bulk-act .mute-ctl select { width: auto; max-width: 16rem; }
.bulk-act input[name="comment"] { flex: 1 1 18rem; min-width: 12rem; }
.bulk-act .bulk-hint { flex-basis: 100%; margin: 0; }
.bulk-act .bulk-hint[hidden] { display: none; }


/* --- v0.67.0: the widget «График» — a rule of charts. Every cell keeps its place and height; a
   long title is cut with "…" (whole in its title), nothing pushes the grid. --- */
.graph-h-4 { --gh: 180px; } .graph-h-6 { --gh: 276px; } .graph-h-9 { --gh: 420px; }
/* v0.71.0: the block keeps its size; the charts fill it, or keep their height and scroll inside it */
.dash-graph { display: grid; gap: 12px; padding: 0 8px 8px; flex: 1 0 auto; min-width: 0; grid-auto-rows: minmax(var(--gh, 180px), 1fr); }
.dash-graph.graph-one { grid-auto-rows: minmax(96px, 1fr); }
.dash-type-graph .dash-body { overflow-y: auto; overflow-x: hidden; }
.dash-graph.graph-cols-1 { grid-template-columns: minmax(0, 1fr); }
.dash-graph.graph-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-graph.graph-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-graph.graph-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.graph-cell { min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; }
.graph-cell:only-child { border: 0; border-radius: 0; background: none; } /* one object: the widget is its frame */
.graph-cell-head { display: flex; align-items: center; gap: 8px; padding: 5px 10px 0; min-height: 26px; min-width: 0; font-size: 12.5px; font-weight: 600; flex: none; }
.graph-clip { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-title { flex: 1 1 auto; }
.graph-title a { color: inherit; }
.graph-thr { flex: none; color: var(--muted); font-weight: 500; font-size: 11.5px; white-space: nowrap; }
.chart.graph-chart { flex: 1 1 auto; min-height: 0; padding: 2px 8px 4px; overflow: hidden; }
.graph-chart .chart-empty { padding: 12px 0; font-size: 12.5px; }
.graph-value { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 4px 12px 10px; }
.graph-num { display: block; font-size: 30px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.graph-h-4 .graph-num { font-size: 24px; }
.graph-cell.st-up .graph-num, .graph-val.st-up { color: var(--ok); }
.graph-cell.st-degraded .graph-num, .graph-val.st-degraded { color: var(--warn); }
.graph-cell.st-down .graph-num, .graph-val.st-down { color: var(--bad); }
.graph-cell.st-unknown .graph-num, .graph-val.st-unknown { color: var(--muted); }
.graph-value .gauge { width: 100%; }
/* v0.98.85: each column as wide as its content, the width of the block left over shared among them (the table is as
   wide as the block), the last one at its right edge; a long name, label or head cut by the width of the block
   (cqi — of .graph-tbl, its full text in its hint), the numbers never; wider than the block — it scrolls, the first
   column stays. A width set (data-col-w, app.js) — exactly it. */
.graph-tbl { container-type: inline-size; }
.graph-table { table-layout: auto; width: 100%; }
.graph-table:is(.is-natural, .is-fixed) { width: auto; } /* measured as its content (app.js fitTable); every column of
   its width (v0.98.91, as the Explorer of Windows): the room after the last */
.graph-table th, .graph-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-cap { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.graph-table .graph-name .graph-clip { max-width: clamp(10ch, 34cqi, 40ch); }
.graph-table :where(td):is(.graph-lab, .graph-txt) .graph-cap { max-width: clamp(8ch, 22cqi, 32ch); }
.graph-table th .graph-cap { max-width: clamp(6ch, 16cqi, 24ch); }
.graph-table.is-fit :is(.graph-cap, .graph-clip) { max-width: 100%; } /* it fits: the texts as wide as their columns */
.graph-table tr > :last-child:not(:first-child, .al-l, .al-c, .graph-txt) { text-align: right; }
.graph-table tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.graph-table thead th { z-index: 2; }
.graph-table thead tr > :first-child { z-index: 3; }
.graph-table tbody tr:hover > :first-child { background: var(--surface-2); }
.graph-tbl.is-scrolled .graph-table tr > :first-child { box-shadow: inset -1px 0 var(--line); }
.graph-table tfoot td:first-child { white-space: normal; }
/* v0.98.87: the type of a cell — its background the colour of its value (the text of a contrast: --on-fill of the
   theme over the darker colours, dark over the light ones, of a colour of its own — on-light/on-dark of the server),
   or a bar of the value on its scale beside the number */
:root { --on-fill: #fff; }
:root[data-theme="dark"] { --on-fill: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --on-fill: #111; } }
.graph-table td.cell-bg { background: var(--c); color: var(--on-fill); }
.graph-table td.cell-bg.st-up { --c: var(--ok); } .graph-table td.cell-bg.st-degraded { --c: var(--warn); } .graph-table td.cell-bg.st-down { --c: var(--bad); }
.graph-table td.cell-bg:is(.series-2, .series-3, .series-4, .series-5, .series-8, .on-light) { color: #111; }
.graph-table td.cell-bg.on-dark { color: #fff; }
.graph-table td.cell-bg .graph-val, .graph-table td.cell-bg a { color: inherit; }
.graph-table tbody tr:hover > td.cell-bg { filter: brightness(1.06); }
.graph-table td.cell-gauge { min-width: 16ch; }
.cell-bar { display: inline-block; width: calc(100% - 7ch); min-width: 6ch; height: 8px; margin-right: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.cell-fill { display: block; height: 100%; background: var(--accent); }
.th-filter { display: inline-flex; padding: 2px; margin-left: 4px; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; vertical-align: middle; }
.th-filter svg { width: 12px; height: 12px; fill: currentColor; }
.th-filter.is-on { color: var(--accent-ink); background: var(--accent); } /* chosen: filled, not of a colour alone */
/* v0.98.89: the line between two heads (as in a file manager) — the edge to drag; the column dragged: its edge down the
   table, its width over it */
.th-resize { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; touch-action: none; z-index: 1; }
.th-resize::after { content: ""; position: absolute; right: 0; top: 22%; height: 56%; width: 1px; background: var(--line-strong); }
.th-resize:is(:hover, :focus-visible)::after, th[data-px] .th-resize::after { top: 8%; height: 84%; width: 3px; border-radius: 2px; background: var(--accent); }
.th-resize:focus-visible { outline: none; }
@media (pointer: coarse) { .th-resize { width: 16px; } }
.graph-table .col-resizing { box-shadow: inset -2px 0 var(--accent); }
.graph-table th[data-px]::before { content: attr(data-px); position: absolute; right: 12px; top: 2px; z-index: 2; padding: 0 5px; border-radius: 4px;
  background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 500; line-height: 16px; }
.th-filter-dlg { width: min(420px, calc(100vw - 32px)); }
.th-filter-list { max-height: 50vh; overflow: auto; }
.th-filter-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; }
.th-filter-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-filtered { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 4px 12px; font-size: 12.5px; }
.cell-fill.st-up { background: var(--ok); } .cell-fill.st-degraded { background: var(--warn); } .cell-fill.st-down { background: var(--bad); } .cell-fill.has-c { background: var(--c); }
/* v0.99.0: the modes of a cell — a background in a gradient, a bar by the steps of its thresholds or in segments; the line
   of the value over the period (Sparkline); the alignment and the wrap of a column; the whole value of a cut cell */
.graph-table td.cell-bg.is-grad { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); }
.cell-bar.is-steps { display: inline-flex; }
.cell-bar.is-steps .cell-fill { flex: none; }
.cell-bar.is-lcd { background: repeating-linear-gradient(90deg, var(--surface-2) 0 5px, transparent 5px 7px); }
.cell-bar.is-lcd .cell-fill { mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); }
.cell-spark { display: inline-flex; align-items: center; gap: 8px; width: 100%; min-width: 14ch; }
.cell-spark svg { flex: 1 1 auto; min-width: 48px; height: 22px; overflow: visible; }
.cell-spark .spark-line { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cell-spark .spark-area { fill: currentColor; fill-opacity: .12; stroke: none; }
.cell-spark .graph-val { flex: none; min-width: 6ch; text-align: right; }
.cell-spark.st-up { color: var(--ok); } .cell-spark.st-degraded { color: var(--warn); } .cell-spark.st-down { color: var(--bad); } .cell-spark.has-c { color: var(--c); }
.graph-table .al-l { text-align: left; } .graph-table .al-c { text-align: center; } .graph-table .al-r { text-align: right; }
.graph-table .is-wrap, .graph-table .is-wrap .graph-clip, .graph-table .is-wrap .graph-cap, .graph-table td.num.is-wrap .graph-val { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; overflow: visible; }
.graph-table.wrap-head th, .graph-table.wrap-head th .graph-cap { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; overflow: visible; }
.graph-table tfoot td { vertical-align: bottom; }
.graph-table tfoot .foot-fn { display: block; font-size: 11px; font-weight: 400; color: var(--muted); line-height: 1.2; }
.graph-table tfoot td.num:not(.al-l):not(.al-c) { text-align: right; }
.peek-box { position: relative; }
.cell-peek { position: absolute; z-index: 4; width: 22px; height: 22px; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 13px; line-height: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); cursor: pointer; }
.cell-peek[hidden] { display: none; }
.peek-dlg { width: min(620px, calc(100vw - 32px)); }
.peek-text { margin: 0; padding: 4px 0 8px; max-height: 50vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 var(--mono, ui-monospace, monospace); }
/* v0.73.2: the values under their heads; the date in the line of the number — under it when the block is narrow;
   ⚠ of a stale term after the date (it moves nothing) */
.graph-table th.num, .graph-table td.num { padding-left: 14px; padding-right: 6px; }
.graph-table tr > .num:last-child { padding-right: 12px; }
.graph-table td.num .graph-val, .graph-table td.num .graph-date { white-space: nowrap; }
.graph-table td.num .graph-date { display: inline-block; margin-left: 6px; font-size: 12px; }

.graph-table th { vertical-align: bottom; }
@container (max-width: 520px) { .graph-table th.num, .graph-table td.num, .graph-table th.num[data-sort-col] { white-space: normal; }
  .graph-table th.num .graph-cap { white-space: normal; max-width: none; } }
.graph-edit p { margin: 0 0 6px; }
.graph-date { display: block; font-size: 11px; line-height: 1.2; color: var(--muted); font-weight: 400; }
.graph-sub { display: block; font-size: 11px; color: var(--muted); }
.graph-stale-mark { color: var(--warn); font-size: 12px; cursor: help; }
.graph-value .graph-date { font-size: 12px; }
@media (max-width: 899px) {
  .dash-graph[class*="graph-cols-"] { grid-template-columns: minmax(0, 1fr); grid-auto-rows: var(--gh); }
  .dash-type-graph { min-height: 0 !important; }
  /* v0.71.0: the grid has no height here — a long rule scrolls in a block of the screen's height */
  .dash-type-graph .dash-body { max-height: 80vh; }
}

/* The wizard of the graph. */
.gw { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); min-width: 0; margin: 0 0 16px; }
.gw-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gw-step { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 3px 12px 3px 3px; font: inherit; font-size: 13px; cursor: pointer; }
.gw-n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); display: inline-grid; place-items: center; font-size: 12px; font-weight: 650; }
.gw-step[aria-current="step"] { border-color: var(--accent); }
.gw-step[aria-current="step"] .gw-n { background: var(--accent); color: var(--accent-ink); }
.gw-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .gw-body { grid-template-columns: minmax(0, 1fr); } }
.gw-pages { min-width: 0; }
.gw-page { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.gw-page > *, .gw-where > * { min-width: 0; }
.gw.is-stepped .gw-page:not(.is-current) { display: none; }
.gw-page legend { font-weight: 650; margin: 0 0 8px; padding: 0; }
.gw-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.gw-chips.gw-col { flex-direction: column; align-items: flex-start; }
.gw-chips.gw-even { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18em), 1fr)); } /* v0.98.62: even, not ragged */
.gw-chips label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 5px 10px; font-size: 13.5px; cursor: pointer; max-width: 100%; min-width: 0; }
.list-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; }
.list-filter .search { flex: 1 1 260px; max-width: 420px; }
.list-filter .search input { width: 100%; }
.gw-mlist { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 0; }
.gw-mgroup { margin: 8px 10px 2px; font-size: 12px; color: var(--muted); font-weight: 650; }
.gw-metric { padding: 3px 10px; min-width: 0; }
.gw-metric:has(input[type="checkbox"]:checked) { background: var(--accent-soft); }
.gw-mlabel { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; font-size: 13.5px; }
.gw-mname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-unit { flex: none; color: var(--muted); }
.gw-labels { display: none; box-sizing: border-box; width: calc(100% - 26px); margin: 4px 0 4px 26px; font-size: 13px; }
.gw-metric:has(input[type="checkbox"]:checked) .gw-labels { display: block; }
/* v0.71.1: the own name of a value — under it, when it is picked */
.gw-mtitle, .gw-vtitle { display: none; box-sizing: border-box; font-size: 13px; }
.gw-mtitle { width: calc(100% - 26px); margin: 4px 0 4px 26px; }
.gw-metric:has(input[name="item_metric"]:checked) .gw-mtitle { display: block; }
.gw-fn { display: none; margin: 4px 0 4px 26px; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.gw-metric:has(input[name="item_metric"]:checked) .gw-fn { display: flex; }
.gw-vtitle { grid-column: 2 / 4; width: 100%; margin-top: 4px; }
.gw-value:has(input[type="checkbox"]:checked) .gw-vtitle { display: block; }
.gw-vtitle-hint { display: block; margin: 6px 10px; }
.gw-narrow { max-width: 240px; }
.gw-where > * { margin-bottom: 12px; }
.gw-preview { position: sticky; top: 12px; scroll-margin-top: 64px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 10px; }
.gw-preview-head { margin: 0 0 6px; font-weight: 650; font-size: 13px; color: var(--muted); }
/* v0.72.1: a box of its own height — the charts that come later scroll in it, the wizard does not grow */
.gw-preview [data-gw-preview] { height: 300px; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 1000px) { .gw-preview [data-gw-preview] { height: 260px; } }
.gw-preview-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.gw-preview-title { margin: 0; padding: 8px 12px; font-weight: 650; font-size: 14px; }
.gw-preview .dash-graph { grid-auto-rows: var(--gh); }
.gw-preview .dash-graph.graph-cols-3, .gw-preview .dash-graph.graph-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gw-total, .gw-errors p, .gw-error { margin: 0 0 6px; }
.gw:not(.is-stepped) .gw-nav { display: none; }
.graph-legend { display: flex; gap: 10px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 11.5px; color: var(--muted); padding: 0 0 2px; }
.graph-legend-item { display: inline-flex; align-items: center; gap: 4px; min-width: 0; flex: 0 1 auto; overflow: hidden; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.graph-legend-item.is-off { opacity: .45; }
.graph-legend-item.is-off .legend-swatch { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.graph-chart-row { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.graph-chart-row > svg { flex: none; width: auto; }
.chart-note { font-size: 11.5px; margin: 0 0 2px; }
.graph-legend.is-right { flex: none; flex-direction: column; align-items: flex-start; gap: 2px; width: max-content; max-width: 30%; max-height: 100%; overflow-y: auto; padding: 4px 0 0; }
.graph-legend.is-right .graph-legend-item { max-width: 100%; }
.graph-legend-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.graph-legend-item.is-axis2 .graph-legend-text::after { content: " →"; }
.marea { fill: var(--c); opacity: var(--fo, .16); stroke: none; }
.mbars { fill: var(--c); fill-opacity: var(--fo, 1); }
.mline.is-axis2 { stroke-dasharray: 5 3; }
.chart-thr { stroke: var(--bad); stroke-width: 1.2; stroke-dasharray: 5 4; }
.chart-label-2 { fill: var(--muted); }
.graph-chart .chart-tip { max-width: calc(100% - 8px); }
.graph-chart .chart-zoom-label { transform: none; }
.graph-chart .tip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

/* v0.67.1: the wizard across the panel, fields side by side, the window of the objects, the pages. */
.gw-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; align-items: start; }
.gw-cols > * { min-width: 0; margin: 0; }
.gw-cols > .hint, .gw-cols > .hint-more { grid-column: 1 / -1; }
@media (max-width: 700px) { .gw-cols { grid-template-columns: minmax(0, 1fr); } }
.gw-narrow2 { max-width: 420px; }
.gw-sub-head { margin: 14px 0 6px; font-weight: 600; }
.gw-row-add { margin: 6px 0 2px; }
.gw-sub { margin: 8px 0; } .gw-sub > summary { cursor: pointer; color: var(--muted); margin-bottom: 6px; }
.gw-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(80vh, 720px); border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); padding: 14px; box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.gw-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.gw-dialog::backdrop { background: rgb(0 0 0 / .45); }
.gw-dialog-head { margin: 0; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; } /* v0.98.62: a long body does not squeeze it */
.gw-dialog-foot { display: flex; align-items: center; gap: 8px; }
.gw-dialog-foot .spacer { flex: 1; }
[data-gw-label-chips] { margin-bottom: 4px; }
[data-gw-label-chips] .btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

/* v0.67.2: the buttons right under the step, the summary of the rule, the series of a metric by buttons. */
.gw-nav { display: flex; justify-content: flex-start; align-items: center; gap: 8px; margin: 4px 0 0; }
.gw-sum { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 14px 0 0; padding: 10px 12px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: 13px; }
.gw-sum dt { color: var(--muted); font-weight: 600; margin: 0; }
.gw-sum dd { margin: 0; display: flex; gap: 8px; min-width: 0; align-items: baseline; }
.gw-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer; flex: none; }
.gw-link:hover { text-decoration: underline; }
.gw.is-stepped .gw-metric:not(.is-raw) .gw-labels { display: none; }
.gw-msub { margin: 2px 0 4px 26px; font-size: 12.5px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.gw-plaque { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--accent); border-radius: 999px; padding: 0 4px 0 9px;
  margin: 0 6px 4px 0; color: var(--ink); background: var(--surface); max-width: 100%; }
.gw-plaque-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 3px; }
.gw-plaque-x:hover { color: var(--bad); }
.gw-lpop { margin-top: 6px; padding: 8px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--surface); display: grid; gap: 6px; }
.gw-lrow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.gw-lrow .btn { display: inline-block; text-align: left; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-lrow .btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.gw-lhead { min-width: 64px; color: var(--muted); }
.gw-lother { width: 200px; font-size: 13px; }

/* v0.67.3: «Вынести на панель». */
.graph-menu-btn { flex: none; border: 1px solid transparent; background: none; color: var(--muted); border-radius: 5px; width: 24px; height: 22px;
  line-height: 1; font-weight: 700; cursor: pointer; padding: 0; opacity: .55; }
.graph-cell:hover .graph-menu-btn, .graph-menu-btn:focus-visible { opacity: 1; border-color: var(--line); background: var(--surface-2); color: var(--ink); }
.graph-menu { position: absolute; z-index: 40; min-width: 240px; max-width: 320px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 8px; box-shadow: 0 10px 30px rgb(0 0 0 / .25); padding: 4px; display: flex; flex-direction: column; }
.graph-menu[hidden] { display: none; }
.graph-menu .menu-item { text-align: left; }
.graph-menu .menu-item small { display: block; color: var(--muted); font-size: 11.5px; }
.gx-dialog form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.gx-opt { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; cursor: pointer; }
.scope-option:has(input:checked), .kind-pick .kind-card:has(input:checked), .mp-item.mp-card.is-on, .gw-chips label:has(input:checked), .gx-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.gx-opt[hidden] { display: none; }
.gx-opt small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.badge-from { flex: none; border-color: var(--accent); color: var(--accent); }
.gw-except { display: flex; flex-wrap: wrap; min-width: 0; }
.dash-w { scroll-margin-top: 84px; }
.flash-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* v0.68.0: the sources «Проверки» and «Сайты» of the widget «График» */
.gw .is-gw-off { display: none !important; }
.gw-values { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 0; margin-bottom: 10px; }
.gw-value { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline; padding: 5px 10px; min-width: 0; cursor: pointer; }
.gw-value:hover { background: var(--hover, color-mix(in srgb, var(--accent) 6%, transparent)); }
.gw-value .hint { grid-column: 2; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-value .gw-unit { grid-column: 3; grid-row: 1; white-space: nowrap; }

/* v0.73.0: the dashboard — «Удалить» in its head; in the edit mode its properties in one row at the top
   and the form of a widget in a window over it. */
.dash-del { display: inline-flex; margin: 0; }
.dash-props { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto auto; gap: 10px 14px; align-items: end; padding: 12px 14px;
  margin-top: 14px; }
.dash-props .field, .dash-props .check { margin: 0; }
.dash-props .check { margin-bottom: 8px; }
.dash-props .btn { margin-bottom: 3px; }
@media (max-width: 899px) { .dash-props { grid-template-columns: minmax(0, 1fr); align-items: stretch; } }
dialog.wdlg { width: min(1180px, calc(100vw - 48px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
dialog.wdlg:focus { outline: none; }
.wdlg .gw-preview { top: 64px; } /* below the head of the window */
dialog.wdlg::backdrop { background: rgb(0 0 0 / .55); }
.wdlg-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: var(--surface); z-index: 3; }
.wdlg-head h2 { margin: 0; font-size: 16px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wdlg .flash { margin: 12px 16px 0; }
.wdlg .widget-form { padding: 14px 16px 0; }
.wdlg-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 3; margin: 14px -16px 0;
  padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.wdlg-foot .spacer { flex: 1 1 auto; }
.wdlg-at { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.wdlg-at span { color: var(--muted); font-weight: 600; }
/* v0.98.65: «Настройки панели» — a window of tabs; the tabs are radios, a pane is shown by its checked radio */
.props-form { padding: 12px 16px 0; }
.props-tabs { margin-bottom: 14px; }
.props-tabs .seg-btn { padding: 6px 12px; font-size: 14px; color: var(--ink); }
#pt-g:checked ~ .props-tabs [for=pt-g], #pt-m:checked ~ .props-tabs [for=pt-m], #pt-v:checked ~ .props-tabs [for=pt-v],
#pt-l:checked ~ .props-tabs [for=pt-l], #pt-a:checked ~ .props-tabs [for=pt-a] { background: var(--accent); color: var(--accent-ink); }
.props-pane { display: none; }
#pt-g:checked ~ .props-g { display: grid; } #pt-m:checked ~ .props-m, #pt-v:checked ~ .props-v, #pt-l:checked ~ .props-l, #pt-a:checked ~ .props-a { display: block; }
.team-grants select { width: auto; } .gw-pair { display: flex; gap: 6px; }
.props-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px 18px; align-items: start; }
.props-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
.props-none { margin: 4px 0; }
.hint-more summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.mark-cards { display: grid; gap: 10px; }
.mark-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 10px 14px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.mark-card[hidden] { display: none; }
.mark-card .mc { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mark-card .mc > b { font-size: 12px; font-weight: 600; color: var(--muted); }
.mark-card .mc-wide { grid-column: 1 / -1; }
.mark-card select, .mark-card input:not([type=checkbox]) { width: 100%; }
@media (max-width: 899px) { dialog.wdlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; } }

/* v0.73.3: a widget the live refresh changed — a frame and «● обновлено» for 3 s, its changed cells and
   tiles glow (the times that change by themselves do not count). */
.dash-w { transition: box-shadow .5s ease; }
.dash-w.is-fresh { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent); }
.dash-fresh { margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--accent); white-space: nowrap; flex: none; }
.dash-w td.is-changed { background: color-mix(in srgb, var(--accent) 22%, transparent); transition: background .5s ease; }
.dash-w .graph-cell.is-changed { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 80%, transparent); }

/* v0.74.0: reminders — the list, the calendar, the form with its preview beside it (the form takes
   the width the preview leaves; one column on a narrow screen). */
.rem-lead { flex: 1 1 320px; margin: 0; }
.rem-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.rem-filters .field { min-width: 240px; flex: 1 1 260px; }
.rem-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.rem-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
.rem-layout > .panel { margin: 0; }
.rem-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.rem-side .panel { margin: 0; }
.rem-bubble { background: var(--surface-2); border-radius: 12px 12px 12px 4px; padding: 10px 12px; line-height: 1.45; overflow-wrap: anywhere; }
.check-col { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1000px) { .rem-layout { grid-template-columns: minmax(0, 1fr); } .rem-side { position: static; } }
.rem-cal-head { gap: 10px; }
.rem-cal-head h2 { min-width: 150px; text-align: center; }
.rem-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rem-cal-wd { color: var(--muted); font-size: 12px; padding: 2px 6px; }
.rem-cal-day { min-height: 84px; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 6px; font-size: 12px; min-width: 0; }
.rem-cal-day.is-out { border-color: transparent; background: var(--surface-2); opacity: .5; }
.rem-cal-day.is-today { border-color: var(--accent); }
.rem-cal-n { color: var(--muted); }
.rem-cal-day.is-today .rem-cal-n { color: var(--accent); font-weight: 700; }
.rem-cal-ev { display: block; margin-top: 3px; padding: 1px 5px; border-left: 3px solid var(--warn); background: var(--surface-2); border-radius: 3px;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.rem-cal-ev.is-term { border-left-color: var(--bad); }
@media (max-width: 700px) { .rem-cal-day { min-height: 56px; } .rem-cal-ev { font-size: 11px; } }
.rem-filters .search { flex: 1 1 260px; max-width: none; width: auto; }
.rem-filters .search input { width: 100%; }
/* v0.74.0 (after review by the user): the choices of the schedule and of the days before the term take
   the width of the form, in equal cells; the checked one is marked. */
.rem-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; margin: 4px 0 10px; }
.rem-choice { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); cursor: pointer; text-align: center; min-width: 0; white-space: nowrap; }
.rem-choice:hover { background: var(--surface-2); }
.rem-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.rem-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }

/* v0.75.0: the collector modules on the agent's page — two columns, the hint («i») by the title. */
.mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 4px 0 8px; }
.mod-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }

/* v0.76.0: «i» — the hint under its line on hover, on keyboard focus and on a tap (focus). The hint is
   placed by the line that holds the «i» (.mod-item, a legend), so it starts where the line starts and
   stays on a phone screen. */
.info-tip { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--muted); font: 700 11px/1 var(--font); cursor: help;
  vertical-align: 1px; flex: none; user-select: none; }
.info-tip:hover, .info-tip:focus { color: inherit; border-color: var(--muted); outline: none; }
.mod-item, fieldset.field > legend { position: relative; }
.info-tip::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 4px);
  width: max-content; max-width: min(320px, calc(100vw - 48px)); padding: 6px 10px; border-radius: 6px; background: var(--surface-2);
  border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); color: inherit; font: 400 12px/1.4 var(--font);
  white-space: normal; text-align: left; z-index: 20; opacity: 0; visibility: hidden; pointer-events: none; }
.info-tip:hover::after, .info-tip:focus::after { opacity: 1; visibility: visible; }
/* In the right column of the modules the hint opens to the left, not past the edge of the page. */
@media (min-width: 561px) { .mod-grid > .mod-item:nth-child(2n) .info-tip::after { left: auto; right: 0; } }
@media (max-width: 560px) { .mod-grid { grid-template-columns: minmax(0, 1fr); } }
/* v0.77.0: the «i» is in the text of the title (a module, a field), kept with its last word ("title-tip",
   .nowrap): a long title wraps, the «i» stays after it. The hint is placed by the title of a field. */
.mod-item > .check, .mod-item > .check > span { min-width: 0; }
.field > span:has(.info-tip) { position: relative; }

/* v0.75.0: /agents — the installation over the whole width (Windows and Linux side by side), the
   settings of the registration in one row below; a wider search (name, node, IP, tag, ID). */
.install-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 8px 28px; }
.agents-filters .search input { width: 320px; }
@media (max-width: 700px) { .agents-filters .search input { width: 100%; } .install-cols { grid-template-columns: minmax(0, 1fr); } }
/* v0.83.1: «Модули по умолчанию» — Windows and Linux each framed; «Загрузка выпуска» — the form and the note side by side. */
.mod-os { max-width: none; margin: 0 0 14px; padding-bottom: 6px; }
.release-cols { margin-top: 0; }
.release-cols .setup-section { max-width: none; margin: 0; padding-bottom: 10px; }
.release-cols .code-block { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) { .release-cols { grid-template-columns: minmax(0, 1fr); } }

/* v0.75.0: the agent's page — the history under the details, stretched to the bottom of «Что собирать». */
.agent-cols { align-items: stretch; }

/* v0.79.0: the tab «Инвентаризация» of a host — the time and the agent next to the title, «Обновить» at
   the end; the search of the programs in the head of their panel; an event of changes — a line a change. */
.inv-head { margin-top: 8px; }
.inv-head .inv-refresh { margin: 0 0 0 auto; }
.inv-props { grid-template-columns: minmax(120px, 38%) 1fr; }
.inv-sw-head { flex-wrap: wrap; gap: 8px 16px; }
.inv-sw-head .list-filter { margin-left: auto; }
.inv-lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.msg-lines { white-space: pre-line; }
.ev-box { overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
.ev-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* v0.98.81: a list of dashboards — the name, the mark of the home one, the folder at the right */
.dash-list { list-style: none; margin: 0; padding: 4px 14px; }
.dash-list li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.dash-list li small { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* v0.98.81: the events on a phone — a card each: the time, the level, the host on a line, the event under them */
@media (max-width: 640px) {
  .ev-table thead { display: none; }
  .ev-table, .ev-table tbody, .ev-table td { display: block; }
  .ev-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .ev-table td { padding: 0; border: 0; }
  .ev-table td:last-child, .ev-table td.empty-row { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .inv-sw-head .list-filter, .inv-head .inv-refresh { margin-left: 0; }
}

/* v0.80.2: the graphs of agent modules switched off (shown by «показать») and the line about them. */
.graphs-off { margin: 4px 0 12px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.link-btn:hover, .link-btn:focus-visible { text-decoration: underline; }
.chart-off .chart { opacity: .6; }
.chart-off .panel-head .badge { margin-left: 8px; vertical-align: middle; }
/* v0.80.3: a negative value in «Столбцы» — from zero to the left, hatched. */
.chart-bar-fill.is-neg { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .45) 0 3px, transparent 3px 6px); }
.chart-bar-zero { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
/* v0.80.3: the buttons of a registration key: one under the other when the table is narrow. */
.key-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.key-actions form { margin: 0; }

/* v0.81.0: the agent's page in tabs — the tabs under the head; «Состояние сбора» of the apps: the
   message of an app under its state. */
.agent-toolbar { margin-top: 20px; }
.agent-toolbar + .panel-gap, .agent-toolbar + .cols { margin-top: 16px; }
.app-msg { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.agent-apps-state td code { overflow-wrap: anywhere; }

/* v0.83.0: «Кто выполняет проверки» of the host form. */
.probe-section .field { margin-top: 6px; }
.probe-section select { width: 100%; }
.probe-section .hint { margin: 6px 0 0; }

/* v0.83.2: the temporary field of «Копировать» without navigator.clipboard (HTTP) — out of sight, still selectable. */
.copy-buffer { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; font-size: 16px; }
.expires-choice { margin-top: 6px; }
/* v0.83.2: the month and the year of the reminders calendar as lists, «Сегодня» on the right. */
.rem-cal-pick { display: flex; gap: 8px; align-items: center; }
.rem-cal-pick select { width: auto; }
.rem-cal-today { margin-left: auto; }
/* v0.84.0: «Веб-мониторинг» — the server without the network. */
.uplink-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 14px;
  border: 1px solid var(--warn); border-radius: 8px; background: var(--warn-soft); }
.uplink-banner b { white-space: nowrap; }
/* v0.91.0: the compact density (a choice of the user in this browser, theme.js): smaller type, cells and controls —
   about half again as many rows on the screen; the normal one is unchanged. */
html[data-density="compact"] body { font-size: 13.5px; }
html[data-density="compact"] .topbar { padding: 9px 20px; }
html[data-density="compact"] .topbar-title { font-size: 17px; }
html[data-density="compact"] .content { padding: 14px 20px 32px; }
html[data-density="compact"] .nav-link { padding: 5px 10px; }
html[data-density="compact"] .panel-head { padding: 9px 14px; }
html[data-density="compact"] .panel-head h2 { font-size: 14px; }
html[data-density="compact"] .panel-body { padding: 11px 14px; }
html[data-density="compact"] .table th, html[data-density="compact"] .table td { padding: 5px 10px; line-height: 1.35; }
html[data-density="compact"] .table th { font-size: 12px; }
html[data-density="compact"] :is(input:not([type="checkbox"], [type="radio"]), select, textarea) { min-height: 30px; padding-block: 4px; }
html[data-density="compact"] .btn { min-height: 30px; padding: 3px 11px; }
html[data-density="compact"] .tile { padding: 9px 14px; }
html[data-density="compact"] .tile-value { font-size: 21px; }
html[data-density="compact"] .dash-grid { gap: 8px; }
html[data-density="compact"] .dash-head { min-height: 30px; padding: 4px 10px; }
html[data-density="compact"] .wtile { padding: 6px 12px; }
html[data-density="compact"] .state-pill { padding-block: 0; }
html[data-density="compact"] .icon-btn { width: 30px; height: 30px; }
/* v0.91.0: the menu folded to its icons (desktop); it unfolds over the page while the pointer or the focus is in it. */
.icon-btn.rail-pin { display: none; }
@media (min-width: 801px) {
  html[data-rail="mini"] .shell { grid-template-columns: 56px 1fr; }
  html[data-rail="mini"] .rail { width: 56px; padding-inline: 8px; overflow-x: hidden; z-index: 30; background: var(--bg); transition: width .15s; }
  html[data-rail="mini"] .rail:is(:hover, :focus-within) { width: var(--rail-w); padding-inline: 12px; box-shadow: 8px 0 24px rgb(0 0 0 / .25); }
  html[data-rail="mini"] .rail:not(:hover, :focus-within) :is(.brand span, .nav-link span, .nav-link small, .nav-sec-head, .nav-sub-chev, .rail-foot) { display: none; }
  html[data-rail="mini"] .rail:not(:hover, :focus-within) .brand { padding-inline: 6px; }
  .icon-btn.rail-pin { display: inline-grid; position: absolute; top: 16px; right: 10px; width: 30px; height: 30px; }
  .rail-pin .ico { transform: rotate(90deg); }
  html[data-rail="mini"] .rail:not(:hover, :focus-within) .rail-pin { display: none; }
  html[data-rail="mini"] .rail-pin .ico { transform: rotate(-90deg); }
}
/* v0.98.54: the wizard for a person without training — the simple mode, the suggestions, «было → стало», the numbers
   in the unit of the entry */
.gw-suggest { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; background: var(--surface-2); display: grid; gap: 6px; }
.gw-suggest .gw-sub-head { margin: 0; }
.gw-suggest > .btn { justify-self: start; }
@media (min-width: 761px) { .dash-name-narrow { display: none; } } /* v0.98.83: the name of a dashboard is the title of the page */
[data-gw-label-heads] td { vertical-align: middle; } /* v0.98.84: the label in the line of its name */
.field [data-gw-label-heads] input.gw-w { width: 9ch; } /* v0.98.85: a width, px */
[data-gw-label-head].is-off { display: none; } /* v0.98.83: of the host and the label apart only (its view hides it too) */
.gw-suggestion { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13.5px; }
.gw-suggestion > span { flex: 1 1 260px; min-width: 0; }
.gw-story { margin: 0 0 8px; padding: 6px 10px; border-radius: 6px; background: var(--surface-2); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.gw-conv { display: block; font-size: 12.5px; color: var(--muted); min-height: 0; }
.gw-conv:empty { display: none; }
.gw-unit-of { font-weight: normal; color: var(--muted); }
/* v0.98.55: the work with the dashboards — the links of the values and of a dashboard, the refresh, the screen, the
   table (sorting, search, pages, the total), the folders of the list */
.dash-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; font-size: 13.5px; }
.dash-view .menu-pop { right: auto; left: 0; min-width: 0; width: min(300px, calc(100vw - 32px)); }
.dash-view .dash-refresh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; }
.dash-refresh select { padding-block: 3px; }
.vlink { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.vlinks { display: inline-block; position: relative; }
.vlinks > summary { list-style: none; }
.vlinks > summary::-webkit-details-marker { display: none; }
.vlinks .menu-pop { min-width: 200px; right: auto; left: 0; font-weight: normal; }
.chart-hit.has-links { cursor: pointer; }
.link-menu { position: absolute; z-index: 30; min-width: 200px; max-width: min(320px, 100%); padding: 6px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 8px; box-shadow: 0 6px 20px rgb(0 0 0 / .18); font-size: 13px; }
.link-menu p { margin: 2px 8px 4px; color: var(--muted); overflow-wrap: anywhere; }
.gw-links input { width: 100%; min-width: 120px; }
[data-gw-link-sample] { white-space: pre-line; overflow-wrap: anywhere; }
.is-kiosk .rail, .is-kiosk .topbar, .is-kiosk .crumbs, .is-kiosk .dash-headline, .is-kiosk [data-flash] { display: none; }
.is-kiosk .shell { display: block; }
.is-kiosk .content { padding: 10px; max-width: none; }
.kiosk-ctl { position: fixed; right: 14px; bottom: 14px; z-index: 40; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: calc(100vw - 28px);
  padding: 6px 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 6px 20px rgb(0 0 0 / .18); font-size: 13px; transition: opacity .3s; }
.is-idle .kiosk-ctl { opacity: 0; }
.kiosk-stale { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 41; max-width: calc(100vw - 28px); }
.tbl-tools { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 6px 12px 4px; }
.tbl-tools input { flex: 1 1 160px; min-width: 0; padding: 3px 8px; font-size: 13px; }
.graph-table th[data-sort-col] { cursor: pointer; white-space: nowrap; user-select: none; }
.graph-table th[data-sort-col]::after { content: " ↕"; color: var(--muted); font-weight: normal; }
.graph-table th[aria-sort="ascending"]::after { content: " ↑"; color: var(--accent); }
.graph-table th[aria-sort="descending"]::after { content: " ↓"; color: var(--accent); }
.graph-table tfoot td { font-weight: 600; border-top: 2px solid var(--line-strong); }
.tbl-pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; padding: 6px 12px; font-size: 12.5px; }
.tbl-pager select { padding-block: 2px; }
.dash-folder { margin: 0 0 10px; }
.dash-folder > summary { display: flex; gap: 8px; align-items: center; padding: 8px 12px; cursor: pointer; font-weight: 600; }
.dash-folder > summary small { font-weight: normal; }
.dash-tbl { table-layout: fixed; min-width: 640px; }
.dash-tbl .c-w { width: 110px; } .dash-tbl .c-a { width: 240px; } .dash-tbl .c-t { width: 190px; }
.dash-tbl td:first-child { overflow-wrap: anywhere; }
@media (max-width: 600px) { .dash-tbl { min-width: 560px; } .dash-tbl .c-w { width: 80px; } .dash-tbl .c-a, .dash-tbl .c-t { width: 150px; } }
@media (min-width: 900px) { dialog.dash-new { width: min(720px, calc(100vw - 48px)); } }
.dash-new-grid { display: grid; padding-bottom: 4px; }
.dash-new-grid .check { display: flex; margin: 4px 0; }
.adhoc { display: inline-flex; gap: 4px; align-items: center; padding: 2px 4px 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 13px; }
.adhoc button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 4px; }
.data-dlg { width: min(900px, calc(100vw - 24px)); max-height: 88vh; overflow: auto; }
.data-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 8px 0; }
.dash-head .dash-data-btn { margin-left: auto; flex: none; }
.dash-head .dash-mine { margin-left: auto; flex: none; color: var(--accent); } /* v0.98.90: the widths of the user — reset */
.dash-mine:not([hidden]) ~ .dash-data-btn { margin-left: 0; }
.dash-mine svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.data-dlg .gw-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 1; background: var(--surface); padding-bottom: 6px; }
.adhoc-add .menu-pop, .w-copy .menu-pop { right: auto; left: 0; min-width: 0; width: min(300px, calc(100vw - 32px)); }

/* v0.98.56: «точки X–Y» and «линия по X» (a picture of the server) */
.xy { padding: 4px 8px 6px; }
.xy svg { width: 100%; height: auto; display: block; }
.xy-grid { stroke: var(--line); stroke-dasharray: 2 3; }
.xy-axis { stroke: var(--line-strong); }
.xy-tick, .xy-title { font-size: 16px; fill: var(--muted); }
.xy-pt { fill: var(--accent); fill-opacity: .8; }
.xy-pt.st-up { fill: var(--ok); } .xy-pt.st-degraded { fill: var(--warn); } .xy-pt.st-down { fill: var(--bad); }
.xy-pt.has-c { fill: var(--c, var(--accent)); }
.xy-line path { fill: none; stroke: var(--c, var(--accent)); stroke-width: 2; }
.xy-line circle { fill: var(--c, var(--accent)); }
.xy-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; padding: 2px 4px 0; }
@media (max-width: 899px) { .xy svg { min-width: 520px; } }
/* v0.98.57: «карта узлов» */
.geo { display: flex; flex-direction: column; padding: 0 8px 4px; } .geo svg { flex: 1; min-height: 0; width: 100%; display: block; }
.geo-land { fill: var(--surface-2); stroke: var(--line); stroke-width: .3; }
.geo-pt { fill: var(--accent); stroke: var(--surface); stroke-width: .5; } .geo-pt.st-up { fill: var(--ok); } .geo-pt.st-degraded { fill: var(--warn); } .geo-pt.st-down { fill: var(--bad); } .geo-pt.st-unknown { fill: var(--muted); } .geo-pt.has-c { fill: var(--c, var(--accent)); }
.geo-n { fill: #fff; font-weight: 700; pointer-events: none; } .geo-lbl { fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: .25em; }
.geo-off { margin: 2px 4px 0; }

/* v0.98.56: a section of a dashboard — a header the whole width; folded — its widgets hidden */
.dash-w.dash-sec { flex-direction: row; align-items: center; background: none; border: 0; border-bottom: 2px solid var(--line-strong); border-radius: 0; box-shadow: none; overflow: visible; }
.dash-sec-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 4px; min-width: 0; }
.dash-sec-head h2 { font-size: 15px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-sec-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 2px 0; color: inherit; cursor: pointer; min-width: 0; font: inherit; }
.dash-sec-chev { color: var(--muted); transition: transform .15s ease; width: 14px; }
.dash-sec.is-folded .dash-sec-chev { transform: rotate(-90deg); }
.dash-sec-head .muted { font-size: 12.5px; white-space: nowrap; }
@media (max-width: 899px) { .dash-grid > .dash-w.dash-sec { min-height: 0; } }

/* v0.98.56: a schema (a picture of the server; app.js — its editor) */
.schema { padding: 4px 8px 8px; }
.schema svg { width: 100%; height: auto; display: block; }
.sch-item rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.sch-item text { font-size: 14px; fill: var(--ink); }
.sch-item .sch-v { font-size: 12.5px; fill: var(--muted); }
.sch-item.st-up rect { stroke: var(--ok); fill: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.sch-item.st-degraded rect { stroke: var(--warn); fill: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.sch-item.st-down rect { stroke: var(--bad); fill: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.sch-item.has-c rect { stroke: var(--c); }
.sch-item .sch-v.st-degraded { fill: var(--warn); } .sch-item .sch-v.st-down { fill: var(--bad); }
.sch-item.sch-na rect { stroke: var(--line); stroke-dasharray: 4 3; fill: var(--bg); }
.sch-text rect, .sch-value rect { fill: none; stroke: none; }
.sch-box rect { fill: none; stroke: var(--line-strong); stroke-dasharray: 6 4; }
.sch-box text { font-size: 12.5px; fill: var(--muted); }
.lnk line { stroke: var(--line-strong); stroke-width: 3; }
.lnk-up line { stroke: var(--ok); } .lnk-degraded line { stroke: var(--warn); } .lnk-down line { stroke: var(--bad); }
.lnk-na line { stroke: var(--line); stroke-dasharray: 4 4; }
.sch-lt { font-size: 12px; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.sch-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0 8px; }
[data-schema-edit] svg [data-sch-item] { cursor: move; }
[data-schema-edit] svg .is-picked rect { stroke: var(--accent); stroke-width: 2.5; }
.sch-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
@media (max-width: 899px) { .schema svg { min-width: 640px; } }
[data-schema-edit] svg { touch-action: none; }
.lnk .sch-hit { stroke: transparent; stroke-width: 16; cursor: pointer; }
.lnk.is-picked line:first-child { stroke: var(--accent); }

/* v0.98.57: the shared widgets of the library — the mark in the edit mode, «Из библиотеки» of the window of a widget */
.lib-badge { font-size: 11.5px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 7px; color: var(--muted); white-space: nowrap; cursor: pointer; list-style: none; }
.lib-badge::-webkit-details-marker { display: none; }
.wdlg-lib { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.wdlg-lib .field { margin: 0; min-width: 0; flex: 1 1 220px; } .wdlg-lib .hint { flex-basis: 100%; }
/* v0.98.75: «Журналы» — the count by time, the feed of the lines (a row opens its fields) */
.lg-hist { height: 120px; padding: 10px 18px 4px; }
.lg-levels { flex-wrap: wrap; }
.lv-crit { --lv: var(--bad); } .lv-err { --lv: var(--s2); } .lv-warning { --lv: var(--warn); } .lv-info { --lv: var(--info); } .lv-debug { --lv: var(--muted); }
.lg-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lg-head h2 { font-size: 15px; margin: 0; } .lg-head .sp { flex: 1; }
.lg-view { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; } .lg-view select { width: auto; }
.lg-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.lg-live[aria-pressed="true"] i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.lg-feed { font-size: 13.5px; } .lg-feed[aria-busy] { opacity: .6; }
/* v0.98.78: the columns under their heads (.lg-cols); the host and the program as wide as their longest text shown
   (logs.js: --lg-h, --lg-a) */
.lg-cols, .lg-row > summary { display: grid; grid-template-columns: 4px 104px var(--lg-h, 120px) var(--lg-a, 100px) 66px minmax(0, 1fr) auto; gap: 0 12px; padding: 5px 18px 5px 0; }
.lg-row > summary { border-bottom: 1px solid var(--line); align-items: baseline; cursor: pointer; list-style: none; }
.lg-cols { font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.lg-cols span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-row > summary::-webkit-details-marker { display: none; }
.lg-cols.is-host, .lg-feed.is-host .lg-row > summary { grid-template-columns: 4px 104px var(--lg-a, 100px) 66px minmax(0, 1fr) auto; }
@media (max-width: 1200px) {
  .lg-cols, .lg-row > summary { grid-template-columns: 4px 96px min(var(--lg-h, 120px), 180px) min(var(--lg-a, 100px), 120px) 60px minmax(0, 1fr) auto; gap: 0 8px; }
  .lg-cols.is-host, .lg-feed.is-host .lg-row > summary { grid-template-columns: 4px 96px min(var(--lg-a, 100px), 140px) 60px minmax(0, 1fr) auto; }
}
.lg-row > summary:hover, .lg-row[open] > summary { background: var(--surface-2); }
.lg-row.is-here > summary { box-shadow: inset 0 0 0 2px var(--accent); }
.lg-row .bar { align-self: stretch; background: var(--lv); border-radius: 0 2px 2px 0; }
.lg-row .t { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.lg-row .h, .lg-row .a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-row .lv { font-size: 12px; font-weight: 600; color: var(--lv); }
.lg-row .m { white-space: pre; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.lg-feed.is-wrap .lg-row .m { white-space: pre-wrap; overflow-wrap: anywhere; }
.lg-row .m mark { background: var(--warn-soft); color: var(--ink); border-radius: 2px; }
.lg-row .rep { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; }
.lg-fields { padding: 8px 18px 10px 20px; font-size: 12.5px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.lg-fields .fr { display: grid; grid-template-columns: 120px minmax(0, 1fr) max-content; gap: 0 14px; padding: 2px 0; }
.lg-fields b { color: var(--muted); font-weight: 600; overflow-wrap: anywhere; } .lg-fields code { overflow-wrap: anywhere; }
.lg-fields .act { white-space: nowrap; } .lg-fields .act a { margin-left: 10px; }
.lg-fields .acts2 { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.lg-json { margin: 6px 0 0; padding: 8px 10px; max-height: 320px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.lg-more { padding: 12px 18px; }
/* a cell of a dashboard: the time, the host and the text */
.lg-cell { font-size: 12.5px; height: 100%; }
.lg-cell .lg-row > summary { grid-template-columns: 4px 86px minmax(0, 100px) minmax(0, 1fr) auto; gap: 0 8px; padding: 3px 8px 3px 0; }
.lg-cell .lg-row .a, .lg-cell .lg-row .lv { display: none; }
.lg-cell .lg-fields { padding: 6px 8px 8px 12px; } .lg-cell .lg-more { padding: 8px; }
.lg-feed > [data-lg-part] + [data-lg-part] { border-top: 0; }
@media (max-width: 700px) {
  .lg-hist { padding: 8px 10px 2px; }
  .lg-row > summary, .lg-feed.is-host .lg-row > summary { grid-template-columns: 4px minmax(0, 1fr) auto; padding-right: 12px; }
  .lg-cols { display: none; }
  .lg-row .bar { grid-row: 1 / span 3; }
  .lg-row .t { grid-column: 2; grid-row: 1; } .lg-row .lv { grid-column: 3; grid-row: 1; text-align: right; }
  .lg-row .h { grid-column: 2; grid-row: 2; font-weight: 600; } .lg-row .a { grid-column: 3; grid-row: 2; color: var(--muted); text-align: right; max-width: 40vw; }
  .lg-row .m { grid-column: 2 / -1; grid-row: 3; } .lg-row .rep { grid-column: 2; grid-row: 1; justify-self: end; }
  .lg-fields { padding: 8px 12px 10px 14px; } .lg-fields .fr { grid-template-columns: 96px minmax(0, 1fr); } .lg-fields .act { grid-column: 2; }
}
/* v0.98.88: an editor of rows of the wizard behind its line — what is set (cut, all in its hint) and «Изменить…»;
   the table in its window (as wide as the table, the screen at most) */
.gw-fold { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 40px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13.5px; }
.gw-fold-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-fold-text.muted { color: var(--muted); }
.gw-fold .btn { flex: none; }
.gw-fold-dlg { width: min(860px, calc(100vw - 32px)); }
.gw-fold-dlg .gw-fold-body { display: grid; gap: 8px; justify-items: start; padding: 4px 16px 12px; max-height: 70vh; overflow: auto; }
.gw-fold-body > .table-wrap { justify-self: stretch; }
.gw-fold-dlg .gw-fold-body .table-wrap { margin-bottom: 8px; }
.ta-center { text-align: center; } .ta-right { text-align: right; } /* v0.99.14: the alignment of a table of a text (textmd) */
