/* ==========================================================================
   СЕВЕР · Пульт — глобальная тема NTRIP
   Токены сняты с рабочих сервисов ntrip.host (apps/web/src/theme.ts):
   brand #2f6fed, фон #0c0f14, панели #1b2028, линия rgba(255,255,255,.08),
   акцент-селект #f5a524. Фирменный фон — волновое поле ntrip.host.
   ========================================================================== */
:root {
    --brand: #2f6fed;
    --brand-hover: #2159cc;
    --brand-soft: #6c9bff;

    --bg: #0c0f14;
    --bg-2: #0b0e13;
    --panel: rgba(20, 24, 31, 0.92);
    --panel-solid: #1b2028;
    --sea: #0b0e13;
    --land: #212935;

    --stroke: rgba(255, 255, 255, 0.08);
    --stroke-strong: rgba(255, 255, 255, 0.18);

    --text: #e5e7eb;
    --muted: #9aa4b2;
    --dim: #6b7280;

    --accent: #f5a524;
    --bad: #f2555a;
    --ok: #22c55e;

    /* исторические имена классов сохранены — меняем только значения */
    --mint: var(--brand);
    --mint-dim: rgba(47, 111, 237, 0.16);
    --amber: var(--accent);
    --blue: var(--brand-soft);

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.95);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body.v2 {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Фирменное волновое поле ntrip.host: фиксированный слой под контентом. */
.ntrip-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url("/static/wave-bg.svg") center / contain no-repeat;
    opacity: 0.34;
    -webkit-mask-image: radial-gradient(1500px 950px at 58% -8%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 82%);
    mask-image: radial-gradient(1500px 950px at 58% -8%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 82%);
}
body.v2::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(1200px 620px at 70% -10%, rgba(47, 111, 237, 0.16), transparent 65%),
        radial-gradient(900px 500px at 0% 100%, rgba(47, 111, 237, 0.06), transparent 70%);
}

a { color: var(--brand-soft); text-decoration: none; }
a:hover { color: #a9c4ff; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.only-mobile { display: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }
.scrim { display: none; }

.rail {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 18px;
    padding: 20px 12px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 13, 18, 0.55);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 12px 0 44px rgba(0, 0, 0, 0.38);
}

.rail-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 12px; color: var(--text); }
.rail-brand svg { width: 38px; height: 26px; flex: none; }
.rail-brand .wm { display: flex; flex-direction: column; line-height: 1.05; }
.rail-brand .wm b { font-size: 15px; letter-spacing: 0.16em; font-weight: 700; color: #f3f6fb; }
.rail-brand .wm small { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dim); margin-top: 3px; }

.rail-nav { display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.rail-group { display: flex; flex-direction: column; gap: 2px; }
.rail-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: #8b94a3; padding: 0 10px 6px; }

.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    color: #b7c0cd; font-size: 13px; font-weight: 500;
    position: relative; transition: background .16s, color .16s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active {
    background: rgba(47, 111, 237, 0.18);
    color: #dfe9ff;
    box-shadow: inset 2px 0 0 var(--brand);
}
.nav-item.active svg { opacity: 1; color: var(--brand-soft); }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent);
    color: #1a1204; font-size: 11px; font-weight: 800; font-style: normal; display: grid; place-items: center; padding: 0 5px; }

.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--stroke); }
.who { display: flex; gap: 9px; align-items: center; padding: 0 8px; }
.who-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-soft); box-shadow: 0 0 8px rgba(108,155,255,.8); flex: none; }
.who b { display: block; font-size: 12px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.ghost-btn { width: 100%; padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--stroke);
    background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.ghost-btn:hover { border-color: var(--stroke-strong); color: var(--text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topline {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 14px;
    padding: 11px 26px; border-bottom: 1px solid var(--stroke);
    background: rgba(12, 15, 20, 0.72); backdrop-filter: blur(14px);
}
.crumb { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.topline-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--stroke); background: rgba(255,255,255,.05); font-size: 12px; color: #c9d1dc; }
.chip-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-soft); box-shadow: 0 0 8px rgba(108,155,255,.9); }
.chip-live[data-state="stale"] i { background: var(--accent); box-shadow: 0 0 8px rgba(245,165,36,.9); }
.chip-live[data-state="down"] i { background: var(--bad); box-shadow: 0 0 8px rgba(242,85,90,.9); }
.chip-live[data-state="unknown"] i { background: #6b7280; box-shadow: none; }
.page { padding: 26px; max-width: 1480px; width: 100%; margin: 0 auto; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .18em;
    text-transform: uppercase; color: #8b94a3; margin-bottom: 8px; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(47,111,237,.6);
    animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,111,237,.55);} 70% { box-shadow: 0 0 0 9px rgba(47,111,237,0);} 100% { box-shadow: 0 0 0 0 rgba(47,111,237,0);} }
