
.shortage-dialog{width:min(940px,calc(100vw - 24px));max-width:940px;box-sizing:border-box;padding:24px;max-height:90vh;overflow:auto;border:1px solid #ddd6c8;border-radius:18px;color:#24313a;background:#fffdf9}
.shortage-dialog::backdrop{background:#15252e88}.shortage-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.shortage-heading h2{margin:0}.shortage-actions{display:flex;gap:8px}.shortage-summary{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0 12px}.shortage-summary strong{color:#9a3c20}.shortage-explanation,.shortage-time{font-size:13px;line-height:1.7;color:#58646c;margin:6px 0}.shortage-warning{background:#fff3d9;border-left:3px solid #b67d22;padding:12px;font-size:14px;line-height:1.6}.shortage-product{border:1px solid #dfd8cd;border-radius:12px;margin:18px 0;background:#fff;overflow:hidden}.shortage-product-heading{padding:16px;display:flex;justify-content:space-between;align-items:center;gap:16px}.shortage-product h3{margin:4px 0 0;font-size:20px;overflow-wrap:anywhere}.shortage-product h3 small{font-size:12px;font-weight:400;color:#66727a}.shortage-source{font-size:12px;color:#68716d}.shortage-amount{font-size:22px;color:#a33e21;white-space:nowrap}.shortage-amount small{font-size:13px}.shortage-totals{display:flex;flex-wrap:wrap;gap:16px;padding:10px 16px;background:#f6f3ed;font-size:13px}.shortage-customers{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px}.shortage-customers th{background:#faf8f4;text-align:left;font-size:12px;color:#697067}.shortage-customers th,.shortage-customers td{padding:12px 16px;border-top:1px solid #e9e4dc;vertical-align:top;overflow-wrap:anywhere}.shortage-customers th:last-child,.shortage-customers td:last-child{width:23%;text-align:right}.shortage-customer{display:block}.shortage-customers ul{padding:0;margin:6px 0 0;list-style:none;font-size:12px;line-height:1.8;color:#68716d}.shortage-customers a{color:#315a6b;text-decoration:underline}.shortage-customer-quantity{font-weight:700;font-variant-numeric:tabular-nums}.shortage-empty{padding:32px 12px;text-align:center;color:#697067}
@media(max-width:600px){.shortage-dialog{padding:14px}.shortage-product-heading{align-items:flex-start;flex-direction:column;gap:8px;padding:12px}.shortage-customers th,.shortage-customers td{padding:10px}.shortage-totals{padding:10px;gap:8px 14px}.shortage-heading h2{font-size:21px}.shortage-actions button{padding:9px 12px}.shortage-summary{font-size:13px}}
@media print{@page{size:A4 portrait;margin:12mm}body{margin:0;color:#111;font:11pt Arial,'Microsoft YaHei',sans-serif}.shortage-product{overflow:visible;border-radius:0;break-inside:auto}.shortage-product-heading,.shortage-totals{break-after:avoid}.shortage-customers thead{display:table-header-group}.shortage-customers tr{break-inside:avoid}.shortage-customers th,.shortage-customers td{padding:8px}.shortage-product-heading{padding:10px;flex-direction:row}.shortage-amount{font-size:18pt;color:#111}.shortage-product h3{font-size:14pt}.shortage-explanation,.shortage-time,.shortage-customers ul{font-size:9pt}.shortage-print-title{font-size:20pt;margin:0 0 12px}}

/* Compact shortage print table: one product per row. */
.shortage-table-print{box-sizing:border-box;margin:0;padding:0;color:#111;background:#fff;font:10pt/1.35 Arial,'Microsoft YaHei',sans-serif}.shortage-table-print h1{margin:0 0 5mm;font-size:18pt;text-align:center}.st-meta{margin:0 0 3mm;font-size:9pt}.st-table{border-collapse:collapse;table-layout:fixed;width:100%;font-size:9.5pt;line-height:1.4}.st-table th,.st-table td{border:1px solid #555;padding:5px 6px;vertical-align:middle;overflow-wrap:anywhere}.st-table th{text-align:center;background:#f0f0f0;font-weight:700}.st-col-index{width:5%}.st-col-product{width:22%}.st-col-number{width:10%}.st-col-unit{width:5%}.st-index,.st-unit{text-align:center}.st-number{text-align:right;font-variant-numeric:tabular-nums}.st-product{font-weight:600}.st-customer{display:inline}.st-note{margin:3mm 0 0;font-size:8.5pt;line-height:1.4}.st-table thead{display:table-header-group}.st-table tr{break-inside:avoid;page-break-inside:avoid}@media print{@page{size:A4 portrait;margin:10mm}.shortage-table-print{padding:0;margin:0}.st-table th{background:#f0f0f0;print-color-adjust:exact;-webkit-print-color-adjust:exact}}
