/* Mobile UX hardening: compact operational lists and centered scrollable detail dialogs */
html.modal-open,body.modal-open{overflow:hidden!important;overscroll-behavior:none!important;touch-action:none!important}
.selection-bar .btn.secondary{background:var(--panel2)!important;color:var(--text)!important;border-color:var(--line)!important}.selection-bar .btn.primary{color:var(--accentText)!important}.selection-bar strong{color:var(--bg)!important}
.order-super-compact>div:nth-child(2)>.meta:not(.order-compact-meta){display:none!important}.order-super-compact .order-compact-meta{margin-top:3px!important}
.note-alert-dot{display:inline-block;width:8px;height:8px;border-radius:999px;background:#ffd51d;box-shadow:0 0 0 3px rgba(255,213,29,.12),0 0 9px rgba(255,213,29,.65);vertical-align:middle;margin-left:6px;flex:0 0 auto}
.modal-backdrop.show{display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))!important}.modal-backdrop>.modal{margin:auto!important;max-height:calc(100dvh - 28px)!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important}.detail-modal{width:min(760px,calc(100vw - 24px))!important}.detail-body{overflow:visible!important}.modal-head.sticky-head{position:sticky!important;top:0!important;z-index:20!important;background:var(--panel)!important}
#productDetailBody .detail-summary,#customerDetailBody .detail-summary,#financeDetailBody .detail-summary,#itemDetailBody .detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin:8px 0!important}#productDetailBody .detail-stat,#customerDetailBody .detail-stat,#financeDetailBody .detail-stat,#itemDetailBody .detail-stat{padding:9px 10px!important;border-radius:11px!important}#productDetailBody .detail-stat strong,#customerDetailBody .detail-stat strong,#financeDetailBody .detail-stat strong,#itemDetailBody .detail-stat strong{font-size:14px!important}
#productBreakdown .breakdown-row{padding:10px!important}#productBreakdown .breakdown-top{gap:8px!important}#productBreakdown .breakdown-top>div:first-child strong{font-size:13px!important}#productBreakdown .meta{font-size:9px!important}#productBreakdown .action-row{gap:6px!important;padding-top:7px!important}#productBreakdown .btn{min-height:34px!important}
#customerDetailBody .customer-item-link,#customerDetailBody .customer-finance-link{padding:9px 10px!important;min-height:0!important}#customerDetailBody .customer-item-link .breakdown-top{gap:7px!important}#customerDetailBody .customer-item-link strong,#customerDetailBody .customer-finance-link strong{font-size:12px!important}#customerDetailBody .meta{font-size:9px!important}
#financeDetailBody .history-entry{padding:8px 10px!important}#financeDetailBody .history-list{max-height:38vh;overflow:auto;overscroll-behavior:contain}
@media(max-width:760px){
  .mobile-head{box-sizing:border-box!important;padding-top:max(10px,env(safe-area-inset-top))!important;min-height:calc(58px + env(safe-area-inset-top))!important;align-items:center!important}
  .modal-backdrop.show{align-items:center!important}
  .modal-backdrop>.modal,.modal-backdrop>.detail-modal{width:calc(100vw - 20px)!important;max-width:none!important;max-height:calc(100dvh - 24px)!important;border-radius:17px!important}
  .modal-head{padding:11px 13px!important}.modal-head h3{font-size:16px!important}.modal-subtitle{font-size:9px!important;line-height:1.25!important}
  .detail-body{padding:0 9px 10px!important}.detail-section{margin-top:7px!important}.detail-section-head{padding:9px 10px!important}.detail-section-head h4{font-size:12px!important}.detail-section-head p{font-size:9px!important;margin-top:2px!important}
  .finance-overview{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.finance-overview>div{padding:9px!important}.finance-overview strong{font-size:15px!important}.finance-overview span{font-size:8px!important}
  .finance-row,.customer-row{padding:9px 10px!important;gap:7px!important;min-height:0!important;border-radius:0!important}.finance-row{grid-template-columns:minmax(0,1fr) auto 18px!important}.finance-row .secondary-col{display:none!important}.finance-row .money-col{display:block!important;text-align:right!important}.finance-row .money-col strong{font-size:13px!important}.finance-row .money-col .meta{font-size:8px!important}.finance-row>div:first-child strong{font-size:13px!important}.finance-row>div:first-child .meta{font-size:9px!important}
  .customer-row{grid-template-columns:minmax(0,1fr) auto 18px!important}.customer-row .secondary-col{font-size:10px!important}.customer-row strong{font-size:13px!important}.customer-row .meta{font-size:9px!important}
  #productBreakdown .breakdown-top{grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important}#productBreakdown .breakdown-produced,#productBreakdown .breakdown-price{display:none!important}#productBreakdown .action-row{display:grid!important;grid-template-columns:58px 1fr 1.15fr!important}#productBreakdown .bd-prod-qty{width:100%!important}#productBreakdown .bd-save{grid-column:1/-1!important}
  #customerDetailBody .detail-section,#financeDetailBody .detail-section{margin-top:7px!important}.compact-toolbar{margin:5px 0 7px!important}
  #page-finance .tabs,#page-orders .tabs{overflow-x:auto!important;scrollbar-width:none!important}#page-finance .tabs::-webkit-scrollbar,#page-orders .tabs::-webkit-scrollbar{display:none!important}
}
@media(max-width:420px){#productBreakdown .action-row{grid-template-columns:54px 1fr!important}#productBreakdown .bd-complete{grid-column:1/-1!important}.finance-overview{grid-template-columns:1fr 1fr!important}.finance-overview>div:last-child{grid-column:1/-1!important}}
