/* ---------- шрифты (локально, лицензии OFL в /vendor/fonts) ---------- */
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/montserrat-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/montserrat-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/montserrat-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/montserrat-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/montserrat-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/montserrat-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/montserrat-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/montserrat-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Mono'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/fira-mono-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Mono'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/fira-mono-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Mono'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/fira-mono-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

:root {
  --bg: #0b0e11;
  --surface: #13171b;
  --surface-2: #181d22;
  --surface-hover: #1b2126;
  --border: #282e33;
  --border-soft: #1f2428;
  --text: #edf1f3;
  --text-2: #98a4ad;
  --text-3: #6d7881;
  --green: #43d18d;
  --yellow: #efc66d;
  --red: #ff6681;
  --blue: #70b8ef;
  --green-bg: rgba(67, 209, 141, 0.12);
  --yellow-bg: rgba(239, 198, 109, 0.13);
  --red-bg: rgba(255, 102, 129, 0.13);
  --blue-bg: rgba(112, 184, 239, 0.12);
  --radius: 6px;
  --radius-sm: 4px;
  --side-w: 432px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Fira Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 13px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button { font: inherit; color: inherit; }
a { color: var(--blue); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: 11px; }
.dim { color: var(--text-3); }
.ic { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

.t-green { color: var(--green); } .t-yellow { color: var(--yellow); } .t-red { color: var(--red); } .t-blue { color: var(--blue); } .t-muted { color: var(--text-2); }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100vh; }
.side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--bg); }
.main { overflow-y: auto; min-width: 0; padding: 16px 20px 32px; }

.demo-strip { background: var(--blue-bg); color: var(--blue); border-bottom: 1px solid rgba(112,184,239,.25); padding: 6px 14px; font-size: 12px; display: flex; gap: 8px; align-items: center; }

.side-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.brand { font-weight: 700; font-size: 15px; letter-spacing: .01em; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.brand .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.conn-dot.bad { background: var(--red); }
.conn-dot.wait { background: var(--text-3); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--surface); color: var(--text); border-color: var(--border); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.icon-btn.spin .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); overflow: hidden; }
.counter { background: var(--surface); padding: 8px 10px; }
.counter .lbl { color: var(--text-2); font-size: 11px; }
.counter .val { font-family: var(--mono); font-size: 20px; font-weight: 500; line-height: 1.2; }

.mon-state { margin: 10px 14px 8px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 11.5px; color: var(--text-2); }
.mon-state dt { color: var(--text-3); }
.mon-state dd { margin: 0; text-align: right; font-family: var(--mono); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-state dd.warn { color: var(--yellow); }

.list-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 6px; color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border-top: 1px solid var(--border-soft); }
.node-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 12px; overscroll-behavior: contain; }
.group-label { color: var(--text-3); font-size: 11px; padding: 8px 6px 4px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- строки нод (компактный режим) ---------- */
.nrow { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto minmax(74px, max-content); align-items: center; gap: 8px; height: 36px; padding: 0 8px; border-radius: var(--radius-sm); cursor: default; transition: background-color .15s; }
.nrow:hover, .nrow.hl { background: var(--surface); }
.nrow + .nrow { box-shadow: inset 0 1px 0 var(--border-soft); }
.nrow:hover + .nrow, .nrow.hl + .nrow { box-shadow: none; }
.nname { display: flex; align-items: center; gap: 6px; min-width: 0; }
.name-btn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.name-btn:hover { color: var(--blue); }
.badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--border); color: var(--text-2); background: var(--surface-2); white-space: nowrap; flex: none; }
.scan { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 11.5px; color: var(--green); min-width: 52px; justify-content: flex-end; }
.scan .ic { width: 13px; height: 13px; }
.scan.none { color: var(--text-3); }
.users { font-family: var(--mono); font-size: 12.5px; text-align: right; min-width: 44px; }
.users.unknown { color: var(--text-3); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; white-space: nowrap; justify-self: end; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip.green { color: var(--green); } .chip.yellow { color: var(--yellow); } .chip.red { color: var(--red); } .chip.muted { color: var(--text-2); }

.flag { width: 18px; height: 12px; border-radius: 2px; display: inline-block; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.12); background-size: 100% 100%; }
.flag-code { width: auto; min-width: 18px; height: 14px; font-family: var(--mono); font-size: 9.5px; line-height: 14px; text-align: center; padding: 0 2px; color: var(--text-2); background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }

