/* Shared readable controls; financial workspace uses the same light palette. */
:root{--fx-ink:#152238;--fx-muted:#536174;--fx-line:#dce3ed;--fx-accent:#5146ce;--fx-soft:#f0efff;--fx-negative:#a92838}
body{font-family:Inter,'Segoe UI',system-ui,sans-serif}
.content{max-width:1800px}
.page button:not(.icon-btn),.page input,.page select{font:inherit;border-radius:8px}
.page button:not(.fx-card):not(.fx-bar):not(.fx-water-step):not(.fx-link){min-height:34px}
.page button:not([class]){border:1px solid var(--fx-line);background:#fff;color:var(--fx-ink);padding:7px 11px;cursor:pointer}
.page input:not([type=checkbox]):not([type=radio]),.page select{min-height:36px;border:1px solid #b9c5d6;padding:6px 10px}
.page button:focus-visible,.fx-root summary:focus-visible,.fx-root a:focus-visible{outline:3px solid #8d7dec;outline-offset:3px}
#page-home>.fx-root~*,#page-finance:not(.unit-mode)>.fx-root~*{display:none!important}
#page-finance.unit-mode>#finance-workspace{display:none}
.fx-root{color:var(--fx-ink);font-size:15px;line-height:1.55;max-width:100%;min-width:0}
.fx-root *{box-sizing:border-box}
.fx-root h1{font-size:32px;line-height:1.2;letter-spacing:-.7px;margin:0 0 12px}
.fx-root h2{font-size:20px;line-height:1.35;margin:0 0 14px;color:var(--fx-ink)}
.fx-root h3{font-size:17px;margin:24px 0 12px}
.fx-root p{margin:8px 0 16px;color:var(--fx-muted)}
.fx-root small{display:block;font-size:12px;font-weight:400;color:var(--fx-muted);line-height:1.5;overflow-wrap:anywhere}
.fx-head{display:flex;gap:24px;align-items:center;justify-content:space-between;margin:20px 0}
.fx-root .fx-eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.06em;font-weight:700;color:var(--fx-accent);margin-bottom:8px}
.fx-root button{border:1px solid var(--fx-line);background:#fff;color:var(--fx-ink);font:inherit;font-size:14px;line-height:1.4;padding:9px 13px;border-radius:9px;cursor:pointer;text-align:left;transition:background .12s,border-color .12s}
.fx-root button:hover{border-color:#a69ce4;background:#f8f7ff}
.fx-root button:disabled{opacity:.5;cursor:default}
.fx-root button[aria-pressed=true]{color:var(--fx-accent);background:var(--fx-soft);border-color:#c6c0ed}
.fx-tabs{display:flex!important;flex-direction:row!important;flex-wrap:wrap;gap:8px;margin:0 0 22px}
.fx-panel,.fx-tools>.panel{background:#fff;border:1px solid var(--fx-line);border-radius:16px;padding:24px;margin:0 0 20px;box-shadow:0 3px 12px #15223805;min-width:0}
.fx-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0 24px}
.fx-root .fx-card{padding:18px 20px;min-height:142px;box-shadow:0 3px 10px #15223804}
.fx-card span{display:block;font-size:14px;font-weight:600}
.fx-card strong{display:block;font-size:27px;line-height:1.3;letter-spacing:-.4px;margin:12px 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.fx-two{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}
.fx-table-wrap{overflow:auto;border:1px solid var(--fx-line);border-radius:10px;max-width:100%;margin:14px 0;scrollbar-gutter:stable}
.fx-root table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.5}
.fx-root th{background:#f4f6fa;font-size:12px;font-weight:750;text-align:left;color:#3f4d63;white-space:normal;min-width:95px;border-bottom:1px solid #cbd5e3;padding:12px;position:sticky;top:0}
.fx-root td{padding:13px 12px;border-bottom:1px solid #e7ecf3;color:var(--fx-ink);vertical-align:top;font-variant-numeric:tabular-nums}
.fx-root td:not(:first-child){min-width:100px}
.fx-root td:first-child{min-width:180px;max-width:360px;overflow-wrap:anywhere}
.fx-root tr:hover>td{background:#fafaff}
.fx-root td.fx-loss{color:var(--fx-negative);font-weight:650}
.fx-root td.fx-credit{color:#176343}
.fx-root .fx-link{border:0;padding:0;color:var(--fx-accent);text-decoration:underline;text-underline-offset:3px;background:transparent;font-weight:650}
.fx-root .fx-notice{border-left:3px solid #9284d7;background:#f6f5ff;padding:13px 16px;border-radius:0 8px 8px 0;color:#494163;font-size:14px}
.fx-controls,.fx-chart-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:12px 0 16px}
.fx-controls label{font-size:13px;color:var(--fx-muted);display:grid;gap:5px}
.fx-root input,.fx-root select{background:#fff;color:var(--fx-ink);font-size:14px;max-width:100%}
.fx-chart-tools{justify-content:flex-end}
.fx-bars{display:grid;gap:8px}
.fx-bars[hidden],.fx-chart-table[hidden]{display:none}
.fx-root .fx-bar{display:grid;grid-template-columns:minmax(160px,1fr) minmax(90px,2fr) minmax(130px,1fr);gap:16px;align-items:center;width:100%;background:transparent;border:0;padding:9px 4px;min-width:0}
.fx-bar span{font-size:14px;overflow-wrap:anywhere}
.fx-bar i{display:block;height:17px;border-radius:4px;background:linear-gradient(to right,#7363d9 var(--bar),#f1effa var(--bar));min-width:1px}
.fx-bar.negative i{background:linear-gradient(to right,#c3485e var(--bar),#faeff1 var(--bar))}
.fx-bar b{font-size:14px;text-align:right;font-variant-numeric:tabular-nums}
.fx-waterfall{display:flex;gap:14px;overflow:auto;padding:10px 0 18px;min-height:270px}
.fx-root .fx-water-step{flex:1;min-width:130px;display:flex;flex-direction:column;border:0;background:transparent;padding:8px;font-size:12px}
.fx-water-step span{min-height:44px;font-weight:600}
.fx-water-column{height:170px;position:relative;width:100%;border-bottom:1px solid #b7c1d1;margin:12px 0}
.fx-water-column i{position:absolute;background:#6755d3;left:12%;right:12%;border-radius:4px 4px 0 0;max-height:100%}
.fx-water-step.negative i{background:#c25664}
.fx-water-step b{font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.fx-tooltip{position:fixed;z-index:10000;background:#182438;color:#fff;border-radius:10px;padding:12px 14px;box-shadow:0 10px 32px #0003;font:14px/1.5 'Segoe UI',sans-serif;pointer-events:none;white-space:normal}
.fx-tooltip[hidden]{display:none}
.fx-root details{margin:10px 0;max-width:100%}
.fx-root summary{cursor:pointer;font-size:14px;font-weight:600;color:#493aab;padding:4px 0}
.fx-meta{font-size:12px;color:var(--fx-muted);margin:20px 0;overflow-wrap:anywhere}
.fx-tools .panel{margin-bottom:16px}
@media(min-width:1550px){.fx-kpis{grid-template-columns:repeat(6,minmax(0,1fr))}.fx-card strong{font-size:23px}}
@media(max-width:1000px){.fx-two{grid-template-columns:1fr}.fx-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.fx-head{align-items:start;flex-direction:column}.fx-root .fx-bar{grid-template-columns:1fr 1fr}.fx-bar i{grid-column:1/-1;grid-row:2}.fx-panel{padding:18px}.fx-card strong{font-size:24px}}
@media(max-width:650px){.fx-kpis{grid-template-columns:1fr}.fx-root h1{font-size:27px}.content{padding:16px 12px!important}.fx-panel{padding:16px}.fx-root td{padding:10px}.fx-root{font-size:14px}.fx-root .fx-card{min-height:125px}.fx-tabs{gap:6px}}
.fx-root .fx-card{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;min-height:185px}.fx-card small{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.fx-card strong{margin:14px 0}.fx-kpis{align-items:stretch}.fx-card span{min-height:40px}.fx-chart:has(.fx-bars:empty)::after{content:"Результат товаров за этот период неполон. Подробности — Финансы → Полнота по товарам.";color:#536174}
.fx-line{display:block;width:100%;min-height:180px;overflow:visible}.fx-line text{font:11px Segoe UI;fill:#536174}.fx-line circle{cursor:pointer}.fx-line circle:focus{stroke:#182438;stroke-width:3;outline:none}

.fx-water-column .fx-zero{position:absolute;left:0;right:0;min-height:0;border-top:1px dashed #aab5c5}
