/* ═══════════════════════════════════════════════════════════════════
   ФИНАНСОВЫЙ ПОРТАЛ — дизайн-система v3 (2026-10-26)
   Те же токены и компоненты, что в админке Friends Club.
   Подключается ПОСЛЕ finance.css и mobile.css: переопределяет их токены
   (поэтому все 50+ страниц переходят на новую палитру без правки данных),
   добавляет оболочку (сайдбар / топбар), карточки, таблицы, пустые состояния
   и скелетоны. Тёмная тема — по умолчанию, светлая — [data-theme="light"].
   ═══════════════════════════════════════════════════════════════════ */

/* ───────── 1. Токены ───────── */
:root {
  color-scheme: dark;
  --bg:#0C0D10; --surface:#14161A; --elev:#1C1F25; --border:#2B2F37; --border-strong:#3A3F49;
  --text:#EDEBE7; --muted:#9BA1AD;
  --brand:#E8807A; --brand-solid:#A8352F; --brand-ink:#FFFFFF; --brand-soft:rgba(232,128,122,.14);
  --bloody:#F26D78; --brisket:#F29A4A; --pastrama:#4FB3A9;
  --up:#4CC38A; --down:#F0686A; --warn:#E8B93C;
  --up-soft:rgba(76,195,138,.14); --down-soft:rgba(240,104,106,.14); --warn-soft:rgba(232,185,60,.14);
  --shadow:0 12px 32px rgba(0,0,0,.5); --on-accent:#0C0D10;
  --sk-a:#1C1F25; --sk-b:#2A2E37;
  --sbw:248px; --r-card:10px; --r-btn:8px;
  --f-sans:"Onest",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --f-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  /* ── совместимость: старые токены finance.css → новая палитра ── */
  --surface-1:var(--surface); --surface-2:var(--elev); --surface-3:var(--border-strong);
  --header-grad-start:var(--surface); --header-grad-start-alt:var(--surface);
  --text-primary:#F4F2EE; --text-body:#D9D6D0; --text-table:#E4E1DB; --text-secondary:#B4B9C3;
  --text-muted:#9BA1AD; --text-th:#A9AFBA;
  --border-row:#22252C;
  --color-red:#F0686A; --color-red-deep:#F0686A; --color-green:#4CC38A; --color-yellow:#E8B93C;
  --color-blue:#6CB4F0; --color-orange:#F2A65A; --color-orange-deep:#F2A65A;
  --color-purple:#B79CF2; --color-purple-badge:#C9B6F6; --color-teal:#4FB3A9;
  --warning-bg:rgba(240,104,106,.12); --warning-border:rgba(240,104,106,.55);
  --caution-bg:rgba(242,166,90,.12); --caution-cell-bg:rgba(242,166,90,.12);
  --success-bg:rgba(76,195,138,.12); --success-border:rgba(76,195,138,.55);
  --danger-cell-bg:rgba(240,104,106,.12);
  --badge-green-bg:rgba(76,195,138,.08); --badge-red-bg:rgba(240,104,106,.06);
  --badge-yellow-bg:rgba(232,185,60,.08); --badge-blue-bg:rgba(108,180,240,.08);
  --font-family:var(--f-sans);
  --radius-lg:8px; --radius-xl:10px; --radius-2xl:var(--r-card);
  /* токены страниц (marketing_strategy / academy-подобные) */
  --ac-accent:var(--brand); --ac-text-dim:var(--text-secondary); --ac-surface-2:var(--elev);
  --border-color:var(--border);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg:#F6F4F1; --surface:#FFFFFF; --elev:#FBFAF8; --border:#E4DED6; --border-strong:#CFC8BE;
  --text:#1F1C1A; --muted:#65605A;
  --brand:#7A1F1F; --brand-solid:#7A1F1F; --brand-ink:#FFFFFF; --brand-soft:rgba(122,31,31,.08);
  --bloody:#B4232F; --brisket:#9A4A06; --pastrama:#0F766E;
  --up:#17703A; --down:#B3261E; --warn:#8A5B00;
  --up-soft:#E3F3E9; --down-soft:#FBE4E2; --warn-soft:#FBF0D5;
  --shadow:0 12px 32px rgba(40,25,20,.14); --on-accent:#FFFFFF;
  --sk-a:#ECE8E2; --sk-b:#F7F4F0;

  --text-primary:#1F1C1A; --text-body:#2E2A27; --text-table:#2E2A27; --text-secondary:#4A4540;
  --text-muted:#65605A; --text-th:#4A4540;
  --border-row:#EEE9E2;
  --color-red:#B3261E; --color-red-deep:#B3261E; --color-green:#17703A; --color-yellow:#8A5B00;
  --color-blue:#1D5FA8; --color-orange:#9A4A06; --color-orange-deep:#9A4A06;
  --color-purple:#5B3FA8; --color-purple-badge:#5B3FA8; --color-teal:#0F766E;
  --warning-bg:#FBE4E2; --warning-border:#E3A9A4;
  --caution-bg:#FBEBD9; --caution-cell-bg:#FBEBD9;
  --success-bg:#E3F3E9; --success-border:#9CCDB0;
  --danger-cell-bg:#FBE4E2;
  --badge-green-bg:#E3F3E9; --badge-red-bg:#FBE4E2; --badge-yellow-bg:#FBF0D5; --badge-blue-bg:#E2EDF8;
}
:root[data-sb="collapsed"] { --sbw:68px; }
@media (max-width:900px) { :root[data-sb="collapsed"] { --sbw:248px; } }

/* ───────── 2. База ───────── */
html { background: var(--bg); }
body {
  background: var(--bg); color: var(--text-body);
  font: 14px/1.5 var(--f-sans); -webkit-font-smoothing: antialiased; min-height: 100vh;
}
* { scrollbar-color: var(--border-strong) transparent; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
code, pre { font-family: var(--f-mono); font-size: 12.5px; }
.num, td.num, td.r, th.r, .card-value, .kpi-value, .metric-value, .p-kpi .val, .val { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--f-sans); }
.section-title { font: 600 18px/1.3 var(--f-sans); color: var(--text); margin: 28px 0 12px; letter-spacing: -.005em; }
.text-muted, .muted { color: var(--text-muted); }

/* ───────── 3. Оболочка ───────── */
.fin-app { display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr); min-height: 100vh;
  transition: grid-template-columns .28s cubic-bezier(.4,0,.2,1); }
.fin-app.anon { grid-template-columns: minmax(0, 1fr); }
.fin-sb { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface);
  border-right: 1px solid var(--border); overflow: hidden; z-index: 40; }
