/* Independent customer price list and retained protected price editor. */
@layer erp-reconstruction {
  @media screen {
    body[data-module=customer-price-book] :is(.module-banner,.module-summary,.module-flow-rail,.business-workspace) { display: none !important; }
    #customer-price-book-panel {
      --cp-line: #d7e1ef;
      --cp-ink: #213047;
      --cp-muted: #53647a;
      --cp-blue: #245ca7;
      min-width: 0 !important;
      color: var(--cp-ink) !important;
      background: #fff !important;
      font: 15px/1.6 "Microsoft YaHei",sans-serif !important;
      font-variant-numeric: tabular-nums;
    }
    #customer-price-book-panel:not([hidden]) {
      display: flex !important;
      flex-direction: column !important;
      min-height: 0 !important;
      height: auto !important;
      padding: 20px 24px 24px !important;
      overflow-x: hidden !important;
      overflow-y: auto !important;
      scroll-padding-block: 12px;
    }
    #customer-price-book-panel[hidden],
    #customer-price-book-panel [hidden],
    #customer-price-book-panel .customer-price-empty[hidden],
    #customer-price-modal[hidden],
    #customer-price-modal [hidden] { display: none !important; }
    #customer-price-book-panel *,#customer-price-modal * { box-sizing: border-box !important; }
    #customer-price-book-panel .customer-price-heading h2 {margin:0 0 24px;font-size:22px!important;line-height:1.4;color:var(--cp-ink)!important;}
    #customer-price-book-panel .customer-price-workspace {
      display: flex !important;
      flex: 1 1 auto;
      flex-direction: column !important;
      grid-template-rows: none !important;
      gap: 0 !important;
      min-width: 0 !important;
      min-height: 0 !important;
      height: auto !important;
      padding: 0 !important;
      overflow: visible !important;
    }
    #customer-price-book-panel :is(button,input,select),#customer-price-modal :is(button,input,select) {
      min-width: 0 !important;
      max-width: 100% !important;
      min-height: 44px !important;
      height: auto !important;
      font: 15px/1.5 "Microsoft YaHei",sans-serif !important;
    }
    #customer-price-book-panel button,#customer-price-modal button { padding: 8px 12px !important; border:1px solid #b8c9df!important;border-radius:5px!important;background:#fff!important;color:#254c80!important; }
    #customer-price-book-panel :is(#customer-price-add,#customer-price-search){background:#245ca7!important;border-color:#245ca7!important;color:#fff!important}
    #customer-price-book-panel button:disabled { cursor: not-allowed; }
    #customer-price-book-panel :focus-visible,#customer-price-modal :focus-visible { outline: 3px solid #6394df !important; outline-offset: 2px !important; }
    #customer-price-book-panel input { caret-color: var(--cp-blue); }
    #customer-price-book-panel input::placeholder { color: #586b85; opacity: 1; }
    #customer-price-book-panel ::selection { color: #173b7a; background: #dceaff; }
    #customer-price-book-panel .customer-price-tabs {
      display: flex !important;
      flex: 0 0 auto;
      flex-wrap: wrap !important;
      align-items: center !important;
      gap: 8px !important;
      min-height: 0 !important;
      margin: 0 0 16px !important;
      padding: 0 0 12px !important;
      border: 0 !important;
      border-bottom: 1px solid var(--cp-line) !important;
      border-radius: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
    }
    #customer-price-book-panel .customer-price-tabs button {
      flex: 0 1 auto;
      width: auto !important;
      color: var(--cp-muted) !important;
      border: 1px solid transparent !important;
      border-radius: 5px !important;
      box-shadow: none !important;
      white-space: normal !important;
    }
    #customer-price-book-panel .customer-price-tabs button.active { color: #195aab !important; border-color: #b7cae3 !important; background: #edf3fd !important; }
    #customer-price-book-panel .customer-price-filters {
      display: flex !important;
      flex: 0 0 auto;
      flex-wrap: wrap !important;
      align-items: flex-end !important;
      gap: 12px !important;
      min-height: 0 !important;
      height: auto !important;
      margin: 0 !important;
      padding: 0 0 16px !important;
      border: 0 !important;
      border-bottom: 1px solid var(--cp-line) !important;
      border-radius: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
    }
    #customer-price-book-panel .customer-price-filters > label {
      display: flex !important;
      flex: 1 1 170px !important;
      flex-direction: column !important;
      align-items: stretch !important;
      gap: 6px !important;
      width: auto !important;
      min-width: 0 !important;
      margin: 0 !important;
      color: var(--cp-muted) !important;
      font-size: 14px !important;
      line-height: 1.5 !important;
      white-space: normal !important;
    }
    #customer-price-book-panel .customer-price-filters > label > span { white-space: normal !important; }
    #customer-price-book-panel .customer-price-filters > .customer-price-keyword { flex: 2 1 300px !important; justify-content: flex-end; align-self: stretch; }
    #customer-price-book-panel .customer-price-keyword > i { display: none !important; }
    #customer-price-book-panel .customer-price-filters :is(input,select) {
      width: 100% !important;
      padding: 9px 10px !important;
      color: var(--cp-ink) !important;
      background: #fff !important;
      border: 1px solid #b8c9df !important;
      border-radius: 5px !important;
      box-shadow: none !important;
    }
    #customer-price-book-panel #customer-price-search { flex: 0 0 auto; align-self: flex-end !important; min-width: 72px !important; color: #fff !important; background: var(--cp-blue) !important; border-color: var(--cp-blue) !important; box-shadow: none !important; }
    #customer-price-book-panel .customer-price-mobile-summary { display: none !important; }
    #customer-price-book-panel .customer-price-actions {
      display: flex !important;
      flex: 0 0 auto;
      flex-direction: row !important;
      flex-wrap: wrap !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 12px !important;
      min-height: 0 !important;
      height: auto !important;
      margin: 0 !important;
      padding: 12px 0 !important;
      border: 0 !important;
      border-bottom: 1px solid var(--cp-line) !important;
      background: #fff !important;
    }
    #customer-price-book-panel .customer-price-actions > div { display: flex !important; flex: 0 1 auto; flex-wrap: wrap !important; align-items: center !important; gap: 8px !important; width: auto !important; min-width: 0 !important; }
    #customer-price-book-panel #customer-price-batch-action { padding: 8px 28px 8px 10px !important; }
    #customer-price-book-panel #customer-price-settings { min-width: 44px !important; }
    #customer-price-book-panel .customer-price-results {
      position: relative !important;
      flex: 1 1 auto;
      min-width: 0 !important;
      min-height: 180px !important;
      height: auto !important;
      max-height: none !important;
      overflow: auto !important;
      scrollbar-color: #93abc9 #edf3fa;
      border: 1px solid var(--cp-line) !important;
    }
    #customer-price-book-panel .customer-price-table { width: max(100%,1810px) !important; border-collapse: collapse !important; table-layout: auto !important; font-size: 15px !important; }
    #customer-price-book-panel .customer-price-table :is(th,td) { height: auto !important; padding: 10px !important; font-size: 15px !important; line-height: 1.6 !important; border:0!important;border-bottom:1px solid var(--cp-line)!important;color:var(--cp-ink)!important;text-align:left!important; }
    #customer-price-book-panel .customer-price-table th { white-space: normal !important; text-overflow: clip !important;background:#edf3fc!important;font-size:14px!important;font-weight:600!important; }
    #customer-price-book-panel #customer-price-table-body tr>[data-erp-column-visible="false"],#customer-price-book-panel .customer-price-table th[data-erp-column-visible="false"]{display:none!important}
    #customer-price-book-panel .customer-price-table .price-row-disclosure{display:none!important}
    #customer-price-book-panel.compact .customer-price-table td{padding-block:8px!important}
    #customer-price-book-panel .customer-price-empty {
      position: relative !important;
      inset: auto !important;
      display: grid !important;
      place-content: center !important;
      justify-items: center !important;
      gap: 8px !important;
      min-height: 180px !important;
      height: auto !important;
      padding: 24px !important;
      text-align: center !important;
      white-space: normal !important;
      color: var(--cp-muted) !important;
    }
    #customer-price-book-panel .customer-price-empty strong { color: var(--cp-ink) !important; font-size: 15px !important; }
    #customer-price-book-panel .customer-price-empty span { display: grid !important; justify-items: center !important; gap: 12px !important; max-width: 100% !important; color: var(--cp-muted) !important; font-size: 14px !important; line-height: 1.6 !important; overflow-wrap: anywhere; }
    #customer-price-book-panel .customer-price-results:has(> .customer-price-empty:not([hidden])) > table { display: none !important; }
    #customer-price-book-panel .customer-price-pagination {
      display: flex !important;
      flex: 0 0 auto;
      flex-wrap: wrap !important;
      align-items: center !important;
      justify-content: flex-start !important;
      gap: 8px 12px !important;
      min-width: 0 !important;
      height: auto !important;
      margin: 0 !important;
      padding: 16px 0 0 !important;
      position: static !important;
      color: var(--cp-muted) !important;
      font-size: 14px !important;
      white-space: normal !important;
    }
    #customer-price-book-panel .customer-price-pagination > :is(span,label,div):not([hidden]) { display: flex !important; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
    #customer-price-book-panel #customer-price-selection-summary { margin-right: auto !important; }
    #customer-price-book-panel .customer-price-pagination > div { flex-wrap: wrap; }
    #customer-price-book-panel .customer-price-pagination button { min-width: 44px !important; width: auto !important; }
    #customer-price-book-panel #customer-price-page-current { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 4px 8px; font-size: 14px; }
    #customer-price-book-panel #customer-price-page-jump { width: 72px !important; padding: 8px !important; }
    #customer-price-book-panel #customer-price-page-size { width: 76px !important; padding: 8px !important; }

    /* Existing customer price editor: retained local behavior and dimensions. */
    #customer-price-modal { padding: 16px !important; max-height: 100dvh !important; overflow: auto !important; }
    #customer-price-modal form { width: min(640px,100%) !important; max-height: calc(100dvh - 32px) !important; overflow: auto !important; display: grid !important; gap: 18px !important; padding: 24px !important; color: #213047 !important; background: #fff !important; }
    #customer-price-modal header { position: static !important; height: auto !important; background: #fff !important; display: flex !important; gap: 12px !important; }
    #customer-price-modal header strong { font-size: 24px !important; line-height: 1.4 !important; }
    #customer-price-modal header button { margin-left: auto !important; min-width: 44px !important; flex-shrink: 0 !important; }
    #customer-price-modal label { display: grid !important; gap: 6px !important; font-size: 14px !important; min-width: 0 !important; }
    #customer-price-modal label :is(input,select) { width: 100% !important; min-width: 0 !important; padding: 10px !important; }
    #customer-price-modal .checkbox-field { display: flex !important; align-items: center !important; gap: 12px !important; }
    #customer-price-modal input[type=checkbox] { width: 24px !important; height: 24px !important; min-height: 24px !important; }
    #customer-price-modal footer { position: static !important; height: auto !important; display: flex !important; justify-content: flex-end !important; gap: 12px !important; padding-top: 18px !important; background: #fff !important; }

    @media (max-width: 767px) {
      #customer-price-book-panel:not([hidden]) { padding: 16px 12px 24px !important; }
      #customer-price-book-panel .customer-price-workspace { flex: 0 0 auto; }
      #customer-price-book-panel .customer-price-tabs { margin-bottom: 12px !important; }
      #customer-price-book-panel .customer-price-filters { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px 12px !important; }
      #customer-price-book-panel .customer-price-filters > label { width: 100% !important; }
      #customer-price-book-panel .customer-price-filters > .customer-price-keyword,
      #customer-price-book-panel .customer-price-filters > label:nth-child(2),
      #customer-price-book-panel #customer-price-search { grid-column: 1 / -1 !important; }
      #customer-price-book-panel #customer-price-search { width: 100% !important; }
      #customer-price-book-panel .customer-price-mobile-summary { display: grid !important; flex: 0 0 auto; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 12px !important; min-width: 0 !important; height: auto !important; padding: 12px 0 !important; border-bottom: 1px solid var(--cp-line) !important; }
      #customer-price-book-panel .customer-price-mobile-summary span { display: grid !important; grid-template-columns: minmax(0,1fr) !important; grid-template-rows: none !important; gap: 4px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
      #customer-price-book-panel .customer-price-mobile-summary i { display: none !important; }
      #customer-price-book-panel .customer-price-mobile-summary em { color: var(--cp-muted) !important; font: 14px/1.5 "Microsoft YaHei",sans-serif !important; white-space: normal !important; }
      #customer-price-book-panel .customer-price-mobile-summary strong { color: var(--cp-ink) !important; font-size: 17px !important; line-height: 1.5 !important; }
      #customer-price-book-panel .customer-price-actions { align-items: stretch !important; }
      #customer-price-book-panel .customer-price-actions > div { flex: 1 1 100%; }
      #customer-price-book-panel .customer-price-actions > div:first-child > :is(button,select):not([hidden]) { flex: 1 1 140px; }
      #customer-price-book-panel .customer-price-actions > div:last-child { justify-content: flex-start; }
      #customer-price-book-panel .customer-price-results { flex: 0 0 auto; min-height: 0 !important; overflow: visible !important; border: 0 !important; }
      #customer-price-book-panel .customer-price-table{width:100%!important;max-width:100%!important;min-width:0!important;--customer-price-field-width:auto;--customer-price-field-min-width:0px}
      #customer-price-book-panel table,#customer-price-book-panel tbody { display: block !important; width: 100% !important; min-width: 0 !important; border: 0 !important; }
      #customer-price-book-panel thead { display: none !important; }
      #customer-price-book-panel #customer-price-table-body tr { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 4px 12px !important; padding: 16px 0 !important; height: auto !important; border: 0 !important; border-bottom: 1px solid var(--cp-line) !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; }
      #customer-price-book-panel #customer-price-table-body td { position: static !important; display: grid !important; grid-template-columns: minmax(100px,.9fr) minmax(0,1.1fr) !important; grid-column: 1 / -1 !important; grid-row: auto !important; gap: 12px !important; width: auto !important; max-width: none !important; min-width: 0 !important; height: auto !important; padding: 6px 0 !important; border: 0 !important; color: var(--cp-ink) !important; font-weight: 400 !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere !important; text-align: left !important; }
      #customer-price-book-panel #customer-price-table-body td::before { content: attr(data-label) !important; color: var(--cp-muted) !important; font-size: 14px !important; }
      #customer-price-book-panel #customer-price-table-body td:first-child { display: none !important; }
      #customer-price-book-panel #customer-price-table-body input[type=checkbox] { width: 24px !important; height: 24px !important; min-height: 24px !important; justify-self: start !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-secondary { display: none !important; }
      #customer-price-book-panel #customer-price-table-body tr.price-row-expanded > .price-row-secondary { display: grid !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-product { display: block !important; padding: 0 !important; font-size: 18px !important; font-weight: 600 !important; line-height: 1.55 !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-product::before { display: none !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-partner { display: block !important; padding: 0 0 6px !important; color: var(--cp-muted) !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-partner::before { content: attr(data-label) ' · ' !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-value { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; padding: 10px 0 !important; border-block: 1px solid #e0e7ef !important; font-weight: 600 !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-selection { display: flex !important; align-items: center !important; min-height: 44px !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-selection::before { content: "选择" !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-disclosure { display: flex !important; justify-content: flex-end !important; min-height: 44px !important; }
      #customer-price-book-panel #customer-price-table-body .price-row-disclosure::before { display: none !important; }
      #customer-price-book-panel .customer-price-pagination { gap: 12px !important; }
      #customer-price-book-panel #customer-price-selection-summary { flex: 1 1 100%; margin: 0 !important; }
      #customer-price-book-panel #customer-price-page-summary { flex: 1 1 100%; }
      #customer-price-book-panel .customer-price-pagination > div { flex: 1 1 100%; }
      #customer-price-book-panel #customer-price-table-body tr>td[data-erp-column-visible="false"],#customer-price-book-panel #customer-price-table-body tr.price-row-expanded>td[data-erp-column-visible="false"]{display:none!important}
      #customer-price-modal { padding: 12px !important; }
      #customer-price-modal form { padding: 20px 16px !important; max-height: calc(100dvh - 24px) !important; }
    }
  }

