/* Экран «Расходные» (ТЗ 023) — из утверждённого макета макеты/syrve-rsge/raskhodnye.html, вариант 1 «Лист блоками».
   Только переменные стандарта портала; правила экрана — внутри .outp, окна — .dlg-*. */
/* ── плитки и заголовок списка ── */
.outp .kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
.outp .kpi{border-radius:16px;padding:16px 18px;background:var(--soft);display:flex;flex-direction:column;gap:6px;min-width:0;border:1px solid transparent;text-align:left;font:inherit;color:inherit;cursor:pointer}
.outp .kpi:hover{border-color:var(--brand)}
.outp .kpi.sel{background:var(--brand-wash);border-color:var(--brand)}
.outp .kpi-n{font-size:30px;font-weight:800;letter-spacing:-.03em;line-height:1.1;white-space:nowrap}
.outp .kpi-m{font-size:13px;color:var(--ink-3)}
.outp .kpi.warn .kpi-n{color:var(--warn)} .outp .kpi.alert .kpi-n{color:var(--alert)}
@media(max-width:1279px){.outp .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
.outp .modebox{display:flex;gap:14px;align-items:flex-start;max-width:470px;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.outp .modebox b{font-size:15px;font-weight:700}
.outp .modebox .hint{font-size:13.5px;color:var(--ink-2);margin-top:3px;line-height:1.4}
.outp .sw{position:relative;flex:none;width:46px;height:26px;margin-top:1px;border-radius:999px;background:var(--line-strong);transition:background .15s}
.outp .sw::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .15s}
.outp .sw[aria-checked="true"]{background:var(--brand)}
.outp .sw[aria-checked="true"]::after{transform:translateX(20px)}
.outp .lines-note{padding:12px 20px;border-bottom:1px solid var(--line-soft);font-size:13.5px;color:var(--ink-2)}
.outp .rn{overflow-wrap:anywhere}
.outp .outl{table-layout:fixed;width:100%}
.outp .outl th,.outp .outl td{padding-left:10px;padding-right:10px;vertical-align:top}
.outp .outl th:first-child,.outp .outl td:first-child{padding-left:20px}
.outp .outl th:last-child,.outp .outl td:last-child{padding-right:20px}
.outp .outl th{white-space:normal}
.outp .outl .gd-tag{white-space:normal}
.outp .outl .pill{white-space:normal}
.outp .outl td.nw{white-space:normal}
.outp .outl td.nw:first-child{white-space:nowrap}
/* ── полосы состояния ── */
.outp .done-bar,.outp .err-bar,.outp .warn-bar,.outp .info-bar,.outp .idle-bar{display:flex;gap:12px;align-items:flex-start;padding:14px 20px;border-radius:16px;font-weight:600;margin-bottom:16px;line-height:1.45}
.outp .done-bar svg,.outp .err-bar svg,.outp .warn-bar svg,.outp .info-bar svg,.outp .idle-bar svg{width:20px;height:20px;margin-top:2px}
.outp .done-bar{background:var(--ok-wash);color:var(--ok)} .outp .err-bar{background:var(--alert-wash);color:var(--alert)}
.outp .warn-bar{background:var(--warn-wash);color:var(--warn)} .outp .info-bar{background:var(--info-wash);color:var(--info)}
.outp .idle-bar{background:var(--line-soft);color:var(--ink-2)}
.outp .bar-s{font-weight:500;display:block;margin-top:2px}
/* ── блоки формы ── */
.outp .stack{display:flex;flex-direction:column;gap:16px}
.outp .stack>*{margin:0}
.outp .gd-card-top{padding:14px 20px}
.outp .gd-card-top h3{font-size:16px}
.outp .gd-card-body{padding:16px 20px}
.outp .fgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
.outp .cols2 .fgrid,.outp .narrow .fgrid{grid-template-columns:minmax(0,1fr)}
.outp .fgrid .span2{grid-column:1/-1}
.outp .fld{min-width:0}
.outp .fl{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;font-size:13px;font-weight:600;color:var(--ink-2);margin-bottom:5px}
.outp .memk{font-size:12px;font-weight:500;color:var(--ink-3)}
.outp .fi{width:100%;height:40px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:14.5px;color:var(--ink);outline:0;text-overflow:ellipsis}
.outp .fi:focus{border-color:var(--brand);box-shadow:var(--ring)}
.outp .fi.bad{border-color:var(--alert);background:var(--alert-wash)}
.outp .fi:disabled{background:var(--soft);color:var(--ink-3)}
.outp .fi.sm{height:34px;font-size:14px}
.outp .fv{font-size:14.5px;font-weight:600;min-height:22px;overflow-wrap:anywhere}
.outp .fh{font-size:12.5px;color:var(--ink-3);margin-top:5px}
.outp .fe{font-size:13px;color:var(--alert);margin-top:5px;font-weight:500}
.outp .fe:empty{display:none}
.outp .two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.outp .chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;align-items:center}
.outp .memc{height:28px;padding:0 10px;border:1px solid var(--line);border-radius:999px;font-size:13px;color:var(--ink-2);background:var(--surface);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.outp .memc:hover{border-color:var(--brand);color:var(--brand)}
.outp .chk{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:var(--ink-2);cursor:pointer;margin-top:10px}
.outp .chk input{width:16px;height:16px;accent-color:var(--brand)}
.outp .gd-seg{max-width:100%}
.outp .gd-seg button[disabled]{opacity:.4;cursor:not-allowed}
.outp .gd-seg.s2 button{padding:8px 12px;font-size:13.5px}
.outp .narrow .gd-seg.s2{display:flex;flex-wrap:wrap}
.outp .narrow .gd-seg.s2 button{flex:1 1 auto;padding:8px 8px;font-size:13px}
.outp .cols5 .totals .tchk,.outp .cols2 .totals .tchk{flex-basis:100%}
.outp .kindsw .gd-seg button{padding:6px 12px;font-size:13px}
.outp .bpair{display:grid;grid-template-columns:minmax(0,1fr) 34px minmax(0,1.25fr);align-items:start}
.outp .bpair .arr{display:flex;justify-content:center;color:var(--ink-3);padding-top:26px}
.outp .bpair .arr svg{width:18px;height:18px}
.outp .narrow .bpair{grid-template-columns:1fr;gap:12px}
.outp .narrow .bpair .arr{display:none}
.outp .bs .bn{font-size:15px;font-weight:700;overflow-wrap:anywhere}
.outp .bchk{margin-top:8px;display:flex;flex-direction:column;gap:4px;align-items:flex-start}
.outp .bchk:empty{display:none}
.outp .note-line{font-size:14.5px;color:var(--ink-2);line-height:1.5}
.outp .note-line b{color:var(--ink)}
.outp .pill.wrap{white-space:normal;text-align:left}
.outp .sumrow{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid var(--line-soft);font-size:15px;font-weight:700}
.outp .sumrow b{color:var(--warn);font-weight:800}
.outp .sumrow.done{color:var(--ok)}
.outp .lines3{table-layout:fixed;width:100%}
.outp .lines3 th,.outp .lines3 td{padding-left:10px;padding-right:10px;vertical-align:top}
.outp .lines3 th:first-child,.outp .lines3 td:first-child{padding-left:20px}
.outp .lines3 th:last-child,.outp .lines3 td:last-child{padding-right:20px}
.outp .lines3 th{white-space:normal}
.outp .lines3 .rsn{font-weight:600;overflow-wrap:anywhere}
.outp .lines3 .pick{min-width:0;width:100%}
.outp .lines3 .fi.sm{margin-top:6px}
.outp .popwrap{position:relative;display:block}
.outp .pop{position:absolute;z-index:40;top:42px;left:0;min-width:200px;max-height:300px;overflow:auto;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-menu)}
.outp .pop button{display:flex;justify-content:space-between;gap:12px;width:100%;text-align:left;padding:8px 10px;border-radius:9px;font-size:14px}
.outp .pop button:hover{background:var(--paper)}
.outp .pop .sep{border-top:1px solid var(--line-soft);margin-top:4px;padding-top:4px}
.outp .gd-card:has(.popwrap){overflow:visible}
.outp .totals{align-items:flex-end}
.outp .totals .tchk{margin-right:auto;align-self:center;flex-direction:row;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--ok)}
.outp .totals .tchk svg{width:18px;height:18px}
.outp .dock .what{flex:0 1 auto;min-width:0}
.gd-btn.danger{background:var(--alert)}
.gd-btn.danger:hover{background:var(--alert);opacity:.9}
.gd-btn.line.danger{background:var(--surface);color:var(--alert);border-color:var(--alert)}
.gd-btn.line.danger:hover{background:var(--alert-wash);color:var(--alert);border-color:var(--alert);opacity:1}
/* журнал и «было → стало» */
.outp .log td{font-size:13.5px;padding-top:8px;padding-bottom:8px}
.outp .log td:first-child{white-space:nowrap;color:var(--ink-3);width:120px}
.outp .log td:nth-child(2){white-space:nowrap;width:130px;font-weight:600}
.outp .dif td,.outp .dif th{padding-left:10px;padding-right:10px;vertical-align:top}
.outp .dif th:first-child,.outp .dif td:first-child{padding-left:20px}
.outp .dif th:last-child,.outp .dif td:last-child{padding-right:20px}
.outp .dif .was{color:var(--ink-3);text-decoration:line-through}
.outp .dif .now{font-weight:700}
.outp .dif tr.del td{background:var(--alert-wash)} .outp .dif tr.add td{background:var(--ok-wash)} .outp .dif tr.chg td{background:var(--warn-wash)}
.outp .dif tr.same td{color:var(--ink-3)}
.outp .sec-t{font-size:12px;font-weight:700;color:var(--ink-3);text-transform:uppercase;letter-spacing:.07em;padding:14px 20px 8px}
/* окна результата */
.dlg-veil{position:fixed;inset:0;z-index:100;background:rgba(15,23,41,.42);display:flex;align-items:flex-start;justify-content:center;padding:12vh 16px 16px;overflow:auto}
.dlg{width:min(540px,100%);background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden}
.dlg-top{display:flex;gap:12px;align-items:center;padding:18px 22px}
.dlg-top h2{font-size:19px;font-weight:700;letter-spacing:-.015em;line-height:1.25}
.dlg-ic{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:none}
.dlg-ic svg{width:22px;height:22px}
.dlg.ok .dlg-top{background:var(--ok-wash);color:var(--ok)} .dlg.ok .dlg-ic{background:var(--surface)}
.dlg.alert .dlg-top{background:var(--alert-wash);color:var(--alert)} .dlg.alert .dlg-ic{background:var(--surface)}
.dlg.warn .dlg-top{background:var(--warn-wash);color:var(--warn)} .dlg.warn .dlg-ic{background:var(--surface)}
.dlg.idle .dlg-top{background:var(--line-soft);color:var(--ink-2)} .dlg.idle .dlg-ic{background:var(--surface)}
.dlg-body{padding:16px 22px 6px;font-size:14.5px;color:var(--ink-2);line-height:1.5}
.dlg-body p+p{margin-top:8px}
.facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 16px;margin-top:14px;font-size:14px;padding:12px 14px;background:var(--soft);border-radius:12px}
.facts dt{color:var(--ink-3)} .facts dd{font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.facts dd.ge{font-weight:500}
.dlg-foot{display:flex;gap:10px;justify-content:flex-end;padding:16px 22px 20px;flex-wrap:wrap}
.tst{position:fixed;left:50%;bottom:28px;z-index:120;transform:translateX(-50%) translateY(20px);opacity:0;pointer-events:none;max-width:min(460px,calc(100vw - 32px));padding:14px 18px;border-radius:14px;background:var(--surface);border:1px solid var(--line);font-size:14.5px;color:var(--ink);transition:opacity .2s,transform .2s}
.tst.on{opacity:1;transform:translateX(-50%) translateY(0)}
/* дополнения к макету */
.outp .stale{font-size:13.5px;color:var(--ink-3);margin:-10px 0 16px}
.outp .stale.bad{color:var(--warn);font-weight:600}
.outp .sw[disabled]{opacity:.5;cursor:not-allowed}
.outp .log td:nth-child(2){white-space:normal}
.outp .chips{justify-content:flex-start}
.outp .outl .mono{overflow-wrap:anywhere}
