/* Page containment, loaded after module styles. Wide data stays scrollable
   inside its own surface; never hide overflow on body to conceal clipped UI. */
html,body{width:100%;min-width:0}
main,#app,#content,#report-content,#market-content,#multi-store-content,
.panel,.market-module,.pa-module,.dashboard-insights,.opportunity-pool{min-width:0;max-width:100%}
.table-wrap,.market-table-scroll,.opp-table-scroll,.pa-table-scroll{display:block;min-width:0;max-width:100%;overflow-x:auto}
fieldset{min-inline-size:0;min-width:0;max-width:100%;box-sizing:border-box}
legend{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.toolbar,.filters,.nav,.panel-head,.dialog-actions,.pager,.group-pager,
.import-controls,.market-history-controls{min-width:0;max-width:100%;flex-wrap:wrap}
.toolbar>div,.filters>label,.panel-head>div,.filters>form,
.import-controls>label,.pa-search-form{min-width:0;max-width:100%}
.filters label{flex-wrap:wrap}
.filters input,.filters select,.import-controls input,.import-controls select,
.pa-search-form input{min-width:0;max-width:100%}
.filters .btn,.nav .btn,.panel-head .btn,.dialog-actions .btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.panel h2,.panel h3,.panel p,.panel small,.notice,.error,
.brand,.tag-filter{overflow-wrap:anywhere}
.panel pre,#ai-body pre{max-width:100%;overflow-x:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.panel textarea{min-width:0;max-width:100%}
.kpis,.forms,.import-counts,.promotion-totals,.detail-totals,
.overview-cards,.plan-summary,.plan-effects,.pa-metrics{min-width:0;max-width:100%}
.kpis>* ,.forms>* ,.import-counts>*{min-width:0;overflow-wrap:anywhere}
header{flex-wrap:wrap;min-width:0}header>*{max-width:100%;min-width:0}
.chart-tooltip,.pa-chart-tooltip{min-width:0;max-width:calc(100% - 16px);overflow-wrap:anywhere}
dialog{max-width:calc(100vw - 24px);min-width:0;overflow:auto}
.ai-heading,.padj-heading{flex-wrap:wrap;min-width:0}
.ai-heading>div,.ai-form label,.ai-grid>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
.ai-dialog input,.ai-dialog select,.ai-dialog textarea{min-width:0;max-width:100%}
.ai-tabs .btn,.ai-actions .btn,.ai-presets .btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1100px){
 .import-counts{grid-template-columns:repeat(3,minmax(0,1fr))}
 .pa-search-form{flex-wrap:wrap}
}
@media(max-width:700px){
 .kpis,.import-counts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .filters>label,.import-controls>label{width:100%;min-width:0}
 .filters label>input:not([type=checkbox]),.filters label>select{flex:1 1 130px;width:auto}
 .market-module .market-file-label,.market-module .market-detail-heading>div:first-child{min-width:0;max-width:100%}
 .market-module .market-search-form{min-width:0;flex-wrap:wrap}
 .pa-search-form input{min-width:0;flex:1 1 140px;width:auto}
 .pager,.group-pager{justify-content:flex-start}
 .dialog-actions{gap:8px}
}
@media(max-width:420px){
 .import-counts,.promotion-totals,.pa-title-candidates{grid-template-columns:minmax(0,1fr)}
 .filters label{align-items:flex-start}
 .panel{padding:12px}
}