.page-head h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; font-weight: 650; color: #f4f7fb; }
.page-head .sub { margin: 7px 0 0; color: var(--muted); font-size: 13.5px; max-width: 620px; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: var(--radius-sm); font-size: 12.5px;
    border: 1px solid var(--stroke); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--stroke-strong); background: rgba(255,255,255,.05); }

/* ---------- cards ---------- */
.card {
    position: relative; border: 1px solid var(--stroke); border-radius: var(--radius);
    background: linear-gradient(180deg, #1d232c 0%, #1a1f27 100%);
    box-shadow: var(--shadow); padding: 16px 18px; overflow: hidden;
}
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 32%); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8b94a3; font-weight: 600; }
.tag { font-size: 10px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--stroke);
    color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.tag-mint { color: #a9c4ff; border-color: rgba(47,111,237,.45); background: var(--mint-dim); }
.tag-red { color: #ffb3b6; border-color: rgba(242,85,90,.4); background: rgba(242,85,90,.12); }
.card-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--stroke); font-size: 11.5px; color: var(--muted); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(0, 1.95fr); gap: 16px; margin-bottom: 16px; }
.card-occupancy { display: flex; flex-direction: column; }
.occ-wrap { display: flex; align-items: center; gap: 18px; padding: 4px 0 8px; }
.occ-dial { width: 138px; height: 138px; flex: none; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 8; stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(47,111,237,.55)); transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.ring-num { transform: rotate(90deg); transform-origin: 60px 60px; fill: #f4f7fb;
    font-size: 34px; font-weight: 700; text-anchor: middle; font-family: var(--mono); }
