@font-face { font-family: "Space Grotesk"; src: url("space-grotesk-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --bg: #121212; --s1: #1b1b1a; --s2: #232322; --s3: #2e2e2c; --deep: #0e0e0e; --well: #0f0f0f;
  --line: rgba(240, 240, 232, .09); --line2: rgba(240, 240, 232, .16); --line3: rgba(240, 240, 232, .34);
  --fg: #f0f0e8; --fg2: #cfcfc6; --muted: #a3a39b; --layer: #c8d0d8;
  --accent: #4fd69a; --accent-dim: rgba(79, 214, 154, .12); --up: #9fb6ff;
  --warn: #e8b54f; --bad: #ff7a70;
  --brand: "Space Grotesk", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --ui: var(--brand);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --r: 18px; --r-sm: 12px; --pill: 980px;
  --edge: inset 0 1px 0 rgba(240, 240, 232, .04);
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-io: cubic-bezier(.77, 0, .175, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
::selection { background: var(--layer); color: var(--bg); }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--brand); font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1.08; letter-spacing: -.04em; }
h2 { font-size: 1.06rem; }
h3 { font-size: .98rem; margin-bottom: 4px; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: .86em; }
code { padding: .08em .4em; border-radius: 6px; background: rgba(240, 240, 232, .07); }
pre code, .code code, .copy-line code { padding: 0; background: none; }
small, .small { font-size: .8rem; }
.muted { color: var(--muted); }
.block { display: block; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.r { text-align: right; }
.tx-bad { color: var(--bad); }
.tx-warn { color: var(--warn); }
.i { width: 16px; height: 16px; flex: none; }
.inline { display: inline; margin: 0; }

.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100svh; }
.topbar { display: none; }
.side-scrim { display: none; }
.side { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 18px; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: var(--deep); overflow-y: auto; scrollbar-width: thin; }
.logo { display: flex; align-items: center; gap: 12px; padding: 2px 10px; text-decoration: none; }
.logo img { height: 27px; width: auto; }
.logo span { color: var(--muted); font-family: var(--brand); font-weight: 500; padding-left: 12px; border-left: 1px solid var(--line2); }
.side-nav { display: grid; gap: 2px; }
.side-group { margin: 16px 12px 6px; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.side-group:first-child { margin-top: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500; transition: background-color 150ms ease, color 150ms ease; }
.side-nav a[aria-current] { color: var(--fg); background: rgba(240, 240, 232, .08); }
.side-nav a[aria-current] .i { color: var(--accent); }
.me { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--s1); }
.avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(140deg, #3c4447, #1f2324); color: var(--fg); font-size: .82rem; font-weight: 600; letter-spacing: -.02em; }
.avatar.sm { width: 32px; height: 32px; border-radius: 50%; font-size: .74rem; }
.me-text { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.me-text b { overflow: hidden; font-size: .9rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .74rem; }
.main { min-width: 0; width: 100%; max-width: 1440px; padding: 34px clamp(20px, 3.4vw, 48px) 72px; }

.portal { min-height: 100vh; display: flex; flex-direction: column; }
.bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 22px; height: 68px; padding: 0 clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); background: rgba(18, 18, 18, .86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.bar .logo { padding: 0; }
.bar-nav { display: flex; gap: 4px; margin-right: auto; }
.bar-nav a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--pill); color: var(--muted); font-weight: 500; text-decoration: none; transition: background-color 150ms ease, color 150ms ease; }
.bar-nav a[aria-current] { color: var(--fg); background: rgba(240, 240, 232, .08); }
.bar-nav a[aria-current] .i { color: var(--accent); }
.bar-r { display: flex; align-items: center; gap: 10px; }
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 24px 72px; }
.foot { padding: 20px clamp(16px, 3vw, 40px); border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.announce { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; background: rgba(159, 182, 255, .08); border-bottom: 1px solid rgba(159, 182, 255, .25); color: #ccd8ff; font-size: .88rem; }
.announce-warn { background: rgba(232, 181, 79, .09); border-color: rgba(232, 181, 79, .3); color: #f1d49a; }
.imp { position: relative; z-index: 41; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 7px 16px; background: var(--accent); color: #0d0d0c; font-weight: 600; font-size: .85rem; }
.imp .btn { background: #0d0d0c; color: var(--fg); border-color: #0d0d0c; }

.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.ph p { margin: 8px 0 0; }
.ph-r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { display: flex; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: .82rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border: 1px solid var(--line3); border-radius: var(--pill); background: transparent; color: var(--fg); font: 600 .88rem/1 var(--ui); letter-spacing: -.005em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease; }
.btn:active, .switch:active, .icon-btn:active { transform: scale(.97); }
.btn.primary { background: var(--fg); color: #111110; border-color: var(--fg); }
.btn.danger { color: var(--bad); border-color: rgba(255, 122, 112, .4); }
.btn.sm { height: 32px; padding: 0 13px; font-size: .82rem; }
.btn.lg { height: 52px; padding: 0 28px; font-size: .98rem; }
.btn .i-go { transition: transform 200ms var(--ease-out); }
.btn.wide { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line2); border-radius: 50%; background: none; color: var(--fg2); cursor: pointer; }
.icon-btn { transition: transform 160ms var(--ease-out), color 150ms ease, background-color 150ms ease; }
.icon-btn.sm { width: 28px; height: 28px; border-color: transparent; }
.icon-btn.sm .i { width: 13px; height: 13px; }
.link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .84rem; cursor: pointer; text-decoration: none; }
.link:hover { color: var(--fg); }
.link.danger:hover { color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.input { width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--well); color: var(--fg); font: 500 .95rem/1.4 var(--ui); transition: border-color 150ms ease, box-shadow 150ms ease; }
.input::placeholder { color: rgba(163, 163, 155, .65); }
textarea.input { height: auto; padding: 11px 14px; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(79, 214, 154, .18); }
.input:disabled { opacity: .55; }
select.input { appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select.input.sm { padding-right: 26px; background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; }
.field { display: grid; gap: 7px; }
.field > span { font-size: .86rem; font-weight: 600; color: var(--fg2); }
.field em { font-style: normal; color: var(--muted); font-weight: 400; margin-left: 4px; }
.field small { color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--fg2); }
.check input, .chip input, .choice input { accent-color: var(--accent); }
.stack { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { max-width: 340px; }

.panel { margin-bottom: 18px; padding: 22px 24px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--edge); }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 32px; }
.panel-h h2 { display: flex; align-items: center; gap: 10px; }
.panel-h h2 .i { color: var(--muted); }
.narrow-panel { max-width: 560px; }
.danger-zone { border-color: rgba(255, 122, 112, .22); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cols > .panel { margin-bottom: 18px; }
.count { min-width: 24px; padding: 2px 9px; border-radius: var(--pill); background: var(--s3); color: var(--fg2); font-size: .78rem; text-align: center; font-variant-numeric: tabular-nums; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpis.k6 .kpi { padding: 16px 18px; }
.kpis.k6 .kpi-v { font-size: 1.45rem; }
.kpi { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 18px 20px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--edge); }
.kpi-l { color: var(--muted); font-size: .84rem; }
.kpi-v { font-family: var(--brand); font-size: 1.75rem; line-height: 1.15; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-v small { color: var(--muted); font-size: .9rem; font-weight: 500; }
.kpi-v .st { font-family: var(--ui); font-size: 1rem; }
.kpi-s { display: block; color: var(--muted); font-size: .8rem; }
.kpi-s .meter { margin: 7px 0 5px; }

.st { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st-ok::before { box-shadow: 0 0 0 3px rgba(79, 214, 154, .16); }
.st-ok::before { background: var(--accent); }
.st-warn::before { background: var(--warn); }
.st-bad::before { background: var(--bad); }
.st-idle { color: var(--fg2); }
.tag { display: inline-block; padding: 2px 9px; border: 1px solid var(--line2); border-radius: var(--pill); color: var(--fg2); font-size: .75rem; font-weight: 500; }

.meter { display: block; width: 100%; height: 4px; }
.meter svg { display: block; width: 100%; height: 4px; border-radius: 2px; }
.mt-bg { fill: rgba(240, 240, 232, .09); }
.mt-ok { fill: var(--accent); }
.mt-warn { fill: var(--warn); }
.mt-bad { fill: var(--bad); }

.tbl-wrap { overflow-x: auto; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--edge); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { padding: 13px 16px 11px; text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--s1); }
.tbl th.num { text-align: right; }
.tbl th[data-sort] { cursor: pointer; user-select: none; }
.tbl th[data-sort]:hover { color: var(--fg); }
.tbl th[aria-sort="ascending"]::after { content: " ↑"; }
.tbl th[aria-sort="descending"]::after { content: " ↓"; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr[data-href] { cursor: pointer; }
.tbl tbody tr:hover td { background: rgba(240, 240, 232, .025); }
.tbl a { text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.panel .tbl { margin: -4px 0 6px; }
.panel .tbl th { background: none; padding-left: 0; }
.panel .tbl td { padding-left: 0; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.toolbar select.input { width: auto; min-width: 140px; }
.search { position: relative; flex: 1; max-width: 380px; min-width: 200px; }
.search .i { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }
.search:focus-within .i { color: var(--accent); }
.search .input { padding-left: 40px; }

.tabs { display: flex; gap: 2px; width: max-content; max-width: 100%; margin-bottom: 20px; padding: 4px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--deep); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: var(--pill); color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current] { color: var(--fg); background: var(--s3); }
.tabs a[aria-current] .i { color: var(--accent); }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--deep); }
.seg button { padding: 5px 12px; border: 0; border-radius: var(--pill); background: none; color: var(--muted); font: 500 .82rem var(--ui); cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.seg button[aria-pressed="true"] { background: var(--s3); color: var(--fg); }

.chart { position: relative; width: 100%; min-height: 220px; }
.chart-sm { min-height: 170px; }
.chart-xs { min-height: 44px; margin: 6px 0; }
.chart .uplot { font-family: var(--ui); }
.chart .u-legend { font-size: .78rem; color: var(--fg2); text-align: left; margin-top: 4px; }
.chart .u-legend .u-marker { border-radius: 2px; width: .8em; height: .8em; }
.chart .u-legend th { font-weight: 500; }
.chart-empty { display: grid; place-items: center; min-height: inherit; color: var(--muted); font-size: .85rem; }

.rows { display: grid; margin: 0; }
.rows div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rows div:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; display: flex; align-items: center; gap: 6px; min-width: 0; word-break: break-all; }
.grid-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.grid-kv div { margin: 0 -1px -1px 0; padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid-kv dt { color: var(--muted); font-size: .76rem; }
.grid-kv dd { margin: 2px 0 0; word-break: break-all; }

.list { list-style: none; margin: 0; padding: 0; }
.list li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.list li:last-child a { border-bottom: 0; }
.list li a:hover b { text-decoration: underline; }
.list li a > span:first-child { display: grid; min-width: 0; }
.list small { color: var(--muted); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed-e::first-letter { text-transform: uppercase; }
.feed-d { grid-column: 1; color: var(--muted); font-size: .82rem; }
.feed time { grid-row: 1; grid-column: 2; font-size: .8rem; white-space: nowrap; }
.feed.compact li { padding: 7px 0; }

.choices { display: grid; gap: 8px; }
.choice { display: grid; grid-template-columns: auto 170px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 14px; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.choice-t { display: grid; font-weight: 600; }
.choice-t small { color: var(--muted); font-weight: 400; }
.choice-d { color: var(--fg2); font-size: .86rem; }
.wg-box { display: flex; gap: 22px; align-items: center; margin-bottom: 18px; padding: 18px; border: 1px dashed var(--line3); border-radius: var(--r); }
.qr { flex: none; padding: 10px; border-radius: 14px; background: #fff; line-height: 0; }
.guides .seg { margin-bottom: 10px; }
.code-wrap { position: relative; }
.code { margin: 0; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: #0b0b0b; font: .8rem/1.65 var(--mono); color: var(--fg2); white-space: pre; }
.code-copy { position: absolute; top: 10px; right: 10px; background: var(--s2); }

.fw-switch { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.fw-switch p { margin: 4px 0 0; max-width: 620px; }
.switch { position: relative; flex: none; width: 46px; height: 26px; padding: 0; border: 1px solid var(--line3); border-radius: 999px; background: var(--s3); cursor: pointer; transition: background-color 160ms; }
.switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--fg); transition: transform 220ms var(--ease-out), background-color 180ms ease; }
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on i { transform: translateX(20px); background: #0d0d0c; }
.rule-form { display: grid; grid-template-columns: 110px 160px 1fr 1fr auto; gap: 8px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line2); border-radius: var(--pill); font: .76rem var(--mono); cursor: pointer; }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }

.checks { list-style: none; margin: 0 0 8px; padding: 0; }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks li > .i { margin-top: 1px; padding: 3px; width: 22px; height: 22px; border-radius: 50%; }
.checks .ok > .i { color: var(--accent); background: var(--accent-dim); }
.checks .bad > .i { color: var(--bad); background: rgba(255, 122, 112, .1); }
.checks span { display: grid; }
.checks small { color: var(--muted); }

.notice { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 18px; border: 1px solid; border-radius: 14px; font-size: .92rem; }
.notice.bad { border-color: rgba(255, 122, 112, .35); background: rgba(255, 122, 112, .07); }
.notice.warn { border-color: rgba(232, 181, 79, .3); background: rgba(232, 181, 79, .07); }
.flash { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 10px 18px 10px 10px; border: 1px solid rgba(79, 214, 154, .3); border-radius: var(--pill); background: rgba(79, 214, 154, .07); font-weight: 500; animation: flash-in 260ms var(--ease-out); }
.flash .i { flex: none; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--accent); color: var(--bg); }
.flash.is-err { border-color: rgba(255, 122, 112, .35); background: rgba(255, 122, 112, .07); }
.flash.is-err .i { background: var(--bad); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } }
.empty { padding: 34px 12px; text-align: center; color: var(--muted); }
.empty p { margin: 0 0 10px; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--edge); }
.plan.is-hidden { opacity: .6; }
.plan header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan h2 { font-size: 1.25rem; letter-spacing: -.03em; }
.price { font-family: var(--brand); font-weight: 600; color: var(--accent); }
.plan .rows div { grid-template-columns: 90px minmax(0, 1fr); padding: 6px 0; }
.plan footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.plan-form { max-width: 820px; }

.pool { margin-bottom: 12px; }
.pool-h { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .85rem; }
.ipmap { display: grid; grid-template-columns: repeat(64, 1fr); gap: 2px; margin: 14px 0 8px; }
.ipmap i { aspect-ratio: 1; border-radius: 3px; background: var(--s3); }
.ipmap i.c-u, .lg.c-u::before { background: var(--accent); }
.ipmap i.c-s, .lg.c-s::before { background: var(--bad); }
.ipmap i.c-h, .lg.c-h::before { background: var(--warn); }
.lg.c-f::before { background: var(--s3); }
.legend { display: flex; gap: 14px; margin-bottom: 12px; color: var(--muted); font-size: .78rem; }
.lg::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }

.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.tcard { display: grid; gap: 8px; padding: 20px 22px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--edge); text-decoration: none; transition: border-color 160ms ease, transform 220ms var(--ease-out); }
.tcard-h b { font-size: 1.05rem; letter-spacing: -.02em; }
.tcard-h, .tcard-f { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tcard-f { color: var(--muted); font-size: .82rem; }

.auth { width: 100%; }
.auth h1 { margin-bottom: 10px; font-size: clamp(2.1rem, 3.2vw, 2.7rem); letter-spacing: -.045em; }
.auth > p.muted { margin-bottom: 26px; }
.auth .stack { gap: 16px; margin-bottom: 18px; }
.auth .input { height: 50px; border-radius: 14px; background: #0c0c0c; }
.auth .btn.wide { height: 52px; margin-top: 4px; font-size: .96rem; }
.auth .btn:hover .i-go { transform: translateX(3px); }
.auth .flash { margin-bottom: 18px; border-radius: 14px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 0; color: var(--muted); font-size: .88rem; }
.auth-links a { text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; }
.auth-links a:hover { color: var(--fg); text-decoration-color: var(--accent); }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .8rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.page .auth { max-width: 520px; margin: 8vh auto 0; padding: 32px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); }
.page .auth h1 { font-size: 1.6rem; }

.login-body { background: var(--bg); }
.art-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(400px, .95fr); min-height: 100svh; }
.login-art { position: relative; isolation: isolate; overflow: hidden; border-right: 1px solid var(--line); }
.login-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: .5; }
.login-scrim { position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 60% at 55% 45%, rgba(18, 18, 18, .2), rgba(18, 18, 18, .92) 90%), linear-gradient(to top, #121212 0, rgba(18, 18, 18, 0) 60%); }
.login-art-in { display: grid; grid-template-rows: auto 1fr auto; height: 100%; padding: clamp(28px, 4vw, 52px); }
.login-art .logo { padding: 0; }
.login-art .logo img { height: 32px; }
.login-stack { align-self: center; justify-self: center; width: min(340px, 58%); animation: soft-rise 1s var(--ease-out) 80ms both; }
.login-copy h2 { font-size: clamp(2.6rem, 4.4vw, 4.2rem); line-height: 1; letter-spacing: -.05em; }
.login-copy h2 span { color: var(--layer); }
.login-copy p { max-width: 42ch; margin: 16px 0 0; color: rgba(240, 240, 232, .72); font-size: 1.02rem; }
.login-panel { display: grid; grid-template-rows: auto 1fr auto; padding: clamp(24px, 3.4vw, 44px) clamp(24px, 5vw, 72px); }
.login-logo { visibility: hidden; padding: 0; }
.login-form { align-self: center; width: 100%; max-width: 400px; margin-inline: auto; animation: soft-rise .7s var(--ease-out) 60ms both; }
.login-legal { margin: 0; color: rgba(163, 163, 155, .7); font-size: .8rem; text-align: center; }
.art-stack { position: relative; width: 100%; aspect-ratio: 1 / .94; }
.stack-l { --i: 0; position: absolute; top: calc(var(--i) * 15%); left: 0; z-index: calc(10 - var(--i)); width: 100%; }
.stack-l.l1 { --i: 1; } .stack-l.l2 { --i: 2; } .stack-l.l3 { --i: 3; }
.stack-l svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes soft-rise { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-art { min-height: 200px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-art-in { grid-template-rows: auto 1fr; }
  .login-copy { display: none; }
  .login-stack { width: 130px; }
  .login-panel { padding-top: 8px; }
  .login-form { padding: 24px 0 36px; }
}

@media (max-width: 1180px) { .kpis.k6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .main { min-width: 0; }
  .panel > table.tbl, .abuse-hit { display: block; overflow-x: auto; }
  .inline-form { flex-wrap: wrap; }
  .inline-form .input { min-width: 0; }
  .topbar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(18, 18, 18, .88); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .topbar .logo { padding: 0; }
  .topbar .logo img { height: 25px; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 80; width: min(300px, 86vw); height: 100svh; transform: translateX(-100%); transition: transform 260ms var(--ease-drawer); }
  .side-open .side { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .5); }
  .side-scrim { position: fixed; inset: 0; z-index: 70; display: block; background: rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 0s linear 200ms; }
  .side-open .side-scrim { opacity: 1; visibility: visible; transition: opacity 200ms ease; }
  .side-open { overflow: hidden; }
  .main { padding: 22px 16px 56px; }
  .bar { gap: 10px; }
  .bar .logo span { display: none; }
  .bar-nav a { padding: 0 11px; }
  .cols, .row2 { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rule-form { grid-template-columns: 1fr 1fr; }
  .rule-form .btn { grid-column: 1 / -1; }
  .choice { grid-template-columns: auto minmax(0, 1fr); }
  .choice-d { grid-column: 2; }
}
@media (max-width: 600px) {
  .page { padding: 18px 16px 40px; }
  .bar { height: 60px; padding: 0 12px; }
  .bar-nav { gap: 0; }
  .bar-nav a span { display: none; }
  .bar-nav a { width: 40px; padding: 0; justify-content: center; }
  .bar-r .avatar { display: none; }
  .ph { flex-direction: column; align-items: flex-start; }
  .kpis.k6, .row3 { grid-template-columns: 1fr; }
  .kpi { padding: 14px 16px; }
  .kpi-v { font-size: 1.4rem; }
  .rows div { grid-template-columns: 1fr; gap: 2px; }
  .wg-box, .fw-switch { flex-direction: column; align-items: flex-start; }
  .ipmap { grid-template-columns: repeat(32, 1fr); }
  .tbl { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: rgba(240, 240, 232, .07); border-color: var(--fg); }
  .side-nav a:hover, .bar-nav a:hover { color: var(--fg); background: rgba(240, 240, 232, .05); }
  .tabs a:hover, .seg button:hover { color: var(--fg); }
  .choice:hover { border-color: var(--line3); }
  .btn.primary:hover { background: #fff; border-color: #fff; }
  .btn.danger:hover { border-color: var(--bad); background: rgba(255, 122, 112, .1); }
  .icon-btn:hover { color: var(--fg); background: rgba(240, 240, 232, .08); border-color: var(--fg); }
  .tcard:hover { border-color: var(--line3); transform: translateY(-2px); }
}
.sep { display: inline-block; width: 1px; height: .8em; margin: 0 .55em; background: var(--line3); vertical-align: -.05em; }
.mt { margin-top: 14px; }
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.live-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--line3); transition: background-color 300ms ease; }
.live-dot.on { background: var(--accent); }

.path { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto minmax(50px, .45fr) auto; align-items: center; gap: 0 4px; margin-bottom: 18px; padding: 26px 28px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--edge); }
.node { display: grid; justify-items: center; gap: 2px; min-width: 120px; text-align: center; }
.node .i { width: 26px; height: 26px; margin-bottom: 6px; color: var(--fg2); }
.node b { font-weight: 600; font-size: .9rem; }
.node code { color: var(--muted); font-size: .76rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-us .i { color: var(--accent); }
.wire { position: relative; display: grid; justify-items: center; gap: 4px; padding: 0 6px; min-width: 0; }
.wire svg { width: 100%; height: 12px; overflow: visible; }
.wire-l { font-size: .78rem; font-weight: 600; color: var(--fg2); }
.wire-r { font-size: .76rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wire-short .wire-r { font-family: var(--mono); }
.w-base { stroke: var(--line2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.w-flow { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 10; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 400ms ease; }
.path.is-on .w-flow { opacity: 1; animation: flow 1.1s linear infinite; }
.path.is-on .w-base { stroke: rgba(79, 214, 154, .28); }
.path.is-off .w-base { stroke: rgba(255, 122, 112, .45); stroke-dasharray: 3 5; }
.path.is-idle .node:first-child .i { color: var(--muted); }
@keyframes flow { to { stroke-dashoffset: -14; } }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { display: block; padding: 13px 18px; border: 1px solid var(--line2); border-radius: 16px; background: rgba(34, 34, 33, .86); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); color: var(--fg); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-size: .86rem; text-decoration: none; transition: opacity 220ms ease, transform 220ms var(--ease-out); }
@starting-style { .toast { opacity: 0; transform: translateY(8px); } }
.toast.out { opacity: 0; transform: translateY(6px); }

.bars { display: block; width: 100%; height: 60px; margin-bottom: 4px; }
.b-hit { fill: var(--warn); }
.b-zero { fill: var(--s3); }
.bars-x { display: flex; justify-content: space-between; margin-bottom: 14px; color: var(--muted); font-size: .74rem; }
.enrol { display: flex; gap: 20px; align-items: flex-start; }
.qr-wrap { flex: none; padding: 10px; border-radius: 14px; background: #fff; line-height: 0; }
.key { display: inline-block; padding: 7px 12px; border: 1px dashed var(--line3); border-radius: 10px; letter-spacing: .05em; word-break: break-all; }
.code-in { max-width: 150px; letter-spacing: .25em; text-align: center; font-size: 1rem; }
.code-in.big { max-width: none; height: 46px; font-size: 1.35rem; }
.block-form { display: grid; grid-template-columns: 180px 140px 1fr auto; gap: 8px; margin: 12px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.li-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child .li-row { border-bottom: 0; }
.li-row > span { display: grid; min-width: 0; }
.li-row small { color: var(--muted); }
.input.sm { height: 32px; padding: 0 10px; border-radius: 10px; font-size: .84rem; width: auto; }
.tbl tr.is-sel td { background: rgba(79, 214, 154, .04); }
.clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row2.tight { margin-bottom: 0; }
.tbl td .inline + .inline, .tbl td .inline + .link { margin-left: 10px; }
@media (max-width: 960px) {
  .path { grid-template-columns: 1fr; gap: 8px; justify-items: stretch; }
  .wire { padding: 4px 0; }
  .wire svg { display: none; }
  .block-form { grid-template-columns: 1fr 1fr; }
  .enrol { flex-direction: column; }
  .kpis.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .path.is-on .w-flow { animation: none; stroke-dasharray: none; opacity: .6; } }

.cols.tight { gap: 18px; }
.cols.tight > form { margin: 0; }
.port-in { max-width: 100px; }
.rdns-form { display: flex; gap: 6px; }
.rdns-form .input { height: 34px; min-width: 200px; }
.copy-line { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--well); }
.copy-line code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
.newkey { margin-bottom: 14px; padding: 14px 16px; border: 1px solid rgba(79, 214, 154, .35); border-radius: 14px; background: rgba(79, 214, 154, .06); }
.newkey .copy-line { margin-bottom: 0; }
fieldset.plain { margin: 0; padding: 0; border: 0; }
fieldset.plain legend { margin-bottom: 8px; font-size: .82rem; font-weight: 500; color: var(--fg2); }
.inline-field { display: flex; align-items: center; gap: 10px; }

.mini-kpis { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-bottom: 12px; }
.mini-kpis div { display: grid; }
.mini-kpis span { color: var(--muted); font-size: .76rem; }
.mini-kpis b { font: 600 1.2rem var(--brand); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.upstrip { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 34px; }
.upstrip i { border-radius: 3px; background: var(--s3); }
.upstrip .u-ok { background: var(--accent); opacity: .85; }
.upstrip .u-warn { background: var(--warn); }
.upstrip .u-bad { background: var(--bad); }
.strip-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: .74rem; }
.h3 { margin-bottom: 10px; font-size: .86rem; }
.h3 small { font-weight: 400; font-family: var(--ui); }
.tbars { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tbars li { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 4.6rem; align-items: center; gap: 10px; font-size: .84rem; }
.bar-l { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.bar-l small { font-size: .7rem; font-family: var(--mono); }
.bar-t svg { display: block; width: 100%; height: 6px; border-radius: 3px; }
.bar-v { font-size: .8rem; color: var(--fg2); }
.upsell { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.upsell p { margin: 4px 0 0; }
.notice.ok { border-color: rgba(79, 214, 154, .25); background: rgba(79, 214, 154, .06); }
.notice.info { border-color: var(--line2); background: var(--s1); }
.notice.ok .i { color: var(--accent); }
.notice.warn .i { color: var(--warn); }
.notice.bad .i { color: var(--bad); }
.link-notice { text-decoration: none; }
.notes { margin-bottom: 18px; padding: 16px 20px; border: 1px solid rgba(159, 182, 255, .3); border-radius: var(--r); background: rgba(159, 182, 255, .06); }
.note { display: flex; gap: 12px; margin-bottom: 10px; }
.note .i { margin-top: 3px; color: var(--up); }
.note b { margin-right: 8px; }
.note p { margin: 4px 0 0; white-space: pre-line; }
.node-row { display: flex; flex-wrap: wrap; gap: 8px; }
.node-chip { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--s2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--accent); }
.dot.bad { background: var(--bad); }
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.loc-grid .panel { margin: 0; }
.abuse-hit { padding: 12px 0; border-top: 1px solid var(--line); }
.abuse-hit:first-of-type { border-top: 0; padding-top: 0; }
.abuse-ip { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 1rem; }
.abuse-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--s2); }
.abuse-row + .abuse-row { margin-top: 6px; }
.abuse-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.abuse-act .input[name="note"] { width: 260px; }
.bulk { position: sticky; top: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 10px 8px 16px; border: 1px solid var(--line2); border-radius: var(--pill); background: rgba(34, 34, 33, .9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.bulk[hidden] { display: none; }
.bulk-n { padding: 0 6px; font-weight: 600; white-space: nowrap; }
.bulk .input:not(.sm) { flex: 1; max-width: 420px; }
.tbl .pick { width: 34px; padding-right: 0; }
.tbl .pick input { width: 15px; height: 15px; accent-color: var(--accent); vertical-align: middle; }
.seg-wrap { flex-wrap: wrap; }
.auto-bh { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.auto-bh .inline-form { flex-wrap: wrap; align-items: center; }
.num-in { width: 90px; }
.rdns6-form { grid-template-columns: 1fr 1fr auto; }
.copy-line > span.muted { flex: none; }
#ddos .inline-form { flex-wrap: wrap; }
@media (max-width: 960px) {
  .tbars li { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) 4.2rem; }
  .abuse-row { grid-template-columns: 1fr; }
  .abuse-act { justify-content: flex-start; }
  .abuse-act .input[name="note"] { width: 100%; }
  .rdns6-form { grid-template-columns: 1fr; }
  .bulk { flex-wrap: wrap; }
}
.chip small { color: var(--muted); font-family: var(--ui); font-size: .72rem; }
.chip:has(input:disabled) { opacity: .6; cursor: default; }
.req-why { margin: 6px 0 0; color: var(--fg2); font-size: .88rem; white-space: pre-line; }
.tbl-scroll { overflow-x: auto; }
.port-edit { flex-wrap: wrap; }
.port-ask { padding-top: 16px; border-top: 1px solid var(--line); }