.fin-sb-head { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px; border-bottom: 1px solid var(--border); flex: none; }
.fin-logo { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-solid); color: #fff; display: grid; place-items: center; font: 700 14px var(--f-sans); letter-spacing: .02em; }
.fin-brand { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.fin-brand b { display: block; font: 650 15px/1.2 var(--f-sans); color: var(--text); }
.fin-brand span { font-size: 12px; color: var(--muted); }
.fin-icbtn { flex: none; width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; background: transparent; color: var(--muted);
  border: 1px solid transparent; border-radius: var(--r-btn); cursor: pointer; font: inherit; }
.fin-icbtn:hover { background: var(--elev); color: var(--text); }
.fin-icbtn svg { width: 20px; height: 20px; }
#navCollapse svg { transition: transform .28s; }
:root[data-sb="collapsed"] #navCollapse svg { transform: rotate(180deg); }
.fin-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 10px 16px; }
.fin-grp { margin-top: 14px; }
.fin-grp:first-child { margin-top: 4px; }
.fin-grp-t { height: 18px; padding: 0 10px; font: 600 11px/18px var(--f-sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; overflow: hidden; transition: opacity .2s; }
.fin-nv { position: relative; display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 10px; margin: 2px 0; border-radius: var(--r-btn);
  color: var(--text); font-size: 14px; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s; }
.fin-nv:hover { background: var(--elev); text-decoration: none; }
.fin-nv svg { flex: none; width: 20px; height: 20px; color: var(--muted); transition: color .15s; }
.fin-nv:hover svg { color: var(--text); }
.fin-nv .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; transition: opacity .2s; }
.fin-nv.active { background: var(--brand-soft); font-weight: 600; }
.fin-nv.active svg { color: var(--brand); }
.fin-nv.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.fin-sb-foot { flex: none; padding: 8px 10px; border-top: 1px solid var(--border); }
:root[data-sb="collapsed"] .fin-grp-t { opacity: 0; height: 0; }
:root[data-sb="collapsed"] .fin-grp { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
:root[data-sb="collapsed"] .fin-grp:first-child { border-top: 0; }
:root[data-sb="collapsed"] .fin-brand, :root[data-sb="collapsed"] .fin-nv .l { position: absolute; opacity: 0; pointer-events: none; width: 1px; overflow: hidden; clip-path: inset(50%); }
:root[data-sb="collapsed"] .fin-sb-head { padding: 0 15px; gap: 0; }
:root[data-sb="collapsed"] .fin-sb-head .fin-logo { display: none; }
:root[data-sb="collapsed"] #navCollapse { margin: 0 auto; }
.fin-scrim { display: none; }
#navOpen { display: none; }
@media (max-width: 900px) {
  .fin-app { grid-template-columns: minmax(0, 1fr); }
  .fin-sb { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); visibility: hidden;
    transition: transform .28s cubic-bezier(.4,0,.2,1), visibility 0s linear .28s; box-shadow: var(--shadow); }
  body.sb-open .fin-sb { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.4,0,.2,1), visibility 0s; }
  #navCollapse { display: none; }
  #navOpen { display: inline-grid; }
  :root[data-sb="collapsed"] .fin-brand, :root[data-sb="collapsed"] .fin-nv .l { position: static; opacity: 1; width: auto; clip-path: none; pointer-events: auto; }
  :root[data-sb="collapsed"] .fin-sb-head .fin-logo { display: grid; }
  :root[data-sb="collapsed"] .fin-grp-t { height: 18px; opacity: 1; }
  .fin-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .28s, visibility 0s linear .28s; z-index: 30; }
  body.sb-open .fin-scrim { opacity: 1; visibility: visible; transition: opacity .28s; }
  body.sb-open { overflow: hidden; }
}
.fin-main { min-width: 0; display: flex; flex-direction: column; }
.fin-tb { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.fin-crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; }
.fin-crumb .a { color: var(--muted); }
.fin-crumb .s { color: var(--muted); }
.fin-crumb .t { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.fin-acc { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.fin-acc a.fin-out { color: var(--muted); padding: 6px 10px; border-radius: var(--r-btn); }
.fin-acc a.fin-out:hover { background: var(--elev); color: var(--text); text-decoration: none; }
.ic-sun { display: none; } .ic-moon { display: block; }
:root[data-theme="light"] .ic-sun { display: block; } :root[data-theme="light"] .ic-moon { display: none; }
.fin-content { padding: 24px 32px 56px; max-width: 1480px; width: 100%; margin: 0 auto; min-width: 0; }
@media (max-width: 900px) { .fin-content { padding: 16px 16px 48px; } }
@media (max-width: 560px) { .fin-acc .hide-s { display: none; } }
.fin-anon-main { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }

/* шапка страницы */
.pg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.pg-head h1 { font: 650 26px/1.2 var(--f-sans); letter-spacing: -.01em; color: var(--text); margin: 0 0 4px; overflow-wrap: anywhere; }
.pg-head .sub { font-size: 13.5px; color: var(--muted); max-width: 900px; margin: 0; }
.pg-head .pg-badge { flex: none; }
@media (max-width: 560px) { .pg-head h1 { font-size: 21px; } }
.audit-badge, .pg-badge .audit-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font: 500 12px/1.4 var(--f-mono);
  background: var(--elev); color: var(--text-secondary); border: 1px solid var(--border); white-space: normal; }
.audit-badge.badge-neutral { background: var(--elev); color: var(--text-secondary); border-color: var(--border); }
.dark-page { background: transparent; padding: 0; }

/* переключатель «просмотр под ролью» (только владелец) */
.view-as-summary { list-style: none; cursor: pointer; user-select: none; font-size: 13px; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--r-btn); padding: 6px 10px; background: var(--surface); white-space: nowrap; }
.view-as-summary strong { color: var(--text); font-weight: 600; }
.view-as-switcher[open] .view-as-summary { border-color: var(--brand); }
.view-as-panel { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-card); box-shadow: var(--shadow); width: 280px; right: 0; }
.view-as-opt { border-radius: var(--r-btn); padding: 7px 8px; font-size: 13px; color: var(--text-secondary); border-color: var(--border); }
.view-as-opt:hover { color: var(--text); border-color: var(--brand); text-decoration: none; }
.view-as-opt.active { color: var(--text); border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.view-as-scope-title, .view-as-scope-line { font-size: 12px; color: var(--muted); }
.view-as-scope-list li { font-size: 12.5px; color: var(--text-secondary); border-left-color: var(--border); }
.view-as-banner { background: var(--warn-soft); color: var(--text); border-bottom: 1px solid var(--warn); font-size: 13px; padding: 8px 16px; border-radius: var(--r-btn); margin-bottom: 16px; border: 1px solid var(--warn); }
.view-as-banner a { color: var(--warn); font-weight: 700; text-decoration: underline; }

/* ───────── 4. Панель периода / фильтры ───────── */
.period-selector { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px;
  padding: 12px 14px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.period-selector:empty { display: none; }
.period-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.period-pill, a.period-pill { padding: 6px 13px; border-radius: 999px; font: 500 13px var(--f-sans); border: 1px solid var(--border); background: var(--elev); color: var(--text-secondary); white-space: nowrap; }
.period-pill:hover:not(.active) { color: var(--text); background: var(--elev); border-color: var(--border-strong); text-decoration: none; }
.period-pill.active { background: var(--brand-solid); color: var(--brand-ink); border-color: var(--brand-solid); font-weight: 600; }
.compare-toggle { font-size: 13px; color: var(--muted); gap: 10px; flex-wrap: wrap; }
.compare-toggle .compare-label { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.compare-switch { border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--elev); overflow: hidden; }
.compare-switch a, .compare-switch button { background: transparent; color: var(--text-secondary); font: 500 13px var(--f-sans); padding: 6px 12px; }
.compare-switch a:hover:not(.active), .compare-switch button:hover:not(.active) { color: var(--text); background: var(--surface); text-decoration: none; }
.compare-switch a.active, .compare-switch button.active { background: var(--brand-solid); color: var(--brand-ink); font-weight: 600; }
.compare-switch a + a { border-left-color: var(--border); }
.range-note { font-size: 13px; color: var(--muted); } .range-note b { color: var(--text-secondary); }

/* ───────── 5. Карточки, KPI ───────── */
.card, .kpi-tile, .p-kpi, .chart-wrap, .section-card, .table-wrap, .comparison-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); color: var(--text-body); }
.card, .kpi-tile { padding: 16px; }
.p-kpi { padding: 14px 16px; }
.chart-wrap, .section-card { padding: 18px; margin-bottom: 16px; }
.table-wrap { margin-bottom: 16px; }
.card-label, .kpi-tile .kpi-label, .p-kpi .lbl, .comparison-kpi .kpi-label { font: 500 12.5px/1.35 var(--f-sans); text-transform: none; letter-spacing: 0; color: var(--muted); margin-bottom: 6px; }
.card-value, .kpi-tile .kpi-value, .p-kpi .val { font: 600 26px/1.15 var(--f-mono); letter-spacing: -.02em; color: var(--text); }
.p-kpi .val { font-size: 22px; }
.comparison-kpi .kpi-value { font: 600 26px/1.15 var(--f-mono); color: var(--text); }
.card-sub, .kpi-tile .kpi-sub, .p-kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.card-value.green, .kpi-tile .kpi-value.green, .p-kpi .val.g { color: var(--up); }
.card-value.red, .kpi-tile .kpi-value.red, .p-kpi .val.r { color: var(--down); }
.card-value.yellow, .kpi-tile .kpi-value.yellow, .p-kpi .val.y { color: var(--warn); }
.card-value.blue, .kpi-tile .kpi-value.blue, .p-kpi .val.b { color: var(--color-blue); }
.cards { gap: 12px; margin-bottom: 20px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.chart-wrap h3, .section-card h3, .table-wrap h3 { font: 600 15px/1.35 var(--f-sans); text-transform: none; letter-spacing: 0; color: var(--text); margin: 0 0 12px; }
.table-wrap h3 { padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--border); }
.grid2, .grid3 { gap: 16px; }
.note, .insight-card { background: var(--elev); color: var(--text-secondary); border-left: 3px solid var(--border-strong); border-radius: var(--r-btn); font-size: 13px; line-height: 1.55; }
.note b, .insight-card b { color: var(--text); }
.insight-card.blue { border-left-color: var(--color-blue); } .insight-card.green { border-left-color: var(--up); }
.alert-card, .warning-card { border-radius: var(--r-card); }
.alert-card.critical, .warning-card { background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--text); }
.alert-card.critical .title { color: var(--down); }
.alert-card.caution { background: var(--caution-bg); border: 1px solid var(--color-orange); }
.alert-card.caution .title { color: var(--color-orange); }
.alert-card.success { background: var(--success-bg); border: 1px solid var(--success-border); }
.alert-card.success .title { color: var(--up); }
.alert-card .body { color: var(--text); } .alert-card .sub { color: var(--muted); }
.warning-card strong { color: var(--text); }
.comparison-grid { gap: 16px; }
.comparison-card-hdr { background: var(--elev); border-bottom: 1px solid var(--border); }
.comparison-card-hdr .name { font: 650 14px var(--f-sans); color: var(--text); }
.metric-row { border-bottom: 1px solid var(--border-row); }
.metric-row .metric-label { font-size: 13px; color: var(--muted); }
.metric-row .metric-value { font: 600 14.5px var(--f-mono); color: var(--text); }
.pm-row { border-bottom-color: var(--border-row); } .pm-row:last-child { background: var(--elev); }
.delta-badge { font: 600 12px var(--f-mono); }
.delta-badge.up { color: var(--up); background: var(--up-soft); } .delta-badge.up::before { border-bottom-color: var(--up); }
.delta-badge.down { color: var(--down); background: var(--down-soft); } .delta-badge.down::before { border-top-color: var(--down); }
.delta-badge.flat { color: var(--muted); background: var(--elev); } .delta-badge.flat::before { background: var(--muted); }
.badge { font-size: 12px; } .badge.green { background: var(--badge-green-bg); color: var(--up); } .badge.red { background: var(--badge-red-bg); color: var(--down); }
.badge.yellow { background: var(--badge-yellow-bg); color: var(--warn); } .badge.blue { background: var(--badge-blue-bg); color: var(--color-blue); }
.positive { color: var(--up); } .negative { color: var(--down); }

