/* Final document rules, deliberately independent of UI theme and viewport. */
#app .classic-doc{color:#111!important;background:#fff!important;color-scheme:light;width:210mm!important;max-width:none!important;box-sizing:border-box;font-family:'TH SarabunPSK','TH Sarabun New',Sarabun,'Noto Sans Thai',Tahoma,sans-serif!important;font-size:14pt!important;line-height:1.12}
#app .classic-doc table{border:1px solid #222!important;border-collapse:collapse!important;table-layout:fixed!important;width:100%!important;font-size:14pt!important}
#app .classic-doc :is(th,td){border:1px solid #222!important;color:#111!important;background:#fff!important;padding:1.5mm 1mm!important;overflow-wrap:normal;word-break:normal}
#app .classic-doc td:nth-child(n+3){white-space:nowrap;font-variant-numeric:tabular-nums;font-size:12pt;letter-spacing:-.15px}
#app .classic-doc .pack-group{display:inline-block;white-space:nowrap}
#app .classic-doc .product-copy{overflow-wrap:break-word}
#app .classic-doc .product-picture{float:none!important;display:block;width:20mm!important;height:auto!important;max-height:28mm!important;margin:1mm 0 1mm auto!important}
#app .pdfvalue{justify-content:center;font-weight:400!important}
@media screen{
#app .v4-scroll{overflow:auto!important;max-width:100%;min-width:0}
#app .v4-scroll .classic-doc{zoom:var(--paper-scale,1);margin:0 auto!important}
.paper-controls{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 0}.paper-controls button{min-height:40px;padding:5px 10px}.paper-controls output{font-size:14px}
@media(max-width:760px){
html,body{font-size:15px!important;-webkit-text-size-adjust:100%;text-size-adjust:100%}
header{position:sticky;top:0;z-index:30;min-height:54px!important;padding:6px 10px!important;flex-wrap:nowrap!important}
header>div:first-child{min-width:0}.logo{font-size:17px!important;white-space:nowrap}.sub{font-size:11px!important}.menu{display:none!important}.theme-controls{gap:4px;flex-shrink:0}.theme-controls button{font-size:13px!important;min-height:40px;padding:5px 8px!important}
html.sidebar-collapsed aside#sidebar,aside#sidebar{display:block;position:fixed;top:var(--header-height,54px)!important;bottom:0!important;height:auto!important;max-height:calc(100dvh - var(--header-height,54px));width:min(280px,85vw)!important;overflow-y:auto!important;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:8px 8px calc(24px + env(safe-area-inset-bottom))!important;z-index:40;transform:translateX(-105%)}
aside#sidebar.open{transform:none}aside#sidebar button{font-size:15px!important;line-height:1.25;min-height:44px;padding:8px!important;margin:1px 0!important;white-space:normal}aside#sidebar .navicon{font-size:16px!important;width:24px!important}aside#sidebar .sub{padding:8px!important}
#app :is(h1,h2,h3):not(.classic-doc *):not(.pdfpage *){font-size:20px!important}#app :is(h2,h3):not(.classic-doc *):not(.pdfpage *){font-size:17px!important}
#app :is(label,p,button,.muted,.note,.step,.sales-note,.card b,.sales-table td,.sales-table th,.dash-pair .sales-table td,.dash-pair .sales-table th):not(.classic-doc *):not(.pdfpage *){font-size:14px!important;line-height:1.4}
#app :is(input,select,textarea):not(.classic-doc *):not(.pdfpage *){font-size:16px!important;max-width:100%;min-width:0}#app input[type=checkbox],#app input[type=radio]{width:20px!important}
#app .step{padding:6px 9px!important}#app .sales-kpi strong{font-size:21px!important}#app .customer-mini b{font-size:19px!important}#app .sales-grid,#app .customer-mini{grid-template-columns:repeat(2,minmax(0,1fr))!important}#app .dash-pair{grid-template-columns:minmax(0,1fr)!important}#app .p615grid{grid-template-columns:minmax(0,1fr)}#app .cards,#app .products{grid-template-columns:repeat(2,minmax(0,1fr))!important}#app .card{min-height:90px!important}#app .panel{overflow-wrap:break-word}#app .classic-doc{overflow-wrap:normal}
}
}
@media print{@page{size:A4;margin:12mm}html,body,.shell,main#app{display:block!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;background:white!important;color:#111!important}#app .classic-doc{zoom:1!important;width:186mm!important;padding:0!important;margin:0!important;min-height:0!important;box-shadow:none!important}#app .v4-scroll{overflow:visible!important;padding:0!important}#app .classic-doc thead{display:table-header-group}#app .classic-doc tr{break-inside:avoid}#app .classic-doc .keep-footer{break-inside:auto}#app .classic-doc .signature{break-inside:avoid}.paper-controls{display:none!important}}
