.purchase-preview-dialog { box-sizing:border-box; width:min(1760px,calc(100vw - 24px)); max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); padding:0; border:1px solid #bbc6d7; border-radius:10px; color:#182638; background:#fff; font:14px/1.55 "Microsoft YaHei",sans-serif; }
.purchase-preview-dialog.purchase-preview-material-tracking { width:80vw; min-width:min(1040px,calc(100vw - 24px)); max-width:min(1320px,calc(100vw - 24px)); }
body.mobile-preview.mobile-tablet .purchase-preview-dialog.purchase-preview-material-tracking { width:88vw; min-width:min(1100px,calc(100vw - 16px)); max-width:min(1450px,calc(100vw - 16px)); }
.purchase-preview-dialog.purchase-preview-production-scheduling { width:min(1080px,calc(100vw - 24px)); height:fit-content; }
.purchase-preview-dialog.purchase-preview-r103-workshop { width:min(1080px,calc(100vw - 24px)); }
.purchase-preview-dialog::backdrop { background:rgba(20,35,55,.48); }
.purchase-preview-dialog[open] { display:flex; flex-direction:column; }
.purchase-preview-toolbar { display:flex; align-items:center; justify-content:space-between; padding:10px 18px; border-bottom:1px solid #ccd5e1; }
.purchase-preview-dialog button { font:inherit; cursor:pointer; color:#31568c; border:1px solid #bacbe2; border-radius:5px; background:white; padding:6px 16px; }
.purchase-preview-toolbar button { min-width:40px; font-size:24px; padding:0 8px; }
.purchase-preview-body { min-height:0; overflow:auto; padding:16px; }
.purchase-preview-dialog>footer { padding:10px 18px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid #ccd5e1; }
.purchase-preview-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.purchase-preview-tabs button[aria-pressed="true"] { background:#e9f0fe; border-color:#4269b3; }
.purchase-order-sheet,.purchase-material-detail { box-sizing:border-box; width:60%; min-width:min(100%,840px); max-width:1056px; margin-left:auto; margin-right:auto; }
.purchase-preview-material-tracking :is(.purchase-order-sheet,.purchase-material-detail) { width:100%; min-width:0; max-width:none; }
.purchase-preview-production-scheduling .purchase-order-sheet,
.purchase-preview-r103-workshop .purchase-order-sheet { width:100%; min-width:0; max-width:none; }
.purchase-preview-production-scheduling .purchase-preview-body { flex:0 1 auto; }
.purchase-document-heading { position:relative; min-height:64px; text-align:center; margin:5px 0 24px; }
.purchase-document-heading img { position:absolute; top:8px; left:0; width:140px; height:48px; object-fit:contain; }
.purchase-document-heading strong { font-size:18px; }
.purchase-document-heading h2 { margin:2px 0; font-size:24px; color:inherit; }
.purchase-document-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px 24px; margin:0 0 18px; }
.purchase-document-fields>div { display:flex; min-width:0; gap:8px; }
.purchase-document-fields>.purchase-supplier-name { grid-column:1; grid-row:3; }
.purchase-document-fields>.purchase-sales-orders { grid-column:2; grid-row:3; }
.purchase-document-fields dt { flex:none; min-width:84px; }
.purchase-document-fields dd { margin:0; overflow-wrap:anywhere; }
.purchase-order-sheet table,.purchase-material-detail table { width:100%; min-width:0; border-collapse:collapse; table-layout:fixed; font:inherit; font-variant-numeric:tabular-nums; }
.purchase-document-table-wrap,.purchase-material-table-wrap { width:100%; overflow:auto; }
.purchase-order-sheet :is(th,td) { border:1px solid #778491; padding:8px 5px; text-align:center; white-space:normal; overflow-wrap:anywhere; }
.purchase-order-sheet th { background:#f5f7fa; }
.purchase-document-table th:nth-child(1) { width:4%; }
.purchase-document-table th:nth-child(2) { width:12%; }
.purchase-document-table th:nth-child(3) { width:25%; }
.purchase-document-table th:nth-child(4) { width:5%; }
.purchase-document-table th:nth-child(5) { width:9%; }
.purchase-document-table th:nth-child(6),.purchase-document-table th:nth-child(7) { width:10%; }
.purchase-document-table th:nth-child(8) { width:12%; }
.purchase-selected-line { background:#f0f6ff; }
.purchase-total { display:flex; justify-content:space-between; padding:10px 16px; border:1px solid #778491; border-top:0; }
.purchase-material-detail { margin-top:0; margin-bottom:20px; }
.purchase-material-heading { display:flex; align-items:baseline; gap:14px; margin:0 0 6px; }
.purchase-material-heading strong { font-size:16px; }
.purchase-material-heading span { color:#60728a; font-size:12px; }
.purchase-material-detail :is(th,td) { height:40px; padding:4px 3px; border:1px solid #aab7c6; text-align:center; white-space:normal; overflow-wrap:anywhere; }
.purchase-material-detail th { height:40px; background:#eef1f4; font-size:12px; white-space:normal; }
.purchase-preview-material-tracking .purchase-material-detail table { font-size:12px; }
.purchase-preview-material-tracking .purchase-material-detail :is(th,td) { padding-left:1px; padding-right:1px; }
.purchase-preview-material-tracking .purchase-material-detail th { white-space:nowrap; overflow-wrap:normal; word-break:keep-all; }
.purchase-preview-material-tracking .purchase-material-detail td:nth-child(2) { line-height:18px; white-space:normal; overflow-wrap:anywhere; text-wrap:balance; }
.purchase-preview-material-tracking .purchase-material-detail :is(th,td):is(:nth-child(1),:nth-child(6),:nth-child(8),:nth-child(10),:nth-child(12)) { white-space:nowrap; overflow-wrap:normal; word-break:keep-all; }
.purchase-selected-material { background:#d9e9fb; }
.purchase-merge { margin-top:22px; }
.purchase-merge h3 { margin:0; font-size:16px; }
.purchase-merge p { margin:5px 0 10px; }
.purchase-allocation-notice { padding:8px 12px; background:#fff7e6; color:#725320; }
.purchase-loading { padding:28px; text-align:center; }
.purchase-document-cards { display:none; }
@media(max-width:640px) {
 .purchase-preview-dialog { width:calc(100vw - 8px); max-width:calc(100vw - 8px); max-height:calc(100dvh - 8px); font-size:12px; }
 .purchase-preview-dialog.purchase-preview-production-scheduling,
 .purchase-preview-dialog.purchase-preview-r103-workshop { width:calc(100vw - 8px); max-width:calc(100vw - 8px); }
 .purchase-preview-body { padding:10px; }
 .purchase-document-heading { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
 .purchase-document-heading img { position:static; width:76px; height:38px; }
 .purchase-document-heading strong { font-size:13px; }
 .purchase-document-heading h2 { font-size:20px; }
 .purchase-document-fields { grid-template-columns:1fr; gap:7px; }
 .purchase-document-fields>.purchase-supplier-name,.purchase-document-fields>.purchase-sales-orders { grid-column:auto; grid-row:auto; }
 .purchase-order-sheet .purchase-document-table { min-width:900px; }
 .purchase-preview-r103-workshop .purchase-document-table { display:none; min-width:0; }
 .purchase-preview-r103-workshop .purchase-document-cards { display:grid; gap:10px; }
 .purchase-preview-r103-workshop .purchase-document-cards>section { display:grid; grid-template-columns:1fr 1fr; border:1px solid #9aaabb; }
 .purchase-preview-r103-workshop .purchase-document-cards section>div { display:flex; flex-direction:column; gap:4px; padding:8px; border:1px solid #dce3ec; overflow-wrap:anywhere; }
 .purchase-preview-r103-workshop .purchase-document-cards b { font-weight:normal; color:#5a6b80; }
 .purchase-preview-r103-workshop .purchase-document-cards .purchase-card-name { grid-column:1/-1; }
 .purchase-material-detail table { min-width:1500px; }
 .purchase-material-heading { align-items:flex-start; flex-direction:column; gap:1px; }
 .purchase-total { margin-top:10px; border-top:1px solid #778491; }
}
@media(min-width:641px) and (max-width:900px) {
 .purchase-material-detail table { min-width:1500px; }
}

.purchase-preview-dialog [data-purchase-more] { text-align:left; color:#566b85; font-size:12px; }
.purchase-preview-dialog>footer button { flex:none; }
.purchase-price-history-trigger { cursor:pointer; color:#244f98; font-weight:700; text-decoration:underline dotted; text-underline-offset:3px; }
.purchase-price-history-trigger:focus { outline:2px solid #496fbd; outline-offset:-2px; }
.purchase-price-history-dialog { box-sizing:border-box; width:min(980px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); padding:0; border:1px solid #aab9cf; border-radius:8px; color:#182638; background:#fff; font:12px/1.5 "Microsoft YaHei",sans-serif; }
.purchase-price-history-dialog::backdrop { background:rgba(20,35,55,.38); }
.purchase-price-history-dialog[open] { display:flex; flex-direction:column; }
.purchase-price-history-toolbar,.purchase-price-history-dialog>footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px; border-bottom:1px solid #ccd5e1; }
.purchase-price-history-toolbar { color:#fff; background:#3f5f9a; }
.purchase-price-history-toolbar strong { font-size:18px; }
.purchase-price-history-dialog>footer { border-top:1px solid #ccd5e1; border-bottom:0; color:#566b85; }
.purchase-price-history-dialog button { min-height:28px; padding:4px 14px; border:1px solid #9fb5d8; border-radius:5px; color:#274c8d; background:#fff; font:inherit; font-weight:700; cursor:pointer; }
.purchase-price-history-toolbar button { min-width:38px; padding:0 8px; color:#fff; border-color:#d8e1f0; background:transparent; font-size:22px; }
.purchase-price-history-scope { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 16px 6px; }
.purchase-price-history-scope>[data-price-history-identity] { color:#334f78; font-weight:700; }
.purchase-price-history-scope label { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.purchase-price-history-tabs { display:flex; gap:0; padding:0 16px; border-bottom:1px solid #9fb1c9; }
.purchase-price-history-tabs button { border-radius:5px 5px 0 0; border-bottom:0; }
.purchase-price-history-tabs button[aria-pressed="true"] { color:#173d7d; background:#edf3fd; box-shadow:inset 0 3px #496fbd; }
.purchase-price-history-body { min-height:230px; overflow:auto; padding:10px 16px 14px; }
.purchase-price-history-table-wrap { max-height:min(52dvh,520px); overflow:auto; border:1px solid #aab7c6; }
.purchase-price-history-table-wrap table { width:100%; min-width:760px; border-collapse:collapse; table-layout:auto; font:inherit; font-variant-numeric:tabular-nums; }
.purchase-price-history-table-wrap th,.purchase-price-history-table-wrap td { height:40px; box-sizing:border-box; padding:6px 8px; border:1px solid #b8c3d2; text-align:center; white-space:nowrap; }
.purchase-price-history-table-wrap th { position:sticky; top:0; z-index:1; height:40px; color:#425777; background:#e9eef5; }
.purchase-price-history-table-wrap tbody tr:nth-child(even) { background:#f8fafc; }
.purchase-price-history-message { margin:70px 0; text-align:center; color:#566b85; }
.purchase-price-history-error { color:#a23b32; }
@media(max-width:640px) {
 .purchase-price-history-dialog { width:calc(100vw - 8px); max-width:calc(100vw - 8px); max-height:calc(100dvh - 8px); }
 .purchase-price-history-scope { align-items:flex-start; flex-direction:column; gap:6px; }
 .purchase-price-history-body { min-height:200px; padding:8px; }
 .purchase-price-history-table-wrap table { min-width:760px; }
 .purchase-price-history-toolbar,.purchase-price-history-dialog>footer { padding:8px 10px; }
}