/* ───────── 6. Таблицы ───────── */
table, .data-table { font-size: 13.5px; color: var(--text-table); }
th, .data-table th { background: var(--elev); color: var(--muted); font: 600 12px var(--f-sans); text-transform: none; letter-spacing: .02em; padding: 10px 14px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
td, .data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-row); color: var(--text-table); }
td b { color: var(--text); }
tr:hover td { background: var(--elev); }
.tbl-scroll { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.table-wrap .tbl-scroll, .chart-wrap .tbl-scroll, .section-card .tbl-scroll, .tbl-scroll .tbl-scroll { border: 0; border-radius: 0; background: transparent; }
td.num, .num, td.r, th.r { white-space: nowrap; }

/* ───────── 7. Формы и кнопки ───────── */
.fin-app input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
.fin-app select, .fin-app textarea { background: var(--elev); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-btn); font-family: var(--f-sans); }
.fin-app input::placeholder, .fin-app textarea::placeholder { color: var(--muted); }
.fin-app input[type=checkbox], .fin-app input[type=radio] { accent-color: var(--brand-solid); }
.fin-app input:disabled, .fin-app select:disabled { opacity: .55; }
.fin-btn, .login-btn, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; font: 600 14px var(--f-sans);
  background: var(--brand-solid); color: var(--brand-ink); border: 1px solid transparent; border-radius: var(--r-btn); cursor: pointer; text-decoration: none; }
.fin-btn:hover, .login-btn:hover, .btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--elev); filter: none; }
.fin-app button:not([class]):not([style*="background"]), .fin-app input[type=submit] {
  background: var(--brand-solid); color: var(--brand-ink); border: 1px solid transparent; border-radius: var(--r-btn); padding: 7px 14px; font: 600 13.5px var(--f-sans); cursor: pointer; }
.fin-app button:not([class]):not([style*="background"]):hover { filter: brightness(1.12); }
.fin-app button:disabled { opacity: .5; cursor: not-allowed; }
.logout-link { color: var(--muted); border-color: var(--border); border-radius: var(--r-btn); font-size: 13px; }

/* ───────── 8. Пустые состояния ───────── */
.fin-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 16px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-card); background: var(--elev); }
.fin-empty .ei { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; }
.fin-empty .ei svg { width: 22px; height: 22px; }
.fin-empty .et { font: 600 16px var(--f-sans); color: var(--text); }
.fin-empty .ex { font-size: 14px; color: var(--muted); max-width: 460px; margin: 0; }
.fin-empty .btn { margin-top: 10px; }
.fin-empty.ok .ei { background: var(--up-soft); color: var(--up); }
.fin-empty.compact { padding: 18px 12px; }
td > .fin-empty, .chart-wrap > .fin-empty, .section-card > .fin-empty, .table-wrap > .fin-empty { border: 0; background: transparent; }
tr:hover td.empty-cell { background: transparent; }
td.empty-cell { padding: 0; }

