/* Консоль TidalLink: сайдбар приложения и рабочая область; цифры, адреса и журнал моноширинные, журнал всегда на тёмной панели. */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --t-bg: #0d0f12; --t-head: #15181c; --t-line: rgba(255,255,255,.08); --t-ink: #dde1e6; --t-dim: #8b93a0;
  --t-paths: #ffb340; --t-sess: #6cb2ff; --t-caps: #c9a6ff; --t-modes: #5fd3c4; --t-hint: #7fd88f; --t-admin: #ff9db0;
  --bg: #0c0c0e; --side: #161618; --card: #1c1c1e; --card2: #2a2a2d; --pop: #2c2c2e; --hover: rgba(255,255,255,.045);
  --ink: #f5f5f7; --ink2: #c7c7cc; --ink3: #9b9ba2; --line: rgba(255,255,255,.1); --line2: rgba(255,255,255,.06);
  --accent: #0a84ff; --accent-ink: #6cb2ff; --accent-soft: rgba(10,132,255,.2); --btn: #0071e3; --danger: #d92d20; --seg-on: #48484c;
  --ok: #4cd964; --ok-dot: #30d158; --ok-bg: rgba(48,209,88,.16);
  --warn: #ffc15c; --warn-dot: #ffb340; --warn-bg: rgba(255,179,64,.17);
  --ser: #ff9a66; --ser-bg: rgba(255,122,50,.18);
  --down: #ff7b72; --down-dot: #ff453a; --down-bg: rgba(255,69,58,.16);
  --neu: #c7c7cc; --neu-bg: rgba(142,142,152,.2);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #7c7c84;
  --dir-down: #3987e5; --dir-up: #d95926;
  --shadow: 0 1px 1px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.34); --shadow2: 0 2px 8px rgba(0,0,0,.4), 0 22px 56px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f5f7; --side: #ececf0; --card: #ffffff; --card2: #f5f5f7; --pop: #ffffff; --hover: rgba(0,0,0,.035);
  --ink: #1d1d1f; --ink2: #4d4d52; --ink3: #6a6a70; --line: rgba(0,0,0,.09); --line2: rgba(0,0,0,.055);
  --accent: #0071e3; --accent-ink: #0060c0; --accent-soft: rgba(0,113,227,.11); --btn: #0071e3; --danger: #d70015; --seg-on: #ffffff;
  --ok: #1a7f37; --ok-dot: #30b158; --ok-bg: rgba(52,199,89,.15);
  --warn: #8a5300; --warn-dot: #f5a300; --warn-bg: rgba(255,159,10,.18);
  --ser: #b23c00; --ser-bg: rgba(255,105,20,.14);
  --down: #c8102e; --down-dot: #ff3b30; --down-bg: rgba(255,59,48,.1);
  --neu: #4d4d52; --neu-bg: rgba(118,118,128,.13);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #9a9aa2;
  --dir-down: #2a78d6; --dir-up: #eb6834;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px rgba(0,0,0,.05); --shadow2: 0 2px 6px rgba(0,0,0,.08), 0 18px 48px rgba(0,0,0,.16);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #f5f5f7; --side: #ececf0; --card: #ffffff; --card2: #f5f5f7; --pop: #ffffff; --hover: rgba(0,0,0,.035);
    --ink: #1d1d1f; --ink2: #4d4d52; --ink3: #6a6a70; --line: rgba(0,0,0,.09); --line2: rgba(0,0,0,.055);
    --accent: #0071e3; --accent-ink: #0060c0; --accent-soft: rgba(0,113,227,.11); --btn: #0071e3; --danger: #d70015; --seg-on: #ffffff;
    --ok: #1a7f37; --ok-dot: #30b158; --ok-bg: rgba(52,199,89,.15);
    --warn: #8a5300; --warn-dot: #f5a300; --warn-bg: rgba(255,159,10,.18);
    --ser: #b23c00; --ser-bg: rgba(255,105,20,.14);
    --down: #c8102e; --down-dot: #ff3b30; --down-bg: rgba(255,59,48,.1);
    --neu: #4d4d52; --neu-bg: rgba(118,118,128,.13);
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #9a9aa2;
    --dir-down: #2a78d6; --dir-up: #eb6834;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px rgba(0,0,0,.05); --shadow2: 0 2px 6px rgba(0,0,0,.08), 0 18px 48px rgba(0,0,0,.16);
    color-scheme: light;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
