/* Loaded last; screen-only rules never alter the printed document or totals. */
#ts-mobile-nav,#ts-mobile-menu-toggle,.ts-mobile-open-cell,.ts-mobile-filter-control{display:none}
@media screen and (max-width:700px){
 html{background:#f4f7fb;-webkit-text-size-adjust:100%}
 body{margin:0!important;overflow-x:hidden;background:#f4f7fb!important;color:#18334b}
 #workArea.ts-mobile-ready{padding-bottom:calc(76px + env(safe-area-inset-bottom));min-width:0!important;max-width:100vw!important}
 #workArea.ts-mobile-ready .top{position:sticky;top:0;z-index:80;display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;padding:10px 12px!important;background:#fff!important;border-bottom:1px solid #dde5ef!important;box-shadow:0 2px 10px #18334b0a}
 #workArea.ts-mobile-ready #ts-mobile-menu-toggle{display:block;flex:none;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:10px;background:#edf3fa;color:#184b79;font-size:25px}
 #workArea.ts-mobile-ready .brand{flex:1;min-width:0}
 #workArea.ts-mobile-ready .brand strong{font-size:15px!important;letter-spacing:.1px}
 #workArea.ts-mobile-ready .brand small{font-size:10px!important}
 #workArea.ts-mobile-ready .top-actions{width:100%;display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;font-size:12px!important}
 #workArea.ts-mobile-ready #snapshot{flex:1;max-width:none!important;min-width:0}
 #workArea.ts-mobile-ready .top-actions button{min-height:36px!important;border-radius:9px}
 #workArea.ts-mobile-ready #menu{display:none!important}
 #workArea.ts-mobile-ready.ts-mobile-menu-open #menu{position:fixed!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-content:start;left:8px;right:8px;top:116px;bottom:calc(78px + env(safe-area-inset-bottom));width:auto!important;max-width:none!important;z-index:150!important;background:#fff!important;border:1px solid #d6e3ef;border-radius:16px;padding:12px!important;gap:8px!important;overflow:auto!important;box-shadow:0 12px 45px #15375430}
 #workArea.ts-mobile-ready #menu>.navgroup>button{min-height:48px!important;border-radius:10px;background:#edf4fc!important;color:#174e81!important;font-size:14px!important;padding:10px!important}
 #workArea.ts-mobile-ready #menu .navgroup.open .navpop{position:fixed!important;left:14px!important;right:14px!important;top:180px!important;bottom:auto;max-height:calc(100dvh - 280px)!important;z-index:160!important;border-radius:12px;border:1px solid #ccddec;box-shadow:0 8px 30px #15375430}
 #workArea.ts-mobile-ready .layout{display:block!important}
 #workArea.ts-mobile-ready main{padding:8px!important;min-width:0!important;width:auto!important}
 #workArea.ts-mobile-ready #content{padding:0!important;overflow:visible!important}
 #workArea.ts-mobile-ready #content>.panel{background:#fff;border:1px solid #e0e8f1!important;border-radius:14px!important;box-shadow:0 3px 14px #233e5b08;overflow:hidden}
 #workArea.ts-mobile-ready #content h2{font-size:17px!important;margin:0;padding:12px!important;color:#174c7b}
 #workArea.ts-mobile-ready #content .panelhead{padding:10px!important;gap:8px!important;border-bottom:1px solid #edf1f6}
 #workArea.ts-mobile-ready #content button,#workArea.ts-mobile-ready .voucher-actions button{min-height:42px;border:1px solid #d5e0ec;border-radius:10px!important;background:#f3f7fc;color:#185a99;font-weight:600;box-shadow:none!important;white-space:normal;touch-action:manipulation}
 #workArea.ts-mobile-ready #content button.primary,#workArea.ts-mobile-ready #content [type=submit]{background:linear-gradient(110deg,#087acb,#1964b8)!important;border-color:#1670bc!important;color:white!important}
 #workArea.ts-mobile-ready #content button:disabled{opacity:.48}
 #workArea.ts-mobile-ready #content input:not([type=checkbox]):not([type=radio]),#workArea.ts-mobile-ready #content select,#workArea.ts-mobile-ready #content textarea{box-sizing:border-box;max-width:100%;min-height:42px;border:1px solid #ccdae8;border-radius:9px;font-size:16px!important;background:#fff}
 #workArea.ts-mobile-ready #content .shared-tools,#workArea.ts-mobile-ready #content .tshop-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:10px!important}
 #workArea.ts-mobile-ready #content .shared-tools button{flex:1 1 86px;min-width:0}
 #workArea.ts-mobile-ready #content .shared-filters,#workArea.ts-mobile-ready #content .voucher-filters{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px!important}
 #workArea.ts-mobile-ready #content .shared-filters label{min-width:0}
 #workArea.ts-mobile-ready #content .shared-filters input,#workArea.ts-mobile-ready #content .shared-filters select{width:100%}
 #workArea.ts-mobile-ready #content .ts-list-status:empty{display:none}
 #workArea.ts-mobile-ready #content .ts-list-status,#workArea.ts-mobile-ready #content #sd-message:not(:empty){display:block;margin:5px 10px;font-size:12px;color:#617a91}
 #workArea.ts-mobile-ready #content .cards{gap:10px!important;padding:10px!important}
 #workArea.ts-mobile-ready #content .cards>.card{border:1px solid #dce7ef!important;border-radius:14px!important;box-shadow:none!important;min-height:98px;padding:12px!important}
 #workArea.ts-mobile-ready #content .cards>.card b{font-size:22px!important;overflow-wrap:anywhere}
 #workArea.ts-mobile-ready #content .gridwrap:has(>.ts-mobile-card-table){max-height:68dvh;overflow-x:hidden!important;padding:8px;background:#f4f7fb}
 #workArea.ts-mobile-ready #content table.ts-mobile-card-table{display:block!important;min-width:0!important;width:100%!important;border:0!important;table-layout:auto!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table colgroup{display:none!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table thead,#workArea.ts-mobile-ready #content .ts-mobile-card-table tbody{display:block!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table thead tr:not(:has(input,select)){display:none!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table thead tr:has(input,select){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:10px}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table:not(.ts-mobile-filter-open) thead tr:has(input,select){display:none!important}
 #workArea.ts-mobile-ready .ts-mobile-filter-control{display:block;margin-bottom:8px;text-align:right}
 #workArea.ts-mobile-ready .ts-mobile-filter-control button{min-height:36px!important;font-size:12px}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table thead tr:has(input,select)>*{display:block!important;min-width:0;border:0!important;background:transparent!important;padding:0!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table thead input,#workArea.ts-mobile-ready #content .ts-mobile-card-table thead select{width:100%;min-width:0!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table tbody tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;margin-bottom:12px;border:1px solid #d9e4ed!important;border-radius:13px;background:#fff!important;padding:10px;box-shadow:0 2px 8px #27446007}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table tbody tr.selected{border-color:#1677c8!important;background:#f0f7ff!important;box-shadow:0 0 0 1px #1677c8}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table tbody tr:has(td[colspan]){display:block!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table tbody td{display:block!important;min-width:0;width:auto!important;border:0!important;border-bottom:1px solid #edf2f7!important;padding:7px 0!important;font-size:14px!important;white-space:normal!important;overflow-wrap:anywhere;text-align:left!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table [data-mobile-label]::before{content:attr(data-mobile-label);display:block;font-size:11px;font-weight:500;color:#72869a;margin-bottom:4px;line-height:1.25}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table tbody td:first-child{grid-column:1/-1;font-size:16px!important;font-weight:700;color:#125d9e}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table td.ts-mobile-open-cell{grid-column:1/-1!important;border:0!important;padding:8px 0 0!important;text-align:right!important}
 #workArea.ts-mobile-ready .ts-mobile-open-cell button{width:100%;background:#eaf3fd!important;color:#1464a5!important}
 #workArea.ts-mobile-ready #ts-mobile-nav{position:fixed;display:flex;justify-content:space-around;align-items:stretch;left:0;right:0;bottom:0;padding:7px 5px calc(7px + env(safe-area-inset-bottom));background:#fffffff5;border-top:1px solid #dce5ee;box-shadow:0 -4px 18px #1537540a;z-index:190;backdrop-filter:blur(12px)}
 #workArea.ts-mobile-ready #ts-mobile-nav button{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:51px;border:0!important;border-radius:12px;background:transparent;color:#52718a;padding:4px 2px;font-size:11px;font-weight:600}
 #workArea.ts-mobile-ready #ts-mobile-nav button>span:first-child{font-size:23px;line-height:25px}
 #workArea.ts-mobile-ready #ts-mobile-nav button:active,#workArea.ts-mobile-ready #ts-mobile-nav button:focus-visible{background:#e8f2fd;color:#086fbd}
 #workArea.ts-mobile-ready #ts-mobile-nav button[hidden]{display:none!important}
 #workArea.ts-mobile-ready #drawer:not(.hidden){z-index:300!important}
 #workArea.ts-mobile-ready .drawer-box{border-radius:15px!important}
 #workArea.ts-mobile-ready #drawer .voucher-actions{gap:7px;bottom:0;border-top:1px solid #e0e8ef;padding:10px 0!important}
 #workArea.ts-mobile-ready .ts-plus-form,#workArea.ts-mobile-ready .web-form{grid-template-columns:1fr!important}
 #workArea.ts-mobile-ready .ts-plus-form .wide{grid-column:1!important}
}
@media print{#ts-mobile-nav,#ts-mobile-menu-toggle,.ts-mobile-open-cell{display:none!important}}
/* Override desktop shell rules inserted after the base stylesheet. */
@media screen and (max-width:700px){
 #workArea.ts-mobile-ready:not([hidden]){display:block!important;height:auto!important;min-height:100dvh!important;overflow:visible!important;width:100%!important;box-sizing:border-box!important}
 #workArea.ts-mobile-ready>header.top{display:grid!important;grid-template-columns:40px minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;height:auto!important;min-height:0!important;gap:6px 9px!important;padding:8px 10px!important;background:#fff!important;position:relative!important}
 #workArea.ts-mobile-ready #ts-mobile-menu-toggle{grid-column:1!important;grid-row:1!important}
 #workArea.ts-mobile-ready>header.top>.brand{grid-column:2!important;grid-row:1!important;display:flex!important;gap:8px!important;align-items:center!important;max-width:none!important;width:auto!important;height:auto!important;min-width:0!important}
 #workArea.ts-mobile-ready>header.top .brandmark{flex:none!important;width:34px!important;height:32px!important;min-width:34px!important}
 #workArea.ts-mobile-ready>header.top .brandmark img{max-width:100%!important;max-height:100%!important;object-fit:contain!important}
 #workArea.ts-mobile-ready>header.top .brand>div{min-width:0!important}
 #workArea.ts-mobile-ready>header.top .brand strong{display:block!important;font-size:14px!important;line-height:1.3!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 #workArea.ts-mobile-ready>header.top .brand small{display:none!important}
 #workArea.ts-mobile-ready>header.top>#snapshot{grid-column:1/-1!important;grid-row:3!important;display:block!important;width:auto!important;max-width:100%!important;line-height:1.4!important;font-size:11px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;margin:0!important;position:static!important}
 #workArea.ts-mobile-ready>header.top>.top-actions{grid-column:1/-1!important;grid-row:2!important;display:flex!important;justify-content:flex-end!important;gap:6px!important;max-width:none!important;width:100%!important;min-width:0!important;flex-wrap:wrap!important;position:static!important}
 #workArea.ts-mobile-ready>header.top .ts-calendar{display:none!important}
 #workArea.ts-mobile-ready>header.top #activeUser{margin-right:auto!important;font-size:12px!important;max-width:40%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
 #workArea.ts-mobile-ready>header.top .top-actions>button{min-height:34px!important;padding:5px 9px!important;font-size:12px!important;line-height:1.2!important}
 #workArea.ts-mobile-ready>header.top .ts-birthday-notice{grid-column:1/-1!important;grid-row:auto!important;font-size:11px!important}
 #workArea.ts-mobile-ready #menu{display:none!important}
 #workArea.ts-mobile-ready.ts-mobile-menu-open #menu{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;position:fixed!important;top:118px!important;left:8px!important;right:8px!important;bottom:calc(82px + env(safe-area-inset-bottom))!important;overflow:auto!important;min-height:0!important;z-index:1400!important;align-content:start!important;padding:10px!important;gap:8px!important}
 #workArea.ts-mobile-ready.ts-mobile-menu-open #menu>.navgroup{width:auto!important;min-width:0!important}
 #workArea.ts-mobile-ready.ts-mobile-menu-open #menu>.navgroup>button{width:100%!important;white-space:normal!important;min-width:0!important}
 body>.ts-touch-menu{top:132px!important;bottom:calc(82px + env(safe-area-inset-bottom))!important;max-height:none!important;border-radius:12px!important}
 #workArea.ts-mobile-ready .layout.ts-workspace-v2{display:block!important;padding:0!important;overflow:visible!important;height:auto!important;min-height:0!important}
 #workArea.ts-mobile-ready .layout.ts-workspace-v2>.ts-dock{display:none!important}
 #workArea.ts-mobile-ready .layout.ts-workspace-v2>main{display:block!important;width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:8px!important;box-sizing:border-box!important}
 #workArea.ts-mobile-ready main>#content{display:block!important;height:auto!important;max-height:none!important;min-height:50vh!important;overflow:visible!important}
 #workArea.ts-mobile-ready>footer{position:static!important;display:block!important;height:auto!important;padding:8px 10px!important;margin:0!important;font-size:10px!important;background:#edf3fa!important}
 #workArea.ts-mobile-ready>footer span{display:block!important;font-size:10px!important}
 #workArea.ts-mobile-ready #content .saleform{display:grid!important;grid-template-columns:minmax(0,1fr)!important}
 #workArea.ts-mobile-ready #content .salehead{display:block!important}
 #workArea.ts-mobile-ready #content .salehead>div:last-child{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
 #workArea.ts-mobile-ready #content .salemain,#workArea.ts-mobile-ready #content .saletotals{min-width:0!important;max-width:100%!important}
 #workArea.ts-mobile-ready #content .salefields{grid-template-columns:minmax(0,1fr)!important}
 #workArea.ts-mobile-ready #content .sale-meta{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
 #workArea.ts-mobile-ready #content .sale-meta label{max-width:100%!important}
 #workArea.ts-mobile-ready #content .ts-sale-fields.ts-sale-fields-v2,#workArea.ts-mobile-ready #content .ts-sale-fields,#workArea.ts-mobile-ready #content .ts-sale-productrow,#workArea.ts-mobile-ready #content .ts-purchase-productbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;min-width:0!important}
 #workArea.ts-mobile-ready #content .ts-sale-fields>*,#workArea.ts-mobile-ready #content .ts-sale-fields-v2>*,#workArea.ts-mobile-ready #content .ts-purchase-form .salefields>*{grid-column:1!important;min-width:0!important}
 #workArea.ts-mobile-ready #content .ts-sale-fields label,#workArea.ts-mobile-ready #content .ts-sale-productrow label{grid-template-columns:76px minmax(0,1fr)!important}
 #workArea.ts-mobile-ready #content .ts-sale-toolbar,#workArea.ts-mobile-ready #content .ts-purchase-toolbar{display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:8px!important}
 #workArea.ts-mobile-ready #content .ts-sale-toolbar button,#workArea.ts-mobile-ready #content .ts-purchase-toolbar button{min-height:42px!important;white-space:normal!important;flex:1 1 100px!important}
 #workArea.ts-mobile-ready #content .ts-tshop-sale,#workArea.ts-mobile-ready #content .ts-purchase-shell{min-width:0!important;max-width:100%!important;min-height:0!important;background:white!important}
 #workArea.ts-mobile-ready #content .saleform .gridwrap{max-width:100%!important;overflow:auto!important;touch-action:pan-x pan-y pinch-zoom}
 #workArea.ts-mobile-ready #drawer:not(.hidden){z-index:2000!important}
}

/* Card cells must grow for both their label and value; desktop fixes them at 24px. */
@media screen and (max-width:700px){
 #workArea.ts-mobile-ready #content .ts-mobile-card-table tbody tr,
 #workArea.ts-mobile-ready #content .ts-mobile-card-table tbody td{height:auto!important;max-height:none!important;min-height:0!important;line-height:1.45!important;position:static!important;box-sizing:border-box!important;overflow:visible!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table tbody tr{align-items:start!important;grid-auto-rows:auto!important;row-gap:6px!important}
 #workArea.ts-mobile-ready #content .ts-mobile-card-table [data-mobile-label]::before{position:static!important;height:auto!important;line-height:1.35!important;white-space:normal!important;margin:0 0 5px!important}
 /* A print preview keeps physical paper geometry. Swipe inside it for the other edge. */
 #drawer #drawerContent:has(>#printReceipt.ts-mau3){overflow-x:auto!important;max-width:100%!important;-webkit-overflow-scrolling:touch}
 #drawer #drawerContent>#printReceipt.ts-mau3{width:var(--ts-paper-width)!important;max-width:none!important;min-width:var(--ts-paper-width)!important;padding:0!important;margin:8px 0!important;-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important}
 #drawer:has(#printReceipt.ts-mau3) .voucher-actions{position:static!important;display:flex!important;flex-wrap:wrap!important;width:100%!important;box-sizing:border-box!important}
}

/* Phone receipt and stock layout: 20261026. Screen geometry only. */
@media screen and (max-width:700px){
 #drawer:has(#printReceipt){width:100vw!important;max-width:100vw!important;inset:0!important;padding:6px!important;box-sizing:border-box!important}
 #drawer:has(#printReceipt) .drawer-box{width:100%!important;min-width:0!important;max-width:100%!important;max-height:calc(100dvh - 12px)!important;overflow:auto!important;padding:8px!important;box-sizing:border-box!important}
 #drawer:has(#printReceipt) #drawerContent{min-width:0!important;max-width:100%!important;overflow-x:hidden!important}
 #drawer:has(#printReceipt) .voucher-actions{position:sticky!important;top:0!important;bottom:auto!important;z-index:5!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;background:#fff!important;padding:6px 0!important;width:100%!important;box-sizing:border-box!important}
 #drawer:has(#printReceipt) .voucher-actions button,#drawer:has(#printReceipt) .voucher-actions a{font:600 14px/1.3 Arial,sans-serif!important;min-height:40px!important;padding:7px 9px!important;border-radius:6px!important;white-space:normal!important}
 #drawer:has(#printReceipt) .voucher-actions [role=status]{font:13px/1.4 Arial,sans-serif!important;flex-basis:100%;overflow-wrap:anywhere}
 #drawer .ts-phone-paper{position:relative;width:100%;overflow:hidden;background:#fff}
 #drawer .ts-phone-paper>#printReceipt{position:absolute!important;left:0!important;top:0!important;transform:scale(var(--ts-phone-scale,1))!important;transform-origin:top left!important;margin:0!important;max-width:none!important}
 #drawer .ts-phone-paper #printReceipt .ts-print-page{height:auto!important;min-height:0!important;margin-bottom:10px!important;outline:none!important}
 #workArea #content #ts-weekly-stock .ws-grid{width:1386px!important;min-width:1386px!important;max-width:none!important;table-layout:fixed!important;font:13px/1.35 Arial,sans-serif!important}
 #workArea #content #ts-weekly-stock .ws-grid :is(th,td){overflow-wrap:normal!important;word-break:normal!important;line-height:1.35!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-pick{width:38px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-product{width:180px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-opening{width:88px!important}
 #workArea #content #ts-weekly-stock .ws-grid :is(.ws-in,.ws-out){width:70px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-expected{width:82px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-actual{width:112px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-status{width:96px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-target{width:90px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-price{width:100px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-note{width:160px!important}
 #workArea #content #ts-weekly-stock .ws-grid .ws-history{width:200px!important}
 #workArea #content #ts-weekly-stock .ws-grid thead th{font-size:12px!important;height:auto!important;min-height:76px!important;white-space:normal!important}
 #workArea #content #ts-weekly-stock .ws-grid tbody :is(th,td){height:auto!important;min-height:40px!important;padding:4px!important}
 #workArea #content #ts-weekly-stock .ws-grid tbody button{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;padding:4px!important;min-height:36px!important;font-size:14px!important}
 #workArea #content #ts-weekly-stock .ws-grid th.ws-copy-heading>button[data-copy-stock]{font-size:12px!important;white-space:normal!important;min-height:76px!important}
 #workArea #content #ts-weekly-stock .ws-grid-wrap{overflow:auto!important;touch-action:pan-x pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
}
@media print{.ts-phone-paper{height:auto!important;overflow:visible!important} .ts-phone-paper>#printReceipt{position:static!important;transform:none!important}}
