/* ============ Структура работ (СР): листы «как в Excel» ============ */
.sr{display:flex;flex-direction:column;gap:6px}
.sr-load{padding:40px;text-align:center;color:#5a6662}
.sr-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sr-tt{font-size:16px;margin-right:6px}
.sr-save{font-size:12px;color:#2e7d4f;background:#eaf6ee;border-radius:10px;padding:2px 9px;white-space:nowrap}
.sr-save.busy{color:#8a6100;background:#fff5d6}
.sr-save.bad{color:#b00020;background:#fde8ea;font-weight:600}
.sr-top .grow,.sr-bar .grow{flex:1}
.sr-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12px}
.sr-bx{display:contents}
.sr-q{min-width:240px;flex:0 1 320px;height:28px;padding:2px 8px;border:1px solid #b9c3cf;border-radius:6px}
.sr-fs{height:28px!important;max-width:210px;font-size:12px!important;border:1px solid #b9c3cf;border-radius:6px;padding:0 22px 0 6px!important;line-height:26px!important;min-height:0!important}
.sr-fsbad{border-color:#d9534f;color:#b00020}
.sr-chips{display:inline-flex;gap:2px}
.sr-chip{border:1px solid #b9c3cf;background:#fff;border-radius:12px;padding:2px 9px;font-size:12px;cursor:pointer}
.sr-chip.on{background:#1F3864;color:#fff;border-color:#1F3864}
.sr-cbx{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.sr-lvs{display:inline-flex;align-items:center;gap:2px}.sr-lvs small{color:#5a6662;margin-right:2px}
.sr-lv{width:24px;height:24px;border:1px solid #9fb0c4;background:#f2f5f9;border-radius:4px;font-weight:600;cursor:pointer;padding:0}
.sr-lv:hover{background:#dfe7f1}
.sr-cnt{color:#5a6662;white-space:nowrap}
.sr-zoom{display:inline-flex;align-items:center;gap:2px}
.sr-zb{min-width:28px;padding:2px 6px}
.sr-zl{min-width:42px;text-align:center;font-variant-numeric:tabular-nums}
.sr-afc{color:#b00020}
.sr-box{display:flex;flex-direction:column;gap:6px}
.sr-ft{font-size:12px;color:#5a6662;min-height:16px}
/* рабочая область: своя прокрутка, шапка и первые столбцы закреплены */
.sr-sc{position:relative;overflow:auto;border:1px solid #9fb0c4;background:#fff;outline:none;min-height:260px;overscroll-behavior:contain}
.sr-sc:focus{border-color:#1F3864}
.sr-t{border-collapse:separate;border-spacing:0;table-layout:fixed;font:12px/1.3 Calibri,'Segoe UI',Arial,sans-serif;color:#000}
.sr-t th,.sr-t td{border-right:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4;padding:2px 4px;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;background:#fff;overflow:hidden}
.sr-t thead th{background:#1F3864;color:#fff;font-weight:700;text-align:center;vertical-align:middle;position:sticky;top:0;padding:0 14px 3px 4px;border-color:#40598a;user-select:none}
.sr-t thead th .sr-let{font-weight:400;font-size:10px;color:#b8c6e0;line-height:14px}
.sr-t thead th .sr-hl{line-height:1.2}
.sr-t thead th.sr-hsel{background:#2c4d86}
.sr-t thead th.sr-afon{background:#5b3a00}
.sr-t thead th.sr-kph{background:#375623}
.sr-t thead th.sr-tyh{background:#7f6000}
.sr-af{position:absolute;right:1px;bottom:2px;font-style:normal;font-size:10px;width:13px;height:14px;line-height:14px;text-align:center;background:#fff;color:#1F3864;border-radius:2px;cursor:pointer;opacity:.85}
.sr-afon .sr-af{background:#ffd966;opacity:1}
.sr-hx{position:absolute;right:1px;top:1px;font-style:normal;font-size:12px;width:13px;height:13px;line-height:12px;text-align:center;color:#fff;cursor:pointer;border-radius:2px}
.sr-hx:hover{background:#c00000}
.sr-hb{padding:0 8px;height:22px;font-weight:700;margin-top:1px}
.sr-rs{position:absolute;right:-3px;top:0;bottom:0;width:7px;cursor:col-resize;z-index:2}
.sr-t th.sr-rn,.sr-t td.sr-rn{background:#f2f2f2;color:#595959;text-align:right;font-weight:400;white-space:nowrap;padding:2px 3px;border-right:1px solid #bfbfbf;user-select:none}
.sr-t thead th.sr-cor{background:#1F3864}
.sr-rn b{font-weight:400;display:inline-block;min-width:26px}
.sr-rn i{font-style:normal;display:inline-block;width:15px;height:15px;line-height:14px;text-align:center;border-radius:3px;cursor:pointer;color:#7f8c9a;vertical-align:top}
.sr-rn .sr-dr{cursor:grab;float:left;color:#9aa5b1}
.sr-rn .sr-pl{color:#2e7d4f;font-weight:700}.sr-rn .sr-pl:hover{background:#2e7d4f;color:#fff}
.sr-rn .sr-mi{color:#b00020;font-weight:700}.sr-rn .sr-mi:hover{background:#b00020;color:#fff}
.sr-rn .sr-pl,.sr-rn .sr-mi{opacity:.35}
.sr-t tr:hover .sr-rn .sr-pl,.sr-t tr:hover .sr-rn .sr-mi,.sr-t tr.sr-rsel .sr-rn .sr-pl,.sr-t tr.sr-rsel .sr-rn .sr-mi{opacity:1}
@media (pointer:coarse){.sr-rn .sr-pl,.sr-rn .sr-mi{opacity:1;width:20px;height:20px}}
.sr-t tr.sr-rsel td.sr-rn{background:#d9e1f2;color:#1F3864;font-weight:700}
/* оформление строк по типу (как условное форматирование файла) */
.sr-t tr.sr-tS>td:not(.sr-rn){background:#2F5496;color:#fff;font-weight:700;border-color:#4a6aa8}
.sr-t tr.sr-tR>td:not(.sr-rn){background:#8EAADB;font-weight:700;border-color:#a9bfe4}
.sr-t tr.sr-tZ>td:not(.sr-rn){background:#EEF3FA;font-weight:700}
.sr-t tr.sr-ras>td:not(.sr-rn){color:#8c8c8c}
.sr-t tr.sr-ctx>td:not(.sr-rn){opacity:.55}
.sr-t tr.sr-drag>td{opacity:.35}
.sr-t td.sr-r{text-align:right;font-variant-numeric:tabular-nums}
.sr-t td.sr-c{text-align:center}
.sr-t td.sr-ro{color:inherit}
.sr-t td.sr-bad{color:#c00000;font-weight:400}
.sr-t tr.sr-tS>td.sr-bad,.sr-t tr.sr-tR>td.sr-bad{color:#ffe08a}
.sr-t td.sr-badf{background:#ffc7ce!important}
.sr-t td.sr-warn{color:#9c6500}
.sr-t td.sr-old{color:#8c8c8c;text-decoration:line-through}
.sr-t td.sr-zero{color:#9c6500}
.sr-t tr:hover>td.sr-dd:after,.sr-t td.sr-dd.sr-sel:after{content:'▾';position:absolute;right:1px;top:2px;width:14px;height:15px;line-height:15px;text-align:center;font-size:11px;color:#1F3864;background:#e3e9f3;border:1px solid #b9c6da;border-radius:3px;cursor:pointer}
.sr-t td{position:relative}
.sr-t td.sr-rg{box-shadow:inset 0 0 0 9999px rgba(31,56,100,.12)}
.sr-t td.sr-sel{outline:2px solid #217346;outline-offset:-2px;z-index:1}
.sr-t td.sr-edit{padding:0;outline:2px solid #217346;outline-offset:-2px;overflow:visible}
.sr-in{width:100%;box-sizing:border-box;border:0;margin:0;padding:2px 4px;font:inherit;color:#000;background:#fff;resize:none;outline:none;display:block;min-height:100%}
textarea.sr-in{overflow:hidden;white-space:pre-wrap}
select.sr-in{height:100%;min-height:20px}
.sr-in.sr-r{text-align:right}
.sr-ind{display:block}
.sr-tg,.sr-tg0{font-style:normal;display:inline-block;width:14px;text-align:center;cursor:pointer;margin-right:2px}
.sr-tg:hover{background:rgba(0,0,0,.15);border-radius:3px}
.sr-ck{font-style:normal;display:inline-block;min-width:14px;height:14px;line-height:13px;font-size:11px;vertical-align:top;margin-top:1px;border:1px solid #8496b0;border-radius:3px;background:#fff;color:#217346;font-weight:700;cursor:pointer;text-align:center;padding:0 1px}
.sr-ck.on{background:#e2efda;border-color:#217346}
.sr-dl{position:absolute;left:0;right:0;height:3px;background:#217346;z-index:9;pointer-events:none;display:none}
.sr-empty{padding:30px!important;text-align:center;color:#5a6662;white-space:normal!important}
/* всплывающие меню */
.sr-pop{position:fixed;z-index:1000;background:#fff;border:1px solid #9fb0c4;border-radius:8px;box-shadow:0 8px 28px rgba(0,0,0,.18);padding:8px;max-width:min(460px,94vw);max-height:70vh;overflow:auto;font-size:13px}
.sr-menu{display:flex;flex-direction:column;gap:2px;min-width:240px}
.sr-menu>b{font-size:12px;color:#1F3864;margin:4px 2px}
.sr-menu hr{border:0;border-top:1px solid #e3e7ec;margin:4px 0;width:100%}
.sr-menu .row,.sr-af-b .row{display:flex;gap:6px;align-items:center}
.sr-menu .row input{flex:1;min-width:0;height:28px;padding:2px 8px;border:1px solid #b9c3cf;border-radius:6px}
.sr-menu>input{height:28px;padding:2px 8px;border:1px solid #b9c3cf;border-radius:6px}
.sr-mi2{display:flex;align-items:center;gap:6px;text-align:left;background:none;border:0;padding:5px 8px;border-radius:5px;cursor:pointer;font:inherit;color:inherit}
.sr-mi2:hover{background:#eef3fa}
.sr-mi2 small{margin-left:auto;color:#8a96a3}
.sr-mi2 code{color:#1F3864;font-size:11px}
.sr-ml{display:flex;flex-direction:column;max-height:280px;overflow:auto;border:1px solid #eef0f3;border-radius:6px}
.sr-tyl{flex-direction:row;flex-wrap:wrap;max-height:none;border:0}
.sr-tyl .sr-mi2{border:1px solid #b9c3cf;font-weight:600}
.sr-af-b{display:flex;flex-direction:column;gap:6px;min-width:260px}
.sr-afq{height:28px;padding:2px 8px;border:1px solid #b9c3cf;border-radius:6px}
.sr-afl{display:flex;flex-direction:column;max-height:300px;overflow:auto;border:1px solid #eef0f3;border-radius:6px;padding:2px}
.sr-afi{display:flex;gap:6px;align-items:flex-start;padding:2px 4px;cursor:pointer}
.sr-afi span{flex:1;overflow-wrap:anywhere}.sr-afi small{color:#8a96a3}
/* Контроль */
.sr-kbox{display:flex;flex-direction:column;gap:12px;max-width:1100px}
.sr-kt{border-collapse:collapse;font-size:13px;width:100%}
.sr-kt th{background:#1F3864;color:#fff;text-align:left;padding:6px 8px}
.sr-kt td{border-bottom:1px solid #e1e5ea;padding:5px 8px}
.sr-kt td.n{text-align:right;font-variant-numeric:tabular-nums;font-weight:700;width:80px}
.sr-kt tr.bad td{background:#fff3f3}.sr-kt tr.bad td.n{color:#c00000}
.sr-kpis{display:flex;gap:8px;flex-wrap:wrap}
.sr-kpi{background:#eef3fa;border-radius:8px;padding:8px 14px;display:flex;flex-direction:column;min-width:110px}
.sr-kpi b{font-size:20px;color:#1F3864}.sr-kpi span{font-size:12px;color:#5a6662}
@media (max-width:700px){.sr-q{min-width:0;flex:1 1 100%}.sr-tt{font-size:14px}}
.sr-rn .sr-pn{color:#1f5fbf;font-weight:700;opacity:.55}.sr-rn .sr-pn:hover{background:#1f5fbf;color:#fff}
.sr-t tr:hover .sr-rn .sr-pn,.sr-t tr.sr-rsel .sr-rn .sr-pn{opacity:1}
@media (pointer:coarse){.sr-rn .sr-pn{opacity:1;width:20px;height:20px}}
.sr-save.sr-ro{color:#1F3864;background:#e8eef8}

/* v36.2: выпадающий список с вводом (ед. изм., коды) — показывает все значения */
.sr-ac{position:fixed;z-index:230;max-height:280px;overflow:auto;background:#fff;border:1px solid #9fb3c8;border-radius:4px;box-shadow:0 6px 18px rgba(0,0,0,.18);font:12px/1.3 system-ui,sans-serif;color:#1c1f23;max-width:min(520px,90vw)}
.sr-aci{padding:4px 8px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sr-aci:hover{background:#eef4fa}.sr-aci.hi{background:#d6e6f5}.sr-aci.cur{font-weight:700}
.sr-ac0{padding:6px 8px;color:#6b757c}

/* v38: цвет текста по виду позиции */
.sr-t tr.sr-c0>td:not(.sr-rn){color:#1C1F23}
.sr-t tr.sr-c1>td:not(.sr-rn){color:#8C8C8C}
.sr-t tr.sr-c2>td:not(.sr-rn){color:#1D5FBF}
.sr-t tr.sr-c3>td:not(.sr-rn){color:#2E7D32}
.sr-t tr.sr-c4>td:not(.sr-rn){color:#C62828}
.sr-t tr.sr-c5>td:not(.sr-rn){color:#D86A00}
.sr-t tr.sr-c6>td:not(.sr-rn){color:#7B1FA2}
.sr-t tr.sr-c7>td:not(.sr-rn){color:#795548}
.sr-t tr.sr-c8>td:not(.sr-rn){color:#00838F}
.sr-vcl{display:flex;flex-direction:column;gap:6px}.sr-vcr{display:grid;grid-template-columns:18px 1fr 160px;gap:10px;align-items:center;padding:4px 0;border-bottom:1px solid var(--line)}
.sr-sw{width:16px;height:16px;border-radius:3px;border:1px solid rgba(0,0,0,.15)}

/* унаследованные значения (у варианта — из группы) показываются обычным стилем: разные стили в одной строке мешали читать */
.sr-t td.sr-inh,td.sr-inh{color:inherit;font-style:normal}
/* СПР_Материалы: группа (базовый код) — чёрный полужирный, её материалы-варианты — серый обычный (вариант А макета) */
.sr-t tr.sr-mg>td:not(.sr-rn):not(.sr-bad):not(.sr-warn):not(.sr-old){color:#1c1f23;font-weight:600}
.sr-t.sr-k-srmh tr.sr-mg>td:not(.sr-rn):not(.sr-badf){background:#eef2f9}
.sr-t.sr-k-srmt tr.sr-mg>td:not(.sr-rn):not(.sr-badf){background:#eef2f9}
.sr-t tr.sr-var>td:not(.sr-rn):not(.sr-bad):not(.sr-warn):not(.sr-old){color:#6b7280;font-weight:400}

/* СПР_Материалы: чистый вид как в макете (вариант А) — без вертикальных границ, тонкие линии строк, группы крупнее */
.sr-t.sr-k-srmh td{border-right:0;border-bottom:1px solid #e5e8ee;padding:5px 8px}
.sr-t.sr-k-srmt td{border-right:0;border-bottom:1px solid #e5e8ee;padding:5px 8px}
.sr-t.sr-k-srmh tr.sr-var>td{font-size:12.5px}
.sr-t.sr-k-srmt tr.sr-var>td{font-size:12.5px}
.sr-t.sr-k-srmh tr.sr-mg>td{font-size:14px;padding-top:7px;padding-bottom:7px}
.sr-t.sr-k-srmt tr.sr-mg>td{font-size:14px;padding-top:7px;padding-bottom:7px}
.sr-t.sr-k-srmh tr.sr-mg>td .sr-tg{font-size:12px}
.sr-t.sr-k-srmt tr.sr-mg>td .sr-tg{font-size:12px}
