.wholesale-window{border:2px solid #969e89;background:#fff;color:#17212b;font-family:Tahoma,"Microsoft YaHei",sans-serif;font-size:13px}
#temporary-sales-dialog{width:calc(100% - 32px);max-width:1400px;max-height:calc(100% - 32px)}
.wholesale-grid input[type="checkbox"]{width:18px;height:18px;padding:0;vertical-align:middle}
.wholesale-title{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(#89b9f3,#3471bd 65%,#21589d);color:white;height:26px;padding:0 8px;font-weight:bold}.wholesale-title button{border:0;background:transparent;color:white;font-size:20px;padding:0 4px}
.wholesale-heading.panel-head{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;padding:12px 8px;background:#d6def2;border-bottom:3px ridge #fff}.wholesale-heading h1{font-family:SimSun,serif;font-size:23px;margin:0}.wholesale-number{color:#e00000}.wholesale-heading>span{font-size:12px}.wholesale-heading label{display:flex;align-items:center;gap:4px}.wholesale-heading input{width:auto}
.wholesale-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:16px 8px;background:#edf3f9;border-bottom:3px ridge #fff}.wholesale-meta label{display:flex;align-items:center;gap:5px;margin:0;font-weight:400}.wholesale-meta input{width:135px}.wholesale-meta label:first-child input{width:150px;border:0;border-bottom:1px solid #555;background:transparent}.wholesale-meta select{max-width:225px}.wholesale-meta>input[type=date]{width:140px}
.wholesale-tools{display:flex;flex-wrap:wrap;gap:10px;background:#d6def2;padding:10px 8px;border-bottom:3px ridge #fff}.wholesale-tools button{background:transparent;border-color:transparent;padding:5px 8px;color:#182331}.wholesale-tools button:disabled{opacity:.45}
.wholesale-entry{display:flex;align-items:center;flex-wrap:wrap;gap:6px;background:#dff3ff;padding:6px 8px;border-bottom:1px solid #a8c9dc}.wholesale-entry input{width:235px}.wholesale-entry label{margin:0}.wholesale-entry .candidate{background:#fff8b0}
.sale-candidates{width:100%;max-height:240px;overflow:auto;background:white;border:1px solid #a8c9dc;padding:6px}.sale-candidates[hidden]{display:none}.sale-candidates .help{margin:0 0 6px}.sale-candidates .candidate{margin:0 0 4px;padding:8px 10px}
.transfer-window .wholesale-grid{min-height:0;max-height:40vh}.transfer-window .wholesale-grid table{min-width:780px}
#transfer-candidates .candidate{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0}
#transfer-candidates .transfer-candidate-product{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
#transfer-candidates .transfer-candidate-stock{flex-shrink:0;white-space:nowrap;font-weight:600}
.wholesale-grid{min-height:285px;max-height:48vh;overflow:auto;position:relative;border:1px solid #a5a5a5}.wholesale-grid table{min-width:1040px;width:100%;margin:0;border-collapse:collapse}.wholesale-grid th{position:sticky;top:0;background:#efefef;color:#17212b;font-weight:400;white-space:nowrap;border:1px solid #999;padding:3px 6px;z-index:1}.wholesale-grid td{border:1px solid #c2c2c2;padding:4px 6px;white-space:nowrap;font-size:13px}.wholesale-grid tbody tr:nth-child(even){background:white}.wholesale-grid .wholesale-selected{background:#fffbe1}.wholesale-grid input{width:74px;padding:3px 5px}.wholesale-grid button{padding:3px 6px;font-size:13px}.wholesale-grid tfoot{position:sticky;bottom:0;background:#eff3fa}.wholesale-empty{padding:22px;color:#6c7983}
.wholesale-stocks{display:flex;flex-wrap:wrap;gap:6px;padding:6px;background:#edf5fb}.wholesale-stocks .supply-row{display:flex;align-items:center;gap:8px;border:1px solid #b8c9df;background:white;padding:5px 8px}.wholesale-stocks p{margin:0;font-size:12px}.wholesale-stocks button{padding:2px 5px;font-size:12px}
.wholesale-footer{background:#d6def2;border-top:3px ridge #fff;padding:12px 10px 6px}.wholesale-totals{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px;font-weight:bold}.wholesale-totals label{display:flex;align-items:center;gap:5px;margin:0}.wholesale-totals input{width:70px;color:#e00000}.wholesale-totals output{background:#f3f0f6;padding:4px;font-size:12px;font-weight:400}.wholesale-totals .summary-link{color:#e00000;background:#f6f1f7;min-width:95px;border-bottom:1px solid #555}.wholesale-totals select{width:115px}
.wholesale-bottom{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.wholesale-bottom textarea{flex:1;min-width:170px;min-height:32px;height:32px;resize:vertical;background:#f2f0f7;border:0;border-bottom:1px solid #666}.wholesale-bottom label{margin:0}.wholesale-footer .help{font-size:11px;margin:8px 0 0}
@media(min-width:1100px){.main:has(.wholesale-window) .workspace{padding:10px}.main:has(.wholesale-window) .demo-banner{margin-bottom:8px}.wholesale-heading label:first-of-type{margin-left:auto}}
@media(max-width:800px){.wholesale-heading.panel-head{justify-content:flex-start}.wholesale-heading h1{font-size:20px}.wholesale-meta{padding:8px}.wholesale-meta select{max-width:185px}.wholesale-entry input{width:100%;flex-basis:100%}.wholesale-tools{gap:2px}.wholesale-tools button{padding:4px}.wholesale-grid{min-height:220px;max-height:45vh}.wholesale-stocks .supply-row{width:100%;flex-wrap:wrap}.wholesale-bottom textarea{flex-basis:80%}.wholesale-totals{gap:7px}.wholesale-totals label{flex-wrap:wrap}}
.wholesale-quantity-entry{display:flex;align-items:center;gap:6px}
.wholesale-quantity-entry input{flex:0 0 74px;height:34px}
.wholesale-grid .wholesale-quantity-entry button{flex:0 0 auto;white-space:nowrap;min-width:88px;min-height:34px;padding:6px 10px;border-radius:8px}
.wholesale-entry-empty{height:44px}
.wholesale-grid #wholesale-row-code{width:125px;min-width:100px;padding:6px 8px}
.wholesale-entry [data-action="scan"],.wholesale-entry [data-action="scan"]:hover{background:#d20b0b;color:#fff;border-color:#d20b0b}
.sale-print-frame{display:block;width:100%;height:65vh;border:0;background:white}
dialog:has(.sale-print-frame){width:min(960px,calc(100% - 32px));max-width:960px}
