/* Screen-only adaptation. Printed documents retain their own page layout. */
@media screen{
 #app,#app>main,#content,#content>*,.obra360,.quoting{min-width:0;max-width:100%}
 #app>main{box-sizing:border-box}#content :is(.table-wrap,.q-scroll,.pd-table,.schedule-board,.budget-table-scroll,[data-responsive-scroll]){min-width:0;max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .responsive-table-scroll{overflow:auto;width:100%}.responsive-table-scroll:focus-visible,[data-responsive-scroll]:focus-visible{outline:2px solid var(--acid,#f56322);outline-offset:2px}
 html body :is(.budget-table-toolbar,.budget-table-actions,.budget-view-tabs,.budget-actions,.budget-toolbar){min-width:0;display:flex;flex-wrap:wrap;gap:8px}
 html body .budget-total-panel{min-width:0;max-width:100%;box-sizing:border-box}
 html body .obra360-section-title h2{color:var(--ink,#172b3a)!important}
 .app-mobile-bar,.app-menu-close,.app-nav-backdrop{display:none}
 html body #appSidebar{overflow-y:auto;overscroll-behavior:contain}
 html body dialog:not(#modal)::before{content:none!important;display:none!important}
 html body dialog{max-height:calc(var(--app-visual-height,100dvh) - 24px)!important;max-width:calc(100vw - 24px)!important;overscroll-behavior:contain}
 html body dialog#modal form{max-height:calc(var(--app-visual-height,100dvh) - 24px)!important}
 html body .obra360-schedule .schedule-details-hidden .schedule-info{grid-template-columns:32px minmax(0,1fr)!important}
}
@media screen and (max-width:1400px){
 html body #app>.app-mobile-bar{display:flex;position:sticky;top:0;z-index:35;align-items:center;gap:12px;min-height:52px;padding:6px max(16px,env(safe-area-inset-right)) 6px max(16px,env(safe-area-inset-left));background:var(--paper,#fff);color:var(--ink,#172b3a);border-bottom:1px solid var(--line,#ddd)}
 .app-mobile-bar>span{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:600;font-size:14px}
 html body .app-mobile-bar button,html body #appMenuClose{height:40px;min-width:40px;padding:8px 12px;border:1px solid var(--line,#ddd);border-radius:8px;background:var(--paper,#fff);color:var(--ink,#172b3a);cursor:pointer}
 html body #app #appSidebar{display:flex!important;flex-direction:column!important;position:fixed!important;inset:0 auto 0 0!important;width:min(300px,86vw)!important;height:100dvh!important;max-height:100dvh!important;padding:20px!important;padding-top:max(20px,env(safe-area-inset-top))!important;background:var(--paper,#fff)!important;transform:translateX(-105%);visibility:hidden;z-index:90!important;overflow-y:auto!important}
 html body.app-nav-open #app #appSidebar{transform:none;visibility:visible}.app-nav-open{overflow:hidden!important}
 html body #app #appSidebar #nav{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;overflow:visible!important}
 html body #app #appSidebar #nav button{width:100%!important;min-height:44px;white-space:normal;text-align:left}
 html body #app #appSidebar :is(.workspace,.sidebar-project-quicknav,.account,.brand){display:block!important}
 html body #app #appSidebar .account{margin-top:auto;padding-top:18px}
 html body #appMenuClose{display:block;margin-left:auto;flex:none;margin-bottom:10px}
 html body #appNavBackdrop:not([hidden]){display:block;position:fixed;inset:0;width:100%;height:100dvh;background:#10182066;border:0;border-radius:0;z-index:80}
 html body #app>main{margin-left:0!important;width:100%!important;max-width:none!important;padding:18px 20px!important}
 html body #app>main>header{padding:14px 18px!important;gap:16px;align-items:center;flex-wrap:wrap}
 html body #app>main>header .header-tools{display:flex;flex-wrap:wrap;min-width:0;gap:8px;margin:0}
 html body #app>main>header .quick-search{min-width:0;max-width:100%;width:240px}
 html body .obra360-hero{padding:18px 22px!important;min-height:0!important;align-items:center!important}
 html body .obra360-hero h1{font-size:26px!important;line-height:1.2!important;margin:5px 0!important}
 html body .obra360-hero b{font-size:28px!important}
 html body .obra360-tabs{padding:8px 0!important;margin-bottom:14px!important;min-width:0;max-width:100%;scrollbar-width:thin}
 html body .obra360-tabs button{min-height:40px;padding:8px 12px!important;font-size:13px!important}
 html body .obra360-schedule{padding:16px!important}
 html body .schedule-kpis article{padding:12px!important;min-height:0!important}
 html body .schedule-controls{gap:8px;flex-wrap:wrap;padding:10px 0!important;margin:10px 0!important}
 html body .schedule-controls button{min-height:36px}
 html body .schedule-controls label{margin:0!important}
}
@media screen and (max-width:900px){
 html body [data-schedule-details]{display:none!important}
 html body .budget-view-tabs,html body .budget-table-actions{width:100%;margin:0!important}
 html body .budget-table-actions button{flex:1 1 auto;white-space:normal}
 html body .budget-total-panel{width:100%!important;margin-left:0!important}
 html body .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html body #content :is(.q-toolbar,.q-list-heading,.q-document-actions,.er-controls){flex-wrap:wrap;min-width:0}
 html body .q-toolbar>*,html body .q-list-heading>*{min-width:0;max-width:100%}
 html body .quoting .q-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body .quoting .q-workspace{grid-template-columns:minmax(0,1fr)}
 html body .quoting aside.q-summary{position:static!important}
}
@media screen and (max-width:600px){
 html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
 html body #app>main{padding:12px!important;padding-bottom:max(20px,env(safe-area-inset-bottom))!important}
 html body #app>main>header{padding:12px!important;gap:10px}
 html body #app>main>header h1{font-size:23px!important}
 html body #app>main>header .header-tools{width:100%}
 html body #app>main>header .quick-search{flex:1;width:auto;margin:0!important}
 html body #app>main>header :is(.bell,.theme-toggle-btn){display:none!important}
 html body #app>main>header #primaryAction:not([hidden]){margin:0!important;min-height:44px}
 html body :is(#app,dialog) :is(input,select,textarea){font-size:16px!important;max-width:100%;min-width:0}
 html body :is(#app,dialog) input:not([type=checkbox]):not([type=radio]):not([type=color]),html body :is(#app,dialog) select{min-height:44px!important}
 html body :is(#app,dialog) button{min-height:40px;touch-action:manipulation}
 html body .form-grid,html body .quoting :is(.q-fields,.q-document-meta,.q-new-input-grid){grid-template-columns:minmax(0,1fr)!important}
 html body .form-grid>*{min-width:0;max-width:100%;grid-column:auto!important}
 html body .quoting :is(.q-span2,.q-span4){grid-column:auto!important}
 html body dialog#modal form{padding:16px!important}
 html body dialog#modal .modal-head{gap:12px;align-items:flex-start}
 html body dialog#modal h2{font-size:22px!important;overflow-wrap:anywhere}
 html body dialog#modal .modal-actions{bottom:-16px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
 html body .obra360-hero{padding:14px 16px!important;gap:12px!important;align-items:stretch!important}
 html body .obra360-hero h1{font-size:22px!important;line-height:1.2!important}
 html body .obra360-hero>div:last-child{text-align:left!important}
 html body .obra360-hero b{font-size:23px!important}.obra360-hero-actions .obra360-complete{margin-top:0!important}
 html body .obra360-tabs{gap:0!important;scroll-padding-inline:12px;overflow-x:auto!important;scrollbar-width:thin}
 html body .obra360-tabs button{min-height:44px;padding:10px 12px!important}
 html body .obra360-section-title{gap:10px}.obra360-section-title h2{font-size:22px!important}
 html body .obra360-schedule{padding:12px!important}
 html body .schedule-kpis{gap:8px!important}.schedule-kpis article{min-width:0}
 html body .schedule-kpis b{font-size:18px!important}
 html body .schedule-controls{gap:6px!important}
 html body .schedule-controls button{min-height:40px;font-size:12px!important}
 html body .schedule-zoom{margin-left:0!important;width:100%;justify-content:flex-start}
 html body .schedule-board{max-height:70dvh;scrollbar-width:thin}
 html body .obra360-schedule .schedule-details-hidden .schedule-info{grid-template-columns:24px minmax(0,1fr)!important;padding-left:4px!important;padding-right:4px!important}
 html body .obra360-schedule .schedule-task-name>b{min-width:0;white-space:normal!important;font-size:11px!important;line-height:1.35!important;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 html body .obra360-schedule .schedule-group-info{padding:5px!important;gap:4px;min-height:44px}
 html body .obra360-schedule .schedule-group-info>b{min-width:0;white-space:normal;font-size:11px}.schedule-group-info>span{display:none}
 html body .obra360-schedule .schedule-group-info>em{font-size:10px}.schedule-group-info>button{min-width:24px;padding:2px!important}
 html body .obra360-schedule .schedule-with-cash .schedule-task-row{height:64px!important;min-height:64px!important}
 html body .obra360-schedule .schedule-with-cash .schedule-task-row .schedule-bar{top:34px!important;height:22px!important}
 html body .obra360-schedule .sg-cash-cell{height:30px;padding-top:6px!important}
 html body .obra360-schedule .sg-cash-cell b{font-size:12px!important}.sg-cash-cell small{font-size:9px!important}
 html body .obra360-schedule .sg-cash-total-row{height:52px;min-height:52px}.sg-cash-total-row>b{display:flex;align-items:center;justify-content:flex-end;white-space:normal;font-size:10px;padding:6px!important}
 html body .obra360-schedule .sg-cash-total-track>span{padding:17px 4px!important}
 html body :is(.budget-view-tabs,.budget-table-actions){gap:6px!important;flex-wrap:wrap!important}
 html body .budget-view-tabs button{flex:1 1 30%;font-size:12px!important;padding:8px!important;white-space:normal}
 html body .budget-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 html body .budget-kpis article{min-width:0;padding:12px!important}.budget-kpis :is(b,strong){font-size:20px!important;overflow-wrap:anywhere}
 html body #content :is(.q-toolbar,.q-list-heading){gap:10px!important}
 html body .quoting nav.q-tabs{overflow-x:auto;flex-wrap:nowrap!important;scrollbar-width:thin}
 html body .quoting .q-list-actions{display:flex;flex-wrap:wrap;gap:8px}
 html body .quoting .q-search{width:100%;min-width:0}
 html body .quoting .q-input-types{flex-wrap:wrap}.quoting .q-input-types button{min-width:90px}
 html body #obra-executive .er-paper{padding:14px!important}
 html body #obra-executive .er-controls>div{max-width:100%;overflow-x:auto;flex-wrap:nowrap;gap:6px}
 html body #obra-executive .er-controls button{flex:none;padding:9px 10px;font-size:12px}
 html body #obra-executive .er-controls label{max-width:100%;width:100%}
 html body #schedule-cash .sc-chart{padding:12px}
 html body #schedule-cash .sc-heading{align-items:flex-start;gap:10px}
 html body .pd-dialog .pd-footer{flex-wrap:wrap}.pd-footer p{flex-basis:100%;margin:0}
 html body .sc-editor{max-height:calc(var(--app-visual-height,100dvh) - 16px)!important}
}
@media print{.app-mobile-bar,#appMenuClose,#appNavBackdrop{display:none!important}}

@media screen{
 html body .budget-page-head h2{color:var(--ink,#172b3a)!important}
 .schedule-overview summary{cursor:pointer;padding:10px 0;color:var(--muted,#64748b);font-size:13px}
 .schedule-heading-actions{display:flex;flex-wrap:wrap;gap:8px}
}
@media screen and (max-width:1400px){
 html body .obra360-schedule .obra360-section-title{margin-bottom:4px!important}
 html body .schedule-kpis{margin:8px 0!important}
 html body .schedule-controls{padding:6px 0!important;margin:4px 0 10px!important}
}
@media screen and (max-width:900px){
 html body .budget-view-toolbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important}
}
@media screen and (max-width:600px){
 html body .obra360-hero .obra360-hero-actions{display:grid!important;grid-template-columns:1fr auto;gap:3px 8px;align-items:center!important}
 html body .obra360-hero-actions b{grid-column:1;grid-row:1}
 html body .obra360-hero-actions small{grid-column:1;grid-row:2}
 html body .obra360-hero-actions .obra360-complete{grid-column:2;grid-row:1/3;font-size:11px!important;padding:8px!important;white-space:normal;max-width:105px}
 html body .schedule-heading-actions{width:100%}
 html body .schedule-heading-actions button{flex:1;width:auto!important;font-size:12px!important;padding:8px!important}
 html body .budget-page-head h2{font-size:24px!important}
 html body .budget-page-head>div:last-child{display:flex;flex-wrap:wrap;gap:8px}
}
@media print{.schedule-overview summary{display:none}.schedule-overview>*:not(summary){display:block!important}}

@media screen and (max-width:900px){
 html body .schedule-board .schedule-editor{position:sticky!important;left:0!important;z-index:25;width:var(--schedule-viewport-width)!important;max-width:var(--schedule-viewport-width)!important;min-width:0!important;box-sizing:border-box;padding:14px!important;background:var(--paper,#fff)!important}
 html body .schedule-board .schedule-editor>div{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 html body .schedule-board .schedule-editor label{min-width:0!important;margin:0!important}
 html body .schedule-board .schedule-editor :is(input,select){box-sizing:border-box;width:100%!important;min-width:0!important}
 html body .schedule-board .schedule-editor .schedule-editor-actions{grid-template-columns:1fr 1fr!important;margin-top:12px}
}
