/* Slip preview + print only */\n#print-root{display:none}\n:is(#paper,.print-paper){font:14px 'Times New Roman',serif;color:black;padding:20px}:is(#paper,.print-paper) h1{font-size:23px;text-align:center}:is(#paper,.print-paper) .letterhead{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #c21d32;margin-bottom:25px;padding-bottom:15px}:is(#paper,.print-paper) table th,:is(#paper,.print-paper) table td{border:1px solid black;color:black;padding:6px;background:white}:is(#paper,.print-paper) p{color:black;margin:9px 0}:is(#paper,.print-paper) .sign{text-align:right;margin:25px 30px 80px;font-style:italic}@media(max-width:1100px){aside{width:185px}main{margin-left:185px;padding:0 20px}.workspace{grid-template-columns:280px minmax(0,1fr)}.fields{grid-template-columns:1fr}}@media(max-width:800px){aside{display:none}main{margin:0;padding:0 16px}.workspace{grid-template-columns:1fr}.steps{gap:12px}.top{align-items:start}h1{font-size:25px}.actions{flex-wrap:wrap}}@media print{@page{size:A4;margin:12mm}body{background:white}body>aside,body>main,#close{display:none!important}dialog{position:static;display:block;border:0;width:100%;max-width:none;padding:0}dialog::backdrop{display:none}:is(#paper,.print-paper){padding:0}:is(#paper,.print-paper) table{break-inside:auto}:is(#paper,.print-paper) tr{break-inside:avoid}}

