:root{--ink:#18221f;--muted:#68736f;--line:#dfe5e1;--paper:#fff;--bg:#f2f5f3;--green:#184f3e;--green-2:#26725a;--green-soft:#eaf4ef;--amber:#8d570b;--amber-soft:#fff2d9;--kh:#edf5f8;--sp:#f2f0f8;--network:#edf5ef;--draft:#f3f8e9;--sales-head:#e4f1e8;--sales-cell:#f0f8f3;--sales-cell-alt:#edf6f0;--sales-hover:#e6f3ea;--sales-draft:#e7f2e5;--sales-draft-hover:#e0eddf;--stock-head:#f6e7e9;--stock-cell:#fcf2f4;--stock-cell-alt:#f9eef0;--stock-hover:#f6e7ea;--stock-draft:#f4ebe7;--stock-draft-hover:#f0e4e2;--group-separator:#cbd6d1;--active-row:#4f849c;--shadow:0 8px 28px rgba(27,50,42,.08);--photo-w:42px;--article-w:108px;--product-left:150px;--table-font:11px;--table-head-font:10px;--table-row:31px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:13px/1.35 system-ui,-apple-system,"Segoe UI",sans-serif;font-variant-numeric:tabular-nums}button,input,select{font:inherit;color:inherit}button{cursor:pointer}:focus-visible{outline:2px solid #4193b8;outline-offset:2px}[hidden]{display:none!important}
.topbar{height:62px;padding:8px 20px;display:flex;align-items:center;justify-content:space-between;background:#123d31;color:#fff;position:sticky;top:0;z-index:30;box-shadow:0 3px 14px #17392f2e}.brand-block,.sync-panel,.draft-title{display:flex;align-items:center}.brand-block{gap:10px}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:7px;background:#f0b74e;color:#19372e;font-weight:850;font-size:18px}.eyebrow{margin:0;color:#a8c8bd;font-size:9px;text-transform:uppercase;letter-spacing:.13em}.eyebrow.dark{color:#698179}.topbar h1{font-size:20px;line-height:1.1;margin:1px 0}.sync-panel{gap:8px}.status-chip{padding:5px 9px;border:1px solid #ffffff2b;border-radius:999px;color:#d6e7e0;font-size:11px}.button{border:0;border-radius:6px;padding:7px 11px;font-weight:650}.button.primary{background:var(--green);color:#fff}.button.secondary{background:#fff;color:#234238;border:1px solid #cad5d0}.button.ghost{padding:6px 10px;background:transparent;border:1px solid #ffffff4d;color:#fff}.button.compact{min-height:30px;padding:5px 10px}.button:disabled{opacity:.48;cursor:not-allowed}
main{padding:10px 14px 62px}.filters{position:relative;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);margin-bottom:8px}.filters-toolbar{min-height:34px;padding:4px 11px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.filters-toggle{min-width:138px;text-align:left;font-weight:650}.view-actions,.font-segments{display:flex;align-items:center}.view-actions{gap:9px}.view-label{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.06em}.font-segments button{height:25px;min-width:31px;margin-right:-1px;border:1px solid #cdd6d2;background:#fff;padding:2px 6px}.font-segments button:first-child{border-radius:4px 0 0 4px}.font-segments button:last-child{border-radius:0 4px 4px 0}.font-segments button.active{position:relative;background:var(--green);border-color:var(--green);color:#fff}.filters-expanded{display:grid;grid-template-columns:minmax(210px,1.35fr) minmax(210px,1.25fr) minmax(170px,1fr) minmax(150px,.85fr) 142px minmax(245px,1.2fr);gap:7px 9px;padding:9px 11px}.control{display:flex;flex-direction:column;gap:3px;min-width:0}.control>label,.page-size-top>label{color:var(--muted);font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:.07em}.control input,.control select,.selector-trigger,.page-size-top select,.pagination input{width:100%;height:31px;border:1px solid #cdd6d2;border-radius:5px;background:#fff;padding:5px 8px}.selector-input{position:relative;display:flex}.selector-trigger{display:flex;align-items:center;justify-content:space-between;text-align:left;padding-right:27px}.selector-trigger span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.selector-clear{position:absolute;right:25px;top:4px;width:23px;height:23px;border:0;border-radius:4px;background:#f1f4f2;color:#66736e;font-size:16px;line-height:1}.selector-clear:hover{background:#e4ebe7;color:#7a342d}.selector-control{position:relative}.selector-popover{position:absolute;top:46px;left:0;width:max(100%,260px);z-index:25;padding:7px;background:#fff;border:1px solid #c8d3ce;border-radius:7px;box-shadow:0 14px 36px rgba(25,46,39,.18)}.group-popover{width:max(100%,390px)}.selector-search{margin-bottom:6px}.selector-options{max-height:245px;overflow:auto}.selector-option{display:flex;align-items:center;gap:6px;width:100%;min-height:27px;padding:4px 7px;border:0;border-radius:4px;background:transparent;text-align:left}.selector-option:hover,.selector-option:focus,.selector-option.selected{background:var(--green-soft)}.selector-option small{margin-left:auto;color:var(--muted)}.group-option[data-level="1"]{padding-left:22px}.group-option[data-level="2"]{padding-left:39px}.group-option[data-level="3"]{padding-left:56px}.group-option mark{background:var(--amber-soft);border-radius:2px}.check{display:flex;align-items:center;gap:6px;grid-column:2/4;align-self:center;color:var(--muted);font-size:11px}.check input{accent-color:var(--green)}.page-size-top{display:flex;align-items:center;justify-content:flex-end;gap:6px;grid-column:5}.page-size-top select{width:72px}.text-button{border:0;background:transparent;color:#4c655c;padding:4px 2px;font-size:11px}.text-button:hover{text-decoration:underline}.filters-collapsed{min-height:34px;padding:6px 11px;display:flex;align-items:center;gap:9px}.filters-collapsed strong{font-size:11px}.filters-collapsed span{color:var(--muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.segments{display:flex}.segments button{height:31px;min-width:34px;border:1px solid #cdd6d2;background:#fff;padding:4px 8px;margin-right:-1px}.segments button:first-child{border-radius:5px 0 0 5px}.segments button:last-child{border-radius:0 5px 5px 0}.segments .active{position:relative;background:var(--green);border-color:var(--green);color:#fff}.custom-dates{display:flex;align-items:center;gap:4px;margin-top:3px}.custom-dates input{min-width:0}.period-control:has(.custom-dates:not([hidden])){grid-row:span 2}
.table-card{background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);overflow:hidden}.table-caption{min-height:42px;padding:6px 9px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}#resultCount{font-size:14px;margin-right:6px}#rangeCaption,.hint{color:var(--muted);font-size:10px}.table-actions{display:flex;align-items:center;gap:9px}.table-wrap{overflow:auto;height:calc(100vh - 305px);min-height:340px}.filters-are-collapsed .table-wrap{height:calc(100vh - 220px)}table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:var(--table-font)}col[data-column="photo"]{width:var(--photo-w)}th,td{height:var(--table-row);padding:3px 5px;border-right:1px solid #e4e9e6;border-bottom:1px solid #e4e9e6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}th:has(+th.group-start),td:has(+td.group-start){border-right:0}.group-start{border-left:2px solid var(--group-separator)!important}thead th{position:sticky;z-index:7;background:#f7f9f8;color:#59635f;font-weight:650;text-align:center;overflow:visible}thead tr:first-child th{top:0;height:24px;font-size:9px;text-transform:uppercase;letter-spacing:.045em}thead tr:nth-child(2) th{top:24px;height:31px}thead th[rowspan="2"]{top:0;height:55px}.group-head.prices{background:#f6f4ee}.group-head.supply{background:#f4f1f5}.kh{background:var(--kh)!important}.sp{background:var(--sp)!important}.network{background:var(--network)!important}.sort-button{position:relative;width:100%;height:100%;border:0;padding:0 10px 0 0;background:transparent;color:inherit;font-size:var(--table-head-font);line-height:1.05;font-weight:650;white-space:normal}.sort-indicator{position:absolute;right:2px;top:50%;transform:translateY(-50%);opacity:0;color:#7a8782}.sort-button:hover .sort-indicator,.sort-button:focus-visible .sort-indicator{opacity:.7}.sort-button.active{color:var(--green);font-weight:800}.sort-button.active .sort-indicator{opacity:1;color:var(--green)}.column-resizer{position:absolute;top:0;right:-4px;width:8px;height:100%;z-index:20;cursor:col-resize;touch-action:none}.column-resizer::after{content:"";position:absolute;top:18%;bottom:18%;left:3px;width:1px;background:#aab7b1;opacity:0}.column-resizer:hover::after,.column-resizer:focus-visible::after,.column-resizer.resizing::after{opacity:1;background:var(--green)}body.is-resizing{cursor:col-resize;user-select:none}body[data-font="small"]{--table-font:10px;--table-head-font:9px;--table-row:28px}body[data-font="normal"]{--table-font:11px;--table-head-font:10px;--table-row:31px}body[data-font="large"]{--table-font:12px;--table-head-font:11px;--table-row:35px}tbody tr:nth-child(even) td{background:#fafcfb}tbody tr:hover td{background:#eef6f2}tbody tr.in-draft td{background:var(--draft)}tbody tr.in-draft:hover td{background:#eaf3dc}
.sticky-photo,.sticky-article,.sticky-product{position:sticky!important;z-index:5;text-align:left}.sticky-photo{left:0}.sticky-article{left:var(--photo-w)}.sticky-product{left:var(--product-left);box-shadow:5px 0 7px -7px #25372f}.sticky-article,.article-cell{text-align:left}thead .sticky-photo,thead .sticky-article,thead .sticky-product{z-index:15;background:#f7f9f8}tbody .sticky-photo,tbody .sticky-article,tbody .sticky-product{background:#fff}tbody tr:nth-child(even) :is(.sticky-photo,.sticky-article,.sticky-product){background:#fafcfb}tbody tr.in-draft :is(.sticky-photo,.sticky-article,.sticky-product){background:var(--draft)}tbody tr:hover :is(.sticky-photo,.sticky-article,.sticky-product){background:#eef6f2}.product-name{font-weight:650;overflow:hidden;text-overflow:ellipsis}.product-code{color:var(--muted);font-size:calc(var(--table-font) - 2px)}.supplier{max-width:none}.num{font-weight:600}.negative{color:#ad3333}.money-cell,.markup-cell{font-weight:580}.need-value.positive{display:inline-block;padding:2px 5px;border-radius:4px;background:var(--amber-soft);color:var(--amber);font-weight:780}.minimum-control{display:flex;align-items:center;justify-content:flex-end;gap:3px}.minimum-state{font-size:9px;color:var(--muted)}.minimum-edit,.minimum-save,.minimum-cancel{padding:2px 3px}.order-cell{display:flex;align-items:center;justify-content:flex-end;gap:3px}.quantity-input{width:55px;height:25px;border:1px solid #c4d0ca;border-radius:4px;padding:2px 5px;text-align:right}.draft{background:#f3f8e9}.draft-step{width:23px;padding:0;font-size:14px;font-weight:700}.text-action{height:25px;border:1px solid #b8c8c1;background:#fff;border-radius:4px;padding:2px 5px;color:#234d3d;font-size:9px}.clear-draft{width:23px;padding:0;color:#7c5b55}.photo-cell{padding:2px;text-align:center}.photo-button,.photo-placeholder{display:grid;place-items:center;width:28px;height:28px;margin:auto;border:1px solid var(--line);border-radius:4px;background:#fff;overflow:hidden}.photo-button{padding:0}.photo-button img{width:100%;height:100%;object-fit:contain}.photo-button span{display:none}.photo-button.image-error img{display:none}.photo-button.image-error span{display:block;color:var(--muted);font-size:7px}.photo-placeholder{border-style:dashed;color:var(--muted);font-size:7px;white-space:normal}.empty{text-align:center!important;color:var(--muted);padding:45px}.pagination{min-height:40px;padding:5px 9px;display:flex;justify-content:center;align-items:center;gap:10px}.pagination label{display:flex;align-items:center;gap:5px}.pagination input{width:58px;height:29px}
thead th.semantic-sales{background:var(--sales-head)!important}thead th.semantic-stock{background:var(--stock-head)!important}tbody td.semantic-sales{background:var(--sales-cell)}tbody tr:nth-child(even) td.semantic-sales{background:var(--sales-cell-alt)}tbody tr:hover td.semantic-sales{background:var(--sales-hover)}tbody tr.in-draft td.semantic-sales{background:var(--sales-draft)}tbody tr.in-draft:hover td.semantic-sales{background:var(--sales-draft-hover)}tbody td.semantic-stock{background:var(--stock-cell)}tbody tr:nth-child(even) td.semantic-stock{background:var(--stock-cell-alt)}tbody tr:hover td.semantic-stock{background:var(--stock-hover)}tbody tr.in-draft td.semantic-stock{background:var(--stock-draft)}tbody tr.in-draft:hover td.semantic-stock{background:var(--stock-draft-hover)}tbody tr.active-row td{box-shadow:inset 0 2px var(--active-row),inset 0 -2px var(--active-row)}tbody tr.active-row td:first-child{box-shadow:inset 3px 0 var(--active-row),inset 0 2px var(--active-row),inset 0 -2px var(--active-row)}tbody tr.active-row td.sticky-product{box-shadow:inset 0 2px var(--active-row),inset 0 -2px var(--active-row),5px 0 7px -7px #25372f}
.draft-bar{position:fixed;left:14px;right:14px;bottom:8px;z-index:20;min-height:45px;padding:7px 12px;display:flex;align-items:center;gap:14px;background:#153e32;color:#fff;border-radius:8px;box-shadow:0 8px 28px #123d3155}.draft-title{gap:8px}.draft-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:6px;background:#e9b95b;color:#3b2b0a;font-weight:800}.draft-bar p{margin:0;color:#c8dcd5;font-size:11px}.draft-spacer{flex:1}.draft-open{border:1px solid #a8c8bd;background:#fff;color:#173e33}
.toast{position:fixed;right:18px;bottom:64px;max-width:480px;background:#1e2925;color:#fff;border-radius:7px;padding:8px 12px;opacity:0;transform:translateY(7px);transition:.2s;pointer-events:none;z-index:80}.toast.show{opacity:1;transform:none}.modal{position:fixed;inset:0;z-index:60}.modal-dim{display:grid;place-items:center;padding:20px;background:rgba(16,28,24,.64)}.dialog{background:#fff;border-radius:9px;box-shadow:0 20px 70px #0d1b164d}.confirm-dialog{width:min(440px,calc(100vw - 30px));padding:18px}.dialog h2{margin:0 0 12px;font-size:19px}.dialog p{margin:8px 0}.warning{padding:9px;border-radius:6px;background:var(--amber-soft);color:#654613}.dialog-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:16px}.draft-dialog{display:flex;flex-direction:column;width:min(1280px,calc(100vw - 36px));height:min(760px,calc(100vh - 36px));overflow:hidden}.draft-dialog>header,.draft-dialog>footer{display:flex;align-items:center;justify-content:space-between;padding:12px 15px;border-bottom:1px solid var(--line)}.draft-dialog>header h2{margin:1px 0}.dialog-close,.modal-close{width:34px;height:34px;border:0;border-radius:50%;background:#eef2f0;font-size:24px}.draft-modal-summary{padding:8px 15px;background:#f5f8f6;font-weight:650}.draft-table-wrap{flex:1;overflow:auto}.draft-table{min-width:950px}.draft-table th{position:sticky;top:0;z-index:2;background:#f7f9f8}.draft-table .draft-product{text-align:left}.draft-table .draft-remove{color:#8d4034}.draft-dialog>footer{border-top:1px solid var(--line);border-bottom:0;color:var(--muted);font-size:11px}.image-modal{display:grid;place-items:center;padding:24px;background:#0d1714f2}.image-modal figure{position:relative;width:92vw;height:90vh;margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.image-modal img{display:block;max-width:90vw;max-height:82vh;object-fit:contain;background:#fff;border-radius:9px;box-shadow:0 18px 70px #000a}.image-modal figcaption{min-height:28px;max-width:90vw;padding-top:9px;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-status{display:grid;place-items:center;min-width:190px;min-height:54px;padding:10px 16px;border:1px solid #ffffff30;border-radius:8px;background:#17241fcc;color:#e3ece8}.modal-close{position:absolute;right:20px;top:16px;font-size:25px}.login-body{min-height:100vh;display:grid;place-items:center}.login-card{width:min(440px,calc(100% - 32px));background:#fff;border-radius:14px;box-shadow:var(--shadow);padding:30px}.login-card h1{margin:5px 0 24px}.login-card form,.login-card label{display:grid;gap:8px}.login-card form{gap:16px}.login-card input{height:40px;border:1px solid #bac8c2;border-radius:7px;padding:8px}.login-error{min-height:20px;margin:0;color:#a22}
@media(max-width:1450px){.filters-expanded{grid-template-columns:repeat(3,minmax(0,1fr))}.check,.page-size-top{grid-column:auto}.table-wrap{height:calc(100vh - 380px)}}
@media(max-width:850px){.topbar{height:auto;min-height:62px;align-items:flex-start}.sync-panel{flex-wrap:wrap;justify-content:flex-end}.filters-expanded{grid-template-columns:1fr 1fr}.table-actions .hint{display:none}.draft-bar{gap:8px}.draft-bar p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-wrap{height:calc(100vh - 410px)}}
.filters{margin-bottom:12px}.filters-toggle{text-align:right}.filters-edge-toggle{position:absolute;left:50%;bottom:-9px;z-index:8;transform:translateX(-50%);display:grid;place-items:center;width:34px;height:18px;padding:0;border:1px solid #cdd6d2;border-radius:0 0 8px 8px;background:#fff;color:#53665f;box-shadow:0 4px 9px #1b322a16;font-size:12px}.filters-edge-toggle:hover{background:var(--green-soft);color:var(--green)}
body{font-size:var(--ui-font,13px)}body[data-font="small"]{--ui-font:12px}body[data-font="normal"]{--ui-font:13px}body[data-font="large"]{--ui-font:14px}.control input,.control select,.selector-trigger,.selector-search,.segments button,.page-size-top select,.pagination,.quantity-input,.text-action{font-size:inherit}

/* MVP-05: one common draft, grouped locally for owner review. */
.supplier-plan-dialog{width:min(1540px,calc(100vw - 30px));height:min(900px,calc(100vh - 24px))}.draft-tabs{display:flex;gap:4px;padding:6px 15px 0;border-bottom:1px solid var(--line);background:#f8faf9}.draft-tab{min-width:130px;padding:7px 13px;border:1px solid transparent;border-radius:6px 6px 0 0;background:transparent;color:#53635d;font-weight:700}.draft-tab.active{position:relative;top:1px;border-color:var(--line);border-bottom-color:#fff;background:#fff;color:var(--green)}#draftAllPanel,.supplier-plan-panel{min-height:0;flex:1;overflow:hidden}#draftAllPanel{display:flex;flex-direction:column}.supplier-plan-panel{display:flex;flex-direction:column;background:#f5f7f6}.supplier-plan-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:7px 14px;border-bottom:1px solid var(--line);background:#fff}.supplier-plan-toolbar>div{display:grid;gap:3px}.supplier-plan-toolbar strong{font-size:14px}.plan-notice{font-size:11px;color:var(--muted)}.plan-notice.warning-text{color:#825613}.plan-search{display:grid;grid-template-columns:auto 280px;align-items:center;gap:7px;color:var(--muted);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.plan-search input,.supplier-picker input{height:31px;border:1px solid #c5d1cc;border-radius:5px;background:#fff;padding:5px 8px;color:var(--ink);font-size:12px;text-transform:none;letter-spacing:0}.plan-status{min-height:35px;padding:7px 14px;border-bottom:1px solid var(--line);background:#edf4f0;color:#285342;font-size:11px;font-weight:700}.plan-status.requires_suppliers{background:#fff3db;color:#7b5418}.plan-status.confirmed{background:#e6f3e9;color:#18583a}.plan-status.invalidated{background:#fff0d5;color:#76501b}.supplier-bulk-bar{display:flex;align-items:center;gap:10px;min-height:38px;padding:4px 14px;border-bottom:1px solid #cbd6d1;background:#eaf3ef}.supplier-bulk-bar strong{font-size:11px}.supplier-plan-groups{flex:1;overflow:auto;padding:8px 10px 18px}.supplier-group{margin-bottom:7px;border:1px solid #d6dfdb;border-radius:7px;background:#fff;box-shadow:0 2px 7px #233a3110;overflow:hidden}.supplier-group.unresolved{border-color:#e3c989}.supplier-group-header{display:grid;grid-template-columns:22px minmax(170px,.9fr) minmax(320px,2fr) auto;align-items:center;gap:8px;min-height:39px;padding:5px 9px;border-bottom:1px solid #e1e7e4;background:#edf3f0;text-align:left}.supplier-group.unresolved .supplier-group-header{background:#fff2d9}.supplier-group-toggle{display:grid;grid-template-columns:minmax(170px,.9fr) minmax(320px,2fr);align-items:center;gap:8px;border:0;background:transparent;text-align:left}.supplier-group-name{font-weight:780;overflow:hidden;text-overflow:ellipsis}.supplier-group-meta{color:#5e6e67;font-size:10px;white-space:normal}.supplier-group-chevron{width:24px;border:0;background:transparent;color:#4d655b;font-weight:800}.supplier-group table{width:100%;table-layout:fixed}.supplier-group th{top:0;height:27px;background:#f8faf9;font-size:9px}.supplier-group td{height:33px;font-size:10px}.supplier-group tr.selected td{background:#edf5ef}.supplier-group .plan-check{width:34px;text-align:center}.supplier-group .plan-photo{width:38px;text-align:center}.supplier-group .plan-article{width:92px;text-align:left}.supplier-group .plan-product{width:auto;text-align:left}.supplier-group .plan-brand{width:88px;text-align:left}.supplier-group .plan-quantity{width:80px}.supplier-group .plan-price,.supplier-group .plan-total{width:92px}.supplier-group .plan-supplier{width:190px;text-align:left}.supplier-group .plan-source{width:92px;text-align:left}.supplier-group .plan-actions{width:62px}.supplier-product-name{display:block;font-weight:650;overflow:hidden;text-overflow:ellipsis}.source-badge{display:inline-block;max-width:88px;padding:2px 5px;border-radius:999px;background:#edf1ef;color:#52645c;font-size:9px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.source-badge.draft_override{background:#e4eff5;color:#315c70}.source-badge.unresolved{background:#fff0ce;color:#77500f}.supplier-action{max-width:180px;border:0;background:transparent;color:#245c47;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px;overflow:hidden;text-overflow:ellipsis}.supplier-reset{margin-left:4px;color:#7b5b52}.supplier-group .quantity-input{width:58px}.supplier-plan-empty{padding:60px 15px;text-align:center;color:var(--muted)}.draft-footer-actions{display:flex;align-items:center;gap:8px}.supplier-next-step{padding:5px 8px;border-radius:5px;background:#eef3f0;color:#53655d}.supplier-picker{position:fixed;z-index:85;width:320px;max-height:360px;padding:7px;border:1px solid #bccbc5;border-radius:7px;background:#fff;box-shadow:0 18px 52px #152a2245}.supplier-picker input{width:100%;margin-bottom:6px}.supplier-picker-options{max-height:285px;overflow:auto}.supplier-picker-option{display:flex;justify-content:space-between;width:100%;min-height:29px;padding:5px 7px;border:0;border-radius:4px;background:transparent;text-align:left}.supplier-picker-option:hover,.supplier-picker-option:focus{background:var(--green-soft)}.supplier-picker-option small{color:var(--muted)}.supplier-picker-option mark{background:var(--amber-soft)}.supplier-picker-empty{margin:8px 3px;color:#6d736f;font-size:11px}.supplier-picker-empty small{color:var(--muted)}

/* Product Intelligence 06: separate, read-only analytical surface. */
.module-nav{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid #ffffff24;border-radius:7px;background:#092c2366}.module-nav-button{min-height:33px;padding:5px 13px;border:0;border-radius:5px;background:transparent;color:#c9ddd6;font-weight:720}.module-nav-button span{margin-left:4px;color:#efc46d;font-size:8px;text-transform:uppercase;letter-spacing:.06em}.module-nav-button.active{background:#fff;color:#174b3b}.module-nav-button.active span{color:#8d570b}.analytics-panel{display:grid;gap:9px;padding-bottom:18px}.analytics-intro{display:flex;align-items:center;justify-content:space-between;padding:12px 15px;border:1px solid #cddbd5;border-radius:8px;background:linear-gradient(115deg,#f8fbf9,#e8f3ee);box-shadow:var(--shadow)}.analytics-intro h2{margin:2px 0 3px;font-size:19px}.analytics-intro p{margin:0;color:#5d6d66}.analytics-asof,.readonly-chip{padding:5px 9px;border:1px solid #bad0c6;border-radius:999px;background:#fff;color:#315c4c;font-size:10px;font-weight:750}.analytics-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.analytics-summary article{display:grid;gap:3px;padding:9px 11px;border:1px solid var(--line);border-radius:7px;background:#fff;box-shadow:0 3px 12px #1b322a0c}.analytics-summary span{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.05em}.analytics-summary strong{font-size:19px;color:#174f3d}.analytics-filters{display:grid;grid-template-columns:minmax(200px,1.4fr) repeat(5,minmax(130px,1fr)) auto;align-items:end;gap:7px;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:#fff}.analytics-filters label{display:grid;gap:3px;color:var(--muted);font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:.05em}.analytics-filters input,.analytics-filters select{width:100%;height:31px;border:1px solid #cdd6d2;border-radius:5px;background:#fff;padding:5px 7px;color:var(--ink);font-size:11px;text-transform:none;letter-spacing:0}.analytics-card .table-caption span{color:var(--muted);font-size:10px}.analytics-table-wrap{height:calc(100vh - 355px);min-height:360px;overflow:auto}.analytics-table{width:100%;min-width:1580px;table-layout:fixed}.analytics-table th{top:0;height:42px;background:#edf4f0;font-size:9px;line-height:1.1}.analytics-table td{height:49px;vertical-align:middle;font-size:10px}.analytics-table th:nth-child(1){width:42px}.analytics-table th:nth-child(2){width:230px}.analytics-table th:nth-child(3){width:150px}.analytics-table th:nth-child(4),.analytics-table th:nth-child(5){width:95px}.analytics-table th:nth-child(6){width:125px}.analytics-table th:nth-child(7){width:145px}.analytics-table th:nth-child(8){width:90px}.analytics-table th:nth-child(9){width:100px}.analytics-table th:nth-child(10){width:320px}.analytics-table th:nth-child(11){width:155px}.analytics-product,.analytics-taxonomy{display:grid;text-align:left}.analytics-product span,.analytics-taxonomy span{overflow:hidden;text-overflow:ellipsis}.analytics-product small,.analytics-minimum small{display:block;color:var(--muted);font-size:8px}.strategy-badge,.confidence-badge{display:inline-block;padding:3px 6px;border-radius:999px;background:#eef3f1;color:#3d5b50;font-size:9px;font-weight:750;white-space:normal;text-align:center}.strategy-badge.continuous{background:#e1f1e7;color:#1d6544}.strategy-badge.intermittent,.strategy-badge.one_for_one{background:#fff1d6;color:#77500f}.strategy-badge.seasonal{background:#e8eafa;color:#424d88}.strategy-badge.assortment_slot{background:#e4eef5;color:#315d74}.strategy-badge.dormant{background:#f1e9e7;color:#76534a}.confidence-badge.high{background:#daf0e2;color:#195d3e}.confidence-badge.medium{background:#fff0cd;color:#77500f}.confidence-badge.low{background:#f4e3df;color:#7a4338}.analytics-targets{display:flex;justify-content:center;gap:7px}.analytics-targets strong{color:#174f3d;font-size:13px}.analytics-reason{white-space:normal;line-height:1.25;text-align:left}.analytics-signals{white-space:normal;text-align:left}.analytics-signals span{display:inline-block;margin:1px;padding:2px 4px;border-radius:4px;background:#fff0d5;color:#76500f;font-size:8px}.analytics-minimum{text-align:center}.analytics-minimum strong{color:#6f4a12}.analytics-table .photo-button{width:34px;height:34px}
@media(max-width:1200px){.module-nav{order:3}.topbar{flex-wrap:wrap}.analytics-summary{grid-template-columns:repeat(3,1fr)}.analytics-filters{grid-template-columns:repeat(3,1fr)}.analytics-table-wrap{height:calc(100vh - 460px)}}

/* Analytics Integration 07: one compact row signal and a read-only detail drawer. */
.product-meta{display:flex;align-items:center;gap:5px;min-width:0}.product-meta .product-code{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis}.analytics-row-badge{flex:none;max-width:82px;height:17px;padding:1px 5px;border:1px solid #aecbc0;border-radius:999px;background:#e6f3ed;color:#195b42;font-size:8px;font-weight:800;line-height:1;letter-spacing:.015em}.analytics-row-badge[data-confidence="MEDIUM"]{border-color:#dfc58b;background:#fff2d7;color:#77500f}.analytics-row-badge[data-confidence="LOW"]{border-color:#dfb9ae;background:#f7e7e2;color:#7a4338}.analytics-row-badge:hover,.analytics-row-badge:focus-visible{background:#d7ece2;border-color:#76a992}
.advice-modal{display:flex;justify-content:flex-end;background:transparent}.advice-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(16,28,24,.58)}.advice-drawer{position:relative;z-index:1;width:min(610px,calc(100vw - 30px));height:100vh;display:flex;flex-direction:column;background:#f5f8f6;box-shadow:-16px 0 55px #0d1b1645;overflow:hidden}.advice-drawer>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:17px 19px;border-bottom:1px solid var(--line);background:#fff}.advice-drawer h2{max-width:510px;margin:2px 0 3px;font-size:19px;line-height:1.2}.advice-identity{margin:0;color:var(--muted);font-size:10px}.advice-status{display:grid;place-items:center;min-height:150px;padding:30px;color:var(--muted)}.advice-content{overflow:auto;padding:11px 13px 30px}.advice-content section{margin-bottom:9px;padding:11px 12px;border:1px solid #dbe3df;border-radius:8px;background:#fff;box-shadow:0 2px 8px #1b322a0b}.advice-content h3{margin:0 0 8px;color:#50615a;font-size:10px;text-transform:uppercase;letter-spacing:.055em}.advice-lead,.advice-metrics{display:grid;gap:6px}.advice-lead{grid-template-columns:1.5fr 1fr 1fr}.advice-metrics.two{grid-template-columns:1fr 1fr}.advice-metrics.three{grid-template-columns:repeat(3,1fr)}.advice-metrics.four{grid-template-columns:repeat(4,1fr)}.advice-lead>div,.advice-metrics>div,.advice-recommendation>div{display:grid;gap:2px;padding:7px 8px;border-radius:6px;background:#f3f7f5}.advice-content span,.advice-history span{color:var(--muted);font-size:9px}.advice-content strong{white-space:normal}.advice-lead strong{color:#174f3d}.advice-note{margin:7px 1px 0;color:var(--muted);font-size:9px}.advice-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.advice-cycles{display:flex}.advice-cycles button{min-width:35px;height:26px;margin-left:-1px;border:1px solid #c8d4cf;background:#fff;font-size:10px;font-weight:750}.advice-cycles button:first-child{border-radius:5px 0 0 5px}.advice-cycles button:last-child{border-radius:0 5px 5px 0}.advice-cycles button.active{position:relative;border-color:var(--green);background:var(--green);color:#fff}.advice-recommendation{display:grid;grid-template-columns:1fr 1.5fr;gap:7px}.advice-recommendation strong{color:#7d510e;font-size:22px}.advice-history{display:grid;gap:5px}.advice-history p{display:grid;grid-template-columns:115px 1fr;gap:8px;margin:0;padding:4px 0}.advice-reason-text{margin:0;white-space:normal;line-height:1.45}.advice-drawer .dialog-close{position:static;flex:none}
@media(max-width:650px){.advice-drawer{width:100vw}.advice-lead{grid-template-columns:1fr}.advice-metrics.four{grid-template-columns:1fr 1fr}}

/* Analytics Integration 07: owner pilot and read-only remediation queues. */
.pilot-toolbar,.data-quality-toolbar{display:flex;align-items:end;gap:12px;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:var(--shadow)}.pilot-toolbar label,.data-quality-toolbar label{display:grid;gap:3px;color:var(--muted);font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:.05em}.pilot-toolbar select,.data-quality-toolbar input{height:31px;min-width:230px;border:1px solid #cdd6d2;border-radius:5px;background:#fff;padding:5px 8px;color:var(--ink);font-size:11px;text-transform:none}.pilot-toolbar>div>span{display:block;margin-bottom:3px;color:var(--muted);font-size:9px;font-weight:750;text-transform:uppercase}.pilot-toolbar .analytics-asof{margin-left:auto}.pilot-table-wrap{height:calc(100vh - 355px)}.pilot-table{min-width:1550px}.pilot-table th:nth-child(1){width:245px}.pilot-table th:nth-child(2){width:155px}.pilot-table th:nth-child(3){width:130px}.pilot-table th:nth-child(4),.pilot-table th:nth-child(5),.pilot-table th:nth-child(6),.pilot-table th:nth-child(7),.pilot-table th:nth-child(8){width:84px}.pilot-table th:nth-child(9){width:260px}.pilot-table th:nth-child(10){width:245px}.pilot-actions>div{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;margin-top:4px}.pilot-decision{display:inline-block;padding:3px 7px;border-radius:999px;background:#e6f3ed;color:#195b42;font-size:9px;font-weight:800}.pilot-decision.override{background:#fff0cd;color:#77500f}.pilot-decision.reject{background:#f4e3df;color:#7a4338}.pilot-decision-dialog label{display:grid;gap:4px;margin:10px 0;color:var(--muted);font-size:11px;font-weight:700}.pilot-decision-dialog input,.pilot-decision-dialog textarea{width:100%;border:1px solid #cdd6d2;border-radius:5px;padding:7px;color:var(--ink);font:inherit}.pilot-decision-dialog textarea{min-height:72px;resize:vertical}.capacity-card{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:8px 16px;padding:12px 15px;border:1px solid #d8c791;border-radius:8px;background:#fff9e9}.capacity-card h3,.capacity-card p{margin:0}.capacity-card p{margin-top:4px;color:var(--muted)}.capacity-rows{grid-column:1/-1;display:flex;gap:6px;overflow:auto;padding-top:3px}.capacity-rows span{flex:none;padding:4px 7px;border:1px solid #e5d8ac;border-radius:5px;background:#fff;font-size:9px}.data-quality-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.data-quality-toolbar .draft-tabs{margin:0;padding:0;border:0}.data-quality-toolbar label{margin-left:auto}.data-quality-table-wrap{height:calc(100vh - 335px)}.data-quality-table{min-width:1320px}.data-quality-table th,.data-quality-table td{text-align:left;white-space:normal}.data-quality-table th:first-child{width:165px}.data-quality-table th:nth-child(2){width:245px}.data-quality-table th:last-child{width:330px}.review-status{display:inline-block;padding:4px 7px;border-radius:999px;background:#fff0cd;color:#77500f;font-size:9px;font-weight:800}.review-status.ready{background:#daf0e2;color:#195d3e}.review-status.transfer{background:#e4eef5;color:#315d74}.data-quality-table small{color:var(--muted)}
@media(max-width:1200px){.pilot-toolbar,.data-quality-toolbar{flex-wrap:wrap}.pilot-table-wrap,.data-quality-table-wrap{height:calc(100vh - 440px)}.capacity-card{grid-template-columns:1fr}.capacity-rows{grid-column:1}}

/* Receiving & Distribution 08: three top-level sections and keyboard-first receiving. */
.write-plan-summary{display:flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid #d8c791;border-radius:7px;background:#fff9e9}.write-plan-summary div{display:grid;gap:2px;margin-right:auto}.write-plan-summary div span{color:var(--muted);font-size:9px}.write-plan-summary>span{padding:4px 7px;border:1px solid #e5d8ac;border-radius:999px;background:#fff;font-size:9px;font-weight:750;white-space:nowrap}
.module-nav-stack{display:grid;gap:2px}.module-nav-stack .module-nav{justify-self:center}.analytics-subnav{display:flex;justify-content:center;gap:2px}.analytics-subnav-button{height:18px;padding:1px 8px;border:0;border-radius:4px;background:transparent;color:#a9c9bd;font-size:8px;line-height:1}.analytics-subnav-button:hover,.analytics-subnav-button:focus-visible{background:#ffffff14;color:#fff}.analytics-subnav-button.active{background:#e8f1ed;color:#1b5341;font-weight:800}
.receiving-panel{display:grid;gap:9px;padding-bottom:18px}.receiving-intro{display:flex;align-items:center;justify-content:space-between;padding:12px 15px;border:1px solid #cddbd5;border-radius:8px;background:linear-gradient(115deg,#fbfcfb,#eaf3ef);box-shadow:var(--shadow)}.receiving-intro h2{margin:2px 0 3px;font-size:19px}.receiving-intro p{margin:0;color:#5d6d66}.receiving-summary,.receiving-session-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:9px}.receiving-summary article,.receiving-session-summary article{display:grid;gap:3px;padding:9px 11px;border:1px solid var(--line);border-radius:7px;background:#fff;box-shadow:0 3px 12px #1b322a0c}.receiving-summary span,.receiving-session-summary span{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.05em}.receiving-summary strong,.receiving-session-summary strong{font-size:19px;color:#174f3d}.receiving-toolbar{display:grid;grid-template-columns:minmax(230px,1.4fr) minmax(190px,.7fr) 1fr;align-items:end;gap:8px;margin-bottom:9px;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:#fff}.receiving-toolbar label{display:grid;gap:3px;color:var(--muted);font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:.05em}.receiving-toolbar input,.receiving-toolbar select{height:31px;border:1px solid #cdd6d2;border-radius:5px;background:#fff;padding:5px 8px;color:var(--ink);font-size:11px;text-transform:none;letter-spacing:0}.receiving-toolbar .hint{align-self:center;text-align:right}.receiving-table-wrap{height:calc(100vh - 420px);min-height:330px;overflow:auto}.receiving-table{min-width:1280px;table-layout:fixed}.receiving-table th{top:0;height:36px;background:#edf4f0;font-size:9px}.receiving-table td{height:39px;font-size:10px;vertical-align:middle}.receiving-table th:nth-child(1){width:190px}.receiving-table th:nth-child(2){width:150px}.receiving-table th:nth-child(3){width:90px}.receiving-table th:nth-child(4){width:115px}.receiving-table th:nth-child(5){width:70px}.receiving-table th:nth-child(6),.receiving-table th:nth-child(7),.receiving-table th:nth-child(8){width:84px}.receiving-table th:nth-child(9){width:110px}.receiving-table th:nth-child(10){width:94px}.receiving-table small{color:var(--muted);font-size:8px}.receiving-status-badge,.receiving-line-status{display:inline-block;padding:3px 7px;border-radius:999px;background:#eef3f1;color:#3d5b50;font-size:9px;font-weight:780;white-space:normal}.receiving-status-badge.expected{background:#e4eef5;color:#315d74}.receiving-status-badge.in_progress{background:#fff0cd;color:#77500f}.receiving-status-badge.completed{background:#daf0e2;color:#195d3e}.receiving-status-badge.difference,.receiving-difference.has-difference,.receiving-line-difference.has-difference{color:#8a3e31;font-weight:800}.receiving-session{display:grid;gap:9px}.receiving-session-header{display:grid;grid-template-columns:auto minmax(260px,1fr) auto;align-items:center;gap:14px;padding:11px 14px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:var(--shadow)}.receiving-session-header h2,.receiving-session-header p{margin:0}.receiving-session-header h2{margin:2px 0;font-size:18px}.receiving-session-header #receivingSessionCaption{color:var(--muted);font-size:10px}.receiving-session-actions{display:flex;align-items:center;gap:8px}.receiving-lines-wrap{height:calc(100vh - 360px);min-height:390px;overflow:auto}.receiving-lines-table{min-width:1380px}.receiving-lines-table th:nth-child(1){width:120px}.receiving-lines-table th:nth-child(2){width:320px}.receiving-lines-table th:nth-child(3),.receiving-lines-table th:nth-child(4),.receiving-lines-table th:nth-child(5){width:105px}.receiving-lines-table th:nth-child(6),.receiving-lines-table th:nth-child(7),.receiving-lines-table th:nth-child(8){width:120px}.receiving-lines-table th:nth-child(9){width:130px}.receiving-lines-table td{height:36px}.receiving-product{text-align:left}.receiving-input{width:88px;height:27px;border:1px solid #b9c9c2;border-radius:4px;background:#fff;padding:3px 6px;text-align:right;font-weight:650}.receiving-input:focus{border-color:#4b8da6;box-shadow:0 0 0 2px #4b8da62b}.receiving-lines-table tr.active-row td{background:#eaf3ef;box-shadow:inset 0 2px #4f849c,inset 0 -2px #4f849c}.receiving-lines-table tr.active-row td:first-child{box-shadow:inset 3px 0 #4f849c,inset 0 2px #4f849c,inset 0 -2px #4f849c}.receiving-price-difference{color:#596a63}.receiving-card .pagination{border-top:1px solid var(--line)}
@media(max-width:1200px){.topbar{height:auto;min-height:62px}.module-nav-stack{order:3}.receiving-summary,.receiving-session-summary{grid-template-columns:1fr 1fr}.receiving-toolbar{grid-template-columns:1fr 1fr}.receiving-toolbar .hint{grid-column:1/-1;text-align:left}.receiving-table-wrap{height:calc(100vh - 500px)}.receiving-session-header{grid-template-columns:auto 1fr}.receiving-session-actions{grid-column:1/-1;justify-content:flex-end}}

.distribution-session{display:grid;gap:9px}.distribution-header{display:grid;grid-template-columns:auto minmax(260px,1fr) auto;align-items:center;gap:14px;padding:11px 14px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:var(--shadow)}.distribution-header h2,.distribution-header p{margin:0}.distribution-header h2{margin:2px 0;font-size:18px}.distribution-header #distributionCaption{color:var(--muted);font-size:10px}.distribution-actions{display:flex;align-items:center;gap:7px}.distribution-invalidated{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;padding:10px 13px;border:1px solid #d9a99d;border-radius:7px;background:#f8e8e4;color:#753e33}.distribution-invalidated span{font-size:10px}.distribution-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.distribution-summary article{display:grid;gap:3px;padding:9px 11px;border:1px solid var(--line);border-radius:7px;background:#fff;box-shadow:0 3px 12px #1b322a0c}.distribution-summary span{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.05em}.distribution-summary strong{font-size:19px;color:#174f3d}.distribution-confirm-actions{display:flex;align-items:center;gap:10px}.distribution-table-wrap{height:calc(100vh - 355px);min-height:400px;overflow:auto}.distribution-table{width:100%;min-width:1620px;table-layout:fixed;border-collapse:separate;border-spacing:0}.distribution-table th{position:sticky;top:0;z-index:2;height:42px;padding:3px 5px;border-right:1px solid #dfe6e2;border-bottom:1px solid #d7e0dc;background:#edf4f0;color:#59635f;font-size:9px;text-align:center}.distribution-table td{height:37px;padding:3px 5px;border-right:1px solid #e4e9e6;border-bottom:1px solid #e4e9e6;text-align:right;font-size:10px}.distribution-table th:nth-child(1){width:42px}.distribution-table th:nth-child(2){width:105px}.distribution-table th:nth-child(3){width:310px}.distribution-table th:nth-child(4),.distribution-table th:nth-child(5){width:92px}.distribution-table th:nth-child(6),.distribution-table th:nth-child(7),.distribution-table th:nth-child(8),.distribution-table th:nth-child(9),.distribution-table th:nth-child(10),.distribution-table th:nth-child(11){width:105px}.distribution-table th:nth-child(12){width:140px}.distribution-table .kh-column{background:#edf5f8}.distribution-table .sp-column{background:#f2f0f8}.distribution-table .main-column{background:#f6f4ee}.distribution-photo{text-align:center!important}.distribution-photo img,.distribution-photo .photo-placeholder{display:block;width:28px;height:28px;margin:auto;object-fit:contain;border:1px solid var(--line);border-radius:4px;background:#fff}.distribution-product{text-align:left!important}.distribution-product strong,.distribution-product small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.distribution-product small{color:var(--muted);font-size:8px}.distribution-input{width:76px;height:27px;border:1px solid #b9c9c2;border-radius:4px;background:#fff;padding:3px 6px;text-align:right;font-weight:700}.distribution-input:focus{border-color:#4b8da6;box-shadow:0 0 0 2px #4b8da62b}.distribution-quick{display:flex;justify-content:center;gap:3px}.distribution-quick .text-action{white-space:nowrap}.distribution-table tr.active-row td{box-shadow:inset 0 2px #4f849c,inset 0 -2px #4f849c}.distribution-table tr.active-row td:first-child{box-shadow:inset 3px 0 #4f849c,inset 0 2px #4f849c,inset 0 -2px #4f849c}.distribution-table tr.allocation-excessive td{background:#fae5e1!important;color:#842f26}.distribution-table tr.allocation-excessive .distribution-input{border-color:#bc5549;box-shadow:0 0 0 2px #bc55492b}.distribution-print-heading,.distribution-print-value{display:none}.distribution-ack{display:flex;align-items:flex-start;gap:7px;margin-top:11px;padding:9px;border:1px solid #dec483;border-radius:6px;background:#fff8e5;font-weight:700}.receiving-status-badge.invalidated{background:#f4e3df;color:#7a4338}.receiving-status-badge.confirmed{background:#daf0e2;color:#195d3e}.receiving-status-badge.editing{background:#fff0cd;color:#77500f}
@media(max-width:1200px){.distribution-header{grid-template-columns:auto 1fr}.distribution-actions{grid-column:1/-1;justify-content:flex-end}.distribution-summary{grid-template-columns:repeat(3,1fr)}.distribution-table-wrap{height:calc(100vh - 450px)}}

@page{size:A4 landscape;margin:8mm}
@media print{
  body[data-print-store]{background:#fff;color:#000;font-size:9pt}
  body[data-print-store]>*:not(#receivingPanel){display:none!important}
  body[data-print-store] #receivingPanel{display:block!important;padding:0}
  body[data-print-store] #receivingPanel>*:not(#distributionSession){display:none!important}
  body[data-print-store] #distributionSession{display:block!important}
  body[data-print-store] .no-print,body[data-print-store] .distribution-header,body[data-print-store] .distribution-invalidated,body[data-print-store] .distribution-summary,body[data-print-store] .table-caption{display:none!important}
  body[data-print-store] .distribution-print-heading{display:block;margin:0 0 6mm;border-bottom:1px solid #555;padding-bottom:3mm}
  body[data-print-store] .distribution-print-heading h1{margin:0;font-size:16pt}
  body[data-print-store] .distribution-print-heading p{margin:1mm 0 0;color:#444}
  body[data-print-store] .distribution-card{border:0;box-shadow:none}
  body[data-print-store] .distribution-table-wrap{height:auto;overflow:visible}
  body[data-print-store] .distribution-table{min-width:0;width:100%;table-layout:fixed}
  body[data-print-store] .distribution-table th,body[data-print-store] .distribution-table td{position:static;height:auto;padding:2mm 1.5mm;border-color:#999;background:#fff!important;color:#000!important;font-size:8pt}
  body[data-print-store] .distribution-input{display:none}
  body[data-print-store] .distribution-print-value{display:inline;font-weight:800}
  body[data-print-store="khotkovo"] .sp-column,body[data-print-store="khotkovo"] .main-column,body[data-print-store="khotkovo"] tr.kh-zero{display:none!important}
  body[data-print-store="sergiev_posad"] .kh-column,body[data-print-store="sergiev_posad"] .main-column,body[data-print-store="sergiev_posad"] tr.sp-zero{display:none!important}
  body[data-print-store] .distribution-photo img{width:12mm;height:12mm}
}

.receiving-line-actions{display:flex;align-items:center;gap:8px}.receiving-add-dialog{width:min(1040px,94vw);max-height:92vh;overflow:auto}.receiving-import-dialog{width:min(920px,92vw);max-height:88vh;overflow:auto}.receiving-add-dialog>header,.receiving-import-dialog>header{display:flex;justify-content:space-between;align-items:flex-start}.receiving-add-dialog label,.receiving-import-dialog label{display:grid;gap:5px;font-size:12px;font-weight:700;color:var(--muted)}.receiving-add-dialog input,.receiving-import-dialog input{min-height:36px;border:1px solid var(--line);border-radius:7px;padding:7px 9px;background:#fff;color:var(--ink)}.receiving-catalog-results{display:grid;gap:5px;max-height:210px;overflow:auto;margin:8px 0 12px}.receiving-catalog-results.compact{max-height:150px}.receiving-catalog-option{display:flex;justify-content:space-between;text-align:left;gap:14px;border:1px solid var(--line);border-radius:7px;padding:8px 10px;background:#fff}.receiving-catalog-option.selected{border-color:var(--green);box-shadow:0 0 0 1px var(--green)}.receiving-catalog-option small{color:var(--muted)}.receiving-draft-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.receiving-draft-grid.three{grid-template-columns:repeat(3,minmax(0,1fr));margin:12px 0}.new-product-banner{display:flex;justify-content:space-between;align-items:center;padding:9px 11px;border-radius:7px;background:#fff7d6;color:#664d03}.new-product-template-preview{margin:10px 0;padding:10px;border:1px solid var(--line);border-radius:7px;background:#f3f7f5;font-size:12px}.receiving-import-table{max-height:320px;overflow:auto;margin-top:12px}.receiving-import-table table{width:100%;border-collapse:collapse}.receiving-import-table th,.receiving-import-table td{padding:7px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}@media(max-width:900px){.receiving-draft-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
.distribution-invalidated{grid-template-columns:auto minmax(0,1fr) auto;align-items:center}

/* Supplier Workflow 09: partial batches and explainable recommendations. */
.supplier-plan-toolbar{display:grid;grid-template-columns:minmax(250px,1fr) 190px minmax(240px,320px) auto;align-items:end;gap:9px}.plan-group-filter,.plan-search{display:grid;grid-template-columns:1fr;gap:3px;color:var(--muted);font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:.04em}.plan-group-filter select,.plan-search input{width:100%;height:31px;border:1px solid #c5d1cc;border-radius:5px;background:#fff;padding:5px 8px;color:var(--ink);font-size:11px;text-transform:none;letter-spacing:0}.supplier-plan-toolbar #supplierRecommendationOpen{align-self:end;white-space:normal}.supplier-group-header{grid-template-columns:22px minmax(330px,1fr) auto 24px}.supplier-group-body{overflow:auto}.supplier-group table{min-width:1310px}.supplier-group .plan-product{width:410px}.supplier-group .plan-quantity{width:96px}.supplier-group .plan-price{width:98px}.supplier-group .plan-supplier{width:205px}.supplier-group .plan-actions{width:74px}.supplier-group-batch{white-space:nowrap}.supplier-unresolved-note{color:#805b20;font-size:9px;font-weight:700}.supplier-recommendation{display:grid;gap:2px;margin-top:4px;padding:5px 6px;border-left:3px solid #5e947d;border-radius:3px;background:#eef6f2;white-space:normal}.supplier-recommendation strong{color:#19563e;font-size:9px}.supplier-recommendation span{color:#5b6c64;font-size:8px}.supplier-recommendation .supplier-use-recommendation,.supplier-recommendation .supplier-prepare-draft{justify-self:start;margin-top:2px}.supplier-discrepancy{display:block;margin-top:4px;padding:3px 5px;border-radius:4px;background:#f8e4df;color:#812f27;font-size:8px;font-weight:800}.supplier-overcommitted td{background:#fff6f3}.supplier-committed-label{display:inline-block;padding:3px 6px;border-radius:999px;background:#e1f1e7;color:#1d6544;font-size:8px;font-weight:800}.supplier-batch-dialog,.supplier-recommendation-dialog{width:min(1120px,94vw);max-height:92vh;overflow:auto}.supplier-batch-dialog>header,.supplier-recommendation-dialog>header{display:flex;align-items:flex-start;justify-content:space-between}.supplier-batch-summary,.supplier-recommendation-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:10px 0}.supplier-recommendation-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.supplier-batch-summary article,.supplier-recommendation-summary article{display:grid;gap:3px;padding:9px;border:1px solid var(--line);border-radius:7px;background:#f4f8f6}.supplier-batch-summary span,.supplier-recommendation-summary span{color:var(--muted);font-size:9px}.supplier-batch-summary strong,.supplier-recommendation-summary strong{color:#174f3d;font-size:18px}.supplier-batch-preview-table{max-height:420px;overflow:auto;border:1px solid var(--line);border-radius:7px}.supplier-batch-preview-table table{width:100%;border-collapse:collapse}.supplier-batch-preview-table th,.supplier-batch-preview-table td{padding:6px 8px;border-bottom:1px solid var(--line);text-align:left;font-size:10px}.supplier-batch-preview-table th{position:sticky;top:0;background:#edf4f0}.supplier-batch-preview-table img{width:30px;height:30px;object-fit:contain}.supplier-batch-notes{display:grid;gap:4px;margin:9px 0;color:var(--muted);font-size:10px;font-weight:700}.supplier-batch-notes textarea{min-height:55px;border:1px solid var(--line);border-radius:6px;padding:7px;font:inherit;resize:vertical}.supplier-recommendation-rows{display:grid;gap:4px;max-height:420px;overflow:auto}.supplier-recommendation-preview-row{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:8px;padding:7px 9px;border:1px solid var(--line);border-radius:6px;background:#fff;font-size:10px}.supplier-recommendation-preview-row span,.supplier-recommendation-preview-row small{color:var(--muted)}
.supplier-formed-orders{display:grid;gap:7px;padding:8px 14px;border-bottom:1px solid #cbd6d1;background:#fff8e9}.supplier-formed-orders>header div{display:flex;align-items:baseline;gap:8px}.supplier-formed-orders>header span{color:#71582d;font-size:10px}.supplier-formed-orders>div{display:grid;gap:5px}.supplier-formed-order{display:grid;grid-template-columns:minmax(210px,1fr) auto auto;align-items:center;gap:8px;padding:7px 9px;border:1px solid #e3cea1;border-radius:6px;background:#fff}.supplier-formed-order>div{display:grid;gap:2px}.supplier-formed-order small{color:var(--muted)}.supplier-formed-order.review{border-color:#d7b6a8;background:#fff5f1}
@media(max-width:1200px){.supplier-plan-toolbar{grid-template-columns:1fr 180px 1fr}.supplier-plan-toolbar #supplierRecommendationOpen{grid-column:1/-1;justify-self:start}.supplier-batch-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.supplier-plan-toolbar{grid-template-columns:1fr}.supplier-plan-toolbar #supplierRecommendationOpen{grid-column:auto}.supplier-recommendation-summary,.supplier-batch-summary{grid-template-columns:1fr 1fr}.supplier-recommendation-preview-row{grid-template-columns:1fr}}
.receiving-table th:nth-child(10){width:285px}.receiving-plan-actions{display:grid;grid-template-columns:auto minmax(190px,1fr);align-items:end;gap:6px}.receiving-export-controls{display:grid;gap:4px;padding-left:6px;border-left:1px solid var(--line)}.receiving-export-controls label{display:flex;align-items:center;justify-content:space-between;gap:5px;color:var(--muted);font-size:8px}.receiving-export-controls select{height:24px;min-width:82px;border:1px solid #c5d1cc;border-radius:4px;background:#fff;padding:2px 4px;color:var(--ink);font-size:9px}.receiving-export-controls>div{display:flex;gap:3px}.receiving-export-controls .button{min-width:0;padding:4px 6px;font-size:8px}

/* Supplier Workflow 09: local-only missing supplier draft. */
.supplier-recommendation-preview-row .supplier-draft-from-preview{justify-self:start}.missing-supplier-dialog{width:min(900px,94vw);max-height:92vh;overflow:auto}.missing-supplier-dialog>header{display:flex;align-items:flex-start;justify-content:space-between}.missing-supplier-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:9px 0;padding:8px 10px;border:1px solid #dfc98e;border-radius:7px;background:#fff7dc;color:#714e16}.missing-supplier-status span{font-weight:800}.missing-supplier-status small{color:#755f38}.missing-supplier-status.assigned{border-color:#a9cdb8;background:#e6f3ea;color:#195a3d}.missing-supplier-product{margin:9px 0;padding:8px 10px;border-left:3px solid #4b846d;background:#f1f7f4;font-weight:720}.missing-supplier-tabs{margin:0 0 9px;padding:0;background:transparent}.missing-supplier-tabs .draft-tab:disabled{opacity:.5}.missing-supplier-evidence{margin:7px 0;padding:8px 10px;border:1px solid var(--line);border-radius:6px;background:#f5f8f6;color:#53665d;font-size:10px}.missing-supplier-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;margin:9px 0}.missing-supplier-fields label{display:grid;gap:4px;color:var(--muted);font-size:10px;font-weight:740}.missing-supplier-fields label.wide{grid-column:1/-1}.missing-supplier-fields input,.missing-supplier-fields textarea{width:100%;min-height:34px;border:1px solid #c9d4cf;border-radius:6px;background:#fff;padding:6px 8px;color:var(--ink);font:inherit;font-weight:500}.missing-supplier-fields textarea{min-height:58px;resize:vertical}.missing-supplier-fields input:disabled,.missing-supplier-fields textarea:disabled{background:#f1f3f2;color:#526159}.missing-supplier-duplicates{padding:8px 10px;border:1px solid #cdd9d4;border-radius:6px;background:#f6f9f7}.missing-supplier-duplicates p{margin:3px 0;color:var(--muted);font-size:10px}.missing-supplier-duplicates ul{margin:5px 0 0;padding-left:18px;font-size:10px}.missing-supplier-duplicates.clear{border-color:#afd0bc;background:#eaf5ee;color:#205b40}.missing-supplier-duplicates.warning{border-color:#d9b76b;background:#fff5d9;color:#745118}.missing-supplier-duplicate-ack{display:flex;align-items:flex-start;gap:7px;margin-top:8px;padding:8px 10px;border-radius:6px;background:#fff0ce;color:#704c13;font-size:10px;font-weight:720}.missing-supplier-duplicate-ack input{flex:none;margin-top:1px}
@media(max-width:680px){.missing-supplier-fields{grid-template-columns:1fr}.missing-supplier-fields label.wide{grid-column:auto}.missing-supplier-status{align-items:flex-start;flex-direction:column}}

/* Distribution: one dense TorgSoft-informed grid, driven by the server projection. */
.distribution-print-sheet{display:none}.distribution-table{min-width:1450px}.distribution-col-photo{width:42px}.distribution-col-article{width:105px}.distribution-col-product{width:310px}.distribution-col-barcode{width:145px}.distribution-col-received{width:82px}.distribution-col-main{width:118px}.distribution-col-store{width:108px}.distribution-table thead tr:first-child th{top:0;height:28px}.distribution-table thead tr:nth-child(2) th{top:28px;height:28px}.distribution-table tbody td:nth-child(-n+4),.distribution-table thead tr:first-child th:nth-child(-n+4){position:sticky;z-index:3}.distribution-table tbody td:nth-child(1),.distribution-table thead tr:first-child th:nth-child(1){left:0}.distribution-table tbody td:nth-child(2),.distribution-table thead tr:first-child th:nth-child(2){left:42px}.distribution-table tbody td:nth-child(3),.distribution-table thead tr:first-child th:nth-child(3){left:147px}.distribution-table tbody td:nth-child(4),.distribution-table thead tr:first-child th:nth-child(4){left:457px}.distribution-table thead tr:first-child th:nth-child(-n+4){z-index:6}.distribution-table tbody td:nth-child(-n+4){background:#fff}.distribution-table tr.active-row td:nth-child(-n+4){background:#eaf4f0}.distribution-table tfoot th{position:sticky;bottom:0;z-index:4;height:30px;padding:4px 5px;border-top:2px solid #9db5aa;border-right:1px solid #d7e0dc;background:#e7f0eb;color:#234c3e;text-align:right;font-size:10px}.distribution-table tfoot th:first-child{text-align:left}.distribution-article,.distribution-barcode{text-align:left!important}.distribution-barcode span,.distribution-barcode small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.distribution-barcode small{color:var(--muted);font-size:7px}.distribution-main-value strong{display:block}.distribution-row-error{display:block;min-height:0;color:#842f26;font-size:7px;font-weight:750;line-height:1.15;text-align:left}.allocation-excessive .distribution-row-error{margin-top:2px}.distribution-input[aria-invalid="true"]{border-color:#bc5549;box-shadow:0 0 0 2px #bc55492b}.distribution-table tr.active-row td{background-color:#eaf4f0}.distribution-table tr.active-row .kh-column{background:#e1f0f3}.distribution-table tr.active-row .sp-column{background:#e9e6f2}.distribution-table tr.active-row .main-column{background:#f0ede3}

@media print{
  body[data-print-store] #distributionSession>*:not(#distributionPrintSheet){display:none!important}
  body[data-print-store] #distributionPrintSheet{display:block!important}
  body[data-print-store] .distribution-print-sheet header{display:block;margin:0 0 6mm;border-bottom:1px solid #555;padding-bottom:3mm}
  body[data-print-store] .distribution-print-sheet h1{margin:0;font-size:16pt}
  body[data-print-store] .distribution-print-sheet p{margin:1mm 0 0;color:#444}
  body[data-print-store] .distribution-print-sheet table{width:100%;border-collapse:collapse;table-layout:fixed}
  body[data-print-store] .distribution-print-sheet th,body[data-print-store] .distribution-print-sheet td{padding:2mm 1.5mm;border:1px solid #999;text-align:left;font-size:9pt}
  body[data-print-store] .distribution-print-sheet th:first-child,body[data-print-store] .distribution-print-sheet td:first-child{width:10mm;text-align:center}
  body[data-print-store] .distribution-print-sheet th:last-child,body[data-print-store] .distribution-print-sheet td:last-child{width:28mm;text-align:right}
  body[data-print-store] .distribution-print-sheet footer{display:flex;justify-content:space-between;margin-top:14mm;font-size:10pt}
}

/* Workflow UX 10: TorgSoft-informed dense local receiving. */
.receiving-session{gap:8px}.receiving-document-meta{display:grid;grid-template-columns:1.4fr 1fr .8fr .8fr .6fr 1fr;gap:6px}.receiving-document-meta article{display:grid;gap:2px;min-width:0;padding:7px 9px;border:1px solid var(--line);border-radius:6px;background:#fff}.receiving-document-meta span{color:var(--muted);font-size:8px;font-weight:760;text-transform:uppercase;letter-spacing:.05em}.receiving-document-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#174f3d;font-size:11px}.receiving-supplier-warning{padding:6px 9px;border:1px solid #e0c777;border-radius:6px;background:#fff8dc;color:#6d5514;font-size:9px}.receiving-lines-wrap{height:calc(100vh - 475px);min-height:350px}.receiving-lines-table{min-width:1350px}.receiving-lines-table th:nth-child(1){width:48px}.receiving-lines-table th:nth-child(2){width:110px}.receiving-lines-table th:nth-child(3){width:300px}.receiving-lines-table th:nth-child(4),.receiving-lines-table th:nth-child(5),.receiving-lines-table th:nth-child(6){width:92px}.receiving-lines-table th:nth-child(7),.receiving-lines-table th:nth-child(8),.receiving-lines-table th:nth-child(9){width:122px}.receiving-lines-table th:nth-child(10){width:120px}.receiving-lines-table td{height:38px}.receiving-line-photo{text-align:center!important}.receiving-line-photo img,.receiving-line-photo .photo-placeholder{display:block;width:28px;height:28px;margin:auto;object-fit:contain;border:1px solid var(--line);border-radius:4px;background:#fff}.receiving-line-photo .photo-placeholder{height:auto;padding:5px 1px;font-size:7px}.receiving-product strong,.receiving-product .receiving-line-status{display:block}.receiving-product strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.receiving-product .receiving-line-status{width:max-content;margin-top:2px;padding:1px 5px;font-size:8px}.receiving-line-sum{font-weight:760;color:#174f3d}
.receiving-import-dialog{width:calc(100vw - 32px);height:calc(100vh - 28px);max-width:none;max-height:none;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;padding-bottom:0}.receiving-import-dialog input,.receiving-import-dialog select{min-height:34px;border:1px solid var(--line);border-radius:6px;padding:6px 8px;background:#fff;color:var(--ink)}.receiving-import-context{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;border-radius:6px;background:#eaf3ef;color:#174f3d}.receiving-import-mapping{margin-top:9px;padding:9px;border:1px solid var(--line);border-radius:7px;background:#f8faf9}.receiving-import-mapping>header{display:flex;justify-content:space-between;gap:10px;margin-bottom:7px}.receiving-import-mapping-fields{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.receiving-import-mapping-fields label{font-size:9px}.receiving-import-review{display:flex!important;align-items:center;gap:7px;margin:8px 0;padding:7px;border-radius:5px;background:#fff5d6;color:#6a5111}.receiving-import-review input{min-height:0!important}.receiving-import-summary-bar{position:sticky;top:0;z-index:6;display:flex;flex-wrap:wrap;gap:7px 14px;margin:8px 0 0;padding:9px 11px;border:1px solid #a9cbbb;border-radius:7px;background:#eaf5ef;color:#174f3d}.receiving-import-summary-bar strong{font-size:11px}.receiving-import-table{min-height:230px;max-height:none;flex:1;margin-top:10px;border:1px solid var(--line);border-radius:6px}.receiving-import-table table{min-width:1500px}.receiving-import-table thead{position:sticky;top:0;z-index:4;background:#eef5f1}.receiving-import-table th,.receiving-import-table td{padding:6px;font-size:10px;vertical-align:top}.receiving-import-table th:nth-child(1){width:42px}.receiving-import-table th:nth-child(2){width:160px}.receiving-import-table th:nth-child(3){width:280px}.receiving-import-table th:nth-child(4),.receiving-import-table th:nth-child(5){width:90px}.receiving-import-table th:nth-child(6){width:135px}.receiving-import-table th:nth-child(7){width:650px}.receiving-import-table th:nth-child(8){width:100px}.receiving-import-table td small{display:block;margin-top:2px;color:var(--muted)}.invoice-state{display:inline-block;padding:2px 6px;border-radius:999px;font-weight:760}.invoice-state.matched{background:#daf0e2;color:#195d3e}.invoice-state.review{background:#fff0cd;color:#77500f}.invoice-state.draft{background:#e8e9f4;color:#4c4778}.invoice-state.deleted{background:#eceeed;color:#5b635f}.invoice-resolve,.invoice-manual{display:flex;gap:5px;margin-top:5px;align-items:center}.invoice-resolve select,.invoice-manual input{min-height:31px!important;font-size:10px}.invoice-resolve select{max-width:340px}.invoice-manual{position:relative;display:block}.invoice-manual input{width:100%;min-width:280px}.invoice-new-draft{margin-top:5px}.invoice-manual-results{position:absolute;z-index:10;top:35px;left:0;right:0;max-height:330px;overflow:auto;border:1px solid #7ba990;border-radius:7px;background:#fff;box-shadow:0 10px 28px #173d2c38}.invoice-manual-result{display:grid;grid-template-columns:45px 125px minmax(180px,1fr) 110px 115px 100px;gap:8px;align-items:center;width:100%;padding:7px 8px;border:0;border-bottom:1px solid #e1e8e4;background:#fff;text-align:left;cursor:pointer}.invoice-manual-result:is(:hover,.active,:focus-visible){background:#e7f5ec;outline:2px solid #277b58;outline-offset:-2px}.invoice-manual-result img,.invoice-manual-result .photo-placeholder{width:38px;height:38px;object-fit:cover;border:1px solid #d5ded9;border-radius:5px;background:#f4f7f5}.invoice-manual-result strong,.invoice-manual-result span,.invoice-manual-result small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.invoice-manual-result small{font-size:8px;color:var(--muted)}.invoice-row-actions{display:flex;gap:5px;align-items:center}.invoice-row-deleted{opacity:.62;background:#f5f6f5}.receiving-import-footer{position:sticky;bottom:0;z-index:7;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px -18px 0;padding:9px 18px;border-top:1px solid #cbd8d2;background:#fff}.receiving-import-footer p{margin:0;color:#6a5111;font-weight:700}.import-progress-state{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px 10px}.import-progress-state progress{grid-column:1/-1;width:100%;height:8px;accent-color:#277b58}.import-spinner{width:18px;height:18px;border:3px solid #bcd4c8;border-top-color:#277b58;border-radius:50%;animation:import-spin .75s linear infinite}.import-progress-state.error{border-color:#d9a8a4;background:#fff1f0;color:#842f26}.import-progress-state.success{border-color:#91c0a6;background:#eaf7ef;color:#195d3e}@keyframes import-spin{to{transform:rotate(360deg)}}
@media(max-width:900px){.receiving-import-mapping-fields,.receiving-document-meta{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Owner-facing readability and accessibility. All five modes keep dense data as tables. */
:root{--ui-font:13px;--ui-small:10px;--ui-tiny:9px;--surface-table-font:11px;--surface-table-head-font:10px;--surface-row:37px;--surface-head-row:34px;--surface-cell-y:4px;--surface-control-height:31px;--focus-ring:#075f86}
body[data-font="small"]{--ui-font:12px;--ui-small:9px;--ui-tiny:8px;--table-font:10px;--table-head-font:9px;--table-row:28px;--surface-table-font:10px;--surface-table-head-font:9px;--surface-row:34px;--surface-head-row:32px;--surface-cell-y:3px;--surface-control-height:30px}
body[data-font="normal"]{--ui-font:13px;--ui-small:10px;--ui-tiny:9px;--table-font:11px;--table-head-font:10px;--table-row:31px;--surface-table-font:11px;--surface-table-head-font:10px;--surface-row:37px;--surface-head-row:34px;--surface-cell-y:4px;--surface-control-height:31px}
body[data-font="large"]{--ui-font:14px;--ui-small:11px;--ui-tiny:10px;--table-font:12px;--table-head-font:11px;--table-row:35px;--surface-table-font:12px;--surface-table-head-font:11px;--surface-row:40px;--surface-head-row:37px;--surface-cell-y:5px;--surface-control-height:34px}
body[data-font="xlarge"]{--ui-font:16px;--ui-small:13px;--ui-tiny:11px;--table-font:14px;--table-head-font:13px;--table-row:42px;--surface-table-font:14px;--surface-table-head-font:13px;--surface-row:46px;--surface-head-row:43px;--surface-cell-y:6px;--surface-control-height:38px}
body[data-font="xxlarge"]{--ui-font:18px;--ui-small:15px;--ui-tiny:13px;--table-font:16px;--table-head-font:15px;--table-row:50px;--surface-table-font:16px;--surface-table-head-font:15px;--surface-row:54px;--surface-head-row:50px;--surface-cell-y:7px;--surface-control-height:42px}
body{font-size:var(--ui-font)}
.topbar{height:auto;min-height:62px}
.font-segments button{min-width:36px;white-space:nowrap}
.eyebrow,.view-label,.control>label,.page-size-top>label,.receiving-toolbar label,.analytics-filters label,.pilot-toolbar label,.data-quality-toolbar label,.plan-group-filter,.plan-search,.receiving-document-meta span,.receiving-summary span,.receiving-session-summary span,.distribution-summary span{font-size:var(--ui-tiny)}
.hint,.status-chip,.product-code,.plan-notice,.supplier-group-meta,.receiving-table small,.distribution-product small,.distribution-barcode small,.advice-note,.capacity-card p{font-size:var(--ui-small)}
.control input,.control select,.selector-trigger,.selector-search,.segments button,.page-size-top select,.pagination input,.receiving-toolbar input,.receiving-toolbar select,.analytics-filters input,.analytics-filters select,.pilot-toolbar select,.data-quality-toolbar input,.receiving-input,.distribution-input,.receiving-import-dialog input,.receiving-import-dialog select{min-height:var(--surface-control-height);font-size:inherit}
.receiving-table,.distribution-table,.analytics-table,.supplier-group table,.supplier-batch-preview-table table,.receiving-import-table table,.draft-table{display:table;font-size:var(--surface-table-font)}
.receiving-table th,.distribution-table th,.analytics-table th,.supplier-group th,.supplier-batch-preview-table th,.receiving-import-table th,.draft-table th{height:var(--surface-head-row);padding-top:var(--surface-cell-y);padding-bottom:var(--surface-cell-y);font-size:var(--surface-table-head-font)}
.receiving-table td,.distribution-table td,.analytics-table td,.supplier-group td,.supplier-batch-preview-table td,.receiving-import-table td,.draft-table td{height:var(--surface-row);padding-top:var(--surface-cell-y);padding-bottom:var(--surface-cell-y);font-size:var(--surface-table-font)}
.table-wrap,.receiving-table-wrap,.receiving-lines-wrap,.distribution-table-wrap,.analytics-table-wrap,.supplier-group-body,.supplier-batch-preview-table,.receiving-import-table,.draft-table-wrap{overflow:auto}
.technical-details{display:block;padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--muted)}
.technical-details summary{width:max-content;cursor:pointer;color:#315e4f;font-weight:750}
.technical-details-body{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:8px;font-size:var(--ui-small)}
:where(button,a,input,select,textarea,[tabindex]):focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px;box-shadow:0 0 0 2px #fff,0 0 0 5px var(--focus-ring)}
.receiving-difference.has-difference,.receiving-line-difference.has-difference,.distribution-row-error{color:#842f26}
@media(max-width:850px){.font-segments{flex-wrap:wrap}.technical-details-body{display:grid}}

/* Owner Operability 11: local, per-table layout controls. */
.table-layout-dialog{width:min(880px,95vw);max-height:92vh;overflow:auto}.table-layout-dialog>header{display:flex;align-items:flex-start;justify-content:space-between}.table-layout-note{margin:8px 0;padding:8px 10px;border:1px solid #d9c780;border-radius:6px;background:#fff8dc;color:#624d18;font-size:var(--ui-small)}.table-layout-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start}.table-layout-group,.table-layout-stores{padding:8px;border:1px solid var(--line);border-radius:7px;background:#f8faf9}.table-layout-group h3,.table-layout-stores h3{margin:0 0 6px;color:#315e4f;font-size:var(--ui-small)}.table-layout-stores{margin-top:9px}.table-layout-item{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:38px;padding:4px 5px;border-top:1px solid #e4eae7}.table-layout-item:first-of-type{border-top:0}.table-layout-item>label{display:flex;align-items:center;gap:6px;min-width:0;font-size:var(--ui-small);font-weight:700}.table-layout-item>label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-layout-item>label small{color:var(--muted);font-size:var(--ui-tiny);font-weight:500}.table-layout-item-actions{display:flex;align-items:center;gap:3px;flex:none}.table-layout-item-actions>button{min-width:28px;min-height:28px;border:1px solid #bdcbc5;border-radius:5px;background:#fff;color:#275444}.table-layout-color{display:flex!important;align-items:center!important;gap:4px!important;color:var(--muted);font-size:var(--ui-tiny)!important}.table-layout-color input{width:30px;height:28px;border:1px solid #bdcbc5;border-radius:5px;padding:2px;background:#fff}.table-layout-dialog .dialog-actions{position:sticky;bottom:-1px;margin-top:10px;padding:9px 0 2px;background:#fff}
.table-layout-presets{display:flex;align-items:center;gap:3px}.table-layout-preset{width:22px;min-width:22px!important;height:22px;min-height:22px!important;padding:0!important;border:1px solid #9caaa4!important;border-radius:50%!important;background:var(--layout-preset)!important;box-shadow:inset 0 0 0 2px #ffffffb8;cursor:pointer}.table-layout-preset[data-layout-color-preset="#f7edcf"]{--layout-preset:#f7edcf}.table-layout-preset[data-layout-color-preset="#e1eee6"]{--layout-preset:#e1eee6}.table-layout-preset[data-layout-color-preset="#e2edf4"]{--layout-preset:#e2edf4}.table-layout-preset[data-layout-color-preset="#ebe7f3"]{--layout-preset:#ebe7f3}.table-layout-preset[data-layout-color-preset="#f4e7df"]{--layout-preset:#f4e7df}.table-layout-preset:hover,.table-layout-preset:focus-visible{outline:2px solid #286f54;outline-offset:1px}.layout-custom-color input{background:var(--layout-background)!important;color:var(--layout-foreground)!important;border-color:currentColor}
.table-layout-group-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.table-layout-group-heading h3{margin:0}.table-layout-block-color{display:flex;align-items:center;gap:4px;color:var(--muted);font-size:var(--ui-tiny);font-weight:500}.table-layout-block-color>button{min-width:22px;min-height:22px;border:1px solid #bdcbc5;border-radius:5px;background:#fff;color:#275444}
.table-layout-flat-leaves{grid-column:1/-1}.table-layout-flat-convenience{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 6px;padding:6px;border:1px solid #d9e4df;border-radius:6px;background:#fff}.table-layout-flat-convenience>strong{color:#315e4f;font-size:var(--ui-tiny)}
.table-layout-text-presets{grid-column:1/-1}.table-layout-text-presets .table-layout-group-heading>span{color:var(--muted);font-size:var(--ui-tiny)}.table-layout-text-buttons{display:flex;gap:0;margin-top:7px}.table-layout-text-buttons button{min-width:54px;min-height:32px;margin-right:-1px;border:1px solid #bdcbc5;background:#fff;color:#275444;font-weight:800}.table-layout-text-buttons button:first-child{border-radius:6px 0 0 6px}.table-layout-text-buttons button:last-child{border-radius:0 6px 6px 0}.table-layout-text-buttons button.active{position:relative;background:var(--green);border-color:var(--green);color:#fff}
.table-layout-section-legend{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 8px}.table-layout-section-legend span{padding:2px 7px;border:1px solid #d6e1dc;border-radius:999px;background:#f4f8f6;color:#46645a;font-size:var(--ui-tiny);font-weight:750}
[data-testid="product-table"] [hidden],[data-testid="receiving-lines-table"] [hidden],[data-testid="distribution-table"] [hidden]{display:none!important}
[data-testid="product-table"] .layout-custom-color,[data-testid="receiving-lines-table"] .layout-custom-color,[data-testid="distribution-table"] .layout-custom-color{background:var(--layout-background)!important;color:var(--layout-foreground)!important}
[data-testid="product-table"] .layout-custom-color :is(button,input,span,strong,small),[data-testid="receiving-lines-table"] .layout-custom-color :is(button,input,span,strong,small),[data-testid="distribution-table"] .layout-custom-color :is(button,input,span,strong,small){color:inherit}
[data-testid="receiving-lines-table"] th[data-layout-column="photo"]{width:48px}[data-testid="receiving-lines-table"] th[data-layout-column="article"]{width:110px}[data-testid="receiving-lines-table"] th[data-layout-column="product"]{width:300px}[data-testid="receiving-lines-table"] th[data-layout-column="ordered"],[data-testid="receiving-lines-table"] th[data-layout-column="received"],[data-testid="receiving-lines-table"] th[data-layout-column="difference"]{width:92px}[data-testid="receiving-lines-table"] th[data-layout-column="ordered_price"],[data-testid="receiving-lines-table"] th[data-layout-column="actual_price"],[data-testid="receiving-lines-table"] th[data-layout-column="price_difference"]{width:122px}[data-testid="receiving-lines-table"] th[data-layout-column="sum"]{width:120px}
[data-testid="distribution-table"] tbody td:nth-child(-n+4),[data-testid="distribution-table"] thead tr:first-child th:nth-child(-n+4){position:static;left:auto}[data-testid="distribution-table"] .distribution-layout-sticky{position:sticky!important;left:var(--distribution-layout-left)!important;z-index:3}[data-testid="distribution-table"] thead .distribution-layout-sticky{z-index:6;background:#f7f9f8}[data-testid="distribution-table"] tbody .distribution-layout-sticky{background:#fff}
.distribution-table th[data-layout-column]{overflow:visible}.distribution-header-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.distribution-column-resizer{position:absolute;z-index:8;top:0;right:-4px;width:9px;height:100%;cursor:col-resize;touch-action:none}.distribution-column-resizer::after{content:"";position:absolute;top:20%;bottom:20%;left:4px;width:1px;background:#9cafA6;opacity:.65}.distribution-column-resizer:hover::after,.distribution-column-resizer:focus-visible::after,.distribution-column-resizer.resizing::after{left:3px;width:3px;background:#2f735b;opacity:1}.distribution-column-resizer:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}.is-resizing,.is-resizing *{cursor:col-resize!important;user-select:none!important}.table-layout-width{display:flex!important;align-items:center!important;gap:4px!important;color:var(--muted);font-size:var(--ui-tiny)!important}.table-layout-width input{width:62px;min-height:28px;border:1px solid #bdcbc5;border-radius:5px;padding:3px 5px;background:#fff;color:var(--ink);text-align:right}
body[data-font="xxlarge"] .table-layout-dialog{width:min(1040px,97vw)}body[data-font="xxlarge"] .table-layout-item{min-height:54px}.table-layout-dialog button,.table-layout-dialog input{font-size:inherit}
@media(max-width:850px){.table-layout-columns{grid-template-columns:1fr}.table-layout-item{align-items:flex-start;flex-direction:column}.table-layout-item-actions{width:100%;justify-content:flex-end}}
.supplier-picker{width:336px;max-height:400px}.supplier-picker-options{max-height:325px}.supplier-picker-heading{margin:6px 7px 3px;color:#65756e;font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.supplier-picker-loading{margin:12px 7px;color:var(--muted);font-size:11px}.supplier-picker-option{min-height:34px}.supplier-picker-option span{display:flex;align-items:center;gap:6px;min-width:0;font-weight:650}.supplier-picker-option em{padding:1px 5px;border-radius:999px;background:#e7f1ec;color:#37614f;font-size:8px;font-style:normal}.supplier-picker-option small{flex:none;margin-left:8px;font-size:9px}.supplier-picker-create{width:100%;margin-top:5px;padding:7px;border:1px dashed #aebfb7;border-radius:5px;background:#f8fbf9;color:#245c47;text-align:left;font-weight:700}.supplier-picker-create:hover,.supplier-picker-create:focus{background:var(--green-soft)}
.receiving-line-excluded td{background:#f5f5f2!important;color:#6d756f}.receiving-line-excluded .receiving-product strong{text-decoration:line-through;text-decoration-thickness:1px}.receiving-row-actions{display:grid;justify-items:start;gap:3px;min-width:142px}.receiving-row-actions .text-action{font-size:9px}.receiving-row-actions small{color:var(--muted)}[data-testid="receiving-lines-table"] th[data-layout-column="actions"]{width:152px}.receiving-line-action-dialog label{display:grid;gap:4px;margin:8px 0;font-size:var(--ui-small);font-weight:700}.receiving-line-action-dialog select,.receiving-line-action-dialog textarea{width:100%;border:1px solid #c5d1cc;border-radius:6px;padding:7px;background:#fff}.receiving-line-action-dialog textarea{min-height:64px;resize:vertical}
.product-enrichment-dialog{width:min(1100px,96vw);max-height:94vh;overflow:auto}.product-enrichment-dialog>header,.product-enrichment-list-dialog>header{display:flex;align-items:flex-start;justify-content:space-between}.enrichment-columns{display:grid;grid-template-columns:minmax(250px,.72fr) minmax(480px,1.5fr);gap:14px}.enrichment-columns>section{padding:10px;border:1px solid var(--line);border-radius:7px;background:#f8faf9}.enrichment-columns h3{margin:0 0 8px;color:#315e4f;font-size:var(--ui-small)}.enrichment-current{display:grid;gap:7px;margin:0}.enrichment-current div{display:grid;gap:2px;padding-bottom:6px;border-bottom:1px solid #e0e7e3}.enrichment-current dt{color:var(--muted);font-size:var(--ui-tiny)}.enrichment-current dd{margin:0;font-weight:700}.enrichment-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.enrichment-fields label,.supplier-alias-fields label,.enrichment-photo label,.product-enrichment-dialog>label{display:grid;gap:3px;color:#52645c;font-size:var(--ui-tiny);font-weight:750}.enrichment-fields label.wide{grid-column:1/-1}.enrichment-fields input,.supplier-alias-fields input,.enrichment-photo input,.product-enrichment-dialog select{width:100%;min-height:32px;border:1px solid #c5d1cc;border-radius:5px;background:#fff;padding:5px 7px;color:var(--ink)}.enrichment-fields small{color:#84611d;font-weight:500}.supplier-alias-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0;padding:9px;border:1px solid #d9c780;border-radius:7px;background:#fff8dc}.supplier-alias-fields legend{padding:0 5px;color:#6b511b;font-size:var(--ui-small);font-weight:800}.enrichment-photo{display:grid;grid-template-columns:1fr auto;align-items:end;gap:7px;margin:10px 0}.enrichment-photo span{grid-column:1/-1;color:var(--muted);font-size:var(--ui-tiny)}.enrichment-photo img{grid-column:1/-1;max-width:280px;max-height:180px;border:1px solid var(--line);border-radius:6px;object-fit:contain;background:#fff}.product-enrichment-list-dialog{width:min(920px,95vw);max-height:90vh;overflow:auto}.enrichment-list-toolbar{display:flex;gap:8px;margin:8px 0}.enrichment-list-toolbar input,.enrichment-list-toolbar select{min-height:34px;border:1px solid #c5d1cc;border-radius:6px;padding:6px 8px}.enrichment-list-toolbar input{flex:1}.product-enrichment-list{display:grid;gap:6px;max-height:62vh;overflow:auto}.product-enrichment-list-row{display:flex;justify-content:space-between;gap:10px;padding:9px;border:1px solid var(--line);border-radius:6px;background:#f8faf9}.product-enrichment-list-row div{display:grid;gap:3px}.product-enrichment-list-row span,.product-enrichment-list-row small{color:var(--muted);font-size:var(--ui-tiny)}.enrichment-photo-mark{align-self:start;padding:3px 6px;border-radius:999px;background:#e7f1ec!important;color:#315f4c!important;font-weight:800}@media(max-width:800px){.enrichment-columns{grid-template-columns:1fr}.enrichment-fields,.supplier-alias-fields{grid-template-columns:1fr}}
.supplier-plan-toolbar>*{min-width:0}.supplier-group-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0;white-space:nowrap}.supplier-group-actions .button{min-width:0;max-width:112px;padding-inline:7px;overflow:hidden;text-overflow:ellipsis}.supplier-group-actions .order-workflow-clear-supplier,.supplier-group-actions .supplier-draft-pdf{font-size:0}.supplier-group-actions .order-workflow-clear-supplier{max-width:82px}.supplier-group-actions .order-workflow-clear-supplier::after{content:"Очистить";font-size:9px}.supplier-group-actions .supplier-draft-pdf::after{font-size:9px}.supplier-group-actions .supplier-draft-pdf[data-with-prices="false"]::after{content:"Без цен"}.supplier-group-actions .supplier-draft-pdf[data-with-prices="true"]::after{content:"С ценами"}.supplier-line-delete{width:24px;height:24px;border:1px solid #d5b3ad;border-radius:5px;background:#fff;color:#8a382e;font-size:16px;line-height:1}.supplier-line-delete:hover,.supplier-line-delete:focus-visible{background:#fff0ed}.supplier-group .plan-actions{width:42px;text-align:center}@media(max-width:1180px){.supplier-group-actions .order-workflow-clear-supplier{display:none}.supplier-group-actions .supplier-draft-pdf{padding-inline:5px}.supplier-group-actions .supplier-group-batch{max-width:76px}.supplier-plan-toolbar{gap:8px}.plan-search{grid-template-columns:auto minmax(170px,240px)}}

/* OWNER-UAT-POLISH-15: dense, round-aware distribution workspace and documents. */
.distribution-stepper button{border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;padding:0}.distribution-auto-remainder{display:flex;align-items:center;gap:7px;min-height:36px;padding:6px 10px;border:1px solid #bdd2c8;border-radius:7px;background:#edf6f1;color:#174f3d;font-weight:760}.distribution-auto-remainder small{margin-left:auto;color:var(--muted);font-weight:500}.distribution-auto-remainder input{width:17px;height:17px;accent-color:var(--green)}.distribution-round-history{display:flex;gap:5px;overflow:auto;padding:6px 0}.distribution-round-history button{display:grid;gap:1px;min-width:132px;padding:5px 8px;border:1px solid #cdd8d3;border-radius:6px;background:#fff;text-align:left}.distribution-round-history button.active{border-color:#34735d;background:#eaf4ef;color:#174f3d}.distribution-round-history small{color:var(--muted);font-size:var(--ui-tiny)}.distribution-documents{padding:12px;border:1px solid var(--line);border-radius:8px;background:#fff}.distribution-documents>header,.documents-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.distribution-documents h3{margin:2px 0}.documents-empty{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:14px;border:1px dashed #b9c9c2;border-radius:7px;background:#f8faf9}.distribution-document-rounds{display:grid;gap:7px;margin:10px 0}.distribution-document-rounds article{padding:8px 10px;border:1px solid #d6dfdb;border-radius:7px;background:#f8faf9}.distribution-document-rounds article>header,.distribution-document-rounds article>div{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;align-items:center;gap:9px;min-height:30px}.distribution-document-rounds article>header{border-bottom:1px solid #e1e7e4}.distribution-document-rounds article>header span{color:var(--muted);font-size:var(--ui-small)}.document-current{color:#216143!important}.document-stale{color:#8a5016!important}.documents-footer{padding-top:8px;border-top:1px solid var(--line)}@media(max-width:900px){.distribution-auto-remainder{align-items:flex-start;flex-wrap:wrap}.distribution-auto-remainder small{width:100%;margin-left:24px}.distribution-document-rounds article>header,.distribution-document-rounds article>div{grid-template-columns:1fr auto}}
