#production-order-import { border:1px solid #cbdcf2; background:#f4f8ff; border-radius:12px; padding:16px; color:#213954; }
#add-order-modal { z-index:200; }
#production-order-import.recognized .pdf-drop,#production-order-import.recognized .pdf-import-heading p { display:none; }
#production-order-import.recognized .pdf-import-actions { margin-top:8px; }
#production-order-import.recognized { padding:12px; }
#add-order-modal:has(.recognized) #add-order-form-modal > :not([hidden]) ~ :not([hidden]) { margin-top:12px; }
#add-order-modal:has(.recognized) #add-order-form-modal > .grid { gap:12px; }
#add-order-modal:has(.recognized) #add-order-form-modal > .grid input,#add-order-modal:has(.recognized) #add-order-form-modal > .grid select,#add-order-modal:has(.recognized) #modal-order-number { padding:8px 10px; }
#production-order-import[hidden], #production-component-library[hidden], #component-pdf-process-note[hidden] { display:none; }
#add-order-modal:has(#production-pdf-results .pdf-product) .viewport-modal-panel { max-width:850px; }
.pdf-import-heading,.pdf-import-actions,.pdf-list-heading,.pdf-library-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.pdf-import-heading p,.pdf-library-heading p { font-size:12px; color:#61758d; margin:4px 0 0; }
.pdf-button { border:1px solid #bbcee7; border-radius:8px; background:white; color:#1659a7; padding:8px 12px; font-size:13px; font-weight:600; cursor:pointer; flex-shrink:0; }
.pdf-button:hover { background:#eaf2ff; }
.pdf-button.primary { background:#1466e7; color:white; border-color:#1466e7; }
.pdf-button:disabled { opacity:.5; cursor:wait; }
.pdf-drop { width:100%; border:2px dashed #b7cde9; border-radius:10px; padding:20px 10px; margin:16px 0 10px; background:white; color:#284f7f; cursor:pointer; font-size:14px; }
.pdf-drop span { display:block; margin-top:6px; font-size:12px; color:#72849a; }
.pdf-drop.drag-over { background:#dcecff; border-color:#1466e7; }
#production-pdf-filename { font-size:12px; overflow-wrap:anywhere; flex:1; }
#production-pdf-status { font-size:13px; color:#325f90; margin-top:10px; }
.pdf-warnings { background:#fff7df; color:#84561a; border-radius:8px; padding:10px 12px 10px 28px; font-size:12px; line-height:1.7; list-style:disc; margin:12px 0; }
.pdf-list-heading { font-size:14px; margin:18px 0 10px; }
.pdf-list-heading span { font-size:12px; color:#6c7e92; }
.pdf-product-list { display:grid; gap:12px; }
.pdf-product { display:grid; grid-template-columns:92px minmax(0,1fr); gap:14px; background:white; padding:12px; border:1px solid #dce5f0; border-radius:10px; }
.pdf-product-photo img { width:92px; height:92px; object-fit:contain; background:#f3f5f8; border-radius:8px; }
.pdf-product-photo small { display:block; text-align:center; color:#748399; margin-top:6px; }
.pdf-product-fields { display:grid; gap:8px; }
.pdf-basic-heading { font-weight:700; font-size:14px; color:#506982; border-bottom:1px solid #dde6f1; padding-bottom:8px; }
.pdf-note-wrap { position:relative; display:inline-block; width:fit-content; }
.pdf-note-icon { font-size:12px; color:#3473bd; background:#edf5ff; border:1px solid #cfe0f8; border-radius:6px; padding:3px 7px; cursor:pointer; }
.pdf-note-popover { display:none; position:fixed; z-index:220; width:360px; max-width:calc(100vw - 24px); max-height:260px; overflow:auto; white-space:pre-wrap; background:#fff; color:#34465c; border:1px solid #b9cce6; border-radius:9px; padding:12px; font-size:12px; line-height:1.7; box-shadow:0 8px 26px #17325226; }
.pdf-note-wrap:hover .pdf-note-popover,.pdf-note-wrap:focus-within .pdf-note-popover,.pdf-note-wrap.note-open .pdf-note-popover { display:block; }
.pdf-product-fields .pdf-note-wrap { justify-self:end; }
.pdf-library-card .pdf-note-wrap { margin:6px 0; }
.dark .pdf-note-popover { background:#25364b; color:#dce9fa; }
.pdf-product-fields label { font-size:12px; color:#5b6c81; display:block; }
.pdf-product-fields input,.pdf-product-fields textarea { display:block; width:100%; background:white; border:1px solid #ccdaea; border-radius:6px; padding:6px 8px; color:#243951; font-size:13px; margin-top:3px; }
.pdf-product-pair { display:grid; grid-template-columns:minmax(0,1fr) 110px; gap:10px; }
.pdf-order-notes { margin-top:12px; font-size:13px; }
.pdf-order-notes summary,.pdf-library-card summary { cursor:pointer; color:#32639a; }
.pdf-order-notes p,.pdf-library-card details p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; padding:8px 0; }
#production-component-library { max-width:1100px; margin:0 auto 20px; background:#f4f8ff; border:1px solid #cbdcf2; border-radius:14px; padding:18px; }
.pdf-library-heading strong { font-size:17px; }
.pdf-library-heading strong span { font-size:12px; border-radius:10px; background:#dfebff; padding:2px 8px; color:#1466e7; }
.pdf-library-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; margin-top:14px; }
.pdf-library-card { display:grid; grid-template-columns:80px minmax(0,1fr); align-items:start; gap:12px; padding:12px; background:white; border:1px solid #dce5f0; border-radius:10px; }
.pdf-library-card img { width:80px; height:80px; object-fit:contain; border-radius:6px; }
.pdf-library-card strong { font-size:14px; overflow-wrap:anywhere; }
.pdf-library-card small { display:block; color:#65758a; margin:5px 0; font-size:12px; }
.pdf-library-card details { font-size:12px; margin:8px 0; }
.pdf-library-card .pdf-button { width:100%; }
.pdf-no-image { font-size:12px; color:#65758a; padding:20px 0; }
#component-pdf-process-note { font-size:12px; color:#426891; }
.component-import-remarks { width:100%; font-size:12px; color:#64748b; }
.component-import-remarks textarea { display:block; width:100%; margin-top:4px; padding:8px; border:1px solid #cbd5e1; border-radius:8px; background:transparent; }
.component-source-remarks { margin:8px 0; padding:8px; font-size:12px; color:#5c6d80; background:#f3f7fb; border-radius:8px; white-space:pre-wrap; }
.dark #production-order-import,.dark #production-component-library { background:#182738; border-color:#3a506b; color:#deebfc; }
.dark .pdf-product,.dark .pdf-library-card,.dark .pdf-drop,.dark .pdf-product-fields input,.dark .pdf-product-fields textarea,.dark .pdf-button { background:#243447; color:#dce9fa; border-color:#435a78; }
@media(max-width:600px) { .pdf-import-heading,.pdf-library-heading,.pdf-list-heading { align-items:flex-start; flex-direction:column; } .pdf-import-actions { flex-wrap:wrap; } #production-pdf-filename { flex-basis:100%; } .pdf-product { grid-template-columns:65px minmax(0,1fr); gap:8px; padding:8px; } .pdf-product-photo img { width:65px; height:65px; } .pdf-product-pair { grid-template-columns:minmax(0,1fr); } .pdf-library-grid { grid-template-columns:minmax(0,1fr); } }