/* ---------- карточки нод (полный режим) ---------- */
.ncard { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; transition: border-color .2s, background-color .2s; }
.ncard.hl { border-color: #3a434a; background: var(--surface-hover); }
.ncard .top { display: flex; align-items: center; gap: 8px; }
.ncard .top .nname { flex: 1; }
.ncard .country { color: var(--text-2); font-size: 11.5px; white-space: nowrap; }
.ncard .users { font-size: 15px; }
.ncard .expl { color: var(--text-2); font-size: 12px; margin: 6px 0 0; }
.ncard .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.ncard .meta b { font-weight: 400; color: var(--text-2); font-family: var(--mono); }
.bars { margin-top: 8px; display: grid; gap: 3px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 52px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-2); }
.bar-row .num { text-align: right; color: var(--text-2); font-size: 11px; }
.thin { height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
.thin > i { display: block; height: 100%; background: var(--text-2); border-radius: 2px; transition: width .35s ease, background-color .35s; }
.thin > i.green { background: var(--green); } .thin > i.yellow { background: var(--yellow); } .thin > i.red { background: var(--red); } .thin > i.muted { background: var(--text-3); } .thin > i.blue { background: var(--blue); }

.hist { margin-top: 8px; }
.hist-bar { display: grid; grid-template-columns: repeat(48, 1fr); gap: 1px; height: 14px; }
.hist-bar > button { border: 0; padding: 0; border-radius: 1px; background: var(--border); cursor: pointer; min-width: 0; }
.hist-bar > button:hover { filter: brightness(1.35); }
.seg-o { background: var(--green) !important; opacity: .85; }
.seg-p { background: var(--green) !important; opacity: .35; }
.seg-w { background: var(--yellow) !important; }
.seg-b, .seg-f { background: var(--red) !important; }
.seg-n { background: var(--border) !important; }
.hist-cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 3px; }

.res { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.res .k { font-size: 10.5px; color: var(--text-3); }
.res .v { font-family: var(--mono); font-size: 12px; color: var(--text-2); }

/* вспышка при смене статуса */
@keyframes flash-green { from { background-color: var(--green-bg); } }
@keyframes flash-yellow { from { background-color: var(--yellow-bg); } }
@keyframes flash-red { from { background-color: var(--red-bg); } }
.flash-green { animation: flash-green 1.2s ease-out; } .flash-yellow { animation: flash-yellow 1.2s ease-out; } .flash-red { animation: flash-red 1.2s ease-out; }

/* ---------- основная область ---------- */
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.topbar h1 { font-size: 18px; font-weight: 600; margin: 0; }
.online-total { display: flex; align-items: baseline; gap: 8px; color: var(--text-2); font-size: 12px; }
.online-total .num { color: var(--text); font-size: 18px; font-weight: 500; display: inline-block; min-width: 6ch; }
.online-total .note { color: var(--text-3); font-size: 11px; }
.spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 6px 12px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed='true'] { background: var(--surface-hover); color: var(--text); }

.section { margin-bottom: 16px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.section-head h2 { font-size: 13px; font-weight: 600; margin: 0; color: var(--text); }
.section-head .count { font-family: var(--mono); color: var(--text-3); font-size: 12px; }
.text-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: var(--radius-sm); padding: 3px 10px; font-size: 11.5px; cursor: pointer; }
.text-btn:hover:not(:disabled) { color: var(--text); border-color: #3a434a; }
.text-btn:disabled { opacity: .45; cursor: not-allowed; }
.text-btn.primary { color: var(--blue); border-color: rgba(112,184,239,.4); }
.text-btn.danger { color: var(--red); }

.panel { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); }
.empty { color: var(--text-3); font-size: 12px; padding: 12px; }

