/* ASN ERP V4.9.95 | Responsividade transversal, sem alterar regras de negócio.
   Carregar após os CSS de cada módulo; aplicável apenas à área autenticada. */
html,body{min-width:0}
html body.asn-nav-ready.asn-layout-v4994 .asn-app-main,
html body.asn-nav-ready.asn-layout-v4994 .asn-app-main > *,
html body.asn-nav-ready.asn-layout-v4994 .asn-app-main :is(.card,.panel,.box,.content,.content-card,.grid,.dashboard-grid,.toolbar,.filter-row,.table-container){box-sizing:border-box;min-width:0}
html body.asn-nav-ready.asn-layout-v4994 > .asn-app-main{overflow-wrap:break-word}
/* Rolagem contida na tabela; não mover a página inteira para fora do menu. */
html body.asn-nav-ready.asn-layout-v4994 :is(.asn-app-main,.modal-content,.modal,.cv-sku-dialog)
:is(.table-container,.table-responsive,.table-wrap,.tablewrap,.scroll,.cf-table-wrap,.nf-table-wrap,
.asn-ml-catalog-table-wrap,.analytics-table-shell,.sync-table-wrap,.cv-fin-table-scroll,.cv-table-shell,
.pc-sheet-wrap,.asn-market-table,.asn-stock-table,.asn-inventory-table,.asn-pend-table-scroll,
.pp-table-wrap,.v34-compact-table-wrap,.data-table-wrap){
  box-sizing:border-box;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;scrollbar-width:thin;
}
/* Tabelas em div sem classe de wrapper também recebem uma área de rolagem, sem alterar DOM. */
@supports selector(div:has(> table)) {
 html body.asn-nav-ready.asn-layout-v4994 .asn-app-main div:not([class]):has(> table),
 html body.asn-nav-ready.asn-layout-v4994 .modal-content div:not([class]):has(> table){
   box-sizing:border-box;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;
 }
}
html body.asn-nav-ready.asn-layout-v4994 .asn-app-main :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select),
html body.asn-nav-ready.asn-layout-v4994 :is(.modal-content,.modal,.cv-sku-dialog) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){
  box-sizing:border-box;max-width:100%;min-width:0;
}
html body.asn-nav-ready.asn-layout-v4994 .asn-app-main :is(.toolbar,.header-actions,.filter-row,.filters,.form-actions),
html body.asn-nav-ready.asn-layout-v4994 :is(.modal-actions,.confirm-actions){flex-wrap:wrap;min-width:0}
/* Modais respeitam a tela e têm rolagem interna, com cabeçalho e ação alcançáveis. */
html body.asn-nav-ready.asn-layout-v4994 :is(.modal-overlay,#custom-confirm-overlay){
 box-sizing:border-box;padding:clamp(10px,2.5vw,24px);max-width:100vw;max-height:100dvh;
 overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
}
html body.asn-nav-ready.asn-layout-v4994 .modal-overlay > .modal-content,
html body.asn-nav-ready.asn-layout-v4994 #custom-confirm-box{
 box-sizing:border-box;width:min(100%,760px);max-width:100%;max-height:calc(100dvh - 28px);
 min-width:0;overflow:auto;overscroll-behavior:contain;
}
html body.asn-nav-ready.asn-layout-v4994 .overlay.show{
 box-sizing:border-box;max-width:100vw;max-height:100dvh;overflow:auto;
 padding:clamp(10px,2.5vw,22px);overscroll-behavior:contain;
}
html body.asn-nav-ready.asn-layout-v4994 .overlay > .modal{
 box-sizing:border-box;max-width:100%;max-height:calc(100dvh - 28px);
 overflow:auto;overscroll-behavior:contain;
}
html body.asn-nav-ready.asn-layout-v4994 dialog.cv-sku-dialog{
 box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;
}
html body.asn-nav-ready.asn-layout-v4994 :is(.modal-content,.modal,.cv-sku-dialog) :is(.grid,.grid2,.formgrid,.form-grid,.form-row,.userrow,.invite-row,.perm-groups){min-width:0;max-width:100%;}
html body.asn-nav-ready.asn-layout-v4994 :is(.modal-content,.modal,.cv-sku-dialog) :is(h1,h2,h3,p,span){overflow-wrap:anywhere}
@media(max-width:900px){
 html body.asn-nav-ready.asn-layout-v4994 > .asn-app-main{max-width:100vw!important;}
 html body.asn-nav-ready.asn-layout-v4994 .asn-app-main :is(.top,.page-header,.header-actions,.toolbar,.filter-row,.filters){flex-wrap:wrap;max-width:100%;}
}
@media(max-width:680px){
 html body.asn-nav-ready.asn-layout-v4994 :is(.modal-overlay,#custom-confirm-overlay,.overlay.show){padding:10px!important;align-items:center;}
 html body.asn-nav-ready.asn-layout-v4994 :is(.modal-overlay > .modal-content,#custom-confirm-box,.overlay > .modal){
  width:100%!important;max-width:100%!important;max-height:calc(100dvh - 20px)!important;
  padding:clamp(12px,3vw,18px)!important;border-radius:13px!important;
 }
 html body.asn-nav-ready.asn-layout-v4994 .overlay > .modal{padding:0!important;}
 html body.asn-nav-ready.asn-layout-v4994 .overlay > .modal .modal-body,
 html body.asn-nav-ready.asn-layout-v4994 .overlay > .modal .modal-head{padding:13px!important;}
 html body.asn-nav-ready.asn-layout-v4994 :is(.modal-content,.modal) :is(.grid2,.formgrid,.form-manual,.userrow,.invite-row,.perm-groups,.pp-client-modal-grid){grid-template-columns:minmax(0,1fr)!important;}
 html body.asn-nav-ready.asn-layout-v4994 .modal-content .form-group :is(input:not([type="checkbox"]),select,textarea){width:100%!important;}
 html body.asn-nav-ready.asn-layout-v4994 :is(.modal-actions,.confirm-actions){gap:8px!important;}
 html body.asn-nav-ready.asn-layout-v4994 :is(.modal-actions,.confirm-actions) :is(button,.btn){min-height:40px;max-width:100%;}
 html body.asn-nav-ready.asn-layout-v4994 .asn-app-main :is(.toolbar,.header-actions,.filters,.filter-row) :is(input:not([type="checkbox"]),select){max-width:100%;}
}
@media(prefers-reduced-motion:reduce){html body.asn-nav-ready.asn-layout-v4994 .modal-content{scroll-behavior:auto}}
/* Clareza visual nos diálogos de administração, inclusive no tema escuro. */
html body.asn-nav-ready.asn-layout-v4994 .overlay .modal-head :is(h1,h2,h3){color:var(--text,#f8fafc)!important;}
html body.asn-nav-ready.asn-layout-v4994 .overlay .modal-body .field label{color:#cbd5e1!important;}
/* Impressão e PDF devem manter o leiaute original. */
@media print{html body.asn-nav-ready.asn-layout-v4994 :is(.table-container,.table-wrap,.scroll){overflow:visible!important;max-width:none!important}}
