@layer erp-reconstruction,erp-ui,erp-legacy;
@layer erp-reconstruction{
#stock-count-editor .stock-count-actions button{min-height:44px!important}
#stock-count-editor .stock-count-table{height:auto!important}
#stock-count-editor .stock-count-table-wrap{height:auto!important;max-height:none!important;min-height:0!important;contain:none!important}
#stock-count-editor :is(.stock-count-summary,.stock-count-maker,.stock-count-actions){position:static!important;height:auto!important;min-height:0!important;inset:auto!important;clear:both}
@media(max-width:767px){
#stock-count-editor .stock-count-table>tbody>tr>td{position:static!important;height:auto!important;box-shadow:none!important;text-align:left!important}
#stock-count-editor .stock-count-table>tbody>tr>td>*{max-width:100%}
#stock-count-editor .stock-count-table>tbody>tr>td:is([data-count-field="1"],[data-count-field="2"]){align-self:end}
#stock-count-editor .stock-count-table>tfoot{margin-top:16px;border-top:1px solid #cbd6e5}
}
}
@layer erp-reconstruction{
#stock-count-editor.stock-count-page{display:block!important;padding:24px!important;background:#fff!important;color:#213047;max-width:100%;min-width:0;overflow:auto!important;height:auto!important;font:15px/1.6 "Microsoft YaHei",sans-serif!important}#stock-count-editor[hidden]{display:none!important}#stock-count-editor *{box-sizing:border-box}#stock-count-editor [hidden]{display:none!important}
#stock-count-editor :is(input,select,button){font:15px/1.6 "Microsoft YaHei",sans-serif!important;min-height:44px!important;border:1px solid #bfcbdc;border-radius:5px;padding:7px 10px;background:#fff;color:inherit;max-width:100%;box-shadow:none}#stock-count-editor :focus-visible{outline:3px solid #6394df;outline-offset:2px}#stock-count-editor button:disabled{opacity:.5}
#stock-count-editor .stock-count-heading{display:flex!important;align-items:center;gap:12px;height:auto!important;padding:0 0 20px!important;background:none!important;border:0!important}#stock-count-editor .stock-count-heading strong{font-size:24px!important}#stock-count-editor .stock-count-heading button{margin-left:auto}#stock-count-editor .stock-count-form{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important;margin:0 0 24px!important;padding:0!important;background:none!important;border:0!important}#stock-count-editor .stock-count-form label{display:grid;gap:6px;font-size:14px;color:#53647a}#stock-count-editor .stock-count-form :is(input,select){width:100%}
#stock-count-editor .stock-count-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr);gap:12px;height:auto!important;padding:14px 0!important;border-top:1px solid #dce4ee!important;background:none!important}
#stock-count-editor .stock-count-main-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
#stock-count-editor .stock-count-main-tools>.stock-count-toolbar-spacer{flex:1}
#stock-count-editor .stock-count-tools{border-top:1px solid #dce4ee;padding-top:8px;min-width:0}
#stock-count-editor :is(.stock-count-tools,.stock-count-metadata)>summary{min-height:44px;display:list-item;align-content:center;width:fit-content;max-width:100%;padding:9px 4px;color:#245ca7;font-size:14px;cursor:pointer}
#stock-count-editor :is(.stock-count-tools,.stock-count-metadata)>summary:focus-visible{outline:3px solid #6394df;outline-offset:2px}
#stock-count-editor .stock-count-tools-content{padding:8px 0;display:grid;gap:16px}
#stock-count-editor .stock-count-tool-group{display:grid;gap:6px;min-width:0}
#stock-count-editor .stock-count-tool-group>span,#stock-count-editor .stock-count-tools-note{font-size:14px;color:#53647a}
#stock-count-editor .stock-count-tool-group>div{display:flex;gap:8px;flex-wrap:wrap}
#stock-count-editor .stock-count-tools-note{margin:0}
#stock-count-editor .stock-count-metadata{grid-column:1/-1;min-width:0}
#stock-count-editor .stock-count-metadata-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding-top:8px}
#stock-count-editor .stock-count-toolbar button{min-height:44px!important;height:auto!important;white-space:normal!important}
#stock-count-editor .stock-count-table>thead>tr>th{font-size:14px!important}
#stock-count-editor .stock-count-table>thead>tr>th:nth-child(1){width:62px!important}
#stock-count-editor .stock-count-table>thead>tr>th:nth-child(2){width:52px!important}
#stock-count-editor .stock-count-table>thead>tr>th:nth-child(3){width:25%!important}
#stock-count-editor .stock-count-table>thead>tr>th:nth-child(5){width:220px!important}
#stock-count-editor .stock-count-packaging{display:grid;gap:6px;margin-top:8px;min-width:180px}
#stock-count-editor .stock-count-packaging>small{font-size:14px;color:#53647a;white-space:normal}
#stock-count-editor .stock-count-packaging>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#stock-count-editor .stock-count-packaging label{display:grid;gap:4px;min-width:0;font-size:14px;color:#53647a}
#stock-count-editor .stock-count-packaging input{width:100%!important;min-width:0!important}
#stock-count-editor .stock-count-table input[aria-invalid="true"]{border-color:#a52a2a;background:#fff7f7}
#stock-count-editor .stock-count-product-cell strong{display:block;font-size:15px}
#stock-count-editor .stock-count-product-cell small{display:block;font-size:14px;color:#53647a;margin:6px 0}
#stock-count-editor .stock-count-table>tbody>tr[data-stock-count-product]>td{vertical-align:top!important;white-space:normal!important;overflow-wrap:anywhere}
#stock-count-editor .stock-count-table>tbody>tr[data-stock-count-product]>td:nth-child(-n+2){width:auto!important}
#stock-count-editor .stock-count-table>tbody>tr[data-stock-count-product]>td .stock-count-quantity{width:100%!important;min-width:90px!important}
body.pixel-replica #stock-count-editor .stock-count-heading{display:flex!important;visibility:visible!important}
body.pixel-replica #stock-count-editor .stock-count-form label{display:grid!important;gap:6px!important;align-items:stretch!important}
body.pixel-replica #stock-count-editor .stock-count-toolbar>.erp-column-settings-toolbar{width:fit-content!important;justify-self:start!important}
body.pixel-replica #stock-count-editor .stock-count-table :is(th,td){text-align:left!important;background:#fff!important;border:0!important;border-bottom:1px solid #dce4ee!important;box-shadow:none!important;min-width:0!important}
body.pixel-replica #stock-count-editor .stock-count-table th{background:#f2f5fa!important}
body.pixel-replica #stock-count-editor .stock-count-table input[type=checkbox]{width:20px!important;height:20px!important;min-height:20px!important;padding:0!important;accent-color:#245ca7}
body.pixel-replica #stock-count-editor .stock-count-table .stock-count-row-delete{width:44px!important;min-height:44px!important;padding:8px!important}
@media(max-width:767px){
body.pixel-replica #stock-count-editor .stock-count-table>tbody>tr>td{border:0!important;background:none!important;text-align:left!important}
body.pixel-replica #stock-count-editor .stock-count-table>tbody>tr>td:is([data-count-field="1"],[data-count-field="2"]){min-height:44px!important;align-items:start!important;justify-content:center!important}
body.pixel-replica #stock-count-editor .stock-count-table>tbody>tr>td:is([data-count-field="1"],[data-count-field="2"])::before{display:none!important}
body.pixel-replica #stock-count-editor .stock-count-table>tbody>tr>td[data-count-field="2"]{align-items:end!important}
}
#stock-count-editor #stock-count-import-guide{margin:8px 0 20px;color:#53647a;font-size:14px}#stock-count-editor .stock-count-table-wrap{width:100%;min-width:0;overflow:auto!important;border:1px solid #dce4ee;height:auto!important}#stock-count-editor .stock-count-table{width:100%;min-width:880px;table-layout:fixed!important;border-collapse:collapse}#stock-count-editor :is(th,td){font-size:15px!important;padding:12px 10px;border-bottom:1px solid #dce4ee;white-space:normal}#stock-count-editor th{background:#f2f5fa}#stock-count-editor .stock-count-summary,#stock-count-editor .stock-count-maker{display:flex;gap:20px;margin:18px 0;font-size:14px;color:#53647a}#stock-count-editor .stock-count-actions{display:flex!important;gap:12px;flex-wrap:wrap;height:auto!important;padding:20px 0!important;background:#fff!important;border-top:1px solid #dce4ee}#stock-count-editor .stock-count-primary{background:#245ca7;color:#fff;border-color:#245ca7}
body[data-module=stock-count] :is(.module-banner,.module-summary,.module-flow-rail){display:none!important}
@media(max-width:767px){#stock-count-editor.stock-count-page{padding:16px 12px 30px!important;overflow:visible!important}#stock-count-editor :is(input,select,button){min-height:44px}#stock-count-editor .stock-count-form{grid-template-columns:minmax(0,1fr)!important}#stock-count-editor .stock-count-toolbar button{width:auto!important;white-space:normal!important}#stock-count-editor .stock-count-table-wrap{overflow:visible!important;border:0}#stock-count-editor .stock-count-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important}#stock-count-editor .stock-count-table>thead{display:none!important}#stock-count-editor .stock-count-table>tbody{display:block!important;width:100%!important}#stock-count-editor .stock-count-table>tbody>tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px;padding:18px 0;border-top:1px solid #cbd6e5;width:100%!important}#stock-count-editor .stock-count-table>tbody>tr>td{display:flex!important;flex-direction:column;gap:6px;width:auto!important;min-width:0!important;max-width:100%!important;padding:0!important;border:0;order:0!important;grid-area:auto!important;overflow-wrap:anywhere}#stock-count-editor .stock-count-table>tbody>tr>td::before{content:attr(data-count-label);font-size:14px;color:#53647a}#stock-count-editor .stock-count-table>tbody>tr>td:is([data-count-field="3"],[data-count-field="5"]){grid-column:1/-1!important}#stock-count-editor .stock-count-table>tbody>tr>td[data-erp-column-visible="false"]{display:none!important}#stock-count-editor .stock-count-table>tbody>tr>td input{width:100%!important;min-width:0!important}#stock-count-editor .stock-count-table>tfoot{display:block!important;width:100%!important}#stock-count-editor .stock-count-table>tfoot tr{display:flex!important;flex-wrap:wrap;gap:12px}#stock-count-editor .stock-count-table>tfoot td{display:block!important;width:auto!important;min-width:0!important}#stock-count-editor .stock-count-lot-detail{grid-template-columns:minmax(0,1fr)!important}#stock-count-editor .stock-count-lot-detail>td{grid-column:1/-1!important}#stock-count-editor .stock-count-lot-wrap{overflow:auto;max-width:100%}#stock-count-editor .stock-count-lot-table{min-width:620px!important}#stock-count-editor .stock-count-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}#stock-count-editor .stock-count-actions button{width:100%!important}}
}

@layer erp-reconstruction{
#stock-count-records-panel.stock-count-records-page{display:block!important;padding:24px;background:#fff;font:15px/1.6 "Microsoft YaHei",sans-serif;color:#213047;min-width:0}#stock-count-records-panel[hidden]{display:none!important}#stock-count-records-panel [hidden]{display:none!important}#stock-count-records-panel :is(input,select,button){font:15px/1.6 "Microsoft YaHei",sans-serif!important;min-height:44px!important;border:1px solid #bfcbdc;border-radius:5px;padding:7px 10px;background:#fff;color:inherit;max-width:100%}#stock-count-records-panel :is(.stock-count-record-filters,.stock-count-record-actions,.stock-count-record-pagination){display:flex!important;gap:12px;flex-wrap:wrap;align-items:end;padding:0!important;margin:0 0 20px!important;background:none!important;border:0!important}#stock-count-records-panel label{display:grid;gap:6px;font-size:14px;color:#53647a}#stock-count-records-panel .stock-count-record-table-wrap{overflow:auto;max-width:100%}#stock-count-records-panel table{width:100%;border-collapse:collapse;min-width:900px}#stock-count-records-panel :is(th,td){font-size:15px!important;padding:12px 10px;white-space:normal;border-bottom:1px solid #dce4ee}#stock-count-records-panel th{background:#f2f5fa}
@media(max-width:767px){#stock-count-records-panel.stock-count-records-page{padding:16px 12px}#stock-count-records-panel :is(input,select,button){min-height:44px}#stock-count-records-panel .stock-count-record-filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}#stock-count-records-panel .stock-count-record-filters>*{width:100%!important;min-width:0!important}#stock-count-records-panel .stock-count-record-table-wrap{overflow:visible}#stock-count-records-panel table,#stock-count-records-panel tbody{display:block!important;min-width:0!important;width:100%!important}#stock-count-records-panel thead{display:none!important}#stock-count-records-panel tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px;padding:16px 0;border-top:1px solid #cbd6e5;width:100%!important}#stock-count-records-panel td{display:flex!important;flex-direction:column;gap:6px;width:auto!important;min-width:0!important;max-width:100%!important;order:0!important;grid-area:auto!important;padding:0!important;border:0;overflow-wrap:anywhere}#stock-count-records-panel td::before{content:attr(data-count-record-label);font-size:14px;color:#53647a}#stock-count-records-panel td[data-count-record-field="1"]{display:none!important}#stock-count-records-panel td:is([data-count-record-field="6"],[data-count-record-field="10"],[data-count-record-field="11"]){grid-column:1/-1!important}}
}
@layer erp-reconstruction {
@media screen and (max-width:767px){
#stock-count-editor .stock-count-lot-wrap{overflow:visible!important}
#stock-count-editor .stock-count-lot-table{display:block!important;min-width:0!important;width:100%!important}
#stock-count-editor .stock-count-lot-table thead{display:none!important}
#stock-count-editor .stock-count-lot-table tbody{display:block!important}
#stock-count-editor .stock-count-lot-table tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:16px 0!important;border-top:1px solid #dce3ec!important;height:auto!important}
#stock-count-editor .stock-count-lot-table td{display:block!important;width:auto!important;min-width:0!important;padding:0!important;border:0!important;font-size:15px!important;white-space:normal!important;overflow-wrap:anywhere!important}
#stock-count-editor .stock-count-lot-table td:first-child{grid-column:1/-1!important}
#stock-count-editor .stock-count-lot-table td::before{content:attr(data-label)!important;display:block!important;font-size:14px!important;color:#53647a!important;margin-bottom:6px}
#stock-count-editor .stock-count-lot-table input{width:100%!important;min-width:0!important;min-height:44px!important;font-size:15px!important}
}
}
@layer erp-reconstruction { @media screen and (max-width:767px){
#stock-count-editor .stock-count-table>tbody>tr.stock-count-lot-detail{grid-template-columns:minmax(0,1fr)!important}
#stock-count-editor .stock-count-table>tbody>tr.stock-count-lot-detail>td{grid-column:1/-1!important;display:block!important;min-width:0!important;width:100%!important}
#stock-count-editor .stock-count-table>tbody>tr.stock-count-lot-detail>td::before{display:none!important}
#stock-count-editor .stock-count-lot-wrap{display:block!important;width:100%!important;min-width:0!important}
} }
@layer erp-reconstruction { @media screen and (max-width:767px){
#stock-count-records-panel .stock-count-lot-wrap{width:100%!important;min-width:0!important;overflow:visible!important}
#stock-count-records-panel .stock-count-lot-table{display:block!important;min-width:0!important;width:100%!important}
#stock-count-records-panel .stock-count-lot-table thead{display:none!important}
#stock-count-records-panel .stock-count-lot-table tbody{display:block!important}
#stock-count-records-panel .stock-count-lot-table tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:18px 0!important;height:auto!important;border-top:1px solid #dce3ec!important}
#stock-count-records-panel .stock-count-lot-table td{display:block!important;width:auto!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:15px!important;padding:0!important;border:0!important}
#stock-count-records-panel .stock-count-lot-table td:first-child{grid-column:1/-1!important}
#stock-count-records-panel .stock-count-lot-table td::before{content:attr(data-label)!important;display:block!important;font-size:14px!important;color:#53647a!important;margin-bottom:6px}
#stock-count-records-panel #stock-count-record-document-body>tr.stock-count-saved-lots{grid-template-columns:minmax(0,1fr)!important}
#stock-count-records-panel #stock-count-record-document-body>tr.stock-count-saved-lots>td{display:block!important;grid-column:1/-1!important;width:100%!important;min-width:0!important}
#stock-count-records-panel #stock-count-record-document-body>tr.stock-count-saved-lots>td::before{display:none!important}
#stock-count-editor :is(input,select,button),#stock-count-records-panel :is(input,select,button){min-height:44px!important}
#stock-count-editor button{height:auto!important;white-space:normal!important;text-overflow:clip!important}
    #stock-count-records-panel #stock-count-record-log-body > tr > td {
      height: auto !important; white-space: normal !important; overflow-wrap: anywhere !important;
      overflow: visible !important; min-width: 0 !important;
    }
    #stock-count-records-panel #stock-count-record-log-body > tr > td:last-child { grid-area: auto / 1 / auto / -1 !important; }
    /* Saved count lines keep their meaning when the table becomes phone cards. */
    #stock-count-record-lines .stock-count-record-lines-table { min-width: 0 !important; }
    body.pixel-replica #stock-count-records-panel #stock-count-record-lines .stock-count-record-lines-table tbody tr {
      display: grid !important; grid-template-columns: minmax(0,1fr) !important;
      gap: 8px !important; min-width: 0 !important;
    }
    #stock-count-record-lines .stock-count-record-lines-table tbody td {
      display: flex !important; flex-direction: column !important; align-items: flex-start !important;
      min-width: 0 !important; width: auto !important; height: auto !important;
      white-space: normal !important; overflow-wrap: anywhere !important; text-align: left !important;
    }
    body.pixel-replica #stock-count-records-panel #stock-count-record-lines .stock-count-record-lines-table tbody td:nth-child(-n+2) { grid-column: 1 / -1 !important; width: 100% !important; box-sizing: border-box !important; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td::before {
      display: block !important; position: static !important; margin-bottom: 4px;
      color: var(--ui-color-muted); font-size: 14px !important; font-weight: 400 !important;
    }
    #stock-count-record-lines .stock-count-record-lines-table tbody td:nth-child(1)::before { content: "商品编号"; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td:nth-child(2)::before { content: "商品名称"; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td:nth-child(3)::before { content: "规格"; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td:nth-child(4)::before { content: "基本单位"; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td:nth-child(5)::before { content: "账面数量"; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td:nth-child(6)::before { content: "实盘数量"; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td:nth-child(7)::before { content: "差异"; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td[colspan] { grid-column: 1 / -1 !important; }
    #stock-count-record-lines .stock-count-record-lines-table tbody td[colspan]::before { content: none; }
} }