.ring-cap { transform: rotate(90deg); transform-origin: 60px 60px; fill: var(--muted); font-size: 11px; text-anchor: middle; }
.occ-side { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.occ-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); }
.occ-row b { color: var(--text); font-family: var(--mono); font-size: 14px; }
.loadbar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.loadbar i { display: block; height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-soft)); transition: width .6s; }
.dot-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.mint { background: var(--brand); } .dot.amber { background: var(--accent); }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; min-height: 128px; }
.kpi-value { font-size: clamp(28px, 3.4vw, 38px); font-weight: 650; letter-spacing: -.02em; font-family: var(--mono);
    line-height: 1.05; margin: 2px 0 4px; color: #f4f7fb; }
.kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; margin-top: auto; }
.delta { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }
.delta.up { color: #a9c4ff; background: var(--mint-dim); }
.delta.down { color: #ffb3b6; background: rgba(242,85,90,.12); }
.delta.flat { color: var(--muted); }
.spark { position: absolute; right: 14px; bottom: 12px; width: 96px; height: 34px; opacity: .9; }
.spark svg { width: 100%; height: 100%; }
.microbars { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: 10px; opacity: .8; }
.microbars i { flex: 1; background: linear-gradient(180deg, rgba(47,111,237,.9), rgba(47,111,237,.12)); border-radius: 2px; }

/* ---------- flow ---------- */
.panel-flow { margin-bottom: 20px; padding-bottom: 10px; }
.chart-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.ln { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.ln.mint { background: var(--brand); } .ln.amber { background: var(--accent); }
.chart { width: 100%; height: 220px; display: block; margin-top: 4px; }
.gridline { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.axis { fill: #6b7280; font-size: 10px; font-family: var(--mono); }
.chart-line { filter: drop-shadow(0 0 7px rgba(47,111,237,.45)); }
.dotpt { fill: #1b2028; stroke: var(--brand-soft); stroke-width: 2; opacity: 0; transition: opacity .15s; }
.chart:hover .dotpt { opacity: 1; }
.chart-hover { position: absolute; pointer-events: none; padding: 6px 10px; border-radius: 8px;
    background: #161b24; border: 1px solid rgba(255,255,255,.14); font-size: 11px; color: var(--text);
    box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.chart-hover b { color: var(--brand-soft); }
.flow-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.link { color: var(--brand-soft); font-size: 12px; }

/* ---------- cameras ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 2px 12px; }
.sec-head h2 { margin: 0; font-size: 14px; letter-spacing: .02em; font-weight: 600; color: #eef2f7; }
.sec-head span { font-size: 11.5px; }
.cam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; align-items: start; }
.cam { padding: 14px; }
.cam-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cam-top b { display: block; font-size: 13px; color: #eef2f7; }
.cam-top small { font-size: 10.5px; }
.state { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; }
.state-ok { color: #a9c4ff; background: var(--mint-dim); }
.state-warn { color: #ffd08a; background: rgba(245,165,36,.12); }
.state-bad { color: #ffb3b6; background: rgba(242,85,90,.12); }
.cam-frame { position: relative; border-radius: 10px; overflow: hidden; background: #05080d; aspect-ratio: 16/9; border: 1px solid var(--stroke); }
.cam-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-badge { position: absolute; left: 8px; bottom: 8px; font-size: 10px; font-family: var(--mono);
    background: rgba(10,13,18,.8); border: 1px solid var(--stroke); padding: 3px 7px; border-radius: 6px; color: #b9c7da; }
.cam-note[hidden] { display: none !important; }
.cam-note { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10px;
    background: rgba(8,10,14,.78); color: #fff; font-size: 12px; }
.cam-foot { display: flex; align-items: center; gap: 18px; margin-top: 11px; }
.cam-metric { display: flex; flex-direction: column; }
.cam-metric b { font-family: var(--mono); font-size: 13px; color: var(--text); }
.cam-metric span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: #6b7280; }
.cam-foot .link { margin-left: auto; }

/* ---------- grid 2 ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.quality { display: flex; flex-direction: column; gap: 12px; }
.q-row { display: grid; grid-template-columns: 130px 1fr 28px; grid-template-areas: "n b g" "note note note"; gap: 6px 10px; align-items: center; }
.q-name { grid-area: n; font-size: 12px; color: #c9d1dc; }
.q-bar { grid-area: b; height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.q-bar i { display: block; height: 100%; border-radius: 3px; }
.q-grade { grid-area: g; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 13px; }
.g-ok { color: var(--brand-soft); } .g-warn { color: var(--accent); } .g-bad { color: var(--bad); }
.q-note { grid-area: note; font-size: 10.5px; }
.method { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; color: #c9d1dc; }
.method li::marker { color: var(--brand-soft); font-family: var(--mono); }
.foot { display: flex; justify-content: space-between; gap: 12px; margin: 26px 2px 10px; font-size: 11px; color: #5c6573; }
.kpi-note { font-size: 10px; color: #6b7280; margin-top: 6px; letter-spacing: .02em; }

/* ---------- legacy pages compatibility ---------- */
.sidebar, .app-shell, .topbar, .app-main, .sidebar-scrim { all: unset; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-header h1 { margin: 0 0 4px; font-size: 25px; letter-spacing: -.02em; color: #f4f7fb; }
.page-subtitle { color: var(--muted); font-size: 13px; margin: 0; }
.section-title { font-size: 14px; letter-spacing: .02em; margin: 22px 2px 10px; color: #e6ebf2; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.badge { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px;
    border: 1px solid var(--stroke); color: var(--muted); }
.badge-online { color: #a9c4ff; border-color: rgba(47,111,237,.4); }
.badge-degraded { color: var(--accent); border-color: rgba(245,165,36,.4); }
.badge-offline, .badge-disabled { color: #ffb3b6; border-color: rgba(242,85,90,.35); }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #8b94a3; font-weight: 600; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--stroke); }
tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
input, select, textarea { background: #0b0f15; border: 1px solid rgba(255,255,255,.1); color: var(--text);
    border-radius: var(--radius-sm); padding: 8px 10px; font: inherit; font-size: 13px; }
button, .button { background: var(--brand); border: 1px solid transparent; color: #fff;
    border-radius: var(--radius-sm); padding: 8px 14px; font: inherit; font-size: 12.5px; cursor: pointer; }
button:hover, .button:hover { background: var(--brand-hover); }
button.secondary { background: transparent; border-color: var(--stroke); color: var(--muted); }
.inline { display: inline; }
body.v2 b, body.v2 strong { color: inherit; }
body.v2 .cam-metric b, body.v2 .cam-top b, body.v2 .who b { color: #eaf2fb !important; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
    .hero { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .rail { position: fixed; left: 0; top: 0; z-index: 60; width: 246px; transform: translateX(-104%);
        transition: transform .22s cubic-bezier(.2,.8,.2,1); }
    .rail.open { transform: none; }
    .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none;
        transition: opacity .2s; z-index: 50; }
    .scrim.open { opacity: 1; pointer-events: auto; }
    .only-mobile { display: inline-flex; }
    .page { padding: 16px; }
    .topline { padding: 10px 14px; }
    .crumb { display: none; }
    .brandline { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
    .brandline svg { width: 30px; height: 20px; }
    .brandline b { letter-spacing: .16em; font-size: 12px; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .chart { height: 180px; }
    .cam-foot { gap: 12px; }
    .ntrip-bg { opacity: .22; }
}
@media (max-width: 520px) {
    .kpis { grid-template-columns: 1fr; }
    .occ-wrap { flex-direction: column; align-items: flex-start; }
    .occ-dial { width: 118px; height: 118px; }
    .chip#site-clock { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- login ---------- */
.login-page { min-height: 100vh; }
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 94vw); background: linear-gradient(180deg, #1d232c 0%, #1a1f27 100%);
    border: 1px solid var(--stroke); border-radius: 14px; padding: 24px 22px 18px;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.95); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.login-brand svg { width: 46px; height: 31px; flex: none; }
.login-wm { display: flex; flex-direction: column; line-height: 1.05; }
.login-wm b { font-size: 17px; letter-spacing: .16em; color: #f3f6fb; }
.login-wm small { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-top: 4px; }
.login-hint { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; }
.login-card label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #8b94a3; margin: 10px 0 5px; }
.login-card input { width: 100%; background: #0b0f15; border: 1px solid rgba(255,255,255,.1); color: var(--text);
    border-radius: var(--radius-sm); padding: 10px 11px; font: inherit; font-size: 13.5px; }
.login-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(47,111,237,.22); }
.login-btn { width: 100%; margin-top: 16px; background: var(--brand); border: 0; color: #fff; border-radius: var(--radius-sm);
    padding: 10px 14px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.login-btn:hover { background: var(--brand-hover); }
.login-error { margin: 0 0 10px; color: #ffb3b6; background: rgba(242,85,90,.1); border: 1px solid rgba(242,85,90,.3);
    border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12.5px; }
.login-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--stroke); font-size: 10.5px; color: #5c6573; text-align: center; letter-spacing: .04em; }

/* ---------- NTRIP-токены для legacy-страниц (shadcn/Tailwind из src.css) ---------- */
:root, .dark {
    --background: #0c0f14;
    --foreground: #e5e7eb;
    --card: #1b2028;
    --card-foreground: #e5e7eb;
    --popover: #161b24;
    --popover-foreground: #e5e7eb;
    --primary: #2f6fed;
    --primary-foreground: #ffffff;
    --secondary: #232a34;
    --secondary-foreground: #e5e7eb;
    --muted: #9aa4b2;          /* совпадает с нашим текстовым токеном */
    --muted-foreground: #9aa4b2;
    --accent: #f5a524;         /* наш акцент; shadcn bg-accent почти не используется */
    --accent-foreground: #1a1204;
    --destructive: #f2555a;
    --border: rgba(255, 255, 255, 0.08);
    --input: rgba(255, 255, 255, 0.12);
    --ring: #2f6fed;
    --chart-1: #2f6fed;
    --chart-2: #6c9bff;
    --chart-3: #2f6fed;
    --chart-4: #f5a524;
    --chart-5: #9aa4b2;
    --chart-background: #1b2028;
    --chart-foreground: #e5e7eb;
    --chart-foreground-muted: #9aa4b2;
    --chart-grid: rgba(255, 255, 255, 0.08);
    --chart-label: #9aa4b2;
    --chart-tooltip-background: rgba(22, 27, 36, 0.96);
    --chart-tooltip-foreground: #e5e7eb;
    --chart-tooltip-muted: #9aa4b2;
    --chart-marker-background: #232a34;
    --chart-marker-border: rgba(255, 255, 255, 0.16);
    --chart-marker-foreground: #e5e7eb;
    --chart-scale-01: #1b2028;
    --chart-scale-02: #232c3b;
    --chart-scale-03: #2b3a55;
    --chart-scale-04: #31508f;
    --chart-scale-05: #2f6fed;
    --sidebar: #0b0e13;
    --sidebar-foreground: #e5e7eb;
}

body.v2 table, body.v2 thead, body.v2 tbody, body.v2 tr, body.v2 td, body.v2 th { background-color: transparent; }
body.v2 th { color: #8b94a3; }
body.v2 td { color: var(--text); }
body.v2 select, body.v2 input[type="date"] { color-scheme: dark; }
body.v2 .heatmap-th { color: #8b94a3; }
body.v2 .card-head { color: var(--text); }
body.v2 .badge-disabled { color: var(--muted); }

/* Бары legacy-графиков (React-остров) красим в бренд: красный «destructive»
   на графике пересечений читается как авария, хотя это просто трафик. */
body.v2 svg rect[fill="var(--destructive)"],
body.v2 svg path[fill="var(--destructive)"] { fill: var(--brand); }
body.v2 svg rect[fill="var(--chart-2)"],
body.v2 svg path[fill="var(--chart-2)"] { fill: var(--brand-soft); }
body.v2 .page-header { margin-bottom: 22px; position: relative; z-index: 2; }