:where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(button):disabled { cursor: default; }
:where(a) { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.022em; text-wrap: balance; }
h2 { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: -.008em; }

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 248px; max-width: 100%; background: var(--side); border-right: 1px solid var(--line); padding-block: 18px; padding-inline: max(14px, env(safe-area-inset-left, 0px)) 14px; display: flex; flex-direction: column; gap: 20px; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; color: var(--accent-ink); }
.brand-n { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.012em; }
.brand-s { font-size: 12px; color: var(--ink3); overflow-wrap: anywhere; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-i { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; text-align: left; color: var(--ink2); font-weight: 500; }
.nav-i:hover { background: var(--hover); }
.nav-i.on { background: var(--accent-soft); color: var(--accent-ink); }
.nav-i svg { flex: none; }
.side-cap { display: flex; justify-content: space-between; padding: 0 10px 6px; font-size: 12px; font-weight: 500; color: var(--ink3); }
.side-list { display: flex; flex-direction: column; gap: 2px; }
.cl-i { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border-radius: 8px; text-align: left; }
.cl-i:hover { background: var(--hover); }
.cl-i.on { background: var(--accent-soft); }
.cl-n { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-m { font-size: 12px; color: var(--ink3); }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ink3); }
.dot-ok { background: var(--ok-dot); }
.dot-warn { background: var(--warn-dot); }
.dot-down { background: transparent; box-shadow: inset 0 0 0 2px var(--down-dot); }
.side-foot { padding: 12px 10px 2px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink3); display: flex; flex-direction: column; gap: 2px; }
.side-out { align-self: flex-start; margin-top: 6px; font-size: 12px; color: var(--accent-ink); }
.side-out:hover { text-decoration: underline; }

.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-block: 14px; padding-inline: 32px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.crumb { font-size: 13px; color: var(--ink3); border-radius: 6px; padding: 2px 4px; }
.crumb:hover { color: var(--ink); }
.crumb.cur { color: var(--ink); font-weight: 500; }
.crumb-sep { color: var(--ink3); font-size: 13px; }
.bar-r { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink3); white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-dot); animation: tl-pulse 2s ease-in-out infinite; }
.live-dot.off { background: var(--down-dot); animation: none; }
@keyframes tl-pulse { 50% { opacity: .35; } }

