/* Fluid app geometry. Wide data tables scroll inside their own region, never off screen. */
.content,.content>*,.detail,.detail-col,.card,.form-field,.ui-modal-body{min-width:0}
.content{max-width:100%;box-sizing:border-box}
.content>*{max-width:100%}
.card-head,.detail-actions,.ax-actions,.ax-file-actions,.ax-history-heading,.pager{flex-wrap:wrap}
.card-head>*{min-width:0}
/* Preserve each dialog's desktop width; viewport caps belong only to small screens. */
.ui-modal,.ax-form-dialog{max-height:calc(100dvh - 24px);min-width:0;box-sizing:border-box}
.ui-modal-header,.ui-modal-footer{flex-shrink:0;flex-wrap:wrap}
.ui-modal-header h2{min-width:0;overflow-wrap:anywhere}
.ui-modal-body{min-height:0;overscroll-behavior:contain}
.form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.form-field input,.form-field textarea,.form-field select{min-width:0;max-width:100%;box-sizing:border-box}
.ax-task-description{min-height:160px!important;resize:vertical}
.ax-card-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr)!important}
.detail .ui-table,.ax-approved-card .ui-table{min-width:0;table-layout:fixed;width:100%}
.detail .ui-table td,.ax-approved-card .ui-table td{overflow-wrap:anywhere}
.ui-table-wrap,.ax-access-scroll,.ax-chart-scroll{max-width:100%;min-width:0;overflow:auto}
.history-layout{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr)}
.ax-projects-page .ax-p-page-size{display:flex;align-items:center;gap:6px;white-space:nowrap}
.ax-p-page-size select{width:66px;padding:4px 6px}
.ax-p-pager{flex-wrap:wrap;flex:none}
.ax-p-pager .ax-p-count-size{display:flex;align-items:center;flex-wrap:wrap;gap:14px}
.ax-p-board-area .ax-project-board{height:100%;min-height:0}
.ax-projects-page .screen-head{padding:0}
.ax-projects-page .detail-actions{justify-content:flex-end}
.ui-tabs{max-width:100%;flex-wrap:wrap}
.props{min-width:0}.props dd{min-width:0;overflow-wrap:anywhere}
.ax-notifications{max-width:calc(100vw - 24px)}
.ax-notifications>.card{max-width:100%}
@media(max-width:1180px){
  .ax-card-grid{grid-template-columns:minmax(0,1fr)!important}
  .ax-approved-card .props{grid-template-columns:160px minmax(0,1fr)}
}
@media(max-width:900px){
  .history-layout{grid-template-columns:minmax(0,1fr)}
  .ax-chart-legend{gap:12px;flex-wrap:wrap}
}
@media(max-width:760px){
  .ui-modal,.ax-form-dialog{max-width:calc(100vw - 24px)}
  .layout-collapsed .content{margin-left:0}
  .content{padding-left:10px;padding-right:10px}
  .ax-p-shell{height:calc(100dvh - 220px)!important;min-height:260px;padding-bottom:60px;box-sizing:border-box}
  .ax-p-toolbar{flex-wrap:wrap}.ax-p-toolbar>input{flex-basis:100%;width:100%}
  .ax-approved-card .card{padding:12px}
  .ax-history-heading time{white-space:normal}
  .ax-stage-strip{max-width:100%}
}
@media(max-width:600px){
  .ax-projects-page .ax-p-table{width:100%!important;display:block}
  .ax-p-table colgroup,.ax-p-table thead{display:none}
  .ax-p-table tbody{display:block}
  .ax-projects-page .ax-p-table tr{display:grid;grid-template-columns:minmax(0,1fr);padding:8px 10px;border-bottom:1px solid #dce2eb}
  .ax-projects-page .ax-p-table td{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px;border:0;padding:4px 0;text-align:left!important}
  .ax-p-table td:before{content:attr(data-label);color:#7a8799;font-size:10px}
  .ax-p-table td:nth-child(2){font-weight:500}
  .ax-projects-page .ax-p-table-wrap+.ax-board-scrollbar{display:none}
  .ax-approved-card .form-grid,.form-grid{grid-template-columns:minmax(0,1fr)}
  .ax-approved-card .props{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:8px}
  .ax-p-pager{gap:6px}.ax-p-pager .ax-p-count-size{gap:8px}
  .ax-p-filter-grid{grid-template-columns:minmax(0,1fr)}
  .ax-p-filter-options{max-height:190px}
  .ax-product-edit,.ax-tender-grid{grid-template-columns:minmax(0,1fr)}
  .ui-modal-backdrop{padding:8px;align-items:center}
  .ui-modal,.ax-form-dialog{max-width:100%;border-radius:10px}
  .ax-project-delete-slot{grid-column:1}
}
