/* Shared mobile overflow protection, scoped to the authenticated workspace shell. */
@media (max-width:767px){
  .app,.app>.main,.app .content,.app main.content{min-width:0;max-width:100%;box-sizing:border-box}
  .app .content :is(.m-grid,.pmx-stats,.head-actions,.page-head,.module-head,.ws-shared-tools){min-width:0;max-width:100%}
  .app .content :is(input,select,textarea){max-width:100%;box-sizing:border-box}
  .app .content :is(.table-responsive,.table-wrap,.m-table-wrap,.stock-table-wrap){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .app .content :is(img,video,canvas){max-width:100%}
  .app .content :is(.m-card,.pmx-stat-card,.stock-panel){min-width:0}
  .app .content :is(.head-actions,.page-actions){flex-wrap:wrap}
}

/* DAS V12 mobile density and readability. Presentation only, no visibility or state changes. */
@media screen and (max-width:759px){
 /* Reusable summary surfaces: retain the existing theme and hierarchy. */
 html body .app .main main :is(.ctr98-hero,.ctr99-hero,.ctr100-hero){padding:12px 13px!important;border-radius:12px!important;margin:6px 0 10px!important;gap:3px!important;}
 html body .app .main main :is(.ctr98-hero,.ctr99-hero,.ctr100-hero)>strong{font-size:23px!important;line-height:1.25!important;margin:3px 0!important;font-variant-numeric:tabular-nums;}
 html body .app .main main :is(.ctr98-hero,.ctr99-hero,.ctr100-hero)>:is(span,small){font-size:12px!important;line-height:1.4!important;}
 html body .app .main main :is(.ctr98-order-summary){padding:8px 0!important;margin-bottom:10px!important;}
 html body .app .main main .ctr98-order-summary>span{font-size:11px!important;line-height:1.35!important;gap:3px!important;padding:2px 5px!important;}
 html body .app .main main .ctr98-order-summary>span>b{font-size:20px!important;line-height:1.2!important;}
 html body .app .main main :is(.ctr99-line,.ctr100-line){padding:7px 0!important;gap:8px!important;font-size:13px!important;line-height:1.35!important;}
 html body .app .main main :is(.ctr99-line,.ctr100-line)>:is(b,strong){text-align:right!important;font-variant-numeric:tabular-nums;}
 /* Order list and primary action. */
 html body.ctr-artshop-orders .app .main main.ao .ao-header{gap:8px!important;margin-bottom:10px!important;}
 html body.ctr-artshop-orders .app .main main.ao .ao-header h1{font-size:20px!important;line-height:1.25!important;margin:0 0 4px!important;}
 html body.ctr-artshop-orders .app .main main.ao .ao-header p{font-size:13px!important;line-height:1.45!important;margin:0!important;}
 html body.ctr-artshop-orders .app .main main.ao .ao-header .ao-btn.primary{min-height:44px!important;padding:8px 12px!important;font-size:13px!important;color:var(--theme-on-primary,#fff)!important;}
 html body.ctr-artshop-orders .app .main main.ao .ao-list{padding:12px!important;}
 html body.ctr-artshop-orders .app .main main.ao :is(.ao-finance-wrap,.ao-filter-wrap)>summary{padding:9px 10px!important;min-height:44px!important;font-size:12px!important;gap:8px!important;flex-wrap:wrap!important;}
 html body.ctr-artshop-orders .app .main main.ao .ao-list-head h2{font-size:17px!important;line-height:1.3!important;}
 /* Sales history. Keep export and mail accessible. */
 html body.ctr-sales-page .app .main #sales-history .sales-header-combined{padding:12px!important;margin-bottom:10px!important;}
 html body.ctr-sales-page .app .main #sales-history .sales-mobile-title-row{gap:6px!important;align-items:center!important;}
 html body.ctr-sales-page .app .main #sales-history .sales-mobile-title-row h1{font-size:19px!important;line-height:1.25!important;min-width:0!important;}
 html body.ctr-sales-page .app .main #sales-history .sales-mobile-title-row :is(a,button){width:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;}
 html body.ctr-sales-page .app .main #sales-history .ctr98-items{margin-top:5px!important;padding-top:6px!important;font-size:13px!important;}
 /* Receivables. */
 html body.ctr-bon-page .app .main main .related-bon-onecard{padding:12px!important;}
 html body.ctr-bon-page .app .main main .bon-title-wrap h1{font-size:20px!important;line-height:1.25!important;}
 html body.ctr-bon-page .app .main main .bon-title-wrap p{font-size:13px!important;line-height:1.4!important;}
 html body.ctr-bon-page .app .main main .related-header-actions .btn{min-height:44px!important;font-size:13px!important;padding:8px!important;}
 html body.ctr-bon-page .app .main main .related-header-actions .btn-primary{color:var(--theme-on-primary,#fff)!important;}
 /* Products and categories: compact title, equal two action buttons. */
 html body.ctr100 .app .main main.pmx-page .page-head{padding:12px!important;gap:10px!important;margin-bottom:10px!important;}
 html body.ctr100 .app .main main.pmx-page .page-head-text h1{font-size:20px!important;line-height:1.25!important;}
 html body.ctr100 .app .main main.pmx-page .page-head-text p{font-size:13px!important;line-height:1.4!important;}
 html body.ctr100 .app .main main.pmx-page .page-head .head-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;}
 html body.ctr100 .app .main main.pmx-page .head-actions :is(#btnAddProduct,.ctr100-category){min-height:44px!important;height:auto!important;width:100%!important;min-width:0!important;max-width:none!important;font-size:12px!important;padding:7px 5px!important;white-space:normal!important;line-height:1.25!important;}
 html body.ctr100 .app .main main.pmx-page .head-actions:has(.ctr100-category:not([hidden])) #btnAddProduct{grid-column:1!important;grid-row:1!important;}
 html body.ctr100 .app .main main.pmx-page .head-actions .ctr100-category{grid-column:2!important;grid-row:1!important;}
 html body.ctr100 .app .main main.pmx-page .head-actions .pmx-more-actions{grid-column:1/-1!important;}
 html body.ctr100 .app .main main.pmx-page .pmx-toolbar{padding:10px!important;gap:7px!important;}
 /* Stock tabs: two-by-two, contrast on the blue header. */
 html body.stock-page .app .main #inventory-mobile-header{padding:12px!important;border-radius:14px!important;}
 html body.stock-page .app .main #inventory-mobile-header .ctr-stock-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:6px!important;width:100%!important;}
 html body.stock-page .app .main #inventory-mobile-header .ctr-stock-tabs>a{display:flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;width:100%!important;padding:7px 4px!important;white-space:normal!important;font-size:12px!important;line-height:1.25!important;text-align:center!important;}
 html body.stock-page .app .main #inventory-mobile-header .ctr98-stock-switch{color:#fff!important;font-size:12px!important;gap:5px!important;}
 html body.stock-page .app .main #inventory-mobile-header #ctr98StockTab{min-height:44px!important;}
 html body.stock-page .app .main main .ctr98-stock-card .m-card-head{padding:10px 12px!important;gap:7px!important;}
 /* Promotions: don't truncate search/filter labels. */
 html body.ctr100.promo-workspace-page .app .main main.promo-page :is(.promo-head,.ctr100-control,.ctr100-panel){padding:10px 12px!important;margin-bottom:8px!important;}
 html body.ctr100.promo-workspace-page .app .main main.promo-page .ctr100-primary{min-height:44px!important;color:var(--theme-on-primary,#fff)!important;font-size:14px!important;}
 html body.ctr100.promo-workspace-page .app .main main.promo-page #promoTab .promo-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:7px!important;padding:8px!important;}
 html body.ctr100.promo-workspace-page .app .main main.promo-page #promoTab .promo-toolbar :is(.promo-mobile-filter-row,.ctr-promo-search,#search,#status){min-width:0!important;width:100%!important;max-width:none!important;}
 /* Owner business report: Hybrid shortcut full width, less oversized whitespace. */
 html body.ctr-reports-page .app .main #kpi-analysis>a[href="/pos/das_colors"]{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;box-sizing:border-box!important;min-height:44px!important;font-size:13px!important;line-height:1.3!important;text-align:center!important;margin:0 0 10px!important;padding:8px!important;color:var(--blue,#2f6fea)!important;background:var(--card,#fff)!important;}
 html body.ctr-reports-page .app .main #ctr96MobileReport .ctr96-sales{padding:12px!important;}
 html body.ctr-reports-page .app .main #ctr96MobileReport .ctr96-sales>strong{font-size:24px!important;}
 html body.ctr-reports-page .app .main #ctr96MobileReport .ctr96-line{padding:10px 0!important;gap:7px!important;}
 html body.ctr-reports-page .app .main #ctr96MobileReport .ctr96-line>strong{font-size:13px!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:right!important;}
 /* SKU detail: explicit grid by field instead of nth-child (location columns are optional). */
 html body .app .main main.stock-upload-page .stock-list .ctr114-view{gap:6px!important;margin:8px 0!important;}
 html body .app .main main.stock-upload-page #ctr114StockView{min-height:44px!important;color:var(--text-primary,var(--text,#172238))!important;background:var(--card-bg,var(--card,#fff))!important;border:1px solid var(--border-color,#cbd5e1)!important;}
 html body .app .main main.stock-upload-page .stock-list .stock-table-wrap tbody tr:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px 10px!important;padding:11px 0!important;}
 html body .app .main main.stock-upload-page .stock-list .stock-table-wrap tbody td[data-label]{display:block!important;position:static!important;grid-column:auto!important;grid-row:auto!important;text-align:left!important;min-width:0!important;width:auto!important;font-size:12px!important;line-height:1.4!important;overflow-wrap:anywhere!important;padding:0!important;}
 html body .app .main main.stock-upload-page .stock-list .stock-table-wrap tbody td[data-label]::before{content:attr(data-label)!important;display:block!important;font-size:10px!important;line-height:1.25!important;margin-bottom:2px!important;color:var(--text-muted,#64748b)!important;}
 html body .app .main main.stock-upload-page .stock-list .stock-table-wrap tbody td[data-label="Menu"]{grid-column:1/-1!important;font-size:14px!important;font-weight:700!important;}
 html body .app .main main.stock-upload-page .stock-list .stock-table-wrap tbody td[data-label="Menu"]::before{content:"Barang"!important;}
 html body .app .main main.stock-upload-page .stock-list .stock-table-wrap tbody td[data-label="Stok"]{font-weight:700!important;}
}
