/* R26: responsive presentation only. Desktop colors and existing write flows stay unchanged. */
body .shell>.main,body .main-content,body .main-content>*,body .panel-frame{min-width:0}
body .panel-frame{width:100%;max-width:100%;box-sizing:border-box}
body :is(.sheet-scroll,.table-scroll,.table-wrap,.history-scroll,.home-sheet,#institution-records,#institution-totals){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
body :is(.sheet-scroll,.table-scroll,.table-wrap,.history-scroll){scrollbar-gutter:stable}
@media(max-width:1024px){
 body :is(.heading-row,.heading-actions,.card-header,.table-tools,.manual-workspace-tools,.history-heading,.history-toolbar,.section-heading){flex-wrap:wrap;gap:12px}
 body :is(.main-content,.n35-workspace,.exchange-workspace,.history-register,.close-app)>*{min-width:0}
 body :is(.fields-grid,.form-grid,.n44-fields)>*{min-width:0}
}
@media(max-width:850px){
 body .shell,body[data-nibra-admin="1"] .shell{display:block!important;grid-template-columns:minmax(0,1fr)!important;width:100%;min-width:0}
 body .shell>.main,body[data-nibra-admin="1"] .shell>.main{width:100%;max-width:100%;min-width:0;margin:0;grid-column:auto}
 body .shell>.sidebar,body[data-nibra-admin="1"] .shell>.sidebar{position:fixed;inset:0 auto 0 0;width:min(280px,86vw)!important;max-width:86vw;box-sizing:border-box;transform:translateX(-105%);transition:transform .2s ease;z-index:100;overflow-y:auto;overscroll-behavior-y:contain;height:100vh;height:100dvh}
 body .shell>.sidebar.open,body[data-nibra-admin="1"] .shell>.sidebar.open{transform:translateX(0);box-shadow:0 0 0 100vmax #0c21436b}
 body .shell .mobile-toggle,body .shell .mobile-close{display:inline-flex!important;align-items:center;justify-content:center;min-height:40px;min-width:40px}
 body .shell .mobile-close{align-self:flex-end;flex-shrink:0}
 body .shell .sidebar nav{overflow-y:auto;min-height:0}
 body .shell .topbar,body[data-nibra-admin="1"] .shell .topbar{height:auto;min-height:68px;padding:12px 16px;gap:10px;flex-wrap:wrap}
 body .shell .breadcrumb{min-width:0;max-width:100%;gap:8px;flex-wrap:wrap;font-size:11px}
 body .shell .breadcrumb b{overflow-wrap:anywhere}
 body .shell .topbar-actions{margin-left:auto;gap:8px;min-width:0}
 body .shell .user-chip{min-width:0;gap:7px}
 body .shell .user-text{max-width:150px;overflow-wrap:anywhere}
 body .shell .main-content,body[data-nibra-admin="1"] .shell .main-content{width:100%;max-width:100%;padding:18px 14px;box-sizing:border-box}
 body .shell .main-content.nibra-manual-host{padding:8px 8px 18px!important}
 body .shell .manual-workspace-tools{display:flex;justify-content:space-between;gap:8px;font-size:10px;line-height:1.7}
 body .shell .manual-workspace-tools>div{display:flex;flex-wrap:wrap;gap:6px 10px}
 body .shell .panel-frame{border-radius:10px;min-height:480px}
 body :is(.book-header,.book-header>div,.book-header nav,.book-top,.history-heading,.history-actions,.history-toolbar,.institution-filters,.institution-section-heading){flex-wrap:wrap;gap:10px}
 body :is(.exchange-workspace,.history-register,.close-app,.finance-workspace,.n35-workspace,.n31-workspace){width:100%;max-width:100%;min-width:0;box-sizing:border-box}
 body :is(.exchange-workspace,.history-register,.n35-workspace,.finance-workspace){padding:14px 10px}
 body :is(.exchange-workspace,.history-register,.close-app,.finance-workspace,.n35-workspace,.n31-workspace) :is(section,article,.card,.two-col){min-width:0;max-width:100%;box-sizing:border-box}
 body :is(.public-auth-layout,.n48-settings-grid,.n50-settings .n48-settings-form,.close-app .two-col){grid-template-columns:minmax(0,1fr)!important}
 body :is(.public-auth-card,.public-auth-copy){width:100%;min-width:0;box-sizing:border-box}
 body dialog[open]{max-width:calc(100vw - 20px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain}
 body[data-entry="new"] #record-dialog[open]{max-width:100%;width:100%;max-height:none!important;overflow:visible!important}
 body :is(.modal-body,.modal-header,.manual-dialog,.professional-form,.n50-config-dialog,.cut-dialog){max-width:100%;min-width:0;box-sizing:border-box}
}
@media(max-width:600px){
 body .shell .heading-row{align-items:flex-start}
 body .shell .heading-actions{width:100%;justify-content:flex-start;gap:8px}
 body .shell .columns,body .shell .form-grid,body .shell .profile-grid{grid-template-columns:minmax(0,1fr)}
 body :is(.sheet-scroll,.history-scroll,.table-wrap,.table-scroll){touch-action:pan-x pan-y pinch-zoom}
 body :is(.home-kpis,.home-launches,.home-platforms,.home-bottom){grid-template-columns:minmax(0,1fr)}
 body :is(.institution-filters,.history-filters,.op-filter){align-items:stretch;gap:9px;flex-wrap:wrap}
 body :is(.institution-filters,.history-filters,.op-filter)>label{max-width:100%;min-width:0;flex:1 1 140px}
 body :is(.institution-filters,.history-filters,.op-filter) :is(input,select){max-width:100%;box-sizing:border-box}
 body :is(.fields-grid,.form-grid,.n44-fields,.manual-dialog .movement-card>.fields-grid,.manual-dialog .client-card>.fields-grid,.manual-dialog .create-receipt-details>.fields-grid){grid-template-columns:minmax(0,1fr)!important;gap:13px}
 body :is(.fields-grid,.form-grid,.n44-fields)>*{grid-column:auto;min-width:0;max-width:100%}
 body :is(.fields-grid,.form-grid,.n44-fields) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){min-width:0;max-width:100%;box-sizing:border-box;font-size:16px}
 body :is(.n48-settings-hero,.n48-category-heading,.n50-settings .n48-save-row){flex-wrap:wrap}
 body :is(.n48-category-nav,.n48-reset-tabs,.n44-actions,.modal-actions,.sheet-actions,.manual-footer){flex-wrap:wrap;gap:8px}
 body :is(.modal-actions,.manual-footer)>button{max-width:100%;white-space:normal}
 body :is(.history-detail-grid,.history-dialog dl){grid-template-columns:minmax(0,1fr)}
 body :is(.book-header,.book-top,.history-register>header,.exchange-hero){padding:16px 12px}
 body .n48-app{min-width:0;max-width:100%}
 body .n48-composer{min-width:0}
 body .n48-question-menu{max-width:calc(100vw - 72px)}
}
@media(max-width:420px){
 body .shell .topbar{padding:10px 12px!important}
 body .shell .topbar-actions{width:100%;justify-content:flex-end}
 body .shell .main-content{padding:14px 10px!important}
 body .shell .main-content.nibra-manual-host{padding:6px 5px 16px!important}
 body .shell .user-text{font-size:11px;max-width:180px}
 body :is(.institution-metrics,.history-counters,.summary,.nibra40-metrics){grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body .create-state-buttons{grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){body .shell>.sidebar{transition:none}}