.steel-fields{display:grid;gap:8px;min-width:200px;margin-bottom:10px}.steel-fields select{width:100%;border:1px solid #dce1e7;border-radius:5px;padding:8px;background:white;color:#26313e;font:inherit}.steel-fields label input,.steel-fields label select{margin-top:4px}.other-note{margin-top:10px}.other-note[hidden]{display:none}#items td{vertical-align:top}#items th:nth-child(2){min-width:220px}

.source-line{display:block;max-width:250px;white-space:normal;color:#7e8792;font-size:10px;margin-top:6px;line-height:1.5}

.paste-hint{background:#eef4f8;border:1px solid #d4e2ed;border-radius:8px;padding:15px;margin-bottom:14px;line-height:1.6}.paste-hint>b{display:block;color:#24465d;font-size:14px}.paste-hint>span{display:block;color:#63788b;font-size:12px;margin:5px 0 12px}.auto-paste{display:flex;align-items:flex-start;gap:6px;font-size:11px}.auto-paste input{margin-top:4px}

.row-warning{display:block;background:#fff6db;color:#826422;font-size:11px;line-height:1.5;padding:8px;margin:8px 0;max-width:260px}#request-group{width:100%;padding:12px;margin:0 0 18px;border:1px solid #d4a844;border-radius:6px;font:inherit;background:#fffaf0}#request-group[hidden]{display:none}

#companyChoice{width:100%;margin-top:7px;border:1px solid #dce1e7;border-radius:5px;padding:9px;background:white;color:#26313e;font:inherit}#companyName[hidden]{display:none}#items th:first-child{min-width:220px}

.customer-note-label{margin-top:20px}.attachment-hint{font-size:11px;color:#667786}.customer-note{white-space:normal;overflow-wrap:anywhere}.source-attachment{break-before:page;page-break-before:always;padding-top:8mm}.source-attachment h2{font:700 18px Arial}.source-attachment p{font-size:11px}.source-attachment img{display:block;max-width:100%;max-height:245mm;width:auto;height:auto;object-fit:contain;margin:12px auto}.source-attachment{display:block}

#items td select[data-k="lot"]{min-width:155px;width:100%;padding:8px;border:1px solid #dce1e7;border-radius:5px;background:white;color:#26313e;font:inherit}

/* Chữ lớn, độ tương phản rõ và bản in độc lập với hộp thoại xem trước. */
body{font-size:18px;color:#17212b}button{font-size:18px;min-height:46px}label{font-size:17px;color:#243342}input,textarea,select{font-size:20px!important;line-height:1.4}h2{font-size:21px}.notice,#status,#validation,.attachment-hint{font-size:16px;color:#3d4650}.steps span,.badge,.row button,.wide,#add,details,.drop span,.paste-hint>span,.auto-paste{font-size:16px}.paste-hint>b{font-size:20px}.source-line,.row-warning{font-size:15px;color:#4d5661}.source-line{max-width:360px}.row-warning{max-width:360px}.steel-fields{min-width:260px}#items th{font-size:18px;font-weight:700;color:#202b35}#items td input{font-size:20px!important;min-width:95px;padding:10px!important}#items th:first-child{min-width:300px}#items th:nth-child(2){min-width:110px}#items select[data-k="lot"]{min-width:180px}#photo{max-height:350px}.workspace{grid-template-columns:350px minmax(0,1fr)}.confirm input{width:22px;height:22px;flex-shrink:0}.card .tablewrap{margin-bottom:12px}
@media(max-width:1650px){.workspace{grid-template-columns:1fr}.source #photo{display:block;margin:12px 0}.source textarea{min-height:130px}}
:is(#paper,.print-paper){font:18px Arial,sans-serif;line-height:1.45;color:#000}:is(#paper,.print-paper) h1{font-size:26px}:is(#paper,.print-paper) table{font-size:18px}:is(#paper,.print-paper) table th{font-weight:700}:is(#paper,.print-paper) table th,:is(#paper,.print-paper) table td{padding:10px 7px}:is(#paper,.print-paper) td:first-child{min-width:0}:is(#paper,.print-paper) .sign{margin:24px 20px 35px}
#print-root{display:none}
.source-attachment img{width:100%;max-width:100%;height:auto;max-height:235mm;object-fit:contain}.source-attachment p{font-size:15px}.source-attachment h2{font-size:20px}
@media print{
 @page{size:A4 portrait;margin:10mm}
 html,body{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;background:white!important;margin:0!important;padding:0!important}
 body> :not(#print-root){display:none!important}
 #print-root{display:block!important;position:static!important;width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important;margin:0!important;padding:0!important}
 #print-root .print-paper{font:14pt Arial,sans-serif!important;line-height:1.35;color:#000;padding:0!important;overflow:visible!important;max-height:none!important}
 #print-root table{width:100%;font:14pt Arial,sans-serif!important;table-layout:fixed;border-collapse:collapse}
 #print-root th,#print-root td{font-size:14pt!important;padding:8px 6px!important;min-width:0!important;color:#000!important;overflow-wrap:anywhere;border:1px solid #000}
 #print-root th:nth-child(1){width:8%}#print-root th:nth-child(2){width:40%}#print-root th:nth-child(3){width:14%}#print-root th:nth-child(4){width:17%}#print-root th:nth-child(5){width:21%}
 #print-root thead{display:table-header-group}#print-root tr{break-inside:avoid;page-break-inside:avoid}
 #print-root .letterhead{display:block;break-inside:avoid}#print-root .letterhead h1{font:700 20pt Arial,sans-serif;margin:10px 0}#print-root .letterhead>div{font-size:12pt}
 #print-root .customer-note{font-size:14pt!important;font-weight:600;border:2px solid #000;padding:10px}
 #print-root .source-attachment{display:block!important;position:static!important;break-before:page!important;page-break-before:always!important;height:auto!important;max-height:none!important;overflow:visible!important;padding-top:0!important}
 #print-root .source-attachment h2{font-size:16pt!important;display:block;margin:0 0 8px}#print-root .source-attachment p{font-size:11pt!important;line-height:1.3}
 #print-root .source-attachment img{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:235mm!important;object-fit:contain!important;margin:8px auto!important;visibility:visible!important}
}

/* Phiếu gọn trên một tờ: giữ chữ hàng 14pt, giảm khoảng trống và cỡ ảnh. */
.request-details{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px}.request-details .detail-companyName{grid-column:1/-1}.request-details p{margin:3px 0!important}.source-attachment{break-before:auto;page-break-before:auto;padding-top:0}.source-attachment img{max-height:var(--source-image-height,72mm);width:auto;max-width:100%}
@media print{
 @page{size:A4 portrait;margin:8mm}
 #print-root .print-paper{font-size:13pt!important;line-height:1.15!important}
 #print-root .letterhead{display:flex!important;align-items:center;gap:8px;border-bottom:2px solid #000;margin-bottom:6px!important;padding-bottom:5px!important}
 #print-root .letterhead h1{font-size:17pt!important;margin:0!important;flex:1}#print-root .letterhead>b{font-size:19pt!important}#print-root .letterhead>div{font-size:9pt!important;max-width:35mm}
 #print-root .request-details{display:grid!important;grid-template-columns:1fr 1fr;gap:3px 10px;margin:6px 0}
 #print-root .request-details p{font-size:12pt!important;line-height:1.2!important;margin:2px 0!important}
 #print-root .request-details .detail-companyName{grid-column:1/-1}
 #print-root table{font-size:14pt!important;margin:6px 0}
 #print-root th,#print-root td{font-size:14pt!important;line-height:1.16!important;padding:5px 4px!important}
 #print-root th:nth-child(1){width:6%}#print-root th:nth-child(2){width:48%}#print-root th:nth-child(3){width:13%}#print-root th:nth-child(4){width:14%}#print-root th:nth-child(5){width:19%}
 #print-root .customer-note{font-size:13pt!important;line-height:1.2!important;padding:6px!important;margin:5px 0!important;border-width:1px}
 #print-root .declaration{font-size:9pt!important;line-height:1.1!important;margin:4px 0!important}
 #print-root .sign{font-size:11pt!important;margin:3px 12px 5px!important;text-align:right}
 #print-root .source-attachment{break-before:auto!important;page-break-before:auto!important;break-inside:avoid;page-break-inside:avoid;margin-top:5px!important;padding-top:4px!important;border-top:1px solid #000}
 #print-root .source-attachment h2{font-size:11pt!important;margin:0 0 3px!important}
 #print-root .source-attachment p{font-size:9pt!important;line-height:1.1!important;margin:2px 0!important}
 #print-root .source-attachment img{width:auto!important;max-width:100%!important;height:auto!important;max-height:var(--source-image-height,72mm)!important;margin:3px auto!important;object-fit:contain!important}
}

.app-logo{display:block;width:100%;height:auto;background:#fff;border-radius:6px}.print-logo{display:block;width:150px;height:auto;object-fit:contain;flex-shrink:0}@media print{#print-root .letterhead .print-logo{display:block!important;width:40mm!important;height:auto!important;max-height:19mm!important;object-fit:contain!important;margin:0!important;flex-shrink:0}#print-root .letterhead h1{font-size:16pt!important}}

/* Mẫu Word người dùng đã duyệt: Times New Roman 13, số lượng không kèm đơn vị. */
:is(#paper,.print-paper){font-family:'Times New Roman',serif;font-size:13pt}.print-paper table,#paper table{font-family:'Times New Roman',serif;font-size:13pt}.source-attachment img{max-width:163.777mm}
@media print{#print-root .print-paper,#print-root table{font-family:'Times New Roman',serif!important;font-size:13pt!important}#print-root td,#print-root th{font-family:'Times New Roman',serif!important;font-size:13pt!important}#print-root .letterhead h1{font-family:'Times New Roman',serif!important;font-size:16pt!important}#print-root .request-details p{font-family:'Times New Roman',serif!important;font-size:13pt!important}#print-root .declaration{font-size:13pt!important}#print-root .source-attachment h2{font-family:'Times New Roman',serif!important;font-size:13pt!important}#print-root .source-attachment img{max-width:163.777mm!important;max-height:74.823mm!important}#print-root .letterhead .print-logo{width:41.888mm!important}}

@media print{#print-root .letterhead>div{font-size:8pt!important}#print-root .source-attachment{border-top:0!important}}

/* Căn giữa các cột số lượng, khối lượng, lô hàng trong phiếu. */
:is(#paper,.print-paper) th:nth-child(n+3),:is(#paper,.print-paper) td:nth-child(n+3){text-align:center!important;vertical-align:middle!important}


.weight-message{display:block;font-size:14px;line-height:1.4;color:#3b5465;margin-top:6px;min-width:190px}input[readonly]{background:#edf4f8!important;font-weight:700}select[data-k="kgMode"]{width:100%;min-width:190px;margin-bottom:6px;padding:8px;border:1px solid #ccd3db;border-radius:5px;font:inherit}.barem-footnote{font-size:10pt!important;line-height:1.15!important;margin:4px 0!important}

/* Căn theo cột, không phụ thuộc vị trí dòng cuối. */
:is(#paper,.print-paper) tbody td:nth-child(2){text-align:left!important;vertical-align:middle!important}
:is(#paper,.print-paper) tbody td:nth-child(n+3){text-align:center!important;vertical-align:middle!important}
