.report-parts-catalog{margin:0 0 16px;max-width:650px}.report-part-search-row{display:flex;gap:8px}.report-part-search-row input{min-width:0;flex:1}.report-part-search-row button{flex:none}.report-part-results{max-height:270px;overflow:auto;border:1px solid #bfd3ed;background:white;border-radius:8px;margin-top:5px;padding:4px;overscroll-behavior:contain}.report-part-results[hidden]{display:none!important}.report-part-results>button{display:flex;width:100%;text-align:left;justify-content:space-between;background:white;color:#26466c;border:0;border-bottom:1px solid #e7edf6;border-radius:5px;padding:10px 12px;box-shadow:none}.report-part-results>button:hover,.report-part-results>button:focus-visible{background:#edf5ff}.report-part-results strong,.report-part-results small{display:block}.report-part-results small{font-size:12px;color:#637b99;margin-top:3px}.report-part-results .hint{padding:10px}.report-part-change{font-size:11px!important;min-height:27px!important;margin-top:4px;padding:3px 7px!important}#parts input[readonly]{background:#f3f7fc;color:#355476;cursor:default}.report-parts-catalog .hint{font-size:12px;line-height:1.7}
/* Fixed desktop layout; original media: (max-width:650px) */ @media (max-width:0px){.report-part-search-row{flex-wrap:wrap}.report-part-search-row input{flex-basis:100%}}

/* Screen-only stock approval stays beside the report parts, outside the printed document. */
html body .report-document-paper .report-stock-approval{border:1px solid #cfdfef;border-radius:9px;background:#f5f9fe;padding:12px 14px;margin:14px 0 0;font:13px/1.6 Tahoma,'Leelawadee UI','Segoe UI',sans-serif;color:#2c4d70}
.report-stock-heading{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}.report-stock-heading>strong{font-size:14px;font-weight:600}.report-stock-status{display:inline-flex;font-size:12px;padding:3px 9px;border:1px solid #e7d6b3;border-radius:20px;color:#916620;background:#fff6e6}.report-stock-status[data-status="approved_waiting_connection"]{background:#edf5ff;border-color:#c3d8ef;color:#376795}.report-stock-status[data-status="rejected"],.report-stock-status[data-status="cancelled"]{background:#f6eeee;border-color:#e7cece;color:#955c5c}
html body .report-document-paper .report-stock-approval p{font:12px/1.6 Tahoma,'Leelawadee UI','Segoe UI',sans-serif;margin:7px 0 0;color:#647b94}.report-stock-actor,.report-stock-note{overflow-wrap:anywhere;white-space:pre-wrap}.report-stock-controls{display:flex;align-items:flex-end;gap:10px;margin-top:10px}.report-stock-controls label{flex:1;margin:0;min-width:120px;font-size:12px}.report-stock-controls input{margin-top:4px;height:35px;min-height:35px;padding:6px 9px;font-size:12px;background:white}.report-stock-actions{display:flex;gap:7px;flex:none}
html body .report-document-paper .report-stock-approval button{font-size:12px;min-height:35px;padding:6px 12px;white-space:nowrap}.report-stock-error:not(:empty){margin:9px 0;color:#a63f3f;font-size:12px;line-height:1.7}.report-stock-error:empty{display:none}
/* Fixed desktop layout; original media: (max-width:650px) */ @media (max-width:0px){.report-stock-controls{align-items:stretch;flex-direction:column}.report-stock-actions{justify-content:flex-end}.report-stock-heading{align-items:flex-start;flex-direction:column}}
@media print{html body .report-document-paper .report-stock-approval{display:none!important}}
.report-stock-approval{scroll-margin-block:24px}.report-stock-approval:focus-visible{outline:2px solid #4895d7;outline-offset:3px}
/* Section 04: focused parts cards and shared searchable picker. */
.rp-workspace .rp-picker{max-width:none !important;margin-bottom:16px !important;}.rp-workspace-heading{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:24px !important;}.rp-workspace-heading strong{font-size:16px !important;color:#24456b !important;}.rp-workspace-heading [data-part-count]{font-size:12px !important;font-weight:normal !important;background:#eaf3ff !important;border-radius:16px !important;padding:4px 10px !important;margin-left:10px !important;}.rp-workspace-heading p{font-size:13px !important;color:#64758a !important;margin:7px 0 !important;}.rp-workspace .rp-add-trigger{min-width:360px !important;background:linear-gradient(110deg,#2087d5,#304cae) !important;color:white !important;border:0 !important;font-size:15px !important;font-weight:bold !important;padding:12px 20px !important;}.rp-workspace #add-part[hidden],.rp-workspace [hidden]{display:none!important;}.rp-empty{padding:32px !important;text-align:center !important;background:#f7faff !important;border:1px dashed #bed2ed !important;border-radius:10px !important;color:#4f6681 !important;}.rp-empty p{font-size:13px !important;line-height:1.8 !important;}.rp-workspace .rp-cards-wrap{overflow:visible !important;}.rp-workspace .rp-cards{display:block !important;min-width:0 !important;width:100% !important;border:0 !important;}.rp-cards thead{display:none !important;}.rp-cards tbody{display:grid !important;gap:14px !important;}.rp-workspace .rp-cards .rp-part-card{display:grid !important;grid-template-columns:140px 100px 1fr 44px !important;grid-template-areas:'product product product remove' 'code code code remove' 'quantity unit billing billing' 'reason reason reason reason' 'toggle toggle toggle toggle' 'old old new new' !important;gap:10px 14px !important;border:1px solid #cbdcf0 !important;border-radius:10px !important;background:white !important;padding:18px !important;}.rp-workspace .rp-cards td{display:block !important;width:auto!important;min-width:0!important;border:0 !important;padding:0 !important;background:transparent !important;}.rp-product{grid-area:product !important;display:flex!important;align-items:center !important;gap:12px !important;}.rp-code{grid-area:code !important;display:flex!important;align-items:center !important;gap:12px !important;padding-left:60px!important;}.rp-quantity{grid-area:quantity !important;}.rp-unit{grid-area:unit !important;}.rp-billing{grid-area:billing !important;}.rp-free-reason{grid-area:reason !important;}.rp-old-serial{grid-area:old !important;}.rp-new-serial{grid-area:new !important;}.rp-remove{grid-area:remove !important;}.rp-serial-toggle{grid-area:toggle !important;}.rp-workspace .rp-cards label,.rp-billing-choices>span{display:block !important;font-size:12px !important;color:#66768c !important;margin:0 0 6px !important;}.rp-workspace #parts input{width:100% !important;min-width:0 !important;box-sizing:border-box !important;font:15px Tahoma,sans-serif !important;}.rp-workspace #parts .rp-product input,.rp-workspace #parts .rp-code input{border:0 !important;background:transparent !important;box-shadow:none !important;padding:0 !important;height:auto !important;min-height:0 !important;color:#223e60 !important;}.rp-workspace #parts .rp-product input{font-weight:bold !important;}.rp-workspace #parts .rp-code input{width:220px !important;font-size:12px !important;color:#718199 !important;}.rp-part-photo{width:48px !important;height:48px !important;flex:none !important;display:grid !important;place-items:center !important;background:#f0f5fb !important;border-radius:6px !important;color:#9aaec5 !important;}.rp-part-photo img{width:100% !important;height:100% !important;object-fit:contain !important;}.rp-workspace .rp-change,.rp-workspace .rp-serial-toggle button{padding:4px 0 !important;min-height:0 !important;background:transparent !important;border:0 !important;box-shadow:none !important;color:#2478bd !important;font-size:12px !important;}.rp-billing-choices>div{display:flex !important;gap:0 !important;}.rp-workspace .rp-billing-choices button{min-width:100px !important;border:1px solid #cbdcf0 !important;background:white !important;color:#61748c !important;box-shadow:none !important;border-radius:0 !important;font-size:14px !important;padding:8px 20px !important;}.rp-billing-choices button:first-child{border-radius:6px 0 0 6px !important;}.rp-billing-choices button:last-child{border-radius:0 6px 6px 0 !important;}.rp-workspace .rp-billing-choices button[aria-pressed=true]{background:#e6f2ff !important;color:#146bb0 !important;border-color:#70aee0 !important;font-weight:bold !important;}.rp-workspace .rp-serial-toggle{border-top:1px solid #edf1f7 !important;padding-top:8px !important;}.rp-workspace .rp-serial-toggle button::before{content:'＋ ' !important;}.rp-workspace .rp-serial-toggle button[aria-expanded=true]::before{content:'− ' !important;}.rp-selection-menu.qp-report-menu{padding:0 !important;border:1px solid #c5daf0 !important;border-radius:8px !important;background:white !important;box-shadow:0 8px 25px #18385b24 !important;font:15px/22px Tahoma,sans-serif !important;overflow:hidden !important;}.rp-selection-menu:popover-open{display:flex !important;flex-direction:column !important;}.rp-search{padding:8px !important;flex:none !important;}.rp-selection-menu .rp-search input{height:40px !important;min-height:40px !important;padding:0 10px !important;width:100% !important;border:1px solid #bed2e7 !important;border-radius:5px !important;background:white !important;font:15px Tahoma,sans-serif !important;}.rp-search input::placeholder{color:#7c8da4 !important;}.rp-search input:focus{outline:2px solid #6caaff !important;outline-offset:1px !important;}.rp-results{overflow:auto !important;min-height:0 !important;flex:1 !important;overscroll-behavior:contain !important;}.rp-selection-menu .rp-option{display:flex !important;align-items:center !important;gap:10px !important;text-align:left !important;width:100% !important;padding:10px 12px !important;border:0 !important;border-radius:0 !important;background:white !important;color:#253b55 !important;box-shadow:none !important;white-space:normal !important;font:15px/22px Tahoma,sans-serif !important;}.rp-selection-menu .rp-option:hover,.rp-selection-menu .rp-option:focus{background:#eaf3ff !important;outline:0 !important;}.rp-option-photo{flex:none !important;width:38px !important;height:38px !important;background:#f4f7fb !important;display:grid !important;place-items:center !important;}.rp-option-photo img{width:100% !important;height:100% !important;object-fit:contain !important;}.rp-option-text{flex:1 !important;min-width:0 !important;overflow-wrap:anywhere !important;}.rp-option-text strong{font-weight:normal !important;display:block !important;}.rp-option-text small{display:block !important;color:#788597 !important;font-size:12px !important;}.rp-option-stock{flex:none !important;font-size:12px !important;color:#788597 !important;text-align:right !important;}.rp-option-stock b{display:block !important;color:#335273 !important;font-size:14px !important;}.rp-option-stock b.negative{color:#d94747 !important;}.rp-picker-footer{flex:none !important;padding:8px !important;border-top:1px solid #dbe8f6 !important;}.rp-selection-menu .rp-picker-footer button{width:100% !important;background:linear-gradient(110deg,#2087d5,#304cae) !important;color:white !important;font:bold 15px Tahoma,sans-serif !important;padding:12px !important;border:0 !important;}.rp-menu-state{padding:18px !important;color:#687c94 !important;font-size:13px !important;}.rp-menu-state button{display:block !important;margin-top:10px !important;}
.rp-workspace .rp-cards td[hidden]{display:none!important}.rp-workspace .rp-cards td.rp-product,.rp-workspace .rp-cards td.rp-code{display:flex!important}.rp-workspace .rp-cards td.rp-code{padding-left:60px!important}.rp-workspace #parts input[type=number]{appearance:textfield!important;-moz-appearance:textfield!important}.rp-workspace #parts input::-webkit-inner-spin-button,.rp-workspace #parts input::-webkit-outer-spin-button{appearance:none!important;margin:0!important}
.rp-workspace .rp-workspace-heading,.rp-workspace .rp-cards-wrap,.rp-workspace .rp-empty{max-width:780px!important}.rp-workspace .rp-add-trigger{min-width:300px!important}.rp-workspace .rp-cards{width:100%!important}.rp-workspace .rp-remove{display:flex!important;justify-content:flex-end!important}
html body #report-form table.parts.rp-cards{min-width:0!important;width:100%!important;max-width:780px!important}html body #report-form .rp-cards td.rp-remove{display:flex!important;justify-content:flex-end!important}

/* Let section 04 use the existing form width and wrap full product names. */
html body #report-form .rp-workspace-heading,html body #report-form .rp-cards-wrap,html body #report-form .rp-empty{max-width:none!important;width:100%!important;box-sizing:border-box!important}
html body #report-form table.parts.rp-cards{max-width:none!important;width:100%!important;min-width:0!important}
html body #report-form .rp-product-title{display:block!important;flex:1!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;font: bold 15px/1.6 Tahoma,sans-serif!important;color:#223e60!important}
html body #report-form .rp-cards [data-part="description"][hidden]{display:none!important}

/* Serial fields stay visible to the right of quantity and billing. */
html body #report-form .rp-cards .rp-part-card{grid-template-columns:140px 100px 220px minmax(180px,1fr) minmax(180px,1fr) 44px!important;grid-template-areas:"product product product product product remove" "code code code code code remove" "quantity unit billing old new new" "reason reason reason reason reason reason"!important}
html body #report-form .rp-cards td.rp-old-serial,html body #report-form .rp-cards td.rp-new-serial{display:block!important}

/* One framed item: square photo left, identity above controls on the right. */
html body #report-form .rp-cards .rp-part-card.rp-inline-layout{grid-template-columns:120px 110px 80px 200px minmax(180px,1fr) minmax(180px,1fr) 32px!important;grid-template-areas:"photo product product product product product remove" "photo quantity unit billing old new new" "reason reason reason reason reason reason reason"!important;column-gap:14px!important;row-gap:14px!important;padding:18px!important;align-items:start!important}
html body #report-form .rp-inline-layout .rp-photo-cell{grid-area:photo!important;align-self:center!important}
html body #report-form .rp-inline-layout .rp-part-photo{width:120px!important;height:120px!important;border-radius:8px!important}
html body #report-form .rp-inline-layout td.rp-product{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:7px!important}
html body #report-form .rp-inline-layout .rp-code-line{display:flex!important;align-items:center!important;gap:18px!important}
html body #report-form .rp-inline-layout .rp-code-line input{border:0!important;background:transparent!important;padding:0!important;height:auto!important;min-height:0!important;width:200px!important;box-shadow:none!important;font-size:12px!important;color:#718199!important}
html body #report-form .rp-inline-layout .rp-billing-choices button{min-width:90px!important;padding:8px 16px!important}
html body #report-form .rp-picker{margin:14px 0 0!important}
html body #report-form .rp-add-frame{box-sizing:border-box!important;width:100%!important;min-height:100px!important;display:flex!important;align-items:center!important;justify-content:center!important;border:1px dashed #a9c7e7!important;border-radius:10px!important;background:#f7faff!important;padding:20px!important}
html body #report-form .rp-add-frame .rp-add-trigger{min-width:240px!important}
html body #report-form .rp-inline-layout td.rp-code[hidden]{display:none!important}
/* Compact spacing while preserving the two-row parts layout. */
html body #report-form .rp-cards .rp-part-card.rp-inline-layout{grid-template-columns:96px 110px 80px 200px minmax(180px,1fr) minmax(180px,1fr) 32px!important;padding:12px!important;column-gap:12px!important;row-gap:6px!important}
html body #report-form .rp-inline-layout .rp-part-photo{width:96px!important;height:96px!important}
html body #report-form .rp-inline-layout td.rp-product{gap:2px!important}
html body #report-form .rp-inline-layout .rp-product-title{font:bold 18px/1.35 Tahoma,sans-serif!important;color:#183b65!important}
html body #report-form .rp-inline-layout .rp-code-line{gap:12px!important}
html body #report-form .rp-inline-layout label,html body #report-form .rp-inline-layout .rp-billing-choices>span{margin:0 0 4px!important;line-height:16px!important}
html body #report-form .rp-inline-layout input:not([data-part="number"]):not([data-part="description"]){height:34px!important;min-height:34px!important;padding:5px 10px!important}
html body #report-form .rp-inline-layout .rp-billing-choices button{height:34px!important;min-height:34px!important;padding:5px 16px!important}
html body #report-form .rp-cards tbody{gap:10px!important}
html body #report-form .rp-add-frame{min-height:70px!important;padding:12px!important}
html body #report-form .rp-add-frame .rp-add-trigger{min-height:38px!important;padding:8px 18px!important}
html body #report-form .rp-picker{margin-top:10px!important}

html body #report-form .rp-add-frame{justify-content:flex-start!important}

/* Mirror quotation product results, including stock and unit columns. */
.rp-selection-menu .rp-search,.rp-selection-menu .rp-picker-footer{padding:9px!important}
.rp-selection-menu .rp-search input{padding:8px 10px!important;background:#f7faff!important;border:1px solid #c9d9ee!important;border-radius:8px!important;box-shadow:inset 0 1px 3px #345c7910!important;font:400 15px/22px Tahoma,sans-serif!important;color:#182b43!important}
.rp-selection-menu .rp-search input:focus{border-color:#6c9ee9!important;outline:2px solid #6c9ee9!important;outline-offset:3px!important}
.rp-selection-menu .rp-search input::placeholder{color:#8a98ab!important;opacity:1!important}
.rp-selection-menu .rp-option{display:grid!important;grid-template-columns:48px minmax(0,1fr) 138px 50px!important;column-gap:10px!important;padding:10px 12px!important;color:#000!important}
.rp-selection-menu .rp-option-photo{width:48px!important;height:48px!important;border-radius:5px!important;background:#f0f4f9!important;overflow:hidden!important}
.rp-selection-menu .rp-option-text small{margin-top:4px!important;color:#888!important;font-size:12px!important;line-height:22px!important}
.rp-selection-menu .rp-option-stock{display:flex!important;align-items:center!important;gap:10px!important;width:138px!important;font:400 12px/22px Tahoma,sans-serif!important;color:#000!important}
.rp-selection-menu .rp-option-stock>span{flex:0 0 64px!important;text-align:left!important}
.rp-selection-menu .rp-option-stock>b{flex:1 1 0!important;text-align:center!important;font:400 12px/22px Tahoma,sans-serif!important;color:#000!important}
.rp-selection-menu .rp-option-stock>b.negative{color:#d9363e!important}
.rp-selection-menu .rp-option-unit{color:#888!important;text-align:right!important;font:400 15px/22px Tahoma,sans-serif!important}

@media screen{.report-document-paper .rp-original-print-table{display:none!important}}
html body #app .report-document-paper .report-parts-view{display:grid;gap:10px;padding:12px;background:white}
html body #app .report-document-paper .rp-view-card{display:grid;grid-template-columns:28px 96px minmax(0,1fr);grid-template-areas:"number photo identity" "number photo fields" "reason reason reason";gap:6px 12px;padding:12px;border:1px solid #cbdcf0;border-radius:10px;background:#fff;text-align:left;break-inside:avoid}
html body #app .report-document-paper .rp-view-number{grid-area:number;display:grid;place-items:center;align-self:start;width:28px;height:28px;border-radius:6px;background:#e8f2ff;color:#2565a2;font:bold 14px/1 Tahoma,sans-serif}
html body #app .report-document-paper .rp-view-photo{grid-area:photo;align-self:center;width:96px;height:96px;display:grid;place-items:center;background:#f0f5fb;border-radius:8px;overflow:hidden;color:#7c8ca0;font:12px Tahoma,sans-serif}
html body #app .report-document-paper .rp-view-photo img{display:block;width:100%;height:100%;object-fit:contain}
html body #app .report-document-paper .rp-view-identity{grid-area:identity;min-width:0}
html body #app .report-document-paper .rp-view-identity strong{display:block;font:bold 18px/1.35 Tahoma,sans-serif;color:#183b65;white-space:normal;overflow-wrap:anywhere}
html body #app .report-document-paper .rp-view-identity small{display:block;font:12px/20px Tahoma,sans-serif;color:#718199;margin-top:2px}
html body #app .report-document-paper .rp-view-fields{grid-area:fields;display:grid;grid-template-columns:90px 70px 100px minmax(100px,1fr) minmax(100px,1fr);gap:12px;min-width:0}
html body #app .report-document-paper .rp-view-field>span{display:block;font:12px/16px Tahoma,sans-serif;color:#66768c;margin-bottom:4px}
html body #app .report-document-paper .rp-view-field>div{box-sizing:border-box;min-height:34px;padding:6px 10px;border:1px solid #d6e2f0;border-radius:7px;background:#f7faff;font:14px/20px Tahoma,sans-serif;color:#223e60;overflow-wrap:anywhere;white-space:pre-wrap}
html body #app .report-document-paper .rp-view-reason{grid-area:reason}
@media print{html body #app .report-document-paper .report-parts-view{display:none!important}}
.report-job-state.waiting_po{background:#fff3df;color:#b96c13}
.report-job-state.sales_done{background:#eaf4d8;color:#648e30}
