@layer erp-reconstruction,erp-ui,erp-legacy;
@layer erp-reconstruction{
.procurement-entry-page{display:block!important;background:#fff!important;color:#213047;padding:24px!important;min-width:0;max-width:100%;height:auto!important;overflow:auto;font:15px/1.6 "Microsoft YaHei",sans-serif!important;box-sizing:border-box}
.procurement-entry-page[hidden]{display:none!important}.procurement-entry-page *{box-sizing:border-box}
.procurement-entry-page :is(input,select,button){font:15px/1.6 "Microsoft YaHei",sans-serif!important;min-height:44px;max-width:100%;color:inherit;border:1px solid #bfcbdc;border-radius:5px;background:#fff;padding:7px 10px;box-shadow:none}
.procurement-entry-page :is(input,select){width:100%}.procurement-entry-page [hidden]{display:none!important}.procurement-entry-page button{cursor:pointer}.procurement-entry-page button:hover{background:#edf3fd}.procurement-entry-page button:disabled{opacity:.5;cursor:default}.procurement-entry-page :focus-visible{outline:3px solid #6394df;outline-offset:2px}

.procurement-entry-page .procurement-entry-heading{display:grid;gap:12px;margin:0 0 24px}
.procurement-entry-page .procurement-entry-title{display:flex;align-items:center;justify-content:space-between;gap:16px}
.procurement-entry-page .procurement-entry-title h2{font-size:24px;margin:0;line-height:1.4}
.procurement-entry-page .procurement-entry-title>button{flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:8px}
.procurement-entry-page .procurement-entry-options{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 16px;min-width:0}
.procurement-entry-page .procurement-entry-options>button{min-height:44px}
.procurement-entry-page .procurement-entry-options details{max-width:100%;min-width:0}
.procurement-entry-page .procurement-entry-options summary{display:list-item;align-content:center;min-height:44px;width:fit-content;max-width:100%;padding:9px 4px;font-size:14px;color:#245ca7;cursor:pointer}
.procurement-entry-page .procurement-entry-options summary:focus-visible{outline:3px solid #6394df;outline-offset:2px}
.procurement-entry-page .procurement-recovery{font-size:15px;line-height:1.8;padding:14px 0}
.procurement-entry-page .procurement-recovery>button{display:block;margin-top:12px}
.procurement-entry-page :is(.procurement-entry-body,.procurement-entry-footer>div)[hidden]{display:none!important}
.procurement-entry-page .procurement-entry-config{display:flex;flex-wrap:wrap;gap:8px;padding:8px 0;max-width:100%}
.procurement-entry-page .procurement-entry-config button{min-height:44px;height:auto;white-space:normal}
.procurement-entry-page .procurement-entry-meta{display:grid;gap:8px;padding:8px 0;font-size:14px;color:#53647a;overflow-wrap:anywhere}

.procurement-entry-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0 24px}.procurement-entry-form label{display:grid;gap:6px;min-width:0}.procurement-entry-form label span{font-size:14px;color:#53647a}.procurement-entry-form b{color:#b73030}.procurement-entry-form>button{align-self:end}
.procurement-entry-page .procurement-entry-primary-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin:18px 0 8px!important}
.procurement-entry-page .procurement-entry-primary-fields .procurement-entry-summary{grid-column:1/-1}
.procurement-entry-page :is(.procurement-entry-supplement,.procurement-entry-adjustments){border:0!important;background:none!important;margin:0 0 16px!important;padding:0!important}
.procurement-entry-page :is(.procurement-entry-supplement,.procurement-entry-adjustments,.procurement-entry-tools,.procurement-entry-tail)>summary{min-height:44px!important;padding:10px 0!important;color:#245ca7!important;font-size:14px!important;cursor:pointer}
.procurement-entry-page .procurement-entry-supplement .procurement-entry-form{margin:8px 0 16px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
.procurement-entry-page .procurement-entry-supplement .procurement-entry-extra{grid-column:1/-1}
.procurement-entry-page .procurement-entry-adjustments .procurement-entry-discount{display:grid!important;grid-template-columns:repeat(2,minmax(0,220px))!important;gap:16px!important;padding:8px 0 16px!important;max-width:100%}
.procurement-entry-page .procurement-entry-discount label{display:grid!important;gap:6px!important;min-width:0!important;font-size:14px!important;color:#53647a!important}
.procurement-entry-page .procurement-entry-discount input{width:100%!important;max-width:100%!important}
.procurement-entry-page .procurement-entry-tools{min-width:0;max-width:100%}
.procurement-entry-page .procurement-entry-tools-body{display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:8px 0!important}
.procurement-entry-page .procurement-entry-tools-body>div{display:flex;gap:8px;flex-wrap:wrap}
.procurement-entry-page .procurement-entry-tail>summary{margin-bottom:8px}
@media(max-width:767px){.procurement-entry-page .procurement-entry-primary-fields,.procurement-entry-page .procurement-entry-supplement .procurement-entry-form,.procurement-entry-page .procurement-entry-adjustments .procurement-entry-discount{grid-template-columns:minmax(0,1fr)!important}.procurement-entry-page .procurement-entry-tools[open]{flex-basis:100%}.procurement-entry-page .procurement-entry-tools-body button{min-width:44px!important;white-space:normal!important}}
.procurement-entry-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:14px 0;border-top:1px solid #dce4ee}.procurement-entry-toolbar>div{display:flex;gap:8px}.procurement-entry-scan{display:flex;align-items:center;gap:8px;flex:1;min-width:160px}
.procurement-entry-table-wrap{max-width:100%;overflow-x:auto;border:1px solid #dce4ee}.procurement-entry-table{width:100%;min-width:1400px;border-collapse:collapse;table-layout:auto}.procurement-entry-table :is(th,td){padding:10px 8px;border-bottom:1px solid #e1e7ef;vertical-align:top;white-space:nowrap;font-size:15px!important}.procurement-entry-table th{background:#f2f5fa;text-align:left;font-weight:600}.procurement-entry-table input,.procurement-entry-table select{min-width:85px}.procurement-entry-table .purchase-inbound-product{min-width:240px}.procurement-entry-table tfoot{background:#f2f5fa;font-weight:600}
#purchase-inbound-editor .procurement-entry-table{min-width:900px;table-layout:auto}
#purchase-inbound-editor .procurement-entry-table :is(th,td){font-size:15px!important;white-space:normal;overflow-wrap:anywhere;padding:10px 8px}
#purchase-inbound-editor .procurement-entry-table th{font-size:14px!important}
#purchase-inbound-editor .procurement-entry-table .purchase-inbound-product{min-width:210px}
#purchase-inbound-editor .purchase-inbound-lot-field[data-erp-column-visible=true]{display:table-cell!important}
.procurement-entry-line-empty{text-align:center;padding:24px;display:grid;gap:8px}.procurement-entry-maker{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0;font-size:14px;color:#53647a}.procurement-entry-discount{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.procurement-entry-discount input{max-width:100px}.procurement-entry-tail{border-top:1px solid #dce4ee;padding:18px 0}.procurement-entry-tail-tabs{display:flex;gap:8px;margin-bottom:12px}.procurement-entry-tail-basic,.procurement-entry-tail-expense{display:flex;gap:14px;flex-wrap:wrap}.procurement-entry-tail-basic label{display:grid;gap:6px;flex:1;min-width:180px}.procurement-entry-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;padding:20px 0;border-top:1px solid #cbd6e5;background:white}.procurement-entry-footer>div{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.procurement-entry-page [data-ui-button=primary]{background:#245ca7;color:white;border-color:#245ca7}
body:is([data-module=purchase-inbound],[data-module=purchase-returns]) :is(.module-banner,.module-summary,.module-flow-rail){display:none!important}
.procurement-entry-page .purchase-inbound-lot-field,.procurement-entry-page .purchase-return-lot-field{display:none!important}.procurement-entry-page.show-lot-fields .purchase-inbound-lot-field,.procurement-entry-page.show-lot-fields .purchase-return-lot-field{display:table-cell!important}
@media(max-width:767px){
.procurement-entry-page{padding:16px 12px!important;padding-bottom:26px!important;overflow:visible}.procurement-entry-form{grid-template-columns:minmax(0,1fr);gap:14px}.procurement-entry-config{gap:8px}.procurement-entry-page :is(input,select,button){min-height:44px}.procurement-entry-heading{margin-bottom:16px}.procurement-entry-meta{gap:8px}.procurement-entry-toolbar>div{flex-wrap:wrap}.procurement-entry-toolbar>label{max-width:100%}
.procurement-entry-table-wrap{border:0;overflow:visible}.procurement-entry-table{min-width:0!important;width:100%;display:block}.procurement-entry-table thead,.procurement-entry-table tfoot{display:none}.procurement-entry-table tbody{display:grid;gap:16px}.procurement-entry-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px 0;border-top:1px solid #cbd6e5}.procurement-entry-table tbody td{display:flex;flex-direction:column;gap:6px;min-width:0!important;max-width:100%!important;width:auto!important;padding:0;border:0;white-space:normal;order:var(--procurement-order,0)!important;grid-area:auto!important;overflow-wrap:anywhere}.procurement-entry-table td::before{content:attr(data-procurement-label);font-size:14px;color:#53647a}.procurement-entry-table td[data-procurement-field="1"]{display:none}.procurement-entry-table .purchase-inbound-product{min-width:0}.procurement-entry-table td :is(input,select){min-width:0!important;max-width:100%!important;width:100%!important}.procurement-entry-toolbar button{flex-shrink:0;white-space:nowrap}.procurement-entry-toolbar .procurement-entry-scan{flex-basis:100%}.procurement-entry-table tr.purchase-return-spacer-row{display:none}

.procurement-entry-page.show-lot-fields .purchase-inbound-lot-field,.procurement-entry-page.show-lot-fields .purchase-return-lot-field{display:flex!important}.procurement-entry-footer{flex-direction:column;position:static}.procurement-entry-footer>div{width:100%}.procurement-entry-footer>div:last-child{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.procurement-entry-footer button{width:100%}.procurement-entry-tail-basic label{min-width:0;flex-basis:100%}.procurement-entry-maker{gap:8px}.procurement-entry-page .procurement-entry-discount{width:100%}
}
}

@layer erp-reconstruction{
@media(max-width:767px){
:is(#purchase-inbound-editor,#purchase-return-editor).procurement-entry-page .procurement-entry-table tbody tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;min-width:0!important}
:is(#purchase-inbound-editor,#purchase-return-editor).procurement-entry-page .procurement-entry-table tbody td{width:auto!important;min-width:0!important;max-width:100%!important}
:is(#purchase-inbound-editor,#purchase-return-editor).procurement-entry-page .procurement-entry-table :is(input,select){width:100%!important;min-width:0!important;max-width:100%!important}
:is(#purchase-inbound-editor,#purchase-return-editor).procurement-entry-page .procurement-entry-toolbar button{width:auto!important;min-width:44px!important;max-width:100%!important;white-space:normal!important}

#purchase-inbound-editor.procurement-entry-page .procurement-entry-table td[data-procurement-field="1"]{display:flex!important}
#purchase-inbound-editor.procurement-entry-page .procurement-entry-table td.purchase-inbound-lot-field[data-erp-column-visible=true]{display:flex!important}
#purchase-inbound-editor.procurement-entry-page .procurement-entry-table tbody td{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;position:static!important;height:auto!important;padding:0!important;min-width:0!important;max-width:100%!important;white-space:normal!important}
#purchase-inbound-editor.procurement-entry-page .procurement-entry-table tbody td:is([data-procurement-field="1"],[data-procurement-field="2"],[data-procurement-field="8"]){grid-column:1/-1!important}
#purchase-inbound-editor.procurement-entry-page .procurement-entry-table tbody td .purchase-inbound-row-remove{align-self:start;width:44px!important}
#purchase-inbound-editor.procurement-entry-page .procurement-entry-table tbody td::before{display:block!important;position:static!important;white-space:normal!important}
#purchase-inbound-editor.procurement-entry-page:not(.show-lot-fields) .procurement-entry-table tbody td.purchase-inbound-lot-field:not([data-erp-column-visible=true]){display:none!important}
}
}
@layer erp-reconstruction{@media(max-width:767px){:is(#purchase-inbound-editor,#purchase-return-editor).procurement-entry-page .procurement-entry-table,:is(#purchase-inbound-editor,#purchase-return-editor).procurement-entry-page .procurement-entry-table tbody{width:100%!important;min-width:0!important;max-width:100%!important}.procurement-entry-table tbody{grid-template-columns:minmax(0,1fr)!important}}}
@layer erp-reconstruction{@media(max-width:767px){#purchase-inbound-editor.procurement-entry-page td:is([data-procurement-field="4"],[data-procurement-field="7"],[data-procurement-field="10"]){grid-column:1/-1!important}#purchase-inbound-editor.procurement-entry-page td[data-procurement-field="3"]{display:none!important}}}
@layer erp-reconstruction{@media(max-width:767px){.procurement-entry-page :is(input,select,button){min-height:44px!important}}}

@layer erp-reconstruction{body:is([data-module=purchase-orders],[data-module=purchase-query]) :is(.module-banner,.module-summary,.module-flow-rail){display:none!important}}


@layer erp-reconstruction {
  #purchase-inbound-editor .purchase-inbound-scan-controls {
    display: grid;
    grid-template-columns: auto minmax(100px, auto) minmax(100px, 1fr) auto;
    align-items: center;
    gap: 8px;
    flex: 1 1 460px;
    min-width: 0;
  }
  .purchase-inbound-scan-controls > label { font-size: 14px; color: #53647a; }
  #purchase-inbound-scan-status { grid-column: 1 / -1; margin: 0; font-size: 14px; overflow-wrap: anywhere; }
  #purchase-inbound-scan-status:empty { position: absolute; }
  @media (max-width: 767px) {
    #purchase-inbound-editor .purchase-inbound-scan-controls {
      grid-template-columns: minmax(0, 1fr) auto;
      flex-basis: 100%;
    }
    #purchase-inbound-scan-mode { grid-column: 2; grid-row: 1; }
  }
}

@layer erp-reconstruction {
#purchase-return-editor .procurement-entry-table{min-width:960px!important;width:100%!important;table-layout:fixed!important}
#purchase-return-editor .procurement-entry-table :is(th,td){width:auto!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere;font-size:15px!important}
#purchase-return-editor .procurement-entry-table th{font-size:14px!important}
#purchase-return-editor .procurement-entry-table :is(th,td):first-child{width:70px!important}#purchase-return-editor .procurement-entry-table :is(th,td):nth-child(2){width:24%!important}
#purchase-return-editor .procurement-entry-table td strong{display:block;font-size:15px!important}#purchase-return-editor .procurement-entry-table td small{display:block;font-size:14px!important;color:#53647a;margin-top:5px}
#purchase-return-editor .purchase-return-lot-field[data-erp-column-visible=true]{display:table-cell!important}
@media(max-width:767px){
#purchase-return-editor.procurement-entry-page .procurement-entry-table tbody td{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;position:static!important;height:auto!important;padding:0!important;min-width:0!important;max-width:100%!important;white-space:normal!important}
#purchase-return-editor.procurement-entry-page .procurement-entry-table tbody td:is([data-procurement-field="1"],[data-procurement-field="2"],[data-procurement-field="9"]){grid-column:1/-1!important}
#purchase-return-editor.procurement-entry-page .procurement-entry-table tbody td .purchase-return-row-clear{align-self:start;min-width:54px!important}
#purchase-return-editor.procurement-entry-page .procurement-entry-table tbody td::before{content:attr(data-procurement-label)!important;display:block!important;position:static!important;white-space:normal!important}
#purchase-return-editor.procurement-entry-page:not(.show-lot-fields) .procurement-entry-table tbody td.purchase-return-lot-field:not([data-erp-column-visible=true]){display:none!important}
}
}

@layer erp-reconstruction {
body.pixel-replica.order-entry-page-open :is(#dashboard-page,#module-page,#drawer-mask):not([data-order-visible]){display:none!important}
body.pixel-replica.order-entry-page-open .main{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
body.order-entry-page-open{overflow:hidden!important}
#order-entry-page-host{min-height:0;flex:1 1 auto;background:#fff;margin:18px 24px 0;overflow:hidden}
#order-entry-page-host[hidden]{display:none!important}
#order-entry-page-host #business-drawer.order-entry-page{position:static!important;inset:auto!important;transform:none!important;visibility:visible!important;display:flex!important;flex-direction:column!important;width:100%!important;max-width:none!important;height:100%!important;max-height:none!important;padding:0!important;border:0!important;box-shadow:none!important;background:#fff!important;z-index:auto!important;font:15px/1.6 "Microsoft YaHei",sans-serif!important;color:#213047!important;overflow:hidden!important}
.order-entry-page *{box-sizing:border-box}
.order-entry-page [hidden]{display:none!important}
#order-entry-page-host .order-entry-heading{position:static!important;flex:0 0 auto;display:flex!important;align-items:start;justify-content:space-between;gap:16px;height:auto!important;padding:22px 24px!important;border:0!important;background:none!important}
#order-entry-page-host h2{margin:0;font-size:24px!important;line-height:1.4;color:#172d47}
#order-entry-page-host h3{margin:0 0 16px;font-size:18px;line-height:1.5;color:#172d47}
.order-entry-body{flex:1 1 auto;min-height:0;overflow:auto;padding:0 24px 24px;scroll-padding:16px}
.order-entry-page :is(input,select,textarea,button){font:15px/1.6 "Microsoft YaHei",sans-serif!important;min-height:44px!important;max-width:100%;color:inherit}
.order-entry-page :is(input,select,textarea){width:100%;min-width:0;padding:9px 10px!important;border:1px solid #bfcbdc!important;border-radius:4px!important;background:#fff!important;box-shadow:none!important}
.order-entry-page button{cursor:pointer}
.order-entry-page #close-drawer{display:grid;place-items:center;width:44px!important;height:44px!important;min-width:44px;border:1px solid #bfcbdc;background:#fff;color:#245ca7;border-radius:4px;padding:8px}
.order-entry-page :focus-visible{outline:3px solid #6394df;outline-offset:2px}
.order-entry-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px}
.order-entry-page label{display:grid!important;gap:6px!important;min-width:0}
.order-entry-page :is(label>span,label>small,.drawer-product-context,.drawer-price-context){font-size:14px!important;color:#53647a!important}
.order-entry-basic{margin:0 0 28px}
.order-entry-items-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.order-entry-items-heading h3{margin:0!important}
.order-entry-items-heading #add-line{padding:8px 12px;color:#1f55a6;background:#fff;border:1px solid #bfcbdc;border-radius:4px}
.order-entry-page #drawer-lines{display:block!important}
.order-entry-page .drawer-line{position:static!important;display:grid!important;grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(90px,.7fr) minmax(100px,.8fr) 44px!important;gap:16px 12px!important;padding:20px 0!important;margin:0!important;border:0!important;border-bottom:1px solid #dce3ec!important;border-radius:0!important;background:none!important}
.order-entry-page .drawer-line>label{grid-column:auto!important;grid-row:auto!important;order:0!important}
.order-entry-page .drawer-line>.remove-line{position:static!important;inset:auto!important;grid-column:5!important;grid-row:1!important;align-self:start!important;width:44px!important;height:44px!important;margin:24px 0 0!important;padding:8px!important;color:#a72b2b!important;background:#fff;border:1px solid #dce3ec;border-radius:4px}
.order-entry-page .drawer-line>.adjust-field{grid-column:1/-1!important}
.document-edit-extra,.document-edit-sales-line,.document-edit-count-lots{grid-column:1/-1}.document-edit-extra>div,.document-edit-sales-line,.document-edit-sales-adjustments>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.document-edit-extra summary,.document-edit-count-lots summary,.document-edit-sales-adjustments summary{min-height:44px;padding:10px 0;cursor:pointer;font-size:14px;color:#53647a}.document-edit-count-lots label{margin:12px 0}.document-edit-sales-adjustments{margin-top:20px}
.order-entry-lot-fields{grid-column:1/-1}
.order-entry-lot-fields summary{width:fit-content;min-height:44px;padding:10px 0;cursor:pointer;font-size:14px;color:#53647a}
.order-entry-lot-fields>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.order-entry-page .drawer-note{display:grid!important;padding:24px 0 0!important;margin:0!important;border:0!important;border-radius:0!important;background:none!important}
#order-entry-page-host .order-entry-footer{position:static!important;flex:0 0 auto;display:flex!important;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;height:auto!important;padding:16px 24px!important;border-top:1px solid #dce3ec!important;background:#fff!important}
.order-entry-feedback{flex:1;min-width:0;font-size:14px;color:#53647a}
.order-entry-amount{display:block;margin-bottom:6px;font-size:15px;color:#213047;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.order-entry-feedback #drawer-save-error{display:block;color:#a72b2b;overflow-wrap:anywhere}
.order-entry-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:1100px){.order-entry-page .drawer-line{grid-template-columns:minmax(160px,1.6fr) minmax(120px,1fr) minmax(70px,.7fr) minmax(80px,.8fr) 44px!important}}
@media(max-width:767px){
#order-entry-page-host{margin:0;min-height:0}
#order-entry-page-host .order-entry-heading{padding:16px!important}
.order-entry-body{padding:0 16px 20px}
.order-entry-fields{grid-template-columns:minmax(0,1fr);gap:16px}
.order-entry-page .drawer-line{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.order-entry-page .drawer-line>.line-product{grid-column:1/-1!important;grid-row:2!important}
.order-entry-page .drawer-line>label:has(.line-unit-select){grid-column:1/-1!important;grid-row:3!important}
.order-entry-page .drawer-line>label:has(.line-quantity),.order-entry-page .drawer-line>label:has(.line-price){grid-row:4!important}
.document-edit-sales-line,.document-edit-extra,.document-edit-count-lots{grid-column:1/-1!important;grid-row:auto!important}
.order-entry-page .drawer-line>.remove-line{grid-column:1/-1!important;grid-row:1!important;justify-self:end!important;margin:0!important}
.order-entry-lot-fields>div{grid-template-columns:minmax(0,1fr)}
#order-entry-page-host .order-entry-footer{padding:12px 16px!important;gap:8px}
.order-entry-feedback{flex-basis:100%}
.order-entry-feedback:has(>[hidden]):not(:has(>:not([hidden]))){display:none}
.order-entry-actions{width:100%}.order-entry-actions #submit-document{flex:1!important}
}
}
