/* Additive reference card UI; financial screens and existing printed documents are untouched. */
#pw33 .pr54-open{display:inline-flex;align-items:center;gap:6px;background:#f6fbff;border:1px solid #adcbdc;color:#164d6b;padding:5px 8px;min-height:34px;font-size:11px;margin-top:6px;max-width:100%}
#pw33 .pr54-open img{width:42px;height:38px;object-fit:contain;background:white;border-radius:3px}#pw33 .pr54-open>span:first-child{font-size:18px}
#packingReferenceDialog{box-sizing:border-box;width:min(1220px,96vw);max-width:96vw;max-height:94dvh;padding:0;border:1px solid #b6ccda;border-radius:12px;box-shadow:0 20px 90px #0a253c55;color:#213f53;background:white;font:14px Arial,Tahoma,sans-serif;overflow:hidden}
#packingReferenceDialog::backdrop{background:#102c46a8}#packingReferenceDialog *{box-sizing:border-box;min-width:0}
#packingReferenceDialog[open]{display:flex;flex-direction:column}
#packingReferenceDialog>header{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;padding:18px 22px;background:#edf6fb;border-bottom:1px solid #ccdde8;flex-shrink:0}
#packingReferenceDialog>header small{font-size:10px;letter-spacing:1px;color:#38728f}#packingReferenceDialog h2{font-size:21px;margin:5px 0;color:#193d55;line-height:1.5}#packingReferenceDialog .pr54-current{font-size:12px;line-height:1.7;max-width:960px;margin:4px 0 0;color:#46687f}
#packingReferenceDialog button{border:1px solid #bfd1df;color:#215e7d;background:white;padding:8px 12px;border-radius:6px;cursor:pointer;min-height:36px;font:600 13px Arial,Tahoma,sans-serif;max-width:100%;overflow-wrap:anywhere}
#packingReferenceDialog button:disabled{opacity:.48;cursor:not-allowed}#packingReferenceDialog button:hover:not(:disabled){background:#eaf5fb}#packingReferenceDialog>header>button{font-size:23px;min-width:38px;padding:4px}
.pr54-tabs{display:flex;gap:4px;flex-wrap:wrap;background:#f8fbfd;border-bottom:1px solid #dbe6ed;padding:8px 18px;flex-shrink:0}
#packingReferenceDialog .pr54-tabs button{border-color:transparent;background:transparent;flex:1;min-height:42px}.pr54-tabs button.active{background:#117b71!important;color:white!important}
.pr54-content{padding:18px 22px;overflow:auto;flex:1;min-height:100px;overscroll-behavior:contain}.pr54-content p{line-height:1.7;font-size:12px;color:#4f6e82;overflow-wrap:anywhere}
.pr54-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 22px;border-top:1px solid #ccdce6;background:#f5fafc;flex-shrink:0}.pr54-footer b{font-size:12px}.pr54-footer p{font-size:12px;line-height:1.5;max-width:800px;margin:4px 0;color:#406b7c}
#packingReferenceDialog .pr54-footer button{background:#117b71;color:white;border-color:#117b71;min-width:180px;min-height:42px}
#packingReferenceDialog input,#packingReferenceDialog textarea,#packingReferenceDialog select{display:block;max-width:100%;width:100%;border:1px solid #bbd0df;border-radius:5px;color:#203e54;background:white;padding:9px 10px;font:14px Arial,Tahoma,sans-serif;min-height:40px}
#packingReferenceDialog input[type=number]{direction:ltr;text-align:center;font-variant-numeric:tabular-nums}#packingReferenceDialog input:focus,#packingReferenceDialog textarea:focus,#packingReferenceDialog select:focus,#packingReferenceDialog button:focus-visible{outline:3px solid #9bd1e7;outline-offset:1px}
#packingReferenceDialog label{display:grid;gap:7px;font-size:12px;line-height:1.5;font-weight:650;color:#34576e}.pr54-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:16px 0}.pr54-explain{padding:12px 15px;background:#eef8f6;border:1px solid #b9ded5;line-height:1.8;font-size:13px;border-radius:6px}
.pr54-carton-figure{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:12px;border:1px solid #bdd2df;border-radius:8px;padding:20px;background:linear-gradient(120deg,#e9f5fb,#f7fbf5);text-align:center;direction:ltr;color:#164f6b;margin:20px 0}.pr54-carton-figure div{font-size:19px;padding:15px 6px;background:white;border:1px solid #cbdde8;box-shadow:4px 5px 0 #bfd5e25c}.pr54-carton-figure b{color:#b45309}.pr54-carton-figure strong{font-size:16px}.pr54-note-label{margin:15px 0}
.pr54-photo-tools{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.pr54-photo-tools>select{width:200px!important}.pr54-photo-tools>input[type=text]{flex:1;min-width:200px!important}.pr54-photo-tools>label{max-width:110px}.pr54-photo-tools .pr54-upload{display:inline-flex!important;align-items:center;justify-content:center;padding:11px;background:#117b71;color:white!important;border-radius:5px;max-width:none;cursor:pointer;min-height:40px}
.pr54-upload input[type=file]{position:absolute;width:1px!important;height:1px!important;min-height:0!important;clip-path:inset(50%);padding:0!important;overflow:hidden}
.pr54-photo-view{display:flex;justify-content:center;max-height:55vh;overflow:auto;background:#e9f0f4;border:1px solid #bed1df;border-radius:8px;padding:8px}.pr54-photo-view svg{display:block;height:52vh;max-width:100%;touch-action:none;background:white}.pr54-photo-view text,.pr54-photo-view [data-pr54-ann]{cursor:move}.pr54-photo-hint{margin:9px 0}
.pr54-photo-thumbs{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}.pr54-photo-thumbs button{padding:3px!important;border-width:2px!important}.pr54-photo-thumbs button.active{border-color:#117b71!important}.pr54-photo-thumbs img{width:74px;height:64px;object-fit:contain}
.pr54-annotation-list{display:grid;gap:7px}.pr54-annotation-list>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.pr54-empty{min-height:240px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#f5f9fc;border:1px dashed #9ebfd3;border-radius:8px;text-align:center;padding:20px;margin-top:14px}.pr54-empty>strong{font-size:50px;color:#5190aa}.pr54-empty h3{font-size:19px;margin:10px}.pr54-empty p{max-width:550px}
.pr54-section-bar{background:#eff7fb;padding:14px;border:1px solid #c5dbe8;border-radius:8px}.pr54-section-bar>div:first-child{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}.pr54-section-bar p{margin:0;font-weight:700}.pr54-section-bar .pr54-fields{margin-bottom:0}
.pr54-groups{display:grid;gap:16px;margin:18px 0}.pr54-group{border:1px solid #cfdee7;border-inline-start:5px solid var(--pr54-color);border-radius:7px;padding:14px}.pr54-group>header{display:flex;justify-content:space-between;align-items:center;gap:12px}.pr54-group>header b{font-size:15px}.pr54-group>header button{font-size:11px!important;color:#a32a30!important;min-height:30px!important}.pr54-group-result{background:#f5f9fc;padding:9px;border-radius:4px;font-weight:750;direction:ltr}.pr54-group summary{cursor:pointer;color:#4d7085;font-size:12px}.pr54-add-groups{display:flex;gap:12px;flex-wrap:wrap}
.pr54-summary{display:grid;grid-template-columns:1fr 1fr 1.5fr;border:1px solid #b9d2dc;background:#edf7f8;padding:14px;gap:15px;margin:17px 0 10px}.pr54-summary span{font-size:12px;color:#426779}.pr54-summary b{display:block;font-size:21px;color:#124e60;margin-top:8px;overflow-wrap:anywhere}.pr54-summary span:last-child b{font-size:16px}.pr54-fit{font-size:13px;line-height:1.7;padding:10px 13px;border-radius:5px}.pr54-fit.ok{background:#edf9f2;color:#19603d;border:1px solid #afd6bd}.pr54-fit.warn{background:#fff7e8;color:#8c5008;border:1px solid #ebce99}.pr54-stack-preview{display:block;width:100%;height:300px;margin:16px auto;max-width:620px;background:#f9fcfe}
@media(max-width:760px){#packingReferenceDialog{width:98vw;max-width:98vw;max-height:96dvh}#packingReferenceDialog>header{padding:12px}#packingReferenceDialog h2{font-size:16px}.pr54-content{padding:12px}.pr54-tabs{padding:6px;gap:2px}#packingReferenceDialog .pr54-tabs button{font-size:11px;padding:7px}.pr54-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.pr54-carton-figure{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}.pr54-photo-tools>select{width:calc(50% - 6px)!important}.pr54-photo-tools>input[type=text]{flex-basis:100%}.pr54-footer{padding:10px;flex-wrap:wrap;gap:8px}#packingReferenceDialog .pr54-footer button{width:100%}.pr54-summary{grid-template-columns:1fr 1fr}.pr54-summary span:last-child{grid-column:1/-1}.pr54-group>header{align-items:flex-start}.pr54-group>header button{max-width:120px!important}.pr54-group .pr54-fields{grid-template-columns:1fr 1fr}.pr54-photo-view{max-height:48vh}.pr54-photo-view svg{height:45vh}}
@media print{#packingReferenceDialog,[data-pr54-open],[data-pr54-column]{display:none!important}}

.pr54-zoom-label{display:flex!important;align-items:center;gap:12px;max-width:480px;margin:8px 0}.pr54-zoom-label input{min-height:22px!important;padding:0!important;flex:1}

.pr54-stack-legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:9px;margin:12px 0}.pr54-stack-legend>div{border:1px solid #cedde7;border-inline-start:4px solid var(--pr54-color);border-radius:5px;padding:10px;background:#f8fbfd}.pr54-stack-legend b,.pr54-stack-legend span{display:block;line-height:1.7}.pr54-stack-legend span{color:#345a70;font-size:13px}