/* ───────── 9. Скелетоны ───────── */
.fin-sk { display: block; border-radius: 6px; background: var(--sk-a); position: relative; overflow: hidden; }
.fin-sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--sk-b), transparent); animation: fin-shimmer 1.5s infinite; }
@keyframes fin-shimmer { to { transform: translateX(100%); } }
.fin-sk-bars { position: absolute; inset: 14px; display: flex; align-items: flex-end; gap: 8px; }
.fin-sk-bars .fin-sk { flex: 1; border-radius: 4px 4px 0 0; }
/* графики: скелет поверх canvas, пока Chart.js не отрисовал */
.cv-host { position: relative; }
.cv-skel { position: absolute; inset: 0; z-index: 2; background: var(--surface); border-radius: var(--r-btn); transition: opacity .35s ease; overflow: hidden; }
.cv-host[data-state="ready"] > .cv-skel { opacity: 0; pointer-events: none; }
.cv-host[data-state="error"] > .cv-skel { opacity: 1; }
.cv-host[data-state="loading"] > canvas { opacity: 0; }
.cv-host > canvas { transition: opacity .35s ease; }
.cv-err { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 3; padding: 8px; }
.cv-host[data-state="error"] > .cv-err { display: flex; }
.cv-host[data-state="error"] > .cv-skel .fin-sk-bars { display: none; }
/* страница целиком (долгие серверные отчёты): показываем скелет пока документ не загружен */
@media (prefers-reduced-motion: reduce) {
  .fin-sk::after { animation: none; transform: none; opacity: .5; }
  .fin-app, .fin-sb, .fin-scrim, .fin-nv, .fin-nv .l, .fin-grp-t, #navCollapse svg, .cv-skel, .cv-host > canvas { transition: none !important; }
}

/* ───────── 10. Вход ───────── */
.login-box { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 14px !important; box-shadow: var(--shadow); margin: 0 auto !important; text-align: left; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login-title { font: 650 22px var(--f-sans); color: var(--text); }
.login-sub { color: var(--muted); font-size: 14px; }
.login-box input { background: var(--elev) !important; color: var(--text) !important; border: 1px solid var(--border-strong) !important; border-radius: var(--r-btn) !important; font-family: var(--f-sans); }
.login-box input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand) !important; }
.login-box button, .login-box a[style*="display:block"] { background: var(--brand-solid) !important; color: var(--brand-ink) !important; border-radius: var(--r-btn) !important; }
.login-box a { color: var(--muted); }
.login-link a { color: var(--brand); }
.login-err { color: var(--down); background: var(--down-soft); border-radius: var(--r-btn); padding: 8px 10px; text-align: left; }

