/* DIGIX V4.1.60 — final adaptive layer for common laptop viewports and OS scaling. */
:root{
  --suite-responsive-gutter:clamp(10px,1.25vw,22px);
  --suite-responsive-gap:clamp(8px,.8vw,14px);
  --suite-responsive-control:clamp(34px,2.4vw,40px);
}
html{min-width:0;overflow-x:hidden;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body,button,input,select,textarea{font-size-adjust:none}
*,*::before,*::after{box-sizing:border-box}
img,video,canvas,svg{max-width:100%}
button,input,select,textarea{max-width:100%}
button{overflow-wrap:anywhere}
.suite-app-main-250,
.workspace-page-overlay-255,
.quote-preview-shell,.quote-modal,.survey-shell,.ops-shell,.sa-shell,
.card,.quote-card,.survey-info-card,.survey-screen-card,.reports417-panel{min-width:0}

/* Long labels and values may wrap, but controls and records remain contained. */
:is(.suite-result-label,.suite-result-detail,.myq-pipeline-label,.myq-pipeline-detail,
 .dash248-row-copy,.survey-row,.myq-row,.ops-row,.reports417-panel-head,
 .quote-section-heading-row,.sa-section-heading-row) :is(span,b,strong,small,p,h1,h2,h3,h4){
  min-width:0;overflow-wrap:anywhere;
}

/* Every secondary dialog is viewport-bound and owns its scrolling. */
:is(.quote-overlay,.quote-preview-overlay,.ops-overlay,.sa-overlay,.survey-marker-modal,
 .myq-delete-overlay,.v4019-overlay,.guide-modal,.security-dialog,.security-gate){
  max-width:100vw;max-height:100vh;
}
:is(.quote-modal,.quote-preview-shell,.ops-card,.sa-shell,.survey-shell,.myq-delete-card,
 .v4019-card,.guide-card,.security-dialog-card,.security-gate-card){
  width:min(var(--dialog-natural-width,1180px),calc(100vw - 2 * var(--suite-responsive-gutter)))!important;
  max-width:calc(100vw - 2 * var(--suite-responsive-gutter))!important;
  max-height:calc(100dvh - 2 * var(--suite-responsive-gutter))!important;
}
:is(.quote-modal-body,.quote-preview-body,.ops-card-body,.sa-body,.survey-body,
 .myq-delete-body,.v4019-body,.guide-body){min-height:0;overflow:auto;overscroll-behavior:contain}

/* Data grids preserve readable columns and scroll inside their own card. */
:is(.survey-list,.myq-table,.ops-table,.reports417-table-wrap,.v413-access-table,
 .survey-trash-list,.sa-table-wrap){max-width:100%;overflow-x:auto!important;overflow-y:visible;overscroll-behavior-inline:contain}
:is(.survey-row,.myq-row,.myq-table-head,.ops-row,.v413-access-row,.v413-access-head){min-width:max-content}
.survey-row{min-width:980px}
.myq-row,.myq-table-head{min-width:920px}
.ops-row{min-width:930px}
.reports417-table{min-width:max(100%,720px)}

/* Toolbars and footer actions wrap instead of leaving the panel. */
:is(.survey-toolbar,.survey-toolbar-actions,.survey-screen-head,.survey-screen-actions,
 .quote-modal-actions,.quote-heading-actions,.myq-toolbar,.myq-actions,.ops-actions,
 .ops-tabs,.reports417-head-actions,.reports417-filter-actions,.sa-actions,
 .myq-delete-actions){flex-wrap:wrap;min-width:0}
:is(.quote-modal-actions,.myq-delete-actions,.ops-card-actions){row-gap:8px}

/* Configurator: flexible two-pane shell and contained action row. */
#configuratorWorkspace248>.grid{grid-template-columns:minmax(250px,320px) minmax(0,1fr)!important;gap:var(--suite-responsive-gap)!important}
#configuratorWorkspace248 :is(.summary-top,.summary-actions,.tabs,.export-actions){flex-wrap:wrap}
#configuratorWorkspace248 .summary-top>div:first-child{min-width:0}
#configuratorWorkspace248 .summary-actions{max-width:100%;justify-content:flex-end}
#configuratorWorkspace248 .fit-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important}

/* Compact laptop / 125–150% scaling: CSS viewport generally lands below 1400px. */
@media (max-width:1400px){
  :root{--workspace-page-x:14px;--workspace-page-y:12px}
  body.dashboard-active-248 .dash252-layout{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-template-areas:"hero hero" "calendar calendar" "kpis kpis" "day day" "wait wait" "work schedule" "next activity" "note note" "quick quick"!important;
  }
  body.dashboard-active-248 .sticky305-widget{min-height:360px!important}
  #myqPipelineTopper{--result-columns:3!important}
  .survey-result-grid{--result-columns:2!important}
  #operationsCornerModal .ops-kpis.suite-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .reports417-kpi-grid,.reports417-kpi-grid.executive{grid-template-columns:repeat(2,minmax(155px,1fr))}
  .reports417-layout.three{grid-template-columns:repeat(2,minmax(0,1fr))}
  .quote-form-grid-4,.survey-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .survey-photo-grid{grid-template-columns:repeat(2,minmax(160px,1fr))}
  #v4UserEditorModal .v4-user-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:1180px){
  body.workspace-page-active-255 .suite-app-sidebar-250,
  body.dashboard-active-248 .suite-app-sidebar-250{width:190px!important}
  body.workspace-page-active-255 .suite-app-main-250{margin-left:190px!important}
  .workspace-page-overlay-255.quote-preview-overlay,
  #operationsCornerModal.workspace-page-overlay-255{left:190px!important}
  .suite-result-card{grid-template-columns:38px minmax(0,1fr) auto!important;padding:10px!important;column-gap:8px;height:88px}
  .suite-result-icon{width:32px;height:32px}
  .suite-result-count{font-size:18px!important}
  .reports417-layout.two,.reports417-layout.three{grid-template-columns:1fr}
  .reports417-filterbar{position:relative;align-items:stretch;flex-direction:column}
  .reports417-filter-core{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .reports417-filter-core label,.reports417-filter-core select{width:100%;min-width:0}
  .sa-crm-add.contacts{grid-template-columns:1fr 1fr}
}

@media (max-width:900px){
  :root{--suite-responsive-gutter:10px}
  body.workspace-page-active-255 .suite-app-sidebar-250,
  body.dashboard-active-248 .suite-app-sidebar-250{width:0!important;transform:translateX(-100%)}
  body.workspace-page-active-255 .suite-app-main-250{margin-left:0!important}
  .workspace-page-overlay-255.quote-preview-overlay,
  #operationsCornerModal.workspace-page-overlay-255{left:0!important}
  body.dashboard-active-248 .dash252-layout{grid-template-columns:1fr!important;grid-template-areas:"hero" "calendar" "kpis" "day" "wait" "work" "schedule" "next" "activity" "note" "quick"!important}
  #myqPipelineTopper,.survey-result-grid{--result-columns:2!important}
  .reports417-kpi-grid,.reports417-kpi-grid.executive{grid-template-columns:repeat(2,minmax(135px,1fr))}
  #configuratorWorkspace248>.grid{grid-template-columns:1fr!important}
  #configuratorWorkspace248>.grid>aside{position:static!important;max-height:none!important}
  .quote-form-grid-4,.survey-grid{grid-template-columns:1fr!important}
  .survey-grid :is(.span2,.span4){grid-column:1!important}
  .survey-ref-row select{min-width:0;width:100%}
  .survey-side-panel{width:min(620px,100vw)}
  .quote-overlay.survey-reference-open .quote-modal{width:100vw;max-width:100vw;margin-right:0}
  .q412-quote-nav,.tabs,.ops-tabs,.reports417-category-nav,.reports417-subnav{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}
  .q412-quote-nav button,.tabs button,.ops-tabs button,.reports417-category-nav button,.reports417-subnav button{flex:0 0 auto}
  .v4157-report-head,.v4157-report-row{min-width:690px}
  #v4157ReportRows{overflow:auto!important}
}

@media (max-width:620px){
  #myqPipelineTopper,.survey-result-grid{--result-columns:1!important}
  #operationsCornerModal .ops-kpis.suite-result-grid{grid-template-columns:1fr!important}
  .reports417-kpi-grid,.reports417-kpi-grid.executive{grid-template-columns:1fr}
  .reports417-filter-core,.sa-crm-add.contacts{grid-template-columns:1fr}
  .survey-photo-grid,.survey-report-photos{grid-template-columns:1fr}
  .survey-toolbar{align-items:stretch;flex-direction:column}
  .survey-search{width:100%}
  :is(.quote-modal-actions,.myq-delete-actions,.ops-card-actions)>button{flex:1 1 140px}
}

@media (max-height:800px){
  :is(.quote-overlay,.quote-preview-overlay,.ops-overlay,.sa-overlay,.survey-marker-modal){align-items:flex-start!important;padding-top:8px!important;padding-bottom:8px!important;overflow:auto!important}
  :is(.quote-modal,.quote-preview-shell,.ops-card,.sa-shell,.survey-shell){max-height:calc(100dvh - 16px)!important}
  .suite-result-card{height:82px}
  body.dashboard-active-248 .dash252-calendar-card{height:auto!important;min-height:300px!important;max-height:none!important}
}

@media print{
  html,body{overflow:visible!important}
  :is(.survey-list,.myq-table,.ops-table,.reports417-table-wrap){overflow:visible!important}
  :is(.survey-row,.myq-row,.myq-table-head,.ops-row,.reports417-table){min-width:0!important}
}
