/* Консоль 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: 1px; background: var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.stat { background: var(--card); padding: 16px 20px; 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; 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); white-space: nowrap; }
.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: start; }
.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: start; }
.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); }
.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; }
.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; }

@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; }
}
