/* Keep receipt controls aligned independently of help text and inspection data. */
html body #raw #rawInspectionEntry .raw-receipt-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;align-items:start!important;gap:12px!important}
html body #raw #rawInspectionEntry .raw-receipt-grid>div{align-self:start;min-width:0}
html body #raw #rawInspectionEntry .raw-receipt-grid label{min-height:18px;line-height:18px;margin-bottom:4px;white-space:nowrap}
html body #raw #rawInspectionEntry .raw-receipt-grid :is(input,select){height:34px;width:100%;min-width:0;box-sizing:border-box}
html body #raw #rawInspectionEntry .raw-receipt-grid .wide{grid-column:1/-1}
html body #raw #rawInspectionEntry .raw-receipt-grid .raw-storage-field{grid-column:span 2}
html body #raw .raw-storage-input{display:flex;gap:7px;align-items:center}
html body #raw .raw-storage-input select{flex:1;min-width:0}
html body #raw .raw-storage-input .btn{flex:none;white-space:nowrap;min-height:34px}
html body #raw .raw-storage-input [hidden]{display:none!important}
html body #raw #rawStorageReceiptHint{display:block;font-size:11px;color:#62748b;line-height:1.6;margin-top:5px;white-space:normal}
html body :is(#rawInspectionHistory,#rhTable) .raw-storage-cell .btn{white-space:nowrap;min-width:48px}
html body #rawHistory .raw-excel-storage-field{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:11px;color:#55718f}
html body #rawHistory .raw-excel-storage-field select{width:170px;max-width:100%;height:34px}
html body #raw #rawInspectionEntry .raw-editable-field>input{margin-top:5px}
html body #raw .raw-editable-field>input[hidden]{display:none!important}
html body #raw .raw-measurement-table select{width:210px;max-width:100%;height:34px}
html body #raw .raw-print-toolbar{display:flex;align-items:center;gap:14px;margin:10px 0}
html body #raw .raw-print-toolbar label{display:inline-flex;gap:7px;align-items:center;margin:0}
html body #raw :is(.raw-print-toolbar input,.raw-print-check){width:15px;height:15px}
html body :is(#rawInspectionHistory,#rhTable) tr[data-raw-detail-id]{cursor:pointer}
html body :is(#rawInspectionHistory,#rhTable) tr[data-raw-detail-id]:hover{background:#eef5ff}
html body :is(#rawInspectionHistory,#rhTable) tr[data-raw-detail-id]:focus-visible{outline:2px solid #3977bd;outline-offset:-2px}
html body #raw .raw-entry-help{display:flex;flex-wrap:wrap;gap:5px 24px;font-size:11px;color:#62748b;line-height:1.6;margin:9px 0 14px}
html body #raw .raw-measurement-entry{margin:12px 0}
html body #raw :is(.raw-measurement-entry,.raw-appearance-details) h4{margin:0 0 8px;font-size:13px;color:#25486e}
html body #raw .raw-measurement-table{overflow-x:auto;border:1px solid #dbe4ed;border-radius:7px}
html body #raw .raw-measurement-table table{min-width:650px}
html body #raw .raw-measurement-table :is(th,td){padding:8px 11px;vertical-align:middle;white-space:nowrap}
html body #raw .raw-measurement-table tbody th{background:#f8fafc;color:#25486e}
html body #raw .raw-measurement-table input{width:180px;height:34px;border-color:#91b5e8;background:#f8fbff}
html body #raw .raw-measurement-table .raw-appearance-normal-check{display:inline-flex;gap:7px;align-items:center;margin:0;color:#334155;font-size:12px;white-space:nowrap}
html body #raw .raw-measurement-table .raw-appearance-normal-check input[type=checkbox]{width:17px;height:17px;min-height:0;margin:0}
html body #raw #rawAppearanceSummary{margin-bottom:8px}
html body #raw .raw-appearance-details{padding:12px;background:#fffaf4;border:1px solid #eadbc4;border-radius:7px;margin:10px 0}
html body #raw .raw-appearance-details[hidden]{display:none!important}
html body #raw .raw-appearance-options{display:flex;flex-wrap:wrap;gap:9px 20px;margin-bottom:10px}
html body #raw .raw-appearance-options label{display:flex;align-items:center;gap:6px;font-size:12px;margin:0;color:#334155}
html body #raw .raw-appearance-options input{width:15px;height:15px;margin:0}
@media(max-width:1100px){html body #raw #rawInspectionEntry .raw-receipt-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:700px){html body #raw #rawInspectionEntry .raw-receipt-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:420px){html body #raw #rawInspectionEntry .raw-receipt-grid{grid-template-columns:1fr!important}html body #raw #rawInspectionEntry .raw-receipt-grid .raw-storage-field{grid-column:1}html body #raw .raw-storage-input{flex-wrap:wrap}html body #raw .raw-storage-input select{flex-basis:150px}html body #raw .raw-page-head .raw-millsheet-actions{display:flex;flex-wrap:wrap;gap:6px}html body #raw .raw-page-head .raw-millsheet-actions .btn{min-height:36px}html body #rawHistory .raw-excel-storage-field{width:100%;justify-content:space-between}}

/* Use the spare space below the collapsed receipt entry for the recent history. */
html body #raw.page #rawInspectionHistory{max-height:max(300px,calc(100vh - 210px));max-height:max(300px,calc(100dvh - 210px));overflow:auto}
@media(max-height:600px){html body #raw.page #rawInspectionHistory{max-height:max(180px,calc(100vh - 190px));max-height:max(180px,calc(100dvh - 190px))}}

/* Printer settings stay compact even when business detail dialogs use a full workspace. */
@media screen{
 html body dialog#wkQrPrintDialog{position:fixed!important;inset:auto!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%)!important;margin:0!important;width:min(550px,94vw)!important;max-width:94vw!important;height:auto!important;max-height:90vh!important;max-height:90dvh!important;min-height:0!important;padding:18px!important;overflow:auto!important}
}
