.personal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto;margin-right:14px}.column-actions{display:flex;align-items:center;gap:3px}.column-actions .column-heading{flex:1;justify-content:flex-end;padding:4px 0;min-height:32px}.filter-icon{flex-shrink:0;border:0;background:transparent;color:#718093;padding:7px 3px;border-radius:4px}.filter-icon:hover,.filter-icon.filtered{background:#e6efff;color:#285dd4}.stock{font:inherit;font-weight:600}.columns-list{list-style:none;padding:0;margin:0;max-height:48vh;overflow:auto}.columns-list li{display:flex;gap:8px;align-items:center;padding:8px;border-bottom:1px solid #e2e8f0}.columns-list li>span:nth-child(2){flex:1}.columns-list button{padding:6px 12px}.drag-grip{cursor:grab;color:#718093;font-size:22px}.personal-footer{display:flex;gap:10px;justify-content:space-between;margin-top:18px}.user-card{border:1px solid #dce2ea;border-radius:10px;padding:18px;margin:14px 0}.user-heading{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin-bottom:12px}.user-card>label{display:block;margin:12px 0}.user-card>label>input:not([type=checkbox]){display:block;width:100%;margin-top:5px}.user-rights{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.user-rights label,.user-enabled{display:flex;align-items:center;gap:6px}.user-save{display:flex;align-items:center;gap:12px;margin-top:14px}.user-save span{font-size:12px}.stock-table-wrap{overflow:auto}.stock-table{width:100%}.stock-table td:not(:first-child),.stock-table th:not(:first-child){text-align:right}.stock-footnote{margin-top:18px}.rnp-table:not(.pin-identities) th:nth-child(-n+2),.rnp-table:not(.pin-identities) td:nth-child(-n+2){position:static;left:auto;width:auto;min-width:0;box-shadow:none}.rnp-table:not(.pin-identities) th:nth-child(-n+2){position:sticky;top:0}.rnp-table [data-key=article]{text-align:left}.rnp-table:not(.pin-identities) th,.rnp-table:not(.pin-identities) td{text-align:right}.rnp-table:not(.pin-identities) [data-key=article]{text-align:left}
html[data-theme=dark]{color-scheme:dark;--dark-bg:#101722;--dark-surface:#192332;--dark-raised:#213047;--dark-line:#35445b;--dark-text:#e2eaf6;--dark-muted:#a5b4ca}
html[data-theme=dark] body{background:var(--dark-bg);color:var(--dark-text)}
html[data-theme=dark] :is(.table-panel,.kpi,.preview,.source-card,.product-counters>div,.task-counters>div,.task-rule,.quality-sources details,.quality-examples details,.preparation-card,.login-overlay form,dialog,.brand-popover,.brand-menu summary,.column-filter,.phone-top,.bubble){background:var(--dark-surface);border-color:var(--dark-line);color:var(--dark-text)}
html[data-theme=dark] :is(input,select,textarea,.task-dialog textarea,.button,.brand-actions button){background:var(--dark-surface);border-color:var(--dark-line);color:var(--dark-text)}
html[data-theme=dark] .button:hover{background:#2c3c54;border-color:#6a8bb8}
html[data-theme=dark] .button.primary{background:#3266db;border-color:#5685ec;color:white}
html[data-theme=dark] :is(.button.selected,.activity-buttons .button[aria-pressed=true]){background:#284b7c;color:#e0ecff;border-color:#6b92cc}
html[data-theme=dark] :is(th,.simple-table th,.rnp-table th,.table-footer,.column-jumps,.task-context,.quality-examples blockquote,.product-bulk,.preparation-screen){background:var(--dark-raised);color:var(--dark-text);border-color:var(--dark-line)}
html[data-theme=dark] :is(.rnp-table td,.rnp-table td:nth-child(1),.rnp-table td:nth-child(2)){background:var(--dark-surface);color:var(--dark-text);border-color:var(--dark-line)}
html[data-theme=dark] :is(.rnp-table tr:hover td,.simple-table tr:hover td){background:#23344c}
html[data-theme=dark] :is(td,.table-toolbar,.table-pagination,.completion-controls,.columns-list li,.user-card,.task-dialog-footer,.filter-actions,.filter-sort,.preparation-footer){border-color:var(--dark-line)}
html[data-theme=dark] :is(p,.subtle,.cell-sub,.cell-daily,.summary-detail,.kpi .label,.summary-kpis .kpi-unit,.simple-table td small,.rnp-table th small,.product-counters span,.task-counters span,.task-counters small,.task-product,.task-evidence,.task-assignee,.task-dialog label,.task-rule label,.quality-table small,.quality-examples footer,.table-pagination,.table-footer,.period-status #period-state,.preparation-card p,.preparation-card .subtle,.login-overlay label,.user-save span){color:var(--dark-muted)}
html[data-theme=dark] :is(.product strong,.column-heading,.price,.note strong,.period-status strong,.brand-controls label,.brand-menu summary,.product-switch,.quality-examples blockquote p,.bubble pre,.login-overlay .brand){color:var(--dark-text)}
html[data-theme=dark] :is(a.wb-link,.task-title-link,.task-context a,.task-history summary,#quality-dialog a,.brand-controls .brand-actions button,.column-jumps button,.column-jumps button.active){color:#9bbfff}
html[data-theme=dark] :is(.note,.activity-scope,.period-status,.period-status.busy,.task-scan-status,.task-dept,.task-status,.pill,.preparation-mark){background:#20344b;border-color:#365779;color:#c7dbf5}
html[data-theme=dark] :is(.badge,.demo,.task-scan-warning,.period-status.failed,.preview.errors,.preparation-errors){background:#3e2f24;border-color:#7a6044;color:#f0bc86}
html[data-theme=dark] :is(.badge.ok,.preparation-ready,.status-done){background:#1a3c32;color:#92dfbd;border-color:#396650}
html[data-theme=dark] :is(.good,.signal-clear,.product-counters>div:nth-child(2) strong){color:#77d7ab}
html[data-theme=dark] :is(.bad,.signal-triggered,.period-status.failed #period-state){color:#ff9c95}
html[data-theme=dark] :is(.filter-choice:hover,.filter-sort button:hover,.filter-sort button.active){background:#2b4263;color:#e2edff}
html[data-theme=dark] :is(.inactive-card-label,.empty){color:#a5b4ca!important}
html[data-theme=dark] .filter-icon{color:#afc4df}html[data-theme=dark] .filter-icon.filtered{background:#284b7c;color:#d8e7ff}
html[data-theme=dark] .summary-kpis .summary-plan{background:#1e2c40;border-color:#384e6e}
html[data-theme=dark] :is(.plan-input,.plan-input:focus){background:#101b2a;color:#e2eaf6;border-color:#4b6587}
html[data-theme=dark] .plan-input.dirty{background:#403921;border-color:#967f3c}
html[data-theme=dark] .phone{background:#203546}html[data-theme=dark] .telegram-link{background:#28405c;color:#bbd7ff}
html[data-theme=dark] .good{color:#77d7ab!important}html[data-theme=dark] .bad{color:#ff9c95!important}
html[data-theme=dark] :is(.completion-controls,.toggle,.filter-sort button,.filter-heading button){color:var(--dark-muted)}
html[data-theme=dark] .column-jumps button.active{background:#284b7c;color:#dfebff}
/* Child text has explicit light-theme colors; a light td alone cannot override them. */
html[data-theme=dark] :is(.cell-value,.kpi .value,.product-counters strong,.task-counters strong){color:var(--dark-text)}
html[data-theme=dark] :is(.product .color,.product small,.plan-progress,.range-fields label,.reset-filters,.task-signal,.signal-unknown,.brand-options small,.task-history small,.task-context small,.preparation-range,.preparation-card .preparation-active,.preparation-updated){color:var(--dark-muted)}
html[data-theme=dark] .warn{color:#f1c66b!important}
html[data-theme=dark] :is(input,textarea)::placeholder{color:var(--dark-muted);opacity:1}
html[data-theme=dark] .plans-table tr.edited-row td{background:#302d23}
html[data-theme=dark] :is(.filter-chip,.count){background:#28405c;color:#d8e7ff;border-color:#4b6587}
html[data-theme=dark] .thumb:not(img){background:#2b3c54;color:#b4c4da}
html[data-theme=dark] .table-scroll{scrollbar-color:#647b9b #192332}
html[data-theme=dark] :is(.wb-link,.note-icon,.phone-top>span){color:#9bbfff}
html[data-theme=dark] :is(.drag-grip,.telegram-layout ul,.select-all,.preparation-logout){color:var(--dark-muted)}
html[data-theme=dark] .preparation-numbers strong{color:var(--dark-text)}
html[data-theme=dark] .preparation-numbers span{color:var(--dark-muted)}
html[data-theme=dark] .preparation-progress{background:#2b3c54}
html[data-theme=dark] .plan-heading:hover{color:#9bbfff}
.rnp-table th[data-key] .column-actions{justify-content:flex-end;gap:3px}
.rnp-table th[data-key] .column-heading{flex:0 1 auto;width:auto;min-width:0;justify-content:flex-end;text-align:right}
.rnp-table th[data-key=article] .column-actions,.rnp-table th[data-key=nm_id] .column-actions{justify-content:flex-start}
.rnp-table th[data-key=article] .column-heading,.rnp-table th[data-key=nm_id] .column-heading{justify-content:flex-start;text-align:left}
@media(max-width:1100px){header{flex-wrap:wrap;gap:12px}.personal-actions{margin:0}.header-right{margin-left:auto}}
@media(max-width:760px){header>div:first-child{flex-basis:100%}.personal-actions .button{padding:7px 10px;font-size:12px}.stock-table th,.stock-table td{padding:9px 7px}.stock-table th{white-space:normal}.user-rights{flex-direction:column}.personal-footer{flex-wrap:wrap}.columns-list li{font-size:12px}.columns-list button{padding:6px 9px}dialog{padding:16px}.period-controls .button{font-size:12px}.stock-table-wrap{max-width:100%}}

#stock-dialog{max-width:820px}.stock-main-total{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:14px;border:1px solid #dce2ea;border-radius:8px}.stock-main-total strong{font-size:23px;white-space:nowrap}.stock-reference{margin-top:22px;border-top:1px solid #dce2ea;padding-top:16px}.stock-reference h3{margin:0 0 6px;font-size:17px}.stock-reference-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}.stock-reference-totals>div{border:1px solid #dce2ea;border-radius:8px;padding:12px}.stock-reference-totals span{display:block;font-size:12px}.stock-reference-totals strong{display:block;font-size:21px;margin-top:5px;font-variant-numeric:tabular-nums}.stock-reference-table th{white-space:normal}.stock-table td:first-child{max-width:240px;white-space:normal;overflow-wrap:anywhere}.stock-main-total,.stock-reference-totals strong{color:inherit}html[data-theme=dark] :is(.stock-main-total,.stock-reference,.stock-reference-totals>div){border-color:var(--dark-line)}@media(max-width:520px){.stock-reference-totals{grid-template-columns:1fr}.stock-reference-totals>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.stock-reference-totals strong{margin:0;font-size:19px}.stock-main-total{flex-wrap:wrap}.stock-reference-table{min-width:460px}}