/* ───────── 11. Адаптеры инлайн-цветов (сгенерировано; шаблоны писались под один тёмный фон) ───────── */
[style^="color:#fc8181" i],
[style*=";color:#fc8181" i],
[style*="; color:#fc8181" i],
[style^="color: #fc8181" i],
[style*=";color: #fc8181" i],
[style*="; color: #fc8181" i],
[style^="color:#e53e3e" i],
[style*=";color:#e53e3e" i],
[style*="; color:#e53e3e" i],
[style^="color: #e53e3e" i],
[style*=";color: #e53e3e" i],
[style*="; color: #e53e3e" i],
[style^="color:#f85149" i],
[style*=";color:#f85149" i],
[style*="; color:#f85149" i],
[style^="color: #f85149" i],
[style*=";color: #f85149" i],
[style*="; color: #f85149" i],
[style^="color:#ff5555" i],
[style*=";color:#ff5555" i],
[style*="; color:#ff5555" i],
[style^="color: #ff5555" i],
[style*=";color: #ff5555" i],
[style*="; color: #ff5555" i],
[style^="color:#feb2b2" i],
[style*=";color:#feb2b2" i],
[style*="; color:#feb2b2" i],
[style^="color: #feb2b2" i],
[style*=";color: #feb2b2" i],
[style*="; color: #feb2b2" i],
[style^="color:#e0b4b8" i],
[style*=";color:#e0b4b8" i],
[style*="; color:#e0b4b8" i],
[style^="color: #e0b4b8" i],
[style*=";color: #e0b4b8" i],
[style*="; color: #e0b4b8" i],
[style^="color:#d4b0b4" i],
[style*=";color:#d4b0b4" i],
[style*="; color:#d4b0b4" i],
[style^="color: #d4b0b4" i],
[style*=";color: #d4b0b4" i],
[style*="; color: #d4b0b4" i] { color: var(--color-red) !important; }
[style^="color:#68d391" i],
[style*=";color:#68d391" i],
[style*="; color:#68d391" i],
[style^="color: #68d391" i],
[style*=";color: #68d391" i],
[style*="; color: #68d391" i],
[style^="color:#48bb78" i],
[style*=";color:#48bb78" i],
[style*="; color:#48bb78" i],
[style^="color: #48bb78" i],
[style*=";color: #48bb78" i],
[style*="; color: #48bb78" i],
[style^="color:#9ae6b4" i],
[style*=";color:#9ae6b4" i],
[style*="; color:#9ae6b4" i],
[style^="color: #9ae6b4" i],
[style*=";color: #9ae6b4" i],
[style*="; color: #9ae6b4" i],
[style^="color:#b4e0c4" i],
[style*=";color:#b4e0c4" i],
[style*="; color:#b4e0c4" i],
[style^="color: #b4e0c4" i],
[style*=";color: #b4e0c4" i],
[style*="; color: #b4e0c4" i] { color: var(--color-green) !important; }
[style^="color:#f6ad55" i],
[style*=";color:#f6ad55" i],
[style*="; color:#f6ad55" i],
[style^="color: #f6ad55" i],
[style*=";color: #f6ad55" i],
[style*="; color: #f6ad55" i],
[style^="color:#f0883e" i],
[style*=";color:#f0883e" i],
[style*="; color:#f0883e" i],
[style^="color: #f0883e" i],
[style*=";color: #f0883e" i],
[style*="; color: #f0883e" i],
[style^="color:#ed8936" i],
[style*=";color:#ed8936" i],
[style*="; color:#ed8936" i],
[style^="color: #ed8936" i],
[style*=";color: #ed8936" i],
[style*="; color: #ed8936" i],
[style^="color:#e0a458" i],
[style*=";color:#e0a458" i],
[style*="; color:#e0a458" i],
[style^="color: #e0a458" i],
[style*=";color: #e0a458" i],
[style*="; color: #e0a458" i],
[style^="color:#fbd38d" i],
[style*=";color:#fbd38d" i],
[style*="; color:#fbd38d" i],
[style^="color: #fbd38d" i],
[style*=";color: #fbd38d" i],
[style*="; color: #fbd38d" i],
[style^="color:#e8d5b0" i],
[style*=";color:#e8d5b0" i],
[style*="; color:#e8d5b0" i],
[style^="color: #e8d5b0" i],
[style*=";color: #e8d5b0" i],
[style*="; color: #e8d5b0" i] { color: var(--color-orange) !important; }
[style^="color:#f6e05e" i],
[style*=";color:#f6e05e" i],
[style*="; color:#f6e05e" i],
[style^="color: #f6e05e" i],
[style*=";color: #f6e05e" i],
[style*="; color: #f6e05e" i],
[style^="color:#f0c674" i],
[style*=";color:#f0c674" i],
[style*="; color:#f0c674" i],
[style^="color: #f0c674" i],
[style*=";color: #f0c674" i],
[style*="; color: #f0c674" i] { color: var(--color-yellow) !important; }
[style^="color:#63b3ed" i],
[style*=";color:#63b3ed" i],
[style*="; color:#63b3ed" i],
[style^="color: #63b3ed" i],
[style*=";color: #63b3ed" i],
[style*="; color: #63b3ed" i],
[style^="color:#4299e1" i],
[style*=";color:#4299e1" i],
[style*="; color:#4299e1" i],
[style^="color: #4299e1" i],
[style*=";color: #4299e1" i],
[style*="; color: #4299e1" i],
[style^="color:#90cdf4" i],
[style*=";color:#90cdf4" i],
[style*="; color:#90cdf4" i],
[style^="color: #90cdf4" i],
[style*=";color: #90cdf4" i],
[style*="; color: #90cdf4" i],
[style^="color:#b8d4ea" i],
[style*=";color:#b8d4ea" i],
[style*="; color:#b8d4ea" i],
[style^="color: #b8d4ea" i],
[style*=";color: #b8d4ea" i],
[style*="; color: #b8d4ea" i] { color: var(--color-blue) !important; }
[style^="color:#9f7aea" i],
[style*=";color:#9f7aea" i],
[style*="; color:#9f7aea" i],
[style^="color: #9f7aea" i],
[style*=";color: #9f7aea" i],
[style*="; color: #9f7aea" i],
[style^="color:#b794f4" i],
[style*=";color:#b794f4" i],
[style*="; color:#b794f4" i],
[style^="color: #b794f4" i],
[style*=";color: #b794f4" i],
[style*="; color: #b794f4" i],
[style^="color:#d6bcfa" i],
[style*=";color:#d6bcfa" i],
[style*="; color:#d6bcfa" i],
[style^="color: #d6bcfa" i],
[style*=";color: #d6bcfa" i],
[style*="; color: #d6bcfa" i] { color: var(--color-purple) !important; }
[style^="color:#718096" i],
[style*=";color:#718096" i],
[style*="; color:#718096" i],
[style^="color: #718096" i],
[style*=";color: #718096" i],
[style*="; color: #718096" i],
[style^="color:#8fa3b8" i],
[style*=";color:#8fa3b8" i],
[style*="; color:#8fa3b8" i],
[style^="color: #8fa3b8" i],
[style*=";color: #8fa3b8" i],
[style*="; color: #8fa3b8" i],
[style^="color:#7d90a5" i],
[style*=";color:#7d90a5" i],
[style*="; color:#7d90a5" i],
[style^="color: #7d90a5" i],
[style*=";color: #7d90a5" i],
[style*="; color: #7d90a5" i],
[style^="color:#6b7f94" i],
[style*=";color:#6b7f94" i],
[style*="; color:#6b7f94" i],
[style^="color: #6b7f94" i],
[style*=";color: #6b7f94" i],
[style*="; color: #6b7f94" i],
[style^="color:#9fb3c8" i],
[style*=";color:#9fb3c8" i],
[style*="; color:#9fb3c8" i],
[style^="color: #9fb3c8" i],
[style*=";color: #9fb3c8" i],
[style*="; color: #9fb3c8" i],
[style^="color:#a8c0d4" i],
[style*=";color:#a8c0d4" i],
[style*="; color:#a8c0d4" i],
[style^="color: #a8c0d4" i],
[style*=";color: #a8c0d4" i],
[style*="; color: #a8c0d4" i] { color: var(--text-muted) !important; }
[style^="color:#cbd5e0" i],
[style*=";color:#cbd5e0" i],
[style*="; color:#cbd5e0" i],
[style^="color: #cbd5e0" i],
[style*=";color: #cbd5e0" i],
[style*="; color: #cbd5e0" i],
[style^="color:#a0aec0" i],
[style*=";color:#a0aec0" i],
[style*="; color:#a0aec0" i],
[style^="color: #a0aec0" i],
[style*=";color: #a0aec0" i],
[style*="; color: #a0aec0" i] { color: var(--text-secondary) !important; }
[style^="color:#e2e8f0" i],
[style*=";color:#e2e8f0" i],
[style*="; color:#e2e8f0" i],
[style^="color: #e2e8f0" i],
[style*=";color: #e2e8f0" i],
[style*="; color: #e2e8f0" i],
[style^="color:#e8edf5" i],
[style*=";color:#e8edf5" i],
[style*="; color:#e8edf5" i],
[style^="color: #e8edf5" i],
[style*=";color: #e8edf5" i],
[style*="; color: #e8edf5" i] { color: var(--text) !important; }
[style^="color:#0f1117" i],
[style*=";color:#0f1117" i],
[style*="; color:#0f1117" i],
[style^="color: #0f1117" i],
[style*=";color: #0f1117" i],
[style*="; color: #0f1117" i],
[style^="color:#0b0e16" i],
[style*=";color:#0b0e16" i],
[style*="; color:#0b0e16" i],
[style^="color: #0b0e16" i],
[style*=";color: #0b0e16" i],
[style*="; color: #0b0e16" i] { color: var(--on-accent) !important; }
[style^="background:#1e2a3a" i],
[style*=";background:#1e2a3a" i],
[style*="; background:#1e2a3a" i],
[style^="background: #1e2a3a" i],
[style*=";background: #1e2a3a" i],
[style*="; background: #1e2a3a" i],
[style^="background-color:#1e2a3a" i],
[style*=";background-color:#1e2a3a" i],
[style*="; background-color:#1e2a3a" i],
[style^="background-color: #1e2a3a" i],
[style*=";background-color: #1e2a3a" i],
[style*="; background-color: #1e2a3a" i],
[style^="background:#1a2232" i],
[style*=";background:#1a2232" i],
[style*="; background:#1a2232" i],
[style^="background: #1a2232" i],
[style*=";background: #1a2232" i],
[style*="; background: #1a2232" i],
[style^="background-color:#1a2232" i],
[style*=";background-color:#1a2232" i],
[style*="; background-color:#1a2232" i],
[style^="background-color: #1a2232" i],
[style*=";background-color: #1a2232" i],
[style*="; background-color: #1a2232" i],
[style^="background:#1b2430" i],
[style*=";background:#1b2430" i],
[style*="; background:#1b2430" i],
[style^="background: #1b2430" i],
[style*=";background: #1b2430" i],
[style*="; background: #1b2430" i],
[style^="background-color:#1b2430" i],
[style*=";background-color:#1b2430" i],
[style*="; background-color:#1b2430" i],
[style^="background-color: #1b2430" i],
[style*=";background-color: #1b2430" i],
[style*="; background-color: #1b2430" i],
[style^="background:#1f2937" i],
[style*=";background:#1f2937" i],
[style*="; background:#1f2937" i],
[style^="background: #1f2937" i],
[style*=";background: #1f2937" i],
[style*="; background: #1f2937" i],
[style^="background-color:#1f2937" i],
[style*=";background-color:#1f2937" i],
[style*="; background-color:#1f2937" i],
[style^="background-color: #1f2937" i],
[style*=";background-color: #1f2937" i],
[style*="; background-color: #1f2937" i],
[style^="background:#242f3d" i],
[style*=";background:#242f3d" i],
[style*="; background:#242f3d" i],
[style^="background: #242f3d" i],
[style*=";background: #242f3d" i],
[style*="; background: #242f3d" i],
[style^="background-color:#242f3d" i],
[style*=";background-color:#242f3d" i],
[style*="; background-color:#242f3d" i],
[style^="background-color: #242f3d" i],
[style*=";background-color: #242f3d" i],
[style*="; background-color: #242f3d" i],
[style^="background:#232f42" i],
[style*=";background:#232f42" i],
[style*="; background:#232f42" i],
[style^="background: #232f42" i],
[style*=";background: #232f42" i],
[style*="; background: #232f42" i],
[style^="background-color:#232f42" i],
[style*=";background-color:#232f42" i],
[style*="; background-color:#232f42" i],
[style^="background-color: #232f42" i],
[style*=";background-color: #232f42" i],
[style*="; background-color: #232f42" i],
[style^="background:#1b1f27" i],
[style*=";background:#1b1f27" i],
[style*="; background:#1b1f27" i],
[style^="background: #1b1f27" i],
[style*=";background: #1b1f27" i],
[style*="; background: #1b1f27" i],
[style^="background-color:#1b1f27" i],
[style*=";background-color:#1b1f27" i],
[style*="; background-color:#1b1f27" i],
[style^="background-color: #1b1f27" i],
[style*=";background-color: #1b1f27" i],
[style*="; background-color: #1b1f27" i],
[style^="background:#252d38" i],
[style*=";background:#252d38" i],
[style*="; background:#252d38" i],
[style^="background: #252d38" i],
[style*=";background: #252d38" i],
[style*="; background: #252d38" i],
[style^="background-color:#252d38" i],
[style*=";background-color:#252d38" i],
[style*="; background-color:#252d38" i],
[style^="background-color: #252d38" i],
[style*=";background-color: #252d38" i],
[style*="; background-color: #252d38" i],
[style^="background:#1a2c3f" i],
[style*=";background:#1a2c3f" i],
[style*="; background:#1a2c3f" i],
[style^="background: #1a2c3f" i],
[style*=";background: #1a2c3f" i],
[style*="; background: #1a2c3f" i],
[style^="background-color:#1a2c3f" i],
[style*=";background-color:#1a2c3f" i],
[style*="; background-color:#1a2c3f" i],
[style^="background-color: #1a2c3f" i],
[style*=";background-color: #1a2c3f" i],
[style*="; background-color: #1a2c3f" i],
[style^="background:#1a222e" i],
[style*=";background:#1a222e" i],
[style*="; background:#1a222e" i],
[style^="background: #1a222e" i],
[style*=";background: #1a222e" i],
[style*="; background: #1a222e" i],
[style^="background-color:#1a222e" i],
[style*=";background-color:#1a222e" i],
[style*="; background-color:#1a222e" i],
[style^="background-color: #1a222e" i],
[style*=";background-color: #1a222e" i],
[style*="; background-color: #1a222e" i],
[style^="background:#2a2f3a" i],
[style*=";background:#2a2f3a" i],
[style*="; background:#2a2f3a" i],
[style^="background: #2a2f3a" i],
[style*=";background: #2a2f3a" i],
[style*="; background: #2a2f3a" i],
[style^="background-color:#2a2f3a" i],
[style*=";background-color:#2a2f3a" i],
[style*="; background-color:#2a2f3a" i],
[style^="background-color: #2a2f3a" i],
[style*=";background-color: #2a2f3a" i],
[style*="; background-color: #2a2f3a" i],
[style^="background:#2f3a4a" i],
[style*=";background:#2f3a4a" i],
[style*="; background:#2f3a4a" i],
[style^="background: #2f3a4a" i],
[style*=";background: #2f3a4a" i],
[style*="; background: #2f3a4a" i],
[style^="background-color:#2f3a4a" i],
[style*=";background-color:#2f3a4a" i],
[style*="; background-color:#2f3a4a" i],
[style^="background-color: #2f3a4a" i],
[style*=";background-color: #2f3a4a" i],
[style*="; background-color: #2f3a4a" i] { background: var(--elev) !important; }
[style^="background:#0f1117" i],
[style*=";background:#0f1117" i],
[style*="; background:#0f1117" i],
[style^="background: #0f1117" i],
[style*=";background: #0f1117" i],
[style*="; background: #0f1117" i],
[style^="background-color:#0f1117" i],
[style*=";background-color:#0f1117" i],
[style*="; background-color:#0f1117" i],
[style^="background-color: #0f1117" i],
[style*=";background-color: #0f1117" i],
[style*="; background-color: #0f1117" i],
[style^="background:#0b0e16" i],
[style*=";background:#0b0e16" i],
[style*="; background:#0b0e16" i],
[style^="background: #0b0e16" i],
[style*=";background: #0b0e16" i],
[style*="; background: #0b0e16" i],
[style^="background-color:#0b0e16" i],
[style*=";background-color:#0b0e16" i],
[style*="; background-color:#0b0e16" i],
[style^="background-color: #0b0e16" i],
[style*=";background-color: #0b0e16" i],
[style*="; background-color: #0b0e16" i] { background: var(--bg) !important; }
[style^="background:#2d3748" i],
[style*=";background:#2d3748" i],
[style*="; background:#2d3748" i],
[style^="background: #2d3748" i],
[style*=";background: #2d3748" i],
[style*="; background: #2d3748" i],
[style^="background-color:#2d3748" i],
[style*=";background-color:#2d3748" i],
[style*="; background-color:#2d3748" i],
[style^="background-color: #2d3748" i],
[style*=";background-color: #2d3748" i],
[style*="; background-color: #2d3748" i],
[style^="background:#2d3b52" i],
[style*=";background:#2d3b52" i],
[style*="; background:#2d3b52" i],
[style^="background: #2d3b52" i],
[style*=";background: #2d3b52" i],
[style*="; background: #2d3b52" i],
[style^="background-color:#2d3b52" i],
[style*=";background-color:#2d3b52" i],
[style*="; background-color:#2d3b52" i],
[style^="background-color: #2d3b52" i],
[style*=";background-color: #2d3b52" i],
[style*="; background-color: #2d3b52" i],
[style^="background:#2d3a4a" i],
[style*=";background:#2d3a4a" i],
[style*="; background:#2d3a4a" i],
[style^="background: #2d3a4a" i],
[style*=";background: #2d3a4a" i],
[style*="; background: #2d3a4a" i],
[style^="background-color:#2d3a4a" i],
[style*=";background-color:#2d3a4a" i],
[style*="; background-color:#2d3a4a" i],
[style^="background-color: #2d3a4a" i],
[style*=";background-color: #2d3a4a" i],
[style*="; background-color: #2d3a4a" i],
[style^="background:#3a4a5e" i],
[style*=";background:#3a4a5e" i],
[style*="; background:#3a4a5e" i],
[style^="background: #3a4a5e" i],
[style*=";background: #3a4a5e" i],
[style*="; background: #3a4a5e" i],
[style^="background-color:#3a4a5e" i],
[style*=";background-color:#3a4a5e" i],
[style*="; background-color:#3a4a5e" i],
[style^="background-color: #3a4a5e" i],
[style*=";background-color: #3a4a5e" i],
[style*="; background-color: #3a4a5e" i] { background: var(--border) !important; }
[style^="background:#3a3020" i],
[style*=";background:#3a3020" i],
[style*="; background:#3a3020" i],
[style^="background: #3a3020" i],
[style*=";background: #3a3020" i],
[style*="; background: #3a3020" i],
[style^="background-color:#3a3020" i],
[style*=";background-color:#3a3020" i],
[style*="; background-color:#3a3020" i],
[style^="background-color: #3a3020" i],
[style*=";background-color: #3a3020" i],
[style*="; background-color: #3a3020" i],
[style^="background:#2a2418" i],
[style*=";background:#2a2418" i],
[style*="; background:#2a2418" i],
[style^="background: #2a2418" i],
[style*=";background: #2a2418" i],
[style*="; background: #2a2418" i],
[style^="background-color:#2a2418" i],
[style*=";background-color:#2a2418" i],
[style*="; background-color:#2a2418" i],
[style^="background-color: #2a2418" i],
[style*=";background-color: #2a2418" i],
[style*="; background-color: #2a2418" i],
[style^="background:#3d2f0d" i],
[style*=";background:#3d2f0d" i],
[style*="; background:#3d2f0d" i],
[style^="background: #3d2f0d" i],
[style*=";background: #3d2f0d" i],
[style*="; background: #3d2f0d" i],
[style^="background-color:#3d2f0d" i],
[style*=";background-color:#3d2f0d" i],
[style*="; background-color:#3d2f0d" i],
[style^="background-color: #3d2f0d" i],
[style*=";background-color: #3d2f0d" i],
[style*="; background-color: #3d2f0d" i],
[style^="background:#5c3f1a" i],
[style*=";background:#5c3f1a" i],
[style*="; background:#5c3f1a" i],
[style^="background: #5c3f1a" i],
[style*=";background: #5c3f1a" i],
[style*="; background: #5c3f1a" i],
[style^="background-color:#5c3f1a" i],
[style*=";background-color:#5c3f1a" i],
[style*="; background-color:#5c3f1a" i],
[style^="background-color: #5c3f1a" i],
[style*=";background-color: #5c3f1a" i],
[style*="; background-color: #5c3f1a" i],
[style^="background:#3a2418" i],
[style*=";background:#3a2418" i],
[style*="; background:#3a2418" i],
[style^="background: #3a2418" i],
[style*=";background: #3a2418" i],
[style*="; background: #3a2418" i],
[style^="background-color:#3a2418" i],
[style*=";background-color:#3a2418" i],
[style*="; background-color:#3a2418" i],
[style^="background-color: #3a2418" i],
[style*=";background-color: #3a2418" i],
[style*="; background-color: #3a2418" i] { background: var(--warn-soft) !important; }
[style^="background:#2a1a1c" i],
[style*=";background:#2a1a1c" i],
[style*="; background:#2a1a1c" i],
[style^="background: #2a1a1c" i],
[style*=";background: #2a1a1c" i],
[style*="; background: #2a1a1c" i],
[style^="background-color:#2a1a1c" i],
[style*=";background-color:#2a1a1c" i],
[style*="; background-color:#2a1a1c" i],
[style^="background-color: #2a1a1c" i],
[style*=";background-color: #2a1a1c" i],
[style*="; background-color: #2a1a1c" i],
[style^="background:#3a1a1a" i],
[style*=";background:#3a1a1a" i],
[style*="; background:#3a1a1a" i],
[style^="background: #3a1a1a" i],
[style*=";background: #3a1a1a" i],
[style*="; background: #3a1a1a" i],
[style^="background-color:#3a1a1a" i],
[style*=";background-color:#3a1a1a" i],
[style*="; background-color:#3a1a1a" i],
[style^="background-color: #3a1a1a" i],
[style*=";background-color: #3a1a1a" i],
[style*="; background-color: #3a1a1a" i],
[style^="background:#2d1f1f" i],
[style*=";background:#2d1f1f" i],
[style*="; background:#2d1f1f" i],
[style^="background: #2d1f1f" i],
[style*=";background: #2d1f1f" i],
[style*="; background: #2d1f1f" i],
[style^="background-color:#2d1f1f" i],
[style*=";background-color:#2d1f1f" i],
[style*="; background-color:#2d1f1f" i],
[style^="background-color: #2d1f1f" i],
[style*=";background-color: #2d1f1f" i],
[style*="; background-color: #2d1f1f" i],
[style^="background:#5c1f24" i],
[style*=";background:#5c1f24" i],
[style*="; background:#5c1f24" i],
[style^="background: #5c1f24" i],
[style*=";background: #5c1f24" i],
[style*="; background: #5c1f24" i],
[style^="background-color:#5c1f24" i],
[style*=";background-color:#5c1f24" i],
[style*="; background-color:#5c1f24" i],
[style^="background-color: #5c1f24" i],
[style*=";background-color: #5c1f24" i],
[style*="; background-color: #5c1f24" i],
[style^="background:#331f22" i],
[style*=";background:#331f22" i],
[style*="; background:#331f22" i],
[style^="background: #331f22" i],
[style*=";background: #331f22" i],
[style*="; background: #331f22" i],
[style^="background-color:#331f22" i],
[style*=";background-color:#331f22" i],
[style*="; background-color:#331f22" i],
[style^="background-color: #331f22" i],
[style*=";background-color: #331f22" i],
[style*="; background-color: #331f22" i] { background: var(--down-soft) !important; }
[style^="background:#16241c" i],
[style*=";background:#16241c" i],
[style*="; background:#16241c" i],
[style^="background: #16241c" i],
[style*=";background: #16241c" i],
[style*="; background: #16241c" i],
[style^="background-color:#16241c" i],
[style*=";background-color:#16241c" i],
[style*="; background-color:#16241c" i],
[style^="background-color: #16241c" i],
[style*=";background-color: #16241c" i],
[style*="; background-color: #16241c" i],
[style^="background:#1c3a2a" i],
[style*=";background:#1c3a2a" i],
[style*="; background:#1c3a2a" i],
[style^="background: #1c3a2a" i],
[style*=";background: #1c3a2a" i],
[style*="; background: #1c3a2a" i],
[style^="background-color:#1c3a2a" i],
[style*=";background-color:#1c3a2a" i],
[style*="; background-color:#1c3a2a" i],
[style^="background-color: #1c3a2a" i],
[style*=";background-color: #1c3a2a" i],
[style*="; background-color: #1c3a2a" i],
[style^="background:#1a2d1f" i],
[style*=";background:#1a2d1f" i],
[style*="; background:#1a2d1f" i],
[style^="background: #1a2d1f" i],
[style*=";background: #1a2d1f" i],
[style*="; background: #1a2d1f" i],
[style^="background-color:#1a2d1f" i],
[style*=";background-color:#1a2d1f" i],
[style*="; background-color:#1a2d1f" i],
[style^="background-color: #1a2d1f" i],
[style*=";background-color: #1a2d1f" i],
[style*="; background-color: #1a2d1f" i],
[style^="background:#1a3a2a" i],
[style*=";background:#1a3a2a" i],
[style*="; background:#1a3a2a" i],
[style^="background: #1a3a2a" i],
[style*=";background: #1a3a2a" i],
[style*="; background: #1a3a2a" i],
[style^="background-color:#1a3a2a" i],
[style*=";background-color:#1a3a2a" i],
[style*="; background-color:#1a3a2a" i],
[style^="background-color: #1a3a2a" i],
[style*=";background-color: #1a3a2a" i],
[style*="; background-color: #1a3a2a" i],
[style^="background:#1f4030" i],
[style*=";background:#1f4030" i],
[style*="; background:#1f4030" i],
[style^="background: #1f4030" i],
[style*=";background: #1f4030" i],
[style*="; background: #1f4030" i],
[style^="background-color:#1f4030" i],
[style*=";background-color:#1f4030" i],
[style*="; background-color:#1f4030" i],
[style^="background-color: #1f4030" i],
[style*=";background-color: #1f4030" i],
[style*="; background-color: #1f4030" i],
[style^="background:#1b2d22" i],
[style*=";background:#1b2d22" i],
[style*="; background:#1b2d22" i],
[style^="background: #1b2d22" i],
[style*=";background: #1b2d22" i],
[style*="; background: #1b2d22" i],
[style^="background-color:#1b2d22" i],
[style*=";background-color:#1b2d22" i],
[style*="; background-color:#1b2d22" i],
[style^="background-color: #1b2d22" i],
[style*=";background-color: #1b2d22" i],
[style*="; background-color: #1b2d22" i] { background: var(--up-soft) !important; }
[style*="border:1px solid #6b452f" i],
[style*="border-color:#6b452f" i],
[style*="border-top:1px solid #6b452f" i],
[style*="border-bottom:1px solid #6b452f" i],
[style*="border-left:1px solid #6b452f" i],
[style*="border-right:1px solid #6b452f" i],
[style*="border:1px solid #39434f" i],
[style*="border-color:#39434f" i],
[style*="border-top:1px solid #39434f" i],
[style*="border-bottom:1px solid #39434f" i],
[style*="border-left:1px solid #39434f" i],
[style*="border-right:1px solid #39434f" i],
[style*="border:1px solid #2c4a68" i],
[style*="border-color:#2c4a68" i],
[style*="border-top:1px solid #2c4a68" i],
[style*="border-bottom:1px solid #2c4a68" i],
[style*="border-left:1px solid #2c4a68" i],
[style*="border-right:1px solid #2c4a68" i],
[style*="border:1px solid #30363d" i],
[style*="border-color:#30363d" i],
[style*="border-top:1px solid #30363d" i],
[style*="border-bottom:1px solid #30363d" i],
[style*="border-left:1px solid #30363d" i],
[style*="border-right:1px solid #30363d" i],
[style*="border:1px solid #2d3748" i],
[style*="border-color:#2d3748" i],
[style*="border-top:1px solid #2d3748" i],
[style*="border-bottom:1px solid #2d3748" i],
[style*="border-left:1px solid #2d3748" i],
[style*="border-right:1px solid #2d3748" i],
[style*="border:1px solid #2d3b52" i],
[style*="border-color:#2d3b52" i],
[style*="border-top:1px solid #2d3b52" i],
[style*="border-bottom:1px solid #2d3b52" i],
[style*="border-left:1px solid #2d3b52" i],
[style*="border-right:1px solid #2d3b52" i],
[style*="border:1px solid #fc8181" i],
[style*="border-color:#fc8181" i],
[style*="border-top:1px solid #fc8181" i],
[style*="border-bottom:1px solid #fc8181" i],
[style*="border-left:1px solid #fc8181" i],
[style*="border-right:1px solid #fc8181" i] { border-color: var(--border-strong) !important; }
[style*="rgba(252,129,129,0.08)"], [style*="rgba(252,129,129,.08)"] { background: var(--down-soft) !important; }
[style*="rgba(246,173,85,0.08)"], [style*="rgba(246,173,85,.06)"], [style*="rgba(246,173,85,.15)"], [style*="rgba(246,173,85,0.15)"] { background: var(--warn-soft) !important; }

