/* Stavix 209.64.118 — responsive presentation only; original controls and business actions retained. */
.stv-mobile-only,.stv-row-toggle,.stv-cell-label,.stv-line-label{display:none}
@media screen and (max-width:1024px){
 body.app-page{display:block;grid-template-columns:minmax(0,1fr)}
 body.app-page>.content{width:100%;min-width:0;margin-left:0}
 body.app-page>.sidebar{position:fixed!important;inset:0 auto 0 0!important;z-index:210!important;width:min(320px,88vw)!important;height:100dvh!important;box-sizing:border-box;transform:translateX(-105%);transition:transform .18s ease;overflow-y:auto;overscroll-behavior:contain;visibility:hidden}
 body.app-page>.sidebar.mobile-open{transform:translateX(0);visibility:visible}
 body.app-page>.sidebar nav{display:grid}
 body.app-page .mobile-nav-toggle,body.app-page .sidebar-close{display:inline-flex!important;align-items:center;justify-content:center;min-width:44px;min-height:44px}
 body.app-page .sidebar-backdrop:not([hidden]){display:block;position:fixed;inset:0;background:#14223580;z-index:209}
 body.mobile-nav-open{overflow:hidden}
 body.app-page .topbar{padding:8px 12px;height:auto;min-height:60px;gap:8px;flex-wrap:wrap}
 body.app-page .topbar-company{min-width:0;flex:1}
 body.app-page .topbar-company>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:40vw}
 body.app-page .topbar-company>.muted{display:none}
 body.app-page .topbar .global-search{order:5;flex:1 0 100%;width:100%;max-width:none;margin:0}
 body.app-page .topbar .global-search input{width:100%;min-width:0}
 body.app-page .topbar .user-menu{gap:5px}
 body.app-page .topbar .user-menu>span{display:none}
 body.app-page .topbar-notification-panel{position:fixed;top:62px;left:12px;right:12px;width:auto;max-width:none;max-height:70dvh}
 body.app-page .topbar .user-menu .language-form select{max-width:100px}
 body.app-page .sidebar a,body.app-page .sidebar button{min-height:44px!important}

}
@media screen and (max-width:760px){
 :root{--stv-mobile-gap:12px}
 *,*::before,*::after{box-sizing:border-box}
 body.app-page{font-size:14px}
 body.app-page .content{min-width:0}
 body.app-page .content>section,body.app-page .content>div{max-width:100%}
 body.app-page .page-heading{padding:16px 12px 12px;align-items:flex-start;flex-wrap:wrap;gap:10px}
 body.app-page .page-heading h1{font-size:23px;line-height:1.2;overflow-wrap:anywhere}
 body.app-page .page-heading .page-subtitle{display:none}
 body.app-page .page-heading>div{min-width:0;max-width:100%}
 body.app-page .heading-actions,body.app-page .table-tools{display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
 body.app-page .heading-actions>*,body.app-page .table-tools>*{max-width:100%;min-width:0}
 body.app-page .table-card{margin:0 12px 14px;padding:12px;min-width:0}
 body.app-page .table-head{align-items:stretch;flex-direction:column;gap:10px}
 body.app-page .table-tools>input[type=search]{flex:1 0 100%;width:100%}
 body.app-page .flash{margin:0 12px 12px}
 body.app-page button:not([class*="icon"]),body.app-page a.primary-button,body.app-page a.secondary-button,body.app-page [role=button],body.app-page .compact-button{min-height:44px;padding:9px 11px;font-size:13px;white-space:normal;line-height:1.3;touch-action:manipulation}
 body.app-page .modal-close,body.app-page button[class*="close"]{width:44px;height:44px;min-width:44px;min-height:44px;flex-shrink:0}
 body.app-page input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]),body.app-page select,body.app-page textarea{font-size:16px;min-height:44px;height:auto;max-width:100%;min-width:0}
 body.app-page input[type=checkbox],body.app-page input[type=radio]{min-width:20px;width:20px;height:20px;vertical-align:middle}
 body.app-page label{max-width:100%;min-width:0}
 body.app-page :is(.form-grid,.form-section-grid,.settings-grid,.quote-header-grid,.warehouse-form-grid,.flow-form-grid,.workforce-form-grid,.workplan-form-grid,.supply-form-grid,.rental-form-grid,.purchase-form-grid,.economics-form-grid,.defect-form-grid,.rfi-form-grid,.inspection-form-grid,.drawing-form-grid,.feedback-form-grid,.payroll-form-grid,.change-order-form-grid,.project-document-meta-grid,.reports-filter-grid,.quote-tool-grid,.drawing-link-grid){grid-template-columns:minmax(0,1fr)!important;gap:12px!important;min-width:0}
 body.app-page :is(.form-grid,.settings-grid,.flow-form-grid,.quote-header-grid,.warehouse-form-grid,.workforce-form-grid,.rental-form-grid,.workplan-form-grid) > *{min-width:0;grid-column:auto!important;max-width:100%}
 body.app-page :is(.form-grid,.settings-grid,.warehouse-form-grid) .span-2{grid-column:1/-1!important}
 body.app-page :is(.dashboard-layout,.dashboard-management-grid,.dashboard-project-grid,.account-layout,.account-detail-grid,.communication-delivery-layout,.communication-message-editor-layout,.communication-recipient-grid,.project-portal-comm-layout,.portal-publication-grid,.rental-picker-layout,.rental-detail-overview-grid,.rental-document-grid,.rental-dashboard-grid,.equipment-project-summary,.warehouse-setup-grid,.einvoice-detail-grid,.einvoice-import-grid,.admin-database-layout,.manual-layout,.qcw-layout,.quote-template-layout,.inspection-template-layout,.project-team-modal-grid,.project-assigned-team-grid,.project-file-grid,.drawing-grid,.report-card-grid,.project-document-layout,.catalog-detail-grid){grid-template-columns:minmax(0,1fr)!important;min-width:0}
 body.app-page :is(.stats-grid,.project-summary,.quote-summary,.catalog-summary,.flow-kpis,.workplan-summary,.economics-summary,.site-diary-summary,.defect-summary-grid,.inspection-summary-grid,.rfi-summary-grid,.rental-detail-summary,.rental-finance-summary,.history-stat-grid){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px;padding:0 12px;margin:10px 0 14px}
 body.app-page :is(.stats-grid,.project-summary,.quote-summary,.catalog-summary,.flow-kpis,.workplan-summary,.economics-summary)>article{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:10px;min-height:0;min-width:0}
 body.app-page :is(.stats-grid,.project-summary,.quote-summary,.catalog-summary,.flow-kpis) strong{font-size:16px;white-space:normal;overflow-wrap:anywhere}
 body.app-page :is(.stats-grid,.project-summary,.quote-summary,.catalog-summary,.flow-kpis) span{font-size:12px}
 body.app-page :is(.settings-tabs,.flow-tabs,.room-tabs,.workplan-modal-tabs,.quote-productivity-tabs,.quote-editor-mode-tabs,.rental-tabs,.rental-detail-tabs,.portal-tabs,.account-tabs,.warehouse-section-tabs,.project-portal-subtabs,.standard-tabs){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;max-width:100%;gap:6px;padding:6px;scrollbar-width:thin;overscroll-behavior-x:contain}
 body.app-page :is(.settings-tabs,.flow-tabs,.room-tabs,.workplan-modal-tabs,.quote-productivity-tabs,.quote-editor-mode-tabs,.rental-tabs,.account-tabs,.warehouse-section-tabs)>*{flex:0 0 auto;white-space:nowrap!important;min-height:44px}
 body.app-page :is(.settings-tabs,.project-menu,.project-hub,.quote-header-grid,.quote-offer-summary,.rfq-flow-shell,.reports-shell,.account-shell,.admin-shell,.manual-layout){margin-left:12px!important;margin-right:12px!important}
 body.app-page .project-menu-primary{display:flex;overflow:auto;grid-template-columns:none}
 body.app-page .project-menu-primary-item{flex:0 0 auto;max-width:220px;padding:10px}
 body.app-page .project-menu-primary-item small{display:none}
 body.app-page .project-menu-secondary{display:flex;flex-wrap:nowrap;overflow:auto}
 body.app-page .project-menu-secondary>*{flex-shrink:0}
 body.app-page :is(.filter-card,.filter-panel,.filter-bar,.table-filters,.table-toolbar,.flow-filters,.workplan-toolbar,.rental-picker-toolbar,.picker-toolbar,.material-picker-toolbar){position:static!important;display:flex!important;flex-wrap:wrap;gap:8px;padding:10px;min-width:0;max-width:100%}
 body.app-page :is(.flow-filters,.filter-bar,.table-filters,.workplan-toolbar,.rental-picker-toolbar,.picker-toolbar)>*{min-width:0;max-width:100%;flex:1 1 140px}
 /* Full-height phone dialogs, with their existing scrollable body and explicit close action. */
 body.app-page :is(.modal-backdrop,.flow-modal-backdrop,.warehouse-modal-backdrop,.stavix-dialog-backdrop){padding:8px!important;align-items:center}
 body.app-page :is(.modal,.warehouse-flow-modal,[role=dialog]){width:100%!important;max-width:100%!important;min-width:0!important;max-height:calc(100dvh - 16px)!important;border-radius:12px!important;overflow:auto;overscroll-behavior:contain}
 body.app-page :is(.modal,.warehouse-flow-modal)>header{padding:10px 12px!important;position:sticky;top:0;z-index:5;gap:8px}
 body.app-page :is(.modal,.warehouse-flow-modal)>header h2{font-size:18px;overflow-wrap:anywhere}
 body.app-page .modal .form-grid{padding:12px!important}
 body.app-page :is(.modal-actions,.form-actions,.flow-modal-actions){display:flex;flex-wrap:wrap;gap:8px;padding:10px 12px!important}
 body.app-page :is(.modal-actions,.form-actions,.flow-modal-actions)>*{flex:1 1 auto;max-width:100%}
 /* Cards retain the real cells, controls, selection and delegated listeners. */
 body .stv-card-table{display:block!important;min-width:0!important;width:100%!important;table-layout:auto!important;border:0}
 body .stv-card-table>thead{display:block!important}
 body .stv-card-table>thead>tr{display:flex!important;gap:8px}
 body .stv-card-table>thead th{display:none!important}
 body .stv-card-table>thead th:has(input){display:flex!important;align-items:center;gap:8px;min-height:44px}
 body .stv-card-table>tbody{display:grid!important;gap:10px;width:100%}
 body .stv-card-table>tbody>tr:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr);gap:0;padding:10px!important;border:1px solid #dce1e8;border-radius:10px;background:#fff;position:relative}
 body .stv-card-table>tbody>tr[style*="display: none"],body .stv-card-table>tbody>tr[style*="display:none"]{display:none!important}
 body .stv-card-table>tbody>tr>td{display:grid!important;grid-template-columns:minmax(80px,35%) minmax(0,1fr);align-items:start;gap:6px;padding:5px 0!important;min-width:0!important;max-width:100%;border:0!important;white-space:normal!important;text-align:left!important;overflow-wrap:anywhere;font-size:13px}
 body .stv-card-table>tbody>tr>td::before{content:none!important}
 body .stv-card-table .stv-cell-label{display:block;font-size:11px;font-weight:600;color:#657183;line-height:1.5;grid-column:1;grid-row:1}
 body .stv-card-table>tbody>tr>td.stv-title-cell{display:block!important;font-size:15px;font-weight:650;border-bottom:1px solid #edf0f4!important;padding-bottom:8px!important;margin-bottom:4px}
 body .stv-card-table .stv-title-cell>.stv-cell-label{display:none}
 body .stv-card-table>tbody>tr>td.stv-action-cell{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px}
 body .stv-card-table>tbody>tr>td.stv-action-cell>.stv-cell-label{display:none}
 body .stv-card-table>tbody>tr>td.stv-secondary-cell{display:none!important}
 body .stv-card-table>tbody>tr.stv-expanded>td.stv-secondary-cell{display:grid!important}
 body .stv-card-table>tbody>tr:focus-within>td.stv-secondary-cell:has(:focus){display:grid!important}
 body .stv-row-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin-top:5px;border:1px solid #dce1e8;background:#f5f6f8;color:#24384d;border-radius:8px;width:100%}
 body .stv-card-table .action-menu{right:0;max-width:calc(100vw - 48px);z-index:10}
 body .stv-card-table td input:not([type=checkbox]),body .stv-card-table td select{width:100%}
 body :is(.table-scroll,.flow-table-wrap,.warehouse-table-wrap,.workplan-table-shell){max-width:100%;min-width:0}
 body .stv-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 /* Document editors: each line becomes a compact editable card, not a 900px row. */
 body.app-page .quote-workbench{display:block!important;grid-template-columns:minmax(0,1fr)!important;margin:0 12px!important}
 body.app-page .quote-workbench-main{padding-bottom:12px!important;min-width:0}
 body.app-page .quote-line-head{display:none!important}
 body.app-page .quote-line{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0!important;width:100%!important;gap:9px!important;margin:10px 0!important;padding:12px!important;border:1px solid #dce1e8!important;border-radius:10px;background:#fff}
 body.app-page .quote-line>*{min-width:0!important;max-width:100%}
 body.app-page .quote-line .line-name-cell{grid-column:1/-1!important;padding:0!important}
 body.app-page .quote-line .line-name-cell>div{display:flex;flex-wrap:wrap;gap:6px}
 body.app-page .quote-line .autocomplete-wrap{flex:1 1 100%;min-width:0}
 body.app-page .quote-line .line-name{width:100%!important;font-size:16px!important;min-height:44px!important}
 body.app-page .quote-line .stv-line-field{display:grid;gap:4px;min-width:0}
 body.app-page .quote-line .stv-line-label{display:block;font-size:11px;color:#657183;font-weight:600}
 body.app-page .quote-line .line-total{align-self:center;text-align:right}
 body.app-page .quote-line .line-drag{display:none!important}
 body.app-page .quote-pro-toolbar{position:static!important}
 body.app-page .quote-pro-toolbar-row{flex-wrap:wrap;overflow:visible}
 body.app-page .quote-pro-tool-btn:nth-of-type(3),body.app-page .quote-pro-tool-btn:nth-of-type(4){display:inline-flex!important}
 body.app-page .quote-pro-summary{position:static!important;display:flex;flex-wrap:wrap;padding:12px!important;max-width:100%}
 body.app-page .quote-inspector,body.app-page .quote-inspector.quote-pro-inspector{position:static!important;min-height:0!important;max-height:none!important;width:100%!important;margin:12px 0}
 body.app-page .quote-inspector>header{background:#eef0f4!important;color:#24384d!important}
 body.app-page .room-summary-row{flex-wrap:wrap;gap:8px}
 body.app-page .quote-suggestions{min-width:0!important;max-width:100%!important}
 body.app-page .qcw-categories,body.app-page .qcw-summary{position:static!important;max-height:220px;overflow:auto}
 body.app-page :is(.pdf-viewer-heading,.pdf-viewer-actions,.inventory-label-toolbar){display:flex;flex-wrap:wrap;gap:8px;padding:12px}
 body.app-page .pdf-viewer-shell{margin:0 12px!important;min-width:0}
 body.app-page .pdf-viewer-shell iframe{width:100%;height:70dvh}
 body.app-page :is(.drawing-viewer-shell,.guided-layout,.estimate-detail-grid){display:flex;flex-direction:column;min-width:0;max-width:100%}
 body.app-page :is(.drawing-viewer-toolbar,.guided-toolbar,.estimate-editor-toolbar){flex-wrap:wrap;gap:6px;max-width:100%}
 body.app-page :is(.drawing-viewer-canvas,.guided-canvas-wrap){min-width:0;max-width:100%;height:60dvh}
 .portal-content-grid,.portal-home-layout,.portal-account-grid,.portal-message-layout,.employee-profile-grid{grid-template-columns:minmax(0,1fr)!important}
 .portal-main,.employee-content{min-width:0;max-width:100%}
 .portal-main-nav{display:flex;overflow-x:auto;gap:8px}
 .portal-main-nav a{flex-shrink:0;min-height:44px}
 .employee-portal input,.employee-portal select,.portal-app input,.portal-app select{font-size:16px;min-height:44px}
 [hidden]{display:none!important}
}
@media(prefers-reduced-motion:reduce){body.app-page>.sidebar{transition:none}}

@media screen and (max-width:760px){
 body .stv-card-table>tbody>tr>td>:not(.stv-cell-label){grid-column:2;min-width:0;max-width:100%}
 body .stv-card-table>tbody>tr>td.stv-title-cell>*{grid-column:auto}
 body .stv-card-table>tbody>tr>td:has(>.stv-row-toggle){flex-wrap:wrap}
 body .stv-card-table>tbody>tr>td>.stv-row-toggle{flex:1 0 100%;grid-column:1/-1}
 body.app-page .flow-kpi,body.app-page .flow-kpi:nth-child(n){flex-wrap:wrap;gap:4px;padding:9px;min-width:0}
 body.app-page .flow-heading>.flow-actions{max-width:100%;width:100%}
 body.app-page .flow-filter-dock{position:static!important}
 body.app-page .flow-grid,body.app-page .flow-filters details>.flow-grid{grid-template-columns:minmax(0,1fr)!important}
}

/* Page-family audit: single-column forms/detail panels, including administrative workspaces. */
@media screen and (max-width:760px){
 body.app-page :is(.account-detail-grid,.account-layout,.admin-active-addon-grid,.admin-addon-grid,.admin-company-license-grid,.admin-database-layout,.admin-news-platform-grid,.admin-plan-grid,.admin-retention-grid,.branding-grid,.catalog-detail-grid,.catalog-detail-planning-grid,.change-order-form-grid,.communication-channel-grid,.communication-delivery-layout,.communication-message-editor-layout,.communication-person-grid,.communication-recipient-grid,.communication-step-grid,.dashboard-absence-grid,.dashboard-layout,.dashboard-management-grid,.dashboard-project-grid,.defect-form-grid,.document-template-grid,.economics-form-grid,.einvoice-detail-grid,.einvoice-import-grid,.einvoice-overview-grid,.employee-access-account-grid,.employee-admin-document-grid,.employee-admin-notification-grid,.employee-admin-project-grid,.employee-dashboard-grid,.employee-form-grid,.employee-project-grid,.estimate-ai-page-grid,.estimate-detail-grid,.estimate-meta-grid,.feedback-admin-compose-grid,.feedback-context-grid,.feedback-form-grid,.feedback-modal-context-grid,.form-grid,.form-section-grid,.import-v1-scope-grid,.import-v1-user-grid,.inspection-form-grid,.inspection-template-layout,.inspector-grid,.invoice-balance-grid,.license-plan-grid,.manual-layout,.manual-situation-grid,.payment-gateway-grid,.payroll-form-grid,.portal-account-grid,.portal-auth-layout,.portal-content-grid,.portal-home-layout,.portal-message-layout,.portal-project-grid,.portal-publication-grid,.project-assigned-team-grid,.project-document-meta-grid,.project-portal-comm-layout,.project-team-modal-grid,.purchase-form-grid,.qcw-detail-grid,.qcw-layout,.quote-header-grid,.quote-template-layout,.quote-tool-grid,.rental-checklist-grid,.rental-dashboard-grid,.rental-detail-overview-grid,.rental-document-edit-grid,.rental-document-grid,.rental-form-grid,.rental-picker-layout,.rental-rate-grid,.rental-return-item-grid,.rental-rule-grid,.rental-settings-grid,.rental-template-card-grid,.report-card-grid,.reports-filter-grid,.rfi-form-grid,.rfq-batch-grid,.rfq-bridge-layout,.settings-grid,.site-diary-meta-grid,.site-diary-notes-grid,.stage-form-grid,.stats-grid,.stavix-chat-layout,.supply-form-grid,.vehicle-form-grid,.warehouse-form-grid,.warehouse-setup-grid,.worker-form-grid,.workforce-form-grid,.workforce-team-grid,.workplan-assignment-grid,.workplan-form-grid){grid-template-columns:minmax(0,1fr)!important;min-width:0;max-width:100%}
 body.app-page .dashboard-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px;padding:0}
 body.app-page .dashboard-kpis article{padding:12px;min-width:0}
 body.app-page .dashboard-kpis strong{font-size:19px;overflow-wrap:anywhere}
 body.app-page .language-form{display:block!important}
 body.app-page .topbar .language-form select{width:70px;font-size:12px;min-height:40px}
}
@media screen and (max-width:760px){
 body.app-page .quote-editor-sticky-tabs{position:sticky!important;top:var(--stv-topbar-height,108px)!important;z-index:45;display:flex!important;align-items:center;overflow:visible!important;gap:5px;padding:7px!important;margin:0 12px!important;background:#fff}
 body.app-page .quote-editor-mode-switches{display:flex;flex:1 1 auto;min-width:0;gap:4px}
 body.app-page .quote-editor-mode-switches>button{flex:1 1 0;min-width:0;white-space:normal!important;padding:8px!important}
 body.app-page .quote-editor-sticky-tabs>.quote-sticky-save{flex:0 0 auto;min-width:72px;padding:8px!important;white-space:normal!important}
 body.app-page .quote-floating-tools{position:static!important}
 body.app-page .quote-offer-summary{position:static!important;width:auto!important;max-width:100%;padding:12px!important;transform:none!important}
 body.app-page .quote-line .stv-line-details{grid-column:1/-1;background:#f1f3f6;border:1px solid #dce1e8;border-radius:8px;color:#24384d}
 body.app-page .stv-inspector-return{margin:8px 12px}
 body.app-page .stv-action-more{flex:1 1 auto}
 body.app-page .stv-actions-compact:not(.stv-actions-expanded)>.stv-action-secondary{display:none!important}
}

@media screen and (max-width:760px){.stv-mobile-only{display:inline-flex}}
@media screen and (max-width:760px){
 body.app-page .topbar .stv-account-menu{display:none!important}
 body.app-page .topbar .stv-account-menu.stv-account-open{display:flex!important;position:absolute;right:12px;top:60px;z-index:90;max-width:calc(100vw - 24px);flex-wrap:wrap;align-items:center;gap:10px;padding:14px;background:#fff;border:1px solid #dce1e8;border-radius:12px;box-shadow:0 12px 32px #13233926}
 body.app-page .topbar .stv-account-menu>span{display:block;flex-basis:100%;overflow-wrap:anywhere}
 body.app-page .topbar .stv-account-menu select{width:130px;max-width:160px;font-size:14px}
 body.app-page .stv-account-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;padding:8px}
 body.app-page .topbar-company>strong{max-width:45vw}
 body.app-page .dashboard-kpis article{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;min-height:0!important}
 body.app-page .dashboard-kpis article strong{font-size:17px;margin:0}
 body.app-page .dashboard-kpis article small{grid-column:1/-1;margin:0;line-height:1.4}
 body.app-page .dashboard-kpis article>span{font-size:12px}
}
@media screen and (max-width:760px){
 body.app-page :is(.catalog-pagination-actions,.catalog-picker-pagination,.material-picker-pagination,.flow-pagination){flex-wrap:wrap;gap:8px;min-width:0;max-width:100%}
 body.app-page .catalog-pagination-actions>span{flex:1 0 100%;order:-1;min-width:0}
 body.app-page .catalog-pagination-actions>.secondary-button{flex:1 1 40%;min-width:0;white-space:normal}
}
@media screen and (max-width:760px){
 body.app-page .table-scroll:has(>.stv-card-table),body.app-page .flow-table-wrap:has(>.stv-card-table){overflow:visible;max-height:none}
}
@media screen and (max-width:760px){
 body.app-page .project-menu-subnav{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;gap:6px}
 body.app-page .project-menu-subnav>a{flex-shrink:0;min-height:44px}
 body.app-page .stavix-chat-message-text{font-size:14px;line-height:1.5}
 .portal-auth input,.portal-auth select,.portal-auth-page input,.portal-auth-page select{font-size:16px;min-height:44px}
}
/* Existing visibility/permission state always takes precedence over mobile layout. */
@media screen and (max-width:760px){
 html body [hidden][hidden][hidden][hidden]{display:none!important}
 body.app-page .vat-disabled .stv-line-field:has(>.line-vat),body.app-page .stv-line-field:has(>[hidden]){display:none!important}
}

/* 209.64.119: phone workspace, not a scaled desktop page. Desktop remains untouched. */
@media screen and (max-width:760px){
 body.app-page{font-size:13px;--stv-mobile-gap:6px}
 body.app-page .content>.topbar{min-height:44px!important;height:44px!important;padding:2px 6px!important;gap:3px!important;flex-wrap:nowrap!important}
 body.app-page .topbar-company{flex:1 1 auto;min-width:0;overflow:hidden;gap:3px}
 body.app-page .topbar-company>strong{font-size:12px;max-width:100%;line-height:1.15}
 body.app-page .content>.topbar :is(.mobile-nav-toggle,.topbar-notification-toggle,.topbar-chat-toggle,.stv-account-toggle,.stv-search-toggle){flex:0 0 36px;width:36px!important;min-width:36px!important;height:38px!important;min-height:38px!important;padding:7px!important}
 body.app-page .stv-search-toggle{order:1}
 body.app-page .stv-account-toggle{order:3}
 body.app-page .topbar .global-search{display:none!important}
 body.app-page .topbar form.global-search.stv-search-open{display:flex!important;position:absolute;top:44px;left:6px;right:6px;width:auto;padding:6px;background:#fff;border:1px solid #dce1e8;border-radius:8px;box-shadow:0 6px 18px #17212f20;z-index:95}
 body.app-page .topbar .stv-account-menu.stv-account-open{top:44px;right:6px}
 body.app-page .topbar-notification-panel{top:44px}
 body.app-page :is(.page-heading,.flow-heading,.project-hub-head){padding:8px!important;margin:0!important;gap:6px!important;min-height:0!important}
 body.app-page :is(.page-heading,.flow-heading) h1{font-size:18px!important;line-height:1.2!important;margin:0!important}
 body.app-page :is(.page-heading,.flow-heading) :is(.page-subtitle,.hub-description){display:none!important}
 body.app-page .project-hub-head{display:block!important}
 body.app-page .project-hub-head .back-inline{font-size:11px;line-height:1.2;margin:0 0 4px!important;display:inline-block}
 body.app-page .project-hub-title{display:flex!important;align-items:center;justify-content:space-between;gap:6px;margin:0!important}
 body.app-page .project-hub-title>div{min-width:0}
 body.app-page .project-hub-title h1{font-size:17px!important;line-height:1.2!important;margin:0!important;overflow-wrap:anywhere}
 body.app-page .project-hub-title .project-status{flex-shrink:0;padding:3px 6px;font-size:10px}
 body.app-page .project-hub-head .page-subtitle{font-size:11px;line-height:1.3;margin:4px 0 0!important}
 body.app-page .project-hub-actions{display:flex!important;align-items:center;gap:5px;margin:4px 0 0;padding:0!important}
 body.app-page .project-hub-actions>span{font-size:11px}
 body.app-page .project-hub-actions>a{min-height:28px!important;padding:4px 7px!important;font-size:11px!important;width:auto!important}
 body.app-page :is(.heading-actions,.flow-actions,.table-tools){gap:5px!important}
 body.app-page .flow-heading>.flow-actions{width:auto;display:flex;flex-wrap:wrap}
 body.app-page :is(.heading-actions,.flow-heading>.flow-actions)>*{flex:0 1 auto!important;width:auto!important}
 body.app-page button:not([class*="icon"]),body.app-page a.primary-button,body.app-page a.secondary-button,body.app-page [role=button],body.app-page .compact-button{min-height:34px;padding:6px 9px;font-size:12px;line-height:1.25}
 body.app-page :is(.modal-close,button[class*="close"]){width:36px;height:36px;min-width:36px;min-height:36px}
 body.app-page input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]),body.app-page select,body.app-page textarea{min-height:36px;padding:6px 8px;font-size:16px;line-height:1.2}
 body.app-page input[type=checkbox],body.app-page input[type=radio]{width:18px;min-width:18px;height:18px}
 body.app-page :is(.table-card,.settings-card,.admin-card){padding:8px!important;margin:0 8px 8px!important;border-radius:8px}
 body.app-page .table-head{gap:6px;padding:0 0 6px!important}
 body.app-page :is(.table-head,.settings-card>header,.admin-card>header) h2{font-size:15px!important;margin:0}
 body.app-page :is(.settings-card,.admin-card)>header{padding:6px 0!important;gap:6px}
 body.app-page :is(.settings-card,.admin-card)>header p{margin:3px 0;font-size:11px}
 body.app-page :is(.project-hub,.admin-shell,.reports-shell,.account-shell,.quote-workbench){margin-left:8px!important;margin-right:8px!important;padding:0!important}
 body.app-page :is(.project-hub-panel,.admin-panel){padding:0!important}
 /* A single row of label + number. Horizontal scrolling keeps every KPI available. */
 body.app-page :is(.stats-grid,.project-summary,.quote-summary,.catalog-summary,.flow-kpis,.workplan-summary,.economics-summary,.dashboard-kpis,.admin-kpis){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:5px!important;padding:0 8px!important;margin:2px 0 6px!important;scrollbar-width:thin;min-width:0}
 body.app-page :is(.stats-grid,.project-summary,.quote-summary,.catalog-summary,.flow-kpis,.workplan-summary,.economics-summary,.dashboard-kpis,.admin-kpis)>*{display:flex!important;align-items:center!important;flex:0 0 auto;flex-wrap:nowrap!important;gap:6px!important;padding:5px 7px!important;min-height:30px!important;border-radius:6px!important;min-width:0}
 body.app-page :is(.stats-grid,.project-summary,.quote-summary,.catalog-summary,.flow-kpis,.workplan-summary,.economics-summary,.dashboard-kpis,.admin-kpis) :is(strong,b){font-size:14px!important;margin:0!important;white-space:nowrap!important}
 body.app-page :is(.stats-grid,.project-summary,.quote-summary,.catalog-summary,.flow-kpis,.workplan-summary,.economics-summary,.dashboard-kpis,.admin-kpis) :is(span,small){font-size:11px!important;white-space:nowrap;line-height:1.2;margin:0!important}
 /* Native section picker occupies one row even for grouped project/admin navigation. */
 html body.app-page .stv-section-nav{display:block!important;padding:0!important;margin:0 8px 6px!important;border:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;min-width:0}
 html body.app-page .stv-section-nav>:not(.stv-section-picker){display:none!important}
 html body.app-page .stv-section-nav>.stv-section-picker{display:block!important;width:100%;height:36px;min-height:36px;padding:6px 30px 6px 9px;border:1px solid #cfd3d9;border-radius:7px;background-color:#fff;color:#252b35;font-size:14px;font-weight:600;box-shadow:0 1px 2px #171b2208}
 body.app-page :is(.filter-card,.filter-panel,.filter-bar,.table-filters,.table-toolbar,.flow-filters,.workplan-toolbar,.rental-picker-toolbar,.picker-toolbar,.material-picker-toolbar){gap:5px!important;padding:6px!important;margin-top:0!important;margin-bottom:6px!important}
 body.app-page :is(.flow-filters,.filter-bar,.table-filters)>*{flex:1 1 100px}
 body.app-page :is(.form-grid,.form-section-grid,.flow-grid,.flow-form-grid,.quote-header-grid,.warehouse-form-grid,.settings-grid){gap:7px!important}
 body.app-page .flow-filter-dock{margin:0 8px 6px!important;padding:0!important}
 body.app-page .project-overview-heading{margin:4px 0 7px;gap:5px}
 body.app-page .project-overview-heading h2{font-size:15px}
 body.app-page .project-overview-heading p{font-size:11px;margin:3px 0}
 body.app-page :is(.project-overview-main,.project-overview-secondary){display:grid;grid-template-columns:minmax(0,1fr)!important;gap:6px;margin-top:6px}
 body.app-page :is(.project-focus-card,.project-overview-secondary article,.project-attention){padding:9px;border-radius:8px;gap:5px;min-height:0}
 body.app-page .project-focus-card>strong{font-size:20px}
 body.app-page .project-detail-list>span{padding:4px 0;gap:8px}
 body .stv-card-table>tbody{gap:6px}
 body .stv-card-table>tbody>tr:not([hidden]){padding:7px!important;border-radius:7px}
 body .stv-card-table>tbody>tr>td{padding:3px 0!important;font-size:12px;line-height:1.3}
 body .stv-card-table>tbody>tr>td.stv-title-cell{font-size:14px;padding-bottom:5px!important;margin-bottom:2px}
 body .stv-card-table>tbody>tr>td.stv-action-cell{gap:5px}
 body .stv-card-table>tbody>tr>td>.stv-row-toggle{flex:0 1 auto;width:auto;min-height:30px;margin-top:0;padding:5px 7px;font-size:11px}
 body.app-page .quote-line{padding:8px!important;gap:6px!important;margin:6px 0!important}
 body.app-page .quote-line .line-name{min-height:36px!important}
 body.app-page .quote-editor-sticky-tabs{margin:0 8px!important;padding:4px!important}
 body.app-page .quote-editor-mode-switches.stv-section-nav{margin:0!important;flex:1 1 auto}
 body.app-page :is(.modal-backdrop,.flow-modal-backdrop,.warehouse-modal-backdrop,.stavix-dialog-backdrop){padding:3px!important}
 body.app-page :is(.modal,.warehouse-flow-modal,[role=dialog]){max-height:calc(100dvh - 6px)!important;border-radius:8px!important}
 body.app-page :is(.modal,.warehouse-flow-modal)>header{padding:6px 8px!important}
 body.app-page :is(.modal,.warehouse-flow-modal)>header h2{font-size:16px!important}
 body.app-page .modal .form-grid{padding:8px!important}
 body.app-page :is(.modal-actions,.form-actions,.flow-modal-actions){padding:6px 8px!important;gap:5px}
 html body [hidden][hidden][hidden][hidden]{display:none!important}
}
@media screen and (max-width:760px){
 body.app-page .content>.topbar{display:flex!important;align-items:center!important;justify-content:flex-start!important}
 body.app-page .topbar-notification-center{flex:0 0 auto}
 body.app-page .project-hub-title{flex-direction:row!important;align-items:flex-start!important}
 body.app-page .admin-shell{width:auto!important;max-width:calc(100% - 16px)!important;min-width:0}
 body.app-page .admin-panel{width:auto!important;min-width:0;max-width:100%}
 body.app-page .admin-shell>.stv-section-nav{margin-left:0!important;margin-right:0!important}
}
@media screen and (max-width:760px){
 body.app-page :is(.reports-shell,.account-shell,.project-hub){width:auto!important;max-width:calc(100% - 16px)!important}
}
@media screen and (max-width:760px){
 body.app-page .warehouse-flow{margin:0!important;padding:0!important}
 body.app-page .flow-heading>.flow-actions{flex-direction:row!important}
 body.app-page .flow-heading>.flow-actions>.stv-action-more{flex:0 0 auto!important}
 body.app-page .flow-filters[data-main-filter]{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;align-items:end;gap:5px!important;margin:0!important}
 body.app-page .flow-filters[data-main-filter]>label{grid-column:span 3;min-width:0;font-size:11px}
 body.app-page .flow-filters[data-main-filter]>.flow-actions{grid-column:span 4;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important}
 body.app-page .flow-filters[data-main-filter]>.flow-actions>button{flex:1 1 0;min-width:0;font-size:11px;padding:5px}
 body.app-page .flow-filters[data-main-filter]>details{grid-column:span 2;font-size:11px;align-self:center}
 body.app-page .flow-filters[data-main-filter]>details[open]{grid-column:1/-1}
 body.app-page .flow-filters[data-main-filter]>details summary{min-height:30px;display:flex;align-items:center}
 body.app-page .flow-table-wrap{margin:0 8px!important}
}
@media screen and (max-width:760px){
 body.app-page .reports-category-tabs{width:auto!important;max-width:calc(100% - 16px)!important;margin-left:8px!important;margin-right:8px!important}
}

/* 209.64.146: accessible quote editor cards through tablet widths. */
@media (min-width:761px) and (max-width:1024px){
 /* Document editors: each line becomes a compact editable card, not a 900px row. */
 .quote-workbench-page .quote-workbench{display:block!important;grid-template-columns:minmax(0,1fr)!important;margin:0 12px!important}
 .quote-workbench-page .quote-workbench-main{padding-bottom:12px!important;min-width:0}
 .quote-workbench-page .quote-line-head{display:none!important}
 .quote-workbench-page .quote-line{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0!important;width:100%!important;gap:9px!important;margin:10px 0!important;padding:12px!important;border:1px solid #dce1e8!important;border-radius:10px;background:#fff}
 .quote-workbench-page .quote-line>*{min-width:0!important;max-width:100%}
 .quote-workbench-page .quote-line .line-name-cell{grid-column:1/-1!important;padding:0!important}
 .quote-workbench-page .quote-line .line-name-cell>div{display:flex;flex-wrap:wrap;gap:6px}
 .quote-workbench-page .quote-line .autocomplete-wrap{flex:1 1 100%;min-width:0}
 .quote-workbench-page .quote-line .line-name{width:100%!important;font-size:16px!important;min-height:44px!important}
 .quote-workbench-page .quote-line .stv-line-field{display:grid;gap:4px;min-width:0}
 .quote-workbench-page .quote-line .stv-line-label{display:block;font-size:12px;color:#657183;font-weight:600}
 .quote-workbench-page .quote-line .line-total{align-self:center;text-align:right}
 .quote-workbench-page .quote-line .line-drag{display:none!important}
 .quote-workbench-page .quote-pro-toolbar{position:static!important}
 .quote-workbench-page .quote-pro-toolbar-row{flex-wrap:wrap;overflow:visible}
 .quote-workbench-page .quote-pro-tool-btn:nth-of-type(3),.quote-workbench-page .quote-pro-tool-btn:nth-of-type(4){display:inline-flex!important}
 .quote-workbench-page .quote-pro-summary{position:static!important;display:flex;flex-wrap:wrap;padding:12px!important;max-width:100%}
 .quote-workbench-page .quote-inspector,.quote-workbench-page .quote-inspector.quote-pro-inspector{position:static!important;min-height:0!important;max-height:none!important;width:100%!important;margin:12px 0}
 .quote-workbench-page .quote-inspector>header{background:#eef0f4!important;color:#24384d!important}
 .quote-workbench-page .room-summary-row{flex-wrap:wrap;gap:8px}
 .quote-workbench-page .quote-suggestions{min-width:0!important;max-width:100%!important}
 .quote-workbench-page .qcw-categories,.quote-workbench-page .qcw-summary{position:static!important;max-height:220px;overflow:auto}

 .quote-workbench-page .stv-line-details,.quote-workbench-page .stv-inspector-return{display:inline-flex!important}
}
@media(max-width:1024px){
 body.quote-workbench-page .quote-floating-tools{position:static!important}
 body.quote-workbench-page .stv-line-details{min-height:40px;padding:8px 12px;border:1px solid #c8d3e0;border-radius:8px;background:#fff;color:#24384d;text-align:center;font-size:13px;cursor:pointer}
 body.quote-workbench-page .stv-line-details:focus-visible{outline:2px solid #24384d;outline-offset:2px}
}
