/* Compact phone layout. Desktop typography and Android/browser text scaling stay intact. */
@media(max-width:760px){
 body{font-size:14px;line-height:1.45}
 .workspace>header{min-height:54px;padding:5px 10px}
 .native-module-layout .content{padding:10px 8px}
 .native-module-header{margin-bottom:10px}
 .native-module-header h1,#checkout-view .checkout-heading h1{font-size:19px;line-height:1.25}
 .native-module-layout .content h2{font-size:16px;line-height:1.3}
 .native-module-layout .content p{font-size:13px;line-height:1.45}
 .native-module-tabs>.nav-item{font-size:12px;padding:9px 11px;min-height:44px}
 .native-module-layout .content>section:not(#checkout-view):not([hidden]),.native-module-layout #products-view:not([hidden]){padding:10px 8px}
 .native-module-layout .content button{font-size:13px;padding:8px 11px}
 #products-view>.page-heading{gap:8px;margin-bottom:10px}
 #products-view>.page-heading .muted{margin:0 0 8px}
 #products-view .product-card{padding:10px}
 #products-view #search-form{gap:7px;margin-bottom:10px}
 #products-view #search-form .search-field{padding:4px 6px;gap:6px}
 #products-view #search-form .search-field input{padding:6px 0}
 #products-body{gap:8px}
 #products-body>tr{grid-template-columns:minmax(0,1fr) 44px 104px;gap:6px 8px;padding:11px;border-radius:11px}
 #products-body>tr>td:nth-child(1){grid-column:1/3;grid-row:1;font-size:14px;line-height:1.3}
 #products-body>tr>td:nth-child(1) small{font-size:11px;margin-top:3px}
 #products-body>tr>td:nth-child(2){grid-column:1/-1;grid-row:2;font-size:11px}
 #products-body>tr>td:nth-child(3){grid-column:1;grid-row:3;font-size:12px;align-self:center}
 #products-body>tr>td:nth-child(4){grid-column:2;grid-row:3;font-size:12px;align-self:center}
 #products-body>tr>td:nth-child(3)::before,#products-body>tr>td:nth-child(4)::before{font-size:10px;margin-bottom:3px}
 #products-body>tr>td:nth-child(5){grid-column:3;grid-row:1;font-size:19px;text-align:right;align-self:start;line-height:1.3}
 #products-body>tr>td:nth-child(6){grid-column:3;grid-row:3}
 #products-body>tr>td:nth-child(6)>button{font-size:12px;padding:7px 9px;min-height:44px}
 #products-body .stock{font-size:12px;padding:3px 6px}
 #checkout-view{gap:8px}
 #checkout-view .product-card{padding:11px}
 #checkout-view .checkout-quantity-line{gap:6px}
 #checkout-view .checkout-basket-panel{min-height:170px}
 #checkout-view .checkout-basket-heading h2{font-size:15px}
 #checkout-view .checkout-basket-help{font-size:11px;margin:8px 0 0}
 #checkout-view .checkout-money{padding:9px 7px}
 #checkout-view .checkout-money strong,#checkout-view .checkout-money input{font-size:23px}
 #checkout-view .checkout-money small{font-size:10px}
 .app-shell .sidebar{padding:18px 12px}
 .app-shell .sidebar .shop{font-size:13px;margin:5px 0 10px}
 .app-shell .module-group-button{font-size:13px;min-height:44px;padding:9px 10px}
}
/* Detail/history lists become labelled records only in these phone workspaces. */
@media(max-width:760px){
 :is(#stock-tracking-view,#stock-movements-view,#batch-entry-view,#batch-stock-view,#shopping-view,#purchase-history-view,#purchase-lines,#supplier-ledger-view,#cash-ledger-view,#cash-history-view,#customer-ledger-view,#customer-sales-view,#customer-dues-view,#customer-list) .table-scroll{overflow:visible}
 :is(#stock-tracking-view,#stock-movements-view,#batch-entry-view,#batch-stock-view,#shopping-view,#purchase-history-view,#purchase-lines,#supplier-ledger-view,#cash-ledger-view,#cash-history-view,#customer-ledger-view,#customer-sales-view,#customer-dues-view,#customer-list) .record-table{display:block;width:100%;min-width:0}
 :is(#stock-tracking-view,#stock-movements-view,#batch-entry-view,#batch-stock-view,#shopping-view,#purchase-history-view,#purchase-lines,#supplier-ledger-view,#cash-ledger-view,#cash-history-view,#customer-ledger-view,#customer-sales-view,#customer-dues-view,#customer-list) .record-table>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 :is(#stock-tracking-view,#stock-movements-view,#batch-entry-view,#batch-stock-view,#shopping-view,#purchase-history-view,#purchase-lines,#supplier-ledger-view,#cash-ledger-view,#cash-history-view,#customer-ledger-view,#customer-sales-view,#customer-dues-view,#customer-list) .record-table>tbody{display:grid;gap:8px}
 :is(#stock-tracking-view,#stock-movements-view,#batch-entry-view,#batch-stock-view,#shopping-view,#purchase-history-view,#purchase-lines,#supplier-ledger-view,#cash-ledger-view,#cash-history-view,#customer-ledger-view,#customer-sales-view,#customer-dues-view,#customer-list) .record-table>tbody>tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;padding:11px;border:1px solid var(--line,#d6e0ea);border-radius:11px;background:var(--surface,#fff)}
 :is(#stock-tracking-view,#stock-movements-view,#batch-entry-view,#batch-stock-view,#shopping-view,#purchase-history-view,#purchase-lines,#supplier-ledger-view,#cash-ledger-view,#cash-history-view,#customer-ledger-view,#customer-sales-view,#customer-dues-view,#customer-list) .record-table td{display:block;padding:0;border:0;min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:13px;text-align:left}
 :is(#stock-tracking-view,#stock-movements-view,#batch-entry-view,#batch-stock-view,#shopping-view,#purchase-history-view,#purchase-lines,#supplier-ledger-view,#cash-ledger-view,#cash-history-view,#customer-ledger-view,#customer-sales-view,#customer-dues-view,#customer-list) .record-table td::before{content:attr(data-label);display:block;font-size:10px;font-weight:400;color:var(--muted);margin-bottom:3px}
 :is(#stock-tracking-view,#stock-movements-view,#batch-entry-view,#batch-stock-view,#shopping-view,#purchase-history-view,#purchase-lines,#supplier-ledger-view,#cash-ledger-view,#cash-history-view,#customer-ledger-view,#customer-sales-view,#customer-dues-view,#customer-list) .record-table td:first-child{grid-column:1/-1;font-weight:600}
 :is(#cash-ledger-view,#customer-ledger-view,#supplier-ledger-view) .record-table td:nth-child(2){grid-column:1/-1}
 .record-table td input,.record-table td select{min-width:0;width:100%;min-height:44px}
 .record-table td small{display:block;font-size:11px;line-height:1.4}
 .native-customer-context .summary-grid,#cash-cards{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .native-customer-context .summary-grid article,#cash-cards article{min-width:0;padding:9px!important}
 .native-customer-context .summary-grid article strong,#cash-cards article strong{font-size:18px}
 .native-customer-context .summary-grid article p,#cash-cards article p{font-size:11px;margin:0 0 4px}
 .native-supplier-context,.native-customer-workspace{grid-template-columns:minmax(0,1fr);gap:10px}
 .native-supplier-context .row-actions,.native-customer-editor .row-actions{display:flex;flex-wrap:wrap;gap:6px}
 .native-supplier-context .row-actions button,.native-customer-editor .row-actions button{min-height:44px}
 .native-customer-context .toolbar{display:flex;flex-wrap:wrap;gap:7px}
 .native-customer-context .search-field{min-width:0;flex:1 1 200px}
 .date-toolbar,.form-grid,.financial-form{gap:10px}
 .date-toolbar>div{min-width:0}
}
@media(max-width:760px){
 .native-module-layout #entry-batch-lines{min-height:0}
 .native-picker .toolbar:has(>.barcode-camera-button){display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;align-items:center}
 .native-picker .toolbar:has(>.barcode-camera-button)>input{width:100%;min-width:0;font-size:16px}
 .native-picker .toolbar:has(>.barcode-camera-button)>label:not(.sr-only){grid-column:1/-1}
 .native-picker .toolbar>.barcode-camera-button{width:44px;min-width:44px;min-height:44px;margin:0;padding:4px}
}
@media(max-width:760px){
 .native-module-layout .native-module-header>#customer-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%}
 .native-module-layout .native-module-header>#customer-cards article{min-width:0;padding:9px;gap:4px 6px}
 .native-module-layout .native-module-header>#customer-cards article:last-child{grid-column:1/-1}
 .native-module-layout .native-module-header>#customer-cards article p{font-size:11px}
 .native-module-layout .native-module-header>#customer-cards article strong{font-size:18px}
 #customers-view #customer-list{height:auto;min-height:0;max-height:60dvh;overflow:auto}
}