/* ───────── 12. Печать ───────── */
@media print {
  .fin-sb, .fin-tb, .fin-scrim, .period-selector, .no-print { display: none !important; }
  .fin-app { display: block; }
  body { background: #fff; color: #000; }
  .fin-content { padding: 0; max-width: none; }
}

/* ───────── 13. Скелет страницы при переходе ───────── */
#finPageSkel[hidden] { display: none !important; }
#finPageSkel { display: none; }
body.nav-loading #finPageSkel { display: block; }
body.nav-loading .fin-content > :not(#finPageSkel) { display: none !important; }
.fin-progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; background: var(--brand); z-index: 100; opacity: 0; }
body.nav-loading .fin-progress { opacity: 1; width: 85%; transition: width 25s cubic-bezier(.1,.7,.2,1); }
.fin-skp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-bottom: 20px; }
.fin-skp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fin-skp-chart { position: relative; height: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); margin-bottom: 16px; }
@media (prefers-reduced-motion: reduce) { body.nav-loading .fin-progress { transition: none; width: 60%; } }
.fin-anon-tools { position: fixed; right: 12px; top: 12px; z-index: 10; }
.login-box { padding: 28px 26px !important; }
.login-brand { margin-bottom: 16px; }
.login-brand .fin-logo svg { width: 20px; height: 20px; }
.login-title { margin: 0 0 4px !important; font: 650 22px var(--f-sans) !important; }
.login-sub { margin: 0 0 14px !important; }
.login-box a.login-btn { background: var(--brand-solid) !important; color: var(--brand-ink) !important; margin-top: 12px; min-height: 46px; width: 100%; font-size: 16px; text-decoration: none; }
.login-box .login-btn { width: 100% !important; margin-top: 12px; }

