
#xwSupplyInlineEditor{position:fixed;inset:auto;margin:0;padding:10px 12px 8px;box-sizing:border-box;border:1px solid #6191ff;border-radius:8px;background:white;box-shadow:0 8px 28px #253c6a30;overflow:visible}
#xwSupplyInlineEditor::before{content:"";position:absolute;left:var(--pointer-x);top:-5px;width:8px;height:8px;border-left:1px solid #6191ff;border-top:1px solid #6191ff;background:white;transform:translateX(-50%) rotate(45deg)}
#xwSupplyInlineEditor.is-above::before{top:auto;bottom:-5px;transform:translateX(-50%) rotate(225deg)}
#xwSupplyInlineInput{display:block;width:100%;box-sizing:border-box;height:38px;padding:8px 10px;border:1px solid #6593ff;border-radius:5px;font:14px/20px "Microsoft YaHei",sans-serif;color:#24334b;background:white;outline:none;box-shadow:0 0 0 2px #e5edff}
#xwSupplyInlineEditor small{display:block;font:11px/16px "Microsoft YaHei",sans-serif;color:#8390a2;margin-top:6px}
#productSupplyModal .xw-inline-active{border-color:#6593ff!important;box-shadow:0 0 0 2px #e5edff!important}

/* Source editor 20261020: readable cells and local draft editing. */
#productSupplyModal.xw-supply-v2.xw-supply-dual.xws-clean:not(.xw-global-profit-mode) .product-supply-dialog{width:min(1560px,calc(100vw - 40px))!important}
#productSupplyModal.xw-supply-v2.xw-supply-dual.xws-clean:not(.xw-global-profit-mode) .product-supply-head,
#productSupplyModal.xw-supply-v2.xw-supply-dual.xws-clean:not(.xw-global-profit-mode) .product-supply-row{grid-template-columns:minmax(135px,1.2fr) minmax(140px,1.3fr) minmax(170px,1.5fr) minmax(110px,1.1fr) 85px 72px 72px 30px!important;min-width:900px!important;gap:8px!important}
#productSupplyModal.xws-clean .product-supply-row{padding-top:11px!important;padding-bottom:11px!important}
#productSupplyModal.xws-clean .xws-inline{display:flex;align-items:center;gap:5px;min-width:0;width:100%;position:relative}
#productSupplyModal.xws-clean .xws-inline:not(.is-editing)>input{display:none!important}
#productSupplyModal.xws-clean .xws-inline.is-editing>.xws-inline-open,#productSupplyModal.xws-clean .xws-inline.is-editing>.xws-pencil{display:none!important}
#productSupplyModal.xws-clean .xws-inline.is-editing>input{display:block!important;width:100%!important;min-width:0!important;border:1px solid #6e9ef5!important;box-shadow:0 0 0 2px #2563eb12!important}
#productSupplyModal.xws-clean .xws-inline-open{display:block;flex:1;min-width:0;border:0;background:transparent;padding:5px 0;text-align:left;color:#263650;font:inherit;font-size:13px;line-height:1.6;overflow-wrap:anywhere;cursor:text}
#productSupplyModal.xws-clean .xws-inline-open.is-empty{color:#9aa7ba}
#productSupplyModal.xws-clean .xws-inline-open:disabled{opacity:1;cursor:default}
#productSupplyModal.xws-clean .xws-pencil{border:0;background:transparent;color:#97a6bc;width:25px;height:28px;flex:none;padding:4px;font-size:13px;cursor:pointer;border-radius:4px}
#productSupplyModal.xws-clean .xws-pencil:hover{color:#2563eb;background:#edf4ff}
#productSupplyModal.xws-clean .xws-pencil:disabled{display:none}
#productSupplyModal.xws-clean .xws-source{display:flex!important;align-items:center;gap:4px;min-width:0;width:100%}
#productSupplyModal.xws-clean .xws-source-input{display:none!important}
#productSupplyModal.xws-clean .xws-source-name{display:block;flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.6;color:#2563eb;font-size:13px;text-decoration:none}
#productSupplyModal.xws-clean .xws-source-name:hover{text-decoration:underline}
#productSupplyModal.xws-clean .xws-source-name::after{content:none!important}
#productSupplyModal.xws-clean .xws-source-name[hidden],#productSupplyModal.xws-clean .xws-source-empty[hidden]{display:none!important}
#productSupplyModal.xws-clean .xws-source-empty{flex:1;min-width:0;border:0;background:none;color:#7a92b5;font-size:12px;text-align:left;padding:5px 0;cursor:pointer}
#productSupplyModal.xws-clean .xws-remove{border:0!important;background:none!important;color:#9caac0!important;font-size:14px!important;padding:6px!important;min-width:26px!important}
#productSupplyModal.xws-clean .xws-remove:hover{color:#dc5b5b!important;background:#fff2f2!important;border-radius:5px}
#productSupplyModal.xws-clean .xws-batch-trigger{border:1px solid #cbdbf2;border-radius:6px;background:#fff;color:#3567a6;min-height:32px;padding:6px 11px;font-size:12px;cursor:pointer}
#productSupplyModal.xws-clean .xws-batch-menu{position:fixed;inset:auto;margin:0;width:210px;padding:6px;border:1px solid #d8e2f0;border-radius:7px;background:#fff;box-shadow:0 10px 30px #17325326}
#productSupplyModal.xws-clean .xws-batch-menu>button,#productSupplyModal.xws-clean .xws-batch-menu>#productSupplyFetchAll{display:block!important;width:100%!important;margin:0!important;border:0!important;border-radius:5px!important;padding:9px 10px!important;height:auto!important;background:#fff!important;color:#3f526e!important;text-align:left!important;font-size:13px!important}
#productSupplyModal.xws-clean .xws-batch-menu>button:hover{background:#eff5ff!important}
#productSupplyModal.xws-clean .xws-source-editor{position:fixed;inset:auto;margin:0;padding:0;border:1px solid #cbd9ec;border-radius:8px;background:#fff;box-shadow:0 12px 35px #1b335333;color:#23334d;max-width:calc(100vw - 24px);font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}
#productSupplyModal.xws-clean .xws-source-editor header{display:flex;justify-content:space-between;align-items:center;padding:12px 15px;border-bottom:1px solid #e7edf5}
#productSupplyModal.xws-clean .xws-source-editor header strong{font-size:14px}
#productSupplyModal.xws-clean .xws-pop-x{border:0;background:none;color:#8190a7;font-size:21px;line-height:1;cursor:pointer}
#productSupplyModal.xws-clean .xws-source-fields{display:grid;gap:12px;padding:13px 15px}
#productSupplyModal.xws-clean .xws-source-fields label{display:grid;gap:5px;min-width:0;font-size:12px;color:#70819b}
#productSupplyModal.xws-clean .xws-source-fields input{width:100%;height:36px;min-width:0;padding:7px 9px;border:1px solid #d4deee;border-radius:5px;color:#263650;background:white;font:13px/1.5 inherit}
#productSupplyModal.xws-clean .xws-source-fields input:focus{outline:2px solid #dbeafe;border-color:#6596ed}
#productSupplyModal.xws-clean .xws-source-editor footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 15px;border-top:1px solid #edf1f6}
#productSupplyModal.xws-clean .xws-source-editor footer small{margin-right:auto;color:#91a0b6;font-size:11px}
#productSupplyModal.xws-clean .xws-source-editor footer button{border:1px solid #d6e0ee;border-radius:5px;background:#fff;color:#53657f;padding:6px 14px;font-size:13px;cursor:pointer}
#productSupplyModal.xws-clean .xws-source-editor footer .xws-pop-save{background:#2563eb;border-color:#2563eb;color:#fff}
#productSupplyModal.xws-clean .xws-source-error{padding:0 15px;margin:0 0 10px;font-size:12px;color:#c96835}
#productSupplyModal.xws-clean .xws-source-error[hidden]{display:none}
#productSupplyModal.xws-clean .xws-price-missing{border-color:#efce99!important;background:#fffdf7!important}
#productSupplyModal.xws-clean .xws-missing-total{color:#b98329;font-size:11px;white-space:nowrap}
#productSupplyModal.xws-clean .xws-missing-total[hidden]{display:none!important}
#productSupplyModal.xws-clean .xws-missing-message{margin:12px 0 4px;padding:8px 10px;border:1px solid #f1d7ab;border-radius:5px;background:#fff8ec;color:#ac7825;font-size:12px}
#productSupplyModal.xws-clean .xws-missing-message[hidden]{display:none!important}
#productSupplyModal.xws-clean:not(.xw-global-profit-mode) .product-supply-cost-row.is-missing{background:#fffcf5;color:#9e895e}
#productSupplyModal.xws-clean:not(.xw-global-profit-mode) .product-supply-cost-row.is-missing::after,
#productSupplyModal.xws-clean:not(.xw-global-profit-mode) .product-supply-cost-row.is-missing .name::before{display:none!important;content:none!important}
#productSupplyModal.xws-clean:not(.xw-global-profit-mode) #productSupplySaveBtn{display:inline-flex!important;align-items:center;justify-content:center;background:#2563eb!important;color:#fff!important;border-color:#2563eb!important;min-width:88px}
#productSupplyModal.xws-clean:not(.xw-global-profit-mode) .product-supply-footer #productSupplyRunTrial{display:inline-flex!important;align-items:center;gap:6px;margin-left:8px!important;min-height:36px!important;height:auto!important;padding:8px 16px!important;border-radius:6px!important;background:#2563eb!important;color:#fff!important;font-size:13px!important}
#productSupplyModal.xws-clean .product-supply-parent-grid .xws-inline-open{font-weight:600;font-size:14px}
@media(max-width:1100px){#productSupplyModal.xws-clean .product-supply-head,#productSupplyModal.xws-clean .product-supply-row{min-width:900px!important}}

/* Compact per-column batch actions; independent trial and Save. */
#productSupplyModal.xws-clean .product-supply-head .xws-column-batch{display:inline!important;border:0!important;background:transparent!important;color:#2563eb!important;padding:0 3px!important;margin-left:5px!important;font-size:11px!important;line-height:20px!important;min-width:0!important;min-height:0!important;height:auto!important;font-weight:500;cursor:pointer}
#productSupplyModal.xws-clean .product-supply-head .xws-column-batch:hover{color:#1744be!important;text-decoration:underline}
#productSupplyModal.xws-clean #xwSupplyAuxMenu .xws-fetch-options{display:block!important}
#productSupplyModal.xws-clean #productSupplySaveBtn:disabled{opacity:.6;cursor:wait}