@layer erp-reconstruction {
@media print{
  body.print-current-panel:has(#customer-price-book-panel.print-current-target),
  body.print-current-panel:has(#customer-price-book-panel.print-current-target) :is(.app-shell,.main,#module-page){display:block!important;position:static!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;margin:0!important;padding:0!important;transform:none!important}
  body.print-current-panel:has(#customer-price-book-panel.print-current-target) .main>:not(#module-page),body.print-current-panel:has(#customer-price-book-panel.print-current-target) #module-page>:not(#customer-price-book-panel){display:none!important}
  body.print-current-panel:has(#customer-price-book-panel.print-current-target) .app-shell>:not(.main){display:none!important}
  body.print-current-panel #customer-price-book-panel.print-current-target{display:block!important;position:static!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;padding:0!important;background:#fff!important}
  body.print-current-panel #customer-price-book-panel.print-current-target :is(.customer-price-tabs,.customer-price-filters,.customer-price-actions,.customer-price-pagination,.customer-price-mobile-summary){display:none!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-results{display:block!important;width:100%!important;min-width:0!important;height:auto!important;max-height:none!important;overflow:visible!important;border:0!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-table{display:table!important;width:100%!important;min-width:0!important;max-width:none!important;table-layout:auto!important;font-size:10px!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-table thead{display:table-header-group!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-table tbody{display:table-row-group!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-table tr{display:table-row!important;break-inside:avoid!important;page-break-inside:avoid!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-table :is(th,td){display:table-cell!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;padding:4px!important;border:1px solid #cbd6e5!important;font:10px/1.35 "Microsoft YaHei",sans-serif!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;vertical-align:top!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-table th{font-size:9px!important;background:#edf3fc!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-heading{display:block!important;margin:0 0 8px!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .customer-price-heading h2{margin:0!important;font:18px/1.4 "Microsoft YaHei",sans-serif!important;color:#172033!important}
  body.print-current-panel #customer-price-book-panel.print-current-target [data-customer-price-field="price"] button{display:inline!important;visibility:visible!important;min-height:0!important;height:auto!important;padding:0!important;border:0!important;background:none!important;font:inherit!important;color:inherit!important}
  body.print-current-panel #customer-price-book-panel.print-current-target .price-row-disclosure{display:none!important}
}
}

}
