/* Кабинет NexusNode Аналитики. Токены и шрифт – как на сайте analytics.nexusnode.ru. */
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400 600; font-display: swap;
  src: url(fonts/ibm-plex-sans-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400 600; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

:root {
  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --bg: #FAFAF9; --surface: #FFFFFF; --border: #E7E5E4; --text: #1C1917; --muted: #78716C; --subtle: #F5F5F4;
  --accent: #6E56CF; --accent-soft: #EFEBFB; --accent-text: #4C3BA8;
  --good: #15803D; --good-soft: #DCFCE7; --bad: #B91C1C; --bad-soft: #FEE2E2; --warn: #A16207; --warn-soft: #FEF3C7;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--font); }
a { color: var(--accent-text); text-underline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.top { background: var(--surface); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 600; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.top nav { display: flex; gap: 18px; flex: 1; }
.top nav a, .top .who { color: var(--muted); text-decoration: none; font-size: 14px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }
.top form { margin: 0; }
main { padding: 28px 0 56px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 28px 0 10px; font-weight: 600; }
h3 { font-size: 15px; margin: 0 0 6px; font-weight: 600; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 18px 0 22px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current] { color: var(--text); border-color: var(--accent); font-weight: 500; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 8px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-weight: 600; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }
.btn, button { display: inline-block; font: inherit; font-weight: 500; background: var(--accent); color: #fff; border: 0;
  padding: 9px 16px; border-radius: 8px; cursor: pointer; text-decoration: none; }
.btn:hover, button:hover { background: var(--accent-text); }
.btn.ghost, button.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover, button.ghost:hover { background: var(--subtle); }
button.link { background: none; color: var(--muted); padding: 0; font-weight: 400; font-size: 14px; }
button.link:hover { color: var(--text); background: none; }
label { display: block; font-weight: 500; margin: 12px 0 4px; }
label.inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 4px 14px 4px 0; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  font: inherit; width: 100%; max-width: 460px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
textarea { min-height: 120px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 3px; }
.error { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.notice { background: var(--good-soft); color: var(--good); padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.narrow { max-width: 420px; margin: 40px auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 500; background: var(--subtle); }
tr:last-child td { border-bottom: 0; }
tr.row:hover td { background: #FCFBFF; }
td a.rowlink { color: var(--text); text-decoration: none; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--subtle); color: var(--text); margin: 0 4px 3px 0; white-space: nowrap; }
.pill.accent { background: var(--accent-soft); color: var(--accent-text); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.checks { display: flex; gap: 4px; }
.check { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.check.yes { background: var(--good-soft); color: var(--good); }
.check.no { background: var(--bad-soft); color: var(--bad); }
.check.unknown { background: var(--subtle); color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 150px; }
.module { display: flex; flex-direction: column; gap: 8px; }
.module .head { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.module p { color: var(--muted); font-size: 14px; flex: 1; }
.module.off { opacity: .75; }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
pre { background: var(--subtle); border: 1px solid var(--border); border-radius: 8px; padding: 12px; white-space: pre-wrap; word-break: break-word; margin: 0; }
.snippet { display: flex; gap: 8px; align-items: start; }
.snippet pre { flex: 1; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 44px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 18px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600; display: flex; align-items: center; justify-content: center; }
.steps > li.done::before { content: "✓"; background: var(--good-soft); color: var(--good); }
.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-word; }
.reason { color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 8px; margin-top: 14px; }
.bar { height: 8px; background: var(--subtle); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