.page { display: flex; flex-direction: column; gap: 20px; padding-block: 6px 56px; padding-inline: 32px; min-width: 0; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.head-t { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sub { margin-top: 4px; color: var(--ink3); font-size: 13px; }
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.card-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 18px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.stat-l { font-size: 12.5px; font-weight: 500; color: var(--ink3); }
.stat-v { font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -.03em; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 7px; }
.stat-u { font-size: 13px; color: var(--ink3); font-weight: 400; letter-spacing: -.01em; }
.stat-n { font-size: 12.5px; color: var(--ink3); min-height: 18px; }
.stat-s { display: block; width: 100%; height: 26px; margin-top: 6px; overflow: visible; }
.ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ln-t { stroke-width: 1.5; }
.gl { stroke: var(--line2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.thr { stroke: var(--down-dot); stroke-width: 1; vector-effect: non-scaling-stroke; }
.area { stroke: none; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border-radius: 9px; background: var(--neu-bg); max-width: 100%; }
.seg-b { height: 28px; padding: 0 11px; border-radius: 7px; font-size: 13px; color: var(--ink2); white-space: nowrap; }
.seg-b:hover { color: var(--ink); }
.seg-b.on { background: var(--seg-on); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.seg-b:disabled { opacity: .45; }
.inp { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); color: var(--ink); font: inherit; font-size: 13px; min-width: 0; }
.inp::placeholder { color: var(--ink3); }
.btn { height: 32px; padding: 0 13px; border-radius: 8px; font-weight: 500; font-size: 13px; background: var(--neu-bg); color: var(--ink); white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; filter: none; }
.btn-p { background: var(--btn); color: #fff; }
.btn-d { background: var(--danger); color: #fff; }
.sw { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--neu-bg); transition: background .18s; }
.sw.on { background: var(--ok-dot); }
.sw:disabled { opacity: .45; }
.sw-k { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.28); transition: transform .18s; }
.sw.on .sw-k { transform: translateX(16px); }

.scroll { overflow-x: auto; min-width: 0; margin-inline: -20px; padding-inline: 20px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: 12px; font-weight: 500; color: var(--ink3); text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.row { cursor: pointer; }
.row:hover td { background: var(--hover); }
.link-b { font-weight: 600; text-align: left; }
.link-b:hover { color: var(--accent-ink); }
.t2 { font-size: 12px; color: var(--ink3); white-space: nowrap; }
.nw { white-space: nowrap; }
.v { font-family: var(--mono); font-size: 13.5px; letter-spacing: -.015em; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 7px; border-radius: 999px; font: 500 11px var(--mono); letter-spacing: .01em; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.s-up { background: var(--ok-bg); color: var(--ok); }
.s-warn { background: var(--warn-bg); color: var(--warn); }
.s-ser { background: var(--ser-bg); color: var(--ser); }
.s-neu { background: var(--neu-bg); color: var(--neu); }
.s-pulse i { animation: tl-pulse 1.1s ease-in-out infinite; }
.s-cap { background: var(--neu-bg); color: var(--neu); }
.s-cap i { border-radius: 2px; }
.s-down { background: var(--down-bg); color: var(--down); }
.s-down i { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.s-off { background: transparent; color: var(--ink2); box-shadow: inset 0 0 0 1px var(--ink3); }
.s-off i { height: 2px; border-radius: 1px; }
.tp { display: inline-block; font: 500 11px var(--mono); padding: 2px 7px; border-radius: 6px; background: var(--neu-bg); color: var(--ink2); white-space: nowrap; }
.tp-h3 { background: var(--accent-soft); color: var(--accent-ink); }
.tp-h2 { background: var(--ser-bg); color: var(--ser); }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px 28px; align-items: start; }
.wire { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.wire-n { padding: 6px 10px; border-radius: 8px; background: var(--card2); font-size: 12.5px; font-weight: 500; }
.wire-l { position: relative; min-height: 28px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wire-l::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; margin-top: -1px; border-top: 2px solid var(--ink3); }
.wire-h3 .wire-l::before { border-color: var(--accent); }
.wire-h2 .wire-l::before { border-color: var(--ser); }
.wire-sw .wire-l::before { border-top-style: dashed; }
.wire-off .wire-l::before { border-top-style: dashed; border-color: var(--down-dot); }
.wire-f { position: absolute; inset: 0; pointer-events: none; }
.wire-f i { position: absolute; right: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--ink2); }
.wire-t { position: relative; padding: 2px 8px; border-radius: 6px; background: var(--card); font-size: 11.5px; color: var(--ink2); text-align: center; overflow-wrap: anywhere; }
.wire-s { text-align: center; }
.tr-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-step { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12px; color: var(--ink3); background: var(--neu-bg); }
.tr-step i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .45; }
.tr-step.on { color: var(--warn); background: var(--warn-bg); }
.tr-step.ok { color: var(--ok); background: var(--ok-bg); }
.tr-step.bad { color: var(--down); background: var(--down-bg); }
.tr-step.on i, .tr-step.ok i, .tr-step.bad i { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .wire-f { animation: wire-flow 1.6s linear infinite; }
  .tr-step.on i { animation: tr-pulse 1s ease-in-out infinite; }
}
@keyframes wire-flow { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes tr-pulse { 50% { opacity: .35; } }
.cells { display: grid; grid-template-columns: repeat(8, 24px); gap: 3px; width: max-content; }
.cell { width: 24px; height: 24px; border-radius: 6px; font: 500 10.5px/24px var(--mono); text-align: center; }
.cell:hover { filter: brightness(1.12); }
.cell.s-down { box-shadow: inset 0 0 0 1.5px var(--down-dot); background: transparent; }
.cell.s-off { box-shadow: none; outline: 1px dashed var(--ink3); outline-offset: -1px; background: transparent; }
.spk { display: block; width: 88px; height: 26px; overflow: visible; }
.spk-r { margin-left: auto; }
.ev-cell { max-width: 240px; min-width: 130px; font-size: 12.5px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mode { display: inline-block; font-size: 12.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--neu-bg); color: var(--ink2); white-space: nowrap; }
.mode.act { background: var(--accent-soft); color: var(--accent-ink); }
.swatch { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; }
.ch-n { display: inline-flex; align-items: center; gap: 8px; }
.meter { height: 4px; border-radius: 2px; background: var(--neu-bg); overflow: hidden; margin-top: 4px; }
.meter span { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.meter.m-warn span { background: var(--warn-dot); }
.meter.m-over span { background: var(--down-dot); }
.use { min-width: 124px; }
.empty { padding: 24px; text-align: center; color: var(--ink3); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 20px; align-items: stretch; }
.grid-m { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; align-items: stretch; }
.chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: var(--ch, 200px) auto; row-gap: 6px; }
.yaxis { position: relative; }
.yl { position: absolute; right: 8px; font-size: 11px; color: var(--ink3); transform: translateY(-50%); white-space: nowrap; }
.plot { position: relative; min-width: 0; touch-action: pan-y; }
.plot-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot-e { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: var(--ink3); }
.xaxis { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--ink3); }
.edot { position: absolute; right: -5px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--card); transform: translateY(-50%); pointer-events: none; }
.cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink3); pointer-events: none; }
.tip { position: absolute; top: 6px; z-index: 5; width: max-content; max-width: 240px; background: var(--pop); border-radius: 10px; padding: 8px 11px; box-shadow: var(--shadow2); pointer-events: none; display: flex; flex-direction: column; gap: 3px; }
.tip-right { transform: translateX(12px); }
.tip-left { transform: translateX(calc(-100% - 12px)); }
.tip-t { font-size: 11px; color: var(--ink3); }
.tip-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink2); }
.tip-row b { font-weight: 500; color: var(--ink); min-width: 46px; text-align: right; }
.key { flex: none; width: 12px; height: 2px; border-radius: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.share-w { display: flex; flex-direction: column; gap: 10px; }
.share-t { font-size: 12.5px; font-weight: 500; color: var(--ink3); }
.share { display: flex; gap: 2px; height: 10px; }
.share span { display: block; min-width: 2px; border-radius: 2px; }

.ctl { display: flex; flex-direction: column; gap: 8px; }
.ctl-l { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; font-weight: 500; color: var(--ink3); }
.ctl-d { font-size: 12.5px; color: var(--ink2); }
.hr { height: 1px; background: var(--line); }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sw-row > span:first-child { min-width: 0; }
.sw-t { font-size: 13.5px; font-weight: 500; }
.sw-s { display: block; font-size: 12px; color: var(--ink3); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { height: 26px; padding: 0 9px; border-radius: 7px; font: 500 12px var(--mono); background: var(--neu-bg); color: var(--ink2); }
.chip.on { background: var(--btn); color: #fff; }
.chip:disabled { opacity: .4; }
.chan-tab { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; font: 500 12.5px var(--mono); color: var(--ink2); }
.chan-tab:hover { background: var(--hover); }
.chan-tab.on { background: var(--accent-soft); color: var(--accent-ink); }
.note { padding: 11px 14px; border-radius: 12px; font-size: 13.5px; }
.note-warn { background: var(--warn-bg); color: var(--warn); }
.note-ser { background: var(--ser-bg); color: var(--ser); }
.note-down { background: var(--down-bg); color: var(--down); }
.note-neu { background: var(--neu-bg); color: var(--ink2); }
.note-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.note-act .btn { height: 28px; background: var(--card); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 16px; font-size: 13px; align-items: center; }
.kv > span:nth-child(odd) { color: var(--ink3); min-width: 0; }
.kv > span:nth-child(even) { font-family: var(--mono); font-size: 13px; text-align: right; letter-spacing: -.015em; overflow-wrap: anywhere; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 110px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--ink3); }
.field .inp { width: 100%; font-family: var(--mono); }
.fields { display: flex; flex-wrap: wrap; gap: 10px; }
/* Окно — колонка: основа 110px у .field там читается как высота и раздвигает поля. */
.dlg > .field { flex: none; }
.dlg > .fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.inp.bad { border-color: var(--down); }
/* Сайт и сертификат (§4.4) */
.web-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; font-size: 13px; align-items: baseline; }
.web-l { color: var(--ink3); }
.web-v { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.web-cert { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.web-warn { color: var(--warn); }
.btn-s { height: 26px; padding: 0 10px; font-size: 12px; }
.dlg-w { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.inp-file { font: inherit; font-size: 13px; color: var(--ink2); max-width: 100%; }
@media (max-width: 640px) { .web-kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .web-kv .web-v { margin-bottom: 10px; } }
.field .inp.plain { font-family: inherit; }
.field-h { font-size: 12px; color: var(--ink3); min-height: 0; }
.field-h:empty { display: none; }
.field-h.bad { color: var(--down); }
.fw-prev { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 9px 12px; border-radius: 10px; background: var(--neu-bg); font-family: var(--mono); font-size: 12.5px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.fw-prev b { font-weight: 600; }
.fw-ar { color: var(--ink3); }
.range { width: 100%; accent-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.term { background: var(--t-bg); color: var(--t-ink); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow), inset 0 0 0 1px var(--t-line); font-family: var(--mono); font-size: 12px; line-height: 1.5; min-width: 0; display: flex; flex-direction: column; }
.term-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 16px; background: var(--t-head); border-bottom: 1px solid var(--t-line); color: var(--t-dim); }
.term-h b { color: var(--t-ink); font-weight: 500; }
.term-b { overflow-y: auto; padding: 8px 16px 12px; max-height: 340px; }
.term-b.tall { max-height: 620px; min-height: 420px; }
.term-l { display: grid; grid-template-columns: 62px 108px minmax(0, 1fr); gap: 0 10px; padding: 2px 0; }
.term-l.wide { grid-template-columns: 62px 88px 140px minmax(0, 1fr); }
.term-e { color: var(--t-dim); }
.t-time { color: var(--t-dim); }
.t-kind { white-space: nowrap; overflow: hidden; }
.t-src { color: var(--t-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.t-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--t-dim); }
.t-msg { min-width: 0; overflow-wrap: anywhere; }
.k-paths { color: var(--t-paths); } .k-sess { color: var(--t-sess); } .k-caps { color: var(--t-caps); } .k-modes { color: var(--t-modes); } .k-hint { color: var(--t-hint); } .k-admin { color: var(--t-admin); }
.b-paths { background: var(--t-paths); } .b-sess { background: var(--t-sess); } .b-caps { background: var(--t-caps); } .b-modes { background: var(--t-modes); } .b-hint { background: var(--t-hint); } .b-admin { background: var(--t-admin); }

.scrim { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dlg { width: 100%; max-width: 400px; background: var(--pop); border-radius: 18px; box-shadow: var(--shadow2); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.dlg-t { font-size: 17px; font-weight: 600; letter-spacing: -.012em; }
.dlg-b { font-size: 13.5px; color: var(--ink2); }
.dlg-a { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 12px; background: var(--pop); box-shadow: var(--shadow2); font-size: 13.5px; }
.toast-b { font-weight: 600; color: var(--accent-ink); white-space: nowrap; }

dialog#login { border: 0; border-radius: 18px; padding: 22px; max-width: 400px; width: calc(100% - 32px); background: var(--pop); color: var(--ink); box-shadow: var(--shadow2); }
dialog#login::backdrop { background: rgba(0,0,0,.55); }
#login-form { display: flex; flex-direction: column; gap: 10px; }
#login-form .inp { height: 40px; }
.chk { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; cursor: pointer; }
.chk[hidden] { display: none; }
.chk input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.chk-s { display: block; margin-top: 2px; font-size: 12px; color: var(--ink3); }

@media (max-width: 1180px) { .grid-m { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .side { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); gap: 12px; padding-inline: 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-i { width: auto; }
  .side-list { flex-direction: row; flex-wrap: wrap; }
  .cl-i { width: auto; }
  .side-foot { display: none; }
  .bar, .page { padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
  h1 { font-size: 26px; }
  .term-l.wide { grid-template-columns: 62px minmax(0, 1fr); }
  .term-l.wide .t-kind, .term-l.wide .t-src { display: none; }
}
@media (pointer: coarse) {
  .seg-b, .btn, .nav-i, .cl-i, .chan-tab, .chip { min-height: 40px; }
  .inp { height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Устройства площадки и встроенный браузер (§13.6) */
.web-open { display: inline-flex; align-items: center; gap: 6px; }
.web-open .inp { width: min(320px, 60vw); font-family: var(--mono); font-size: 12.5px; }
.gw { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; }
.gw-i { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: var(--card2); }
.gw-i .btn { height: 26px; padding: 0 9px; font-size: 12px; }
/* Веб-интерфейс устройства — панель справа поверх страницы площадки (09.11.2026); на телефоне — во весь экран */
.webp { position: fixed; top: 0; right: 0; bottom: 0; z-index: 55; width: min(64vw, 1100px); display: flex; flex-direction: column; gap: 8px; padding: 12px 14px max(12px, env(safe-area-inset-bottom, 0px)); background: var(--card); border-left: 1px solid var(--line); box-shadow: var(--shadow2); animation: webp-in .22s cubic-bezier(.2,.8,.2,1); }
.webp-full { width: 100vw; border-left: 0; }
@keyframes webp-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.with-web .main { padding-right: 0; }
.web-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.web-nav, .web-tools { display: inline-flex; gap: 6px; flex: none; }
.web-nav .btn, .web-tools .btn { width: 34px; padding: 0; justify-content: center; display: inline-flex; align-items: center; }
.web-addr { flex: 1 1 220px; font-family: var(--mono); font-size: 12.5px; min-width: 0; }
.web-pick { flex: 0 1 280px; min-width: 0; }
.web-sub { white-space: normal; }
.webf { flex: 1 1 auto; width: 100%; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.web-err { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 24px; border: 1px dashed var(--line); border-radius: 10px; }
.web-err-t { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.web-err .t2 { white-space: normal; max-width: 60ch; }
@media (max-width: 1180px) { .webp { width: min(84vw, 1100px); } }
@media (max-width: 860px) {
  .webp { width: 100vw; border-left: 0; padding-top: max(10px, env(safe-area-inset-top, 0px)); }
  .web-pick { flex-basis: 100%; }
}
.web-act { display: inline-flex; gap: 6px; align-items: center; }
.sel { max-width: 240px; }
/* Порты и устройства площадки: строка — значок, название, состояние, бегущий трафик, управление. */
.ico { flex: none; display: block; }
.gh { font-size: 12px; font-weight: 500; color: var(--ink3); margin: 14px 0 6px; }
.gh:first-child { margin-top: 0; }
.pr, .dr { display: grid; gap: 8px 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line2); }
.pr { grid-template-columns: minmax(0, 1fr) 168px 240px; }
.dr { grid-template-columns: minmax(0, 1fr) 150px 92px 190px 70px; }
.pl > .dr:first-child { border-top: 0; padding-top: 0; }
.pl > .pr:last-child, .pl > .dr:last-child { padding-bottom: 0; }
.pr-m { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pr-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pi { position: relative; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--card2); color: var(--ink2); display: flex; align-items: center; justify-content: center; }
.pi-dot { position: absolute; right: -2px; bottom: -2px; box-sizing: border-box; width: 11px; height: 11px; border-radius: 50%; background: var(--ink3); border: 2px solid var(--card); }
.pi-dot.on { background: var(--ok-dot); }
.nl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pn { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.pn-no { font-weight: 400; color: var(--ink3); }
.eb { flex: none; width: 24px; height: 24px; margin: -2px -4px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink3); }
.eb:hover { background: var(--hover); color: var(--ink); }
.ps { font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt { font-size: 12.5px; color: var(--ink2); max-width: 560px; margin-top: 2px; }
.pr-off .pi { color: var(--ink3); }
.pr-off .pn { color: var(--ink2); }
.rt { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rt-s { flex: none; width: 80px; height: 26px; overflow: visible; }
.dr .rt-s { width: 64px; }
.rt-v { font-size: 12px; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rt-d { color: var(--dir-down); }
.rt-u { color: var(--dir-up); }
.rt-no, .dv { color: var(--ink3); }
.rt-no { font-size: 12px; }
.pr-r { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.pr-r .sel, .dr-s .sel { width: 100%; max-width: none; }
.dr-s { min-width: 0; }
.dr-a { justify-content: flex-end; }
.lb { font-size: 12px; font-weight: 500; color: var(--accent-ink); }
.lb:hover { text-decoration: underline; }
.lb:disabled { opacity: .45; text-decoration: none; }
.btn.ab { width: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.dh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.dsearch { width: 190px; }
@media (max-width: 1180px) {
  .dr { grid-template-columns: minmax(0, 1fr) 150px 170px 70px; }
  .dv { display: none; }
}

/* Каналы карточками (09.11.2026): сетка карточек вместо таблицы на экране площадки; таблица — по выбору.
   Все карточки ряда одной высоты (grid-auto-rows: 1fr), один и тот же порядок блоков, низ прижат. */
.card-flat { background: transparent; box-shadow: none; padding: 0; gap: 12px; }
.chc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 14px; }
.chc { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); box-shadow: var(--shadow); min-width: 0; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.chc::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--chc, var(--line)); }
.chc:hover { transform: translateY(-1px); box-shadow: var(--shadow2); border-color: var(--line); }
.chc:active { transform: none; }
.chc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chc-off { opacity: .72; }
.chc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
.chc-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chc-t .swatch { background: var(--chc); }
.chc-n { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.chc-n:hover { text-decoration: underline; }
.chc-k { font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chc-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chc-num { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chc-l { font-size: 11.5px; font-weight: 500; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chc-v { font-size: 24px; line-height: 1.15; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chc-v small { font-size: 12px; color: var(--ink3); font-weight: 400; letter-spacing: 0; }
.chc-spk { display: block; width: 100%; height: 30px; overflow: visible; }
.chc-share { display: flex; align-items: center; gap: 10px; }
.chc-share .meter { flex: 1; margin: 0; height: 5px; }
.chc-cap { margin: -4px 0 0; }
.chc-f { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 4px; border-top: 1px solid var(--line2); }
.chc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 12px; color: var(--ink3); line-height: 1.45; min-width: 0; }
.chc-meta .m { display: inline-flex; align-items: center; white-space: nowrap; }
.chc-meta .m + .m::before { content: "·"; margin: 0 6px; color: var(--ink3); }
.chc-meta .tp { height: 20px; }
.chc-note { flex-basis: 100%; color: var(--warn); }
.chip-i { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--neu-bg); color: var(--ink2); font-size: 11.5px; white-space: nowrap; }

/* Скорость туннеля (§13.8) */
.st-row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-end; margin-bottom: 14px; }
.st-big { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.st-v { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.st-when { font-size: 15px; font-weight: 500; line-height: 1.6; }
.st-spark { flex: 1 1 180px; min-width: 140px; height: 40px; }
.st-spark svg { display: block; width: 100%; height: 40px; overflow: visible; }
.st-prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 4px 0 8px; }
.st-prog span { display: block; height: 100%; background: var(--acc, var(--ok)); transition: width .6s linear; }
.st-hist { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.st-h { font-size: 12.5px; color: var(--ink2); }
.st-l { display: none; }
@media (max-width: 640px) { .st-v { font-size: 24px; } .st-big { min-width: 44%; } }

/* Защита звонков и интерактива (§8.1) в карточке режима */
.prots { display: flex; flex-direction: column; gap: 12px; }
.prot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prot-t, .prot-v { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prot-v { align-items: flex-end; text-align: right; }
.prot-v .t2, .prot-t .t2 { white-space: normal; }
.prot-n { font-size: 13.5px; font-weight: 500; }
.prot-s { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.prot-s i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink3); }
.prot-s.on { color: var(--ok); }
.prot-s.on i { background: var(--ok-dot); }

/* Сотовая сеть модема (§13.7): шкала сигнала и поколение сети */
.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; width: 22px; flex: none; vertical-align: middle; }
.sig i { flex: 1; border-radius: 1.5px; background: var(--neu-bg); min-height: 3px; }
.sig i.on { background: var(--ok-dot); }
.sig-2 i.on { background: var(--warn-dot); }
.sig-1 i.on { background: var(--down-dot); }
.sig-0 i.on { background: var(--ink3); }
.sig-big { height: 44px; width: 64px; gap: 5px; }
.sig-big i { border-radius: 3px; }
.net { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font: 600 11px var(--mono); letter-spacing: .02em; background: var(--neu-bg); color: var(--ink2); }
.net-lte, .net-5g { background: var(--ok-bg); color: var(--ok); }
.net-3g { background: var(--warn-bg); color: var(--warn); }
.net-2g, .net-0 { background: var(--down-bg); color: var(--down); }
.cell-line { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.cell-op { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cell-w { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font: 700 12px var(--mono); flex: none; }
.cell-hero { display: flex; align-items: center; gap: 18px; }
.cell-hero-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cell-op-big { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.cell-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.cell-grid { gap: 16px 28px; }
.cell-grid .kv { align-content: start; }
.cell-ctl { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* Мобильный режим: сайдбар — выдвижная панель, нижний отступ под жесты, плавность */
.side-theme { display: none; padding: 0 8px; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
.menu-b { display: none; width: 38px; height: 38px; border-radius: 10px; align-items: center; justify-content: center; color: var(--ink2); flex: none; }
.menu-b:hover { background: var(--hover); }
.dscrim { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@media (max-width: 860px) {
  .shell { flex-direction: column; flex-wrap: nowrap; }
  .main { width: 100%; flex: 1 1 auto; }
  .side { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); max-width: none; flex: none; transform: translateX(-104%); transition: transform .26s cubic-bezier(.2,.8,.2,1); border-right: 1px solid var(--line); border-bottom: 0; padding-block: max(18px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-bottom, 0px)); padding-inline: 16px; overflow-y: auto; gap: 18px; box-shadow: var(--shadow2); }
  .shell.drawer .side { transform: none; }
  .shell.drawer .dscrim { display: block; }
  .nav { flex-direction: column; }
  .nav-i, .cl-i { width: 100%; }
  .side-list { flex-direction: column; }
  .side-foot { display: flex; }
  .side-theme { display: block; }
  .menu-b { display: inline-flex; }
  .bar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line2); padding-block: max(10px, env(safe-area-inset-top, 0px)) 10px; }
  .bar-r .seg { display: none; }
  .page { padding-block: 4px max(56px, env(safe-area-inset-bottom, 0px)); gap: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px 14px; }
  .stat:last-child:nth-child(odd) { grid-column: span 2; }
  .stat-v { font-size: 22px; }
  .stat-n, .stat-l { white-space: normal; }
  .col-opt { display: none; }
  .tbl th, .tbl td { padding-inline: 6px; }
  /* Таблица устройств на телефоне — строками: имя и адрес на всю ширину, остальное под ними */
  .tbl.dev, .tbl.dev tbody, .tbl.dev td { display: block; }
  .tbl.dev thead { display: none; }
  .tbl.dev tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
  .tbl.dev tr:last-child { border-bottom: 0; }
  .tbl.dev td { padding: 0; border: 0; }
  .tbl.dev .st-l { display: inline; }
  .tbl.dev td:first-child { flex-basis: 100%; }
  .tbl.dev td.num { text-align: left; }
  .tbl.dev .sel { max-width: 100%; }
  /* Заявки на телефоне — блоками: имя и код в первой строке, кнопки на всю ширину под ними */
  .tbl.enr, .tbl.enr tbody, .tbl.enr td { display: block; }
  .tbl.enr thead { display: none; }
  .tbl.enr tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line2); }
  .tbl.enr tr:last-child { border-bottom: 0; }
  .tbl.enr td { padding: 0; border: 0; }
  .tbl.enr .st-l { display: inline; }
  .tbl.enr td:first-child { flex: 1 1 50%; min-width: 0; overflow-wrap: anywhere; }
  .tbl.enr td:nth-child(4) .t2 { display: inline; }
  .tbl.enr td:nth-child(4) div.t2 { margin-left: 8px; }
  .tbl.enr td:last-child { flex-basis: 100%; }
  .tbl.enr .enr-a { justify-content: flex-start; }
  .tbl.enr .enr-a .inp { width: 100%; }
  .tbl.enr .enr-a .btn { flex: 1 1 0; min-height: 40px; }
  .web-open { flex-wrap: wrap; }
  .web-open .inp { width: 100%; flex: 1 1 160px; }
  .card-h { align-items: flex-start; }
  .card-tools { width: 100%; justify-content: space-between; }
  .card-tools .t2, .head .sub { white-space: normal; }
  .card { padding: 14px 16px; border-radius: 14px; }
  .chc { padding: 14px 14px 12px; }
  .chc-v { font-size: 22px; }
  .cell-op-big { font-size: 20px; }
  .chc-grid { gap: 12px; }
  .webf { height: 70vh; }
}
@media (display-mode: standalone) {
  .bar { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
}
@media (prefers-reduced-motion: no-preference) {
  .page { animation: page-in .22s ease-out; }
  .stat-v, .chc-v, .v { transition: color .3s; }
}
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* --- площадка не подключена: экран подключения (§10.3) --- */
.setup-shell { min-height: 100vh; display: flex; justify-content: center; padding: max(24px, env(safe-area-inset-top, 0px)) 16px 56px; }
.setup { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 16px; }
.setup h1 { font-size: 20px; }
.setup .field { flex: none; }
.setup .dlg-a { justify-content: flex-start; }
.su-code { font-size: 40px; font-weight: 600; letter-spacing: .08em; text-align: center; padding: 14px 0; border-radius: 14px; background: var(--card2); }
.su-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink3); }
.su-foot .side-out { align-self: center; margin-top: 0; }
/* --- заявки площадок на концентраторе --- */
.enr-code { font: 600 15px var(--mono); letter-spacing: .06em; white-space: nowrap; }
.enr-a { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.enr-a .inp { width: 150px; }
/* Порты и устройства площадки на узком экране: название во всю ширину, под ним трафик и управление. */
@media (max-width: 860px) {
  .pr { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "m m" "t r"; }
  .dr { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "m m a" "t s s"; }
  .pr > .pr-m, .dr > .pr-m { grid-area: m; }
  .pr > .rt, .dr > .rt { grid-area: t; }
  .pr > .pr-r { grid-area: r; }
  .dr > .dr-s { grid-area: s; }
  .dr > .dr-a { grid-area: a; }
  .pr-m { align-items: flex-start; }
  .pt { max-width: none; }
  .card-tools .dsearch { width: 100%; }
}

/* Точка доступа Wi-Fi: поле и кнопка в строку, подключённые устройства. */
.inp-row { display: flex; gap: 6px; }
.inp-row .inp { flex: 1 1 auto; width: auto; }
.ap-cl { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border-radius: 10px; background: var(--neu-bg); font-size: 12.5px; }
.ap-c { font-family: var(--mono); overflow-wrap: anywhere; }
/* Окно выше экрана (телефон): прокрутка вместо обрезанного верха. Поля auto центрируют окно, пока оно помещается. */
.scrim { align-items: flex-start; overflow-y: auto; }
.scrim > .dlg { margin-block: auto; }
/* Сеть Wi-Fi порта: список сетей рядом. */
.wn-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wl { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.wn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--ink); text-align: left; font: inherit; }
.wn.on { border-color: var(--accent-ink); }
.wn:disabled { opacity: .6; }
.wn-s { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.wn-m { font-size: 12px; color: var(--ink3); }

a.btn { display: inline-flex; align-items: center; text-decoration: none; }