/* инфраструктура */
.infra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.icard { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 10px 12px; min-width: 0; cursor: pointer; text-align: left; display: block; width: 100%; transition: border-color .15s; }
.icard:hover { border-color: #3a434a; }
.icard .top { display: flex; align-items: center; gap: 8px; }
.icard .name { font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icard .type-ic { color: var(--text-2); }
.icard .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.icard .stat .k { font-size: 10.5px; color: var(--text-3); display: flex; justify-content: space-between; }
.icard .stat .v { font-family: var(--mono); font-size: 12px; color: var(--text); }
.icard .stat .thin { margin-top: 3px; }
.icard .extra { margin-top: 8px; font-size: 11.5px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }
.icard .extra .num { color: var(--text); }
.icard .nodata { margin-top: 10px; font-size: 11.5px; color: var(--text-3); }
.mode-compact .infra-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.mode-compact .icard { padding: 7px 10px; }

/* карта */
.map-wrap { position: relative; height: 380px; overflow: hidden; }
.map-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-grid line { stroke: var(--border-soft); stroke-width: 1; }
.map-route { fill: none; stroke: var(--blue); stroke-opacity: .28; stroke-width: 1.2; transition: stroke-opacity .2s; }
.map-route.red { stroke: var(--red); } .map-route.yellow { stroke: var(--yellow); }
.map.dim .map-route { stroke-opacity: .07; }
.map.dim .map-route.on { stroke-opacity: .75; stroke-width: 1.6; }
.map-particle { fill: var(--blue); opacity: .9; }
.map.dim .map-particle { opacity: .12; }
.map.dim .map-particle.on { opacity: 1; }
.map-dot { cursor: pointer; }
.map-dot circle.core { stroke: var(--bg); stroke-width: 2; }
.map-dot circle.halo { opacity: .18; }
.map-label rect { fill: rgba(11,14,17,.88); stroke: var(--border); stroke-width: 1; rx: 3; }
.map-label text { fill: var(--text); font-size: 11px; font-weight: 500; font-family: var(--font); }
.map-leader { stroke: var(--text-3); stroke-width: 1; }
.map-label text .cnt { fill: var(--text-2); font-family: var(--mono); }
.map-label { cursor: pointer; }
.map.dim .map-label:not(.on), .map.dim .map-dot:not(.on) { opacity: .45; }
.map-legend rect.box { fill: rgba(19,23,27,.92); stroke: var(--border); }
.map-legend text { fill: var(--text-2); font-size: 10.5px; font-family: var(--font); }
.map-legend text.h { fill: var(--text-3); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.map-note { position: absolute; left: 10px; bottom: 6px; font-size: 10.5px; color: var(--text-3); pointer-events: none; }
.mode-compact .map-section { display: none; }
.map-hidden .map-wrap { display: none; }

/* требуют внимания */
.att-list { display: grid; gap: 1px; background: var(--border-soft); }
.att { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); }
.att .nm { font-weight: 500; }
.att .tx { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att .since { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.att-list > :first-child { border-radius: var(--radius) var(--radius) 0 0; }
.att-list > :last-child { border-radius: 0 0 var(--radius) var(--radius); }

/* журнал */
.journal { padding: 4px 0; }
.day-sep { font-size: 11px; color: var(--text-3); padding: 8px 14px 4px; text-transform: uppercase; letter-spacing: .06em; }
.ev { display: grid; grid-template-columns: 54px 18px minmax(0, 1fr); gap: 10px; padding: 7px 14px; font-size: 13px; transition: background-color .15s, transform .15s; transform-origin: left center; position: relative; }
.ev:hover { background: var(--surface-hover); transform: scale(1.008); z-index: 1; }
.ev .tm { font-family: var(--mono); color: var(--text-2); font-size: 12px; padding-top: 1px; }
.ev .ic { margin-top: 1px; }
.ev .main-line { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.ev .ttl { font-weight: 600; }
.ev .who { color: var(--text); }
.ev .sub { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.ev .sub .ok { color: var(--green); }
.ev.crit { box-shadow: inset 2px 0 0 var(--red); }
.ev.crit .ttl { color: var(--red); }
.ev.crit.recovered { box-shadow: inset 2px 0 0 var(--green); }
.ev.crit.recovered .ttl { color: var(--text); }
.ev.warn .ttl { color: var(--yellow); }
.ev.fresh { animation: fresh 2s ease-out; }
@keyframes fresh { from { background-color: var(--blue-bg); } }
.more-row { padding: 6px 14px 8px; }

/* ---------- модальные окна ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5,7,9,.62); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 50; animation: fade .12s ease-out; overflow-y: auto; }
.modal { width: min(720px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: rise .16s ease-out; }
.modal.wide { width: min(940px, 100%); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.modal-body { padding: 12px 16px 16px; }
.msec { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.msec:last-child { border-bottom: 0; }
.msec h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.kv { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 5px 12px; font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.copy { display: inline-flex; align-items: center; gap: 6px; }
.copy .icon-btn { width: 24px; height: 24px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; color: var(--text-3); font-weight: 500; padding: 5px 8px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 5px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.tbl td.num { font-family: var(--mono); }
.scroll-x { overflow-x: auto; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.input, select.input { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 6px 9px; font: inherit; font-size: 12.5px; min-width: 0; }
.input:focus { border-color: var(--blue); outline: none; }
.msg { font-size: 12px; margin-top: 6px; }
.msg.err { color: var(--red); } .msg.ok { color: var(--green); }
.popover { position: absolute; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.45); padding: 10px 12px; min-width: 260px; max-width: 360px; font-size: 12px; animation: rise .14s ease-out; }
.popover h5 { margin: 0 0 6px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.popover .pn { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; padding: 5px 0; border-top: 1px solid var(--border-soft); }
.popover .pn .m { color: var(--text-3); font-size: 11px; grid-column: 1 / -1; font-family: var(--mono); }

/* ---------- вход ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login { width: min(360px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 22px; }
.login h1 { font-size: 17px; margin: 0 0 16px; }
.login label { display: block; font-size: 12px; color: var(--text-2); margin: 10px 0 4px; }
.login .input { width: 100%; padding: 9px 10px; font-size: 14px; }
.login .check { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--text-2); font-size: 12.5px; }
.login button.submit { width: 100%; margin-top: 6px; padding: 9px; border-radius: var(--radius-sm); border: 1px solid rgba(112,184,239,.45); background: var(--blue-bg); color: var(--blue); font-weight: 600; cursor: pointer; }
.login button.submit:disabled { opacity: .5; cursor: wait; }

/* ---------- скелет загрузки ---------- */
.skel { height: 36px; margin: 2px 0; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface) 0, var(--surface-hover) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- адаптивность ---------- */
@media (max-width: 1100px) { :root { --side-w: 400px; } }
@media (max-width: 860px) {
  .app { display: block; height: auto; }
  .side { border-right: 0; border-bottom: 1px solid var(--border); }
  .node-list { max-height: none; overflow: visible; }
  .main { overflow: visible; padding: 14px 16px 28px; }
  .map-wrap { height: 300px; }
  .kv { grid-template-columns: 1fr; gap: 1px; }
  .kv dt { margin-top: 6px; }
  .res { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .nrow { grid-template-columns: 20px minmax(0, 1fr) auto auto minmax(64px, max-content); gap: 6px; padding: 0 4px; }
  .scan { min-width: 0; }
  .icard .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar { gap: 10px; }
  .ev { grid-template-columns: 44px 16px minmax(0, 1fr); gap: 8px; padding: 7px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .ev:hover { transform: none; }
}