@layer erp-reconstruction {
  #stock-count-editor .stock-count-scan-controls {
    display: grid;
    grid-template-columns: auto minmax(100px, auto) minmax(100px, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }
  .stock-count-scan-controls > label { font-size: 14px; color: #53647a; }
  #stock-count-scan-status { grid-column: 1 / -1; margin: 0; font-size: 14px; overflow-wrap: anywhere; }
  #stock-count-scan-status:empty { position: absolute; }
  @media (max-width: 767px) {
    #stock-count-editor .stock-count-scan-controls {
      grid-template-columns: minmax(0, 1fr) auto;
      width: 100%;
    }
    #stock-count-scan-mode { grid-column: 2; grid-row: 1; }
    #stock-count-editor .stock-count-metadata-fields { grid-template-columns: minmax(0,1fr); }
    #stock-count-editor .stock-count-main-tools>.stock-count-toolbar-spacer { display:none; }
    #stock-count-editor .stock-count-main-tools { gap:8px; }
    #stock-count-editor .stock-count-tool-group>div { display:grid;grid-template-columns:repeat(2,minmax(0,1fr)); }
    #stock-count-editor .stock-count-tool-group button { width:100%!important; }
  }
}

@layer erp-reconstruction {
  #stock-count-editor .stock-count-total-label { display: none; }
  @media (max-width: 767px) {
    #stock-count-editor .stock-count-table > tfoot > tr {
      display: grid !important;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }
    #stock-count-editor .stock-count-table > tfoot > tr > td:not(.stock-count-total-field) {
      display: none !important;
    }
    #stock-count-editor .stock-count-table > tfoot .stock-count-total-field {
      display: flex !important;
      flex-direction: column;
      gap: 4px;
      padding: 8px 6px !important;
      border: 0 !important;
      text-align: left !important;
      overflow-wrap: anywhere;
      font-variant-numeric: tabular-nums;
    }
    #stock-count-editor .stock-count-total-label { display: block; color: #53647a; font-size: 14px; }
  }
}