/* ───────── 14. Уточнения по результатам просмотра ───────── */
.delta-badge::before { display: none; }
.metric-row .metric-value-wrap { flex: none; white-space: nowrap; }
.metric-row .metric-label { min-width: 0; }
.metric-row .metric-value { font-size: 13.5px; white-space: nowrap; }
.comparison-kpi .kpi-value, .card-value { white-space: nowrap; }
@media (max-width: 420px) { .comparison-kpi .kpi-value, .card-value { font-size: 22px; } }
.compare-toggle { max-width: 100%; }
.compare-switch { display: flex; flex-wrap: wrap; max-width: 100%; }
.compare-switch a { border-radius: 0; }
.pg-head > div { min-width: 0; }
.pg-badge { max-width: 100%; }
.pg-badge .audit-badge { white-space: normal !important; overflow-wrap: anywhere; max-width: 100%; }
[style*="grid-template-columns"] > * { min-width: 0; }
@media (max-width: 760px) {
  [style*="grid-template-columns:1fr 1fr"], [style*="grid-template-columns: 1fr 1fr"], [style*="grid-template-columns:1fr 1fr 1fr"], [style*="grid-template-columns:repeat(2"], [style*="grid-template-columns:repeat(3"] { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 560px) {
  .fin-crumb .a, .fin-crumb .s { display: none; }
  .view-as-summary { padding: 6px 8px; font-size: 12px; }
  .fin-tb { padding: 0 10px; }
}
.p-kpi .val, .kpi-tile .kpi-value, .metric-row .metric-value, .comparison-kpi .kpi-value { white-space: nowrap; }
.metric-row { flex-wrap: nowrap; } .metric-row .metric-label { flex: 1 1 auto; }
.delta-badge { white-space: nowrap; }
