/* VERUM · Presentación móvil compartida. Escritorio e impresión sin cambios.
 * Las tablas mantienen TODAS sus columnas; los formularios de detalle se apilan.
 * No ocultar estados, importes, permisos, validaciones ni acciones de negocio. */
@media screen and (max-width:780px),screen and (max-width:1024px) and (pointer:coarse){
 html:root{scrollbar-gutter:auto!important;-webkit-text-size-adjust:100%}
 html:root body{min-width:0!important;max-width:100%;margin:0}
 html:root body :is(.shell,.ac-shell,.adm-shell){display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;grid-template-columns:minmax(0,1fr)!important}
 html:root body :is(.workspace,.ac-main,.adm-main,.su-workspace){width:100%!important;min-width:0!important;max-width:100%!important;margin-left:0!important;grid-column:auto!important}
 html:root body :is(.main,.ac-main,.adm-main,.su-main,.ee-main,.book-main,.br-config-main){min-width:0!important;max-width:100%!important;padding:16px 12px 28px!important;box-sizing:border-box}
 html:root body .ac-main>.main{padding:0!important}
 html:root body :is(.panel,.ops-panel,.ops-fv-panel,.ac-panel,.adm-panel,.su-panel,.br-local-panel,.br-local-original,.energy-main,.rp-panel,.ee-panel,.book-panel){min-width:0!important;max-width:100%!important;box-sizing:border-box}
 html:root body :is(.page-head,.oui-page-heading,.br-local-heading,.ac-heading,.adm-heading,.su-hero,.energy-heading,.ee-header-main,.book-header,.rp-heading){flex-wrap:wrap!important;gap:12px!important;min-width:0;max-width:100%;height:auto!important}
 html:root body :is(.page-head,.oui-page-heading,.br-local-heading,.ac-heading,.adm-heading,.su-hero)>div:first-child{min-width:0;max-width:100%}
 html:root body :is(h1,.fm-title){white-space:normal!important;overflow-wrap:break-word;font-size:clamp(21px,5.6vw,27px)!important;line-height:1.25!important}
 html:root body :is(.topbar,.su-topbar,.ac-topbar){min-width:0!important;max-width:100%!important;flex-wrap:wrap!important;gap:8px!important;padding:10px 12px!important}
 html:root body :is(.topbar-left,.topbar-right,.topbar-route){min-width:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere}
 html:root body :is(.actions,.adm-actions,.ac-toolbar-buttons,.br-unified-primary-actions,.oui-filter-actions,.energy-actions,.su-actions){flex-wrap:wrap!important;gap:8px!important;max-width:100%;min-width:0}
 html:root body :is(button,.btn,.adm-btn,.ac-btn,.su-button,.br-local-button,input[type=submit]){touch-action:manipulation}
 html:root body :is(.main,.ac-main,.adm-main,.su-main,dialog) :is(button,.btn,.adm-btn,.ac-btn,.su-button,.br-local-button):not([hidden]):not(.brm-menu-backdrop){min-height:44px!important;height:auto!important;max-width:100%;white-space:normal!important;line-height:1.3!important}
 html:root body :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){font-size:16px!important;min-height:44px!important;min-width:0!important;max-width:100%!important;box-sizing:border-box;line-height:1.35!important}
 html:root body input:is([type=checkbox],[type=radio]){min-width:20px;min-height:20px}
 html:root body :is(label,fieldset,form){min-width:0;box-sizing:border-box}
 html:root body [data-brm-grid="filters"]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;overflow:visible!important;width:100%!important;max-width:100%!important;box-sizing:border-box}
 html:root body [data-brm-grid="form"]{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px!important;max-width:100%!important}
 html:root body [data-brm-grid]>*{min-width:0!important;max-width:100%!important;grid-column:auto!important;grid-row:auto!important;flex-basis:auto!important;box-sizing:border-box}
 html:root body [data-brm-grid="kpis"]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;max-width:100%;width:100%;box-sizing:border-box}
 html:root body [data-brm-grid="kpis"]>*{width:auto!important;min-height:92px!important;padding:12px!important;overflow:hidden;position:relative}
 html:root body [data-brm-grid="kpis"] strong{font-size:clamp(18px,5vw,25px)!important;white-space:normal!important;overflow-wrap:anywhere}
 html:root body [data-brm-grid="kpis"] :is(.oui-metric-icon,.energy-ui-kpi-icon,.oui-mini-bars,.oui-watermark){display:none!important}
 html:root body :is(.twocol,.or-two,.flow-twocol,.oc-bottom,.oa-period,.oa-week-row,.ac-connection,.ac-document-overview,.rp-two,.energy-integral-workspace,.su-layout,.su-detail-grid){grid-template-columns:minmax(0,1fr)!important;min-width:0!important;max-width:100%!important}
 html:root body :is(.oa-counters,.ac-connection-actions,.ac-query-status,.br-u-finance-caption,.adm-panel-title,.ac-panel-top,.panel-title){flex-wrap:wrap!important;min-width:0;gap:10px}
 html:root body :is(.ac-tabs,.br-u-stage-tabs,#br-log-stages,.energy-tabs,.su-org-tabs,.energy-editor-nav,.rp-tabs){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;max-width:100%;min-width:0;gap:6px;-webkit-overflow-scrolling:touch}
 html:root body :is(.ac-tabs,.br-u-stage-tabs,#br-log-stages,.energy-tabs,.su-org-tabs,.energy-editor-nav,.rp-tabs)>*{flex:0 0 auto!important;white-space:nowrap!important;min-height:44px}
 /* Menú común. Solo cerrar/abrir presentación; enlaces originales intactos. */
 html:root body[data-brm-active] [data-brm-sidebar]{position:sticky!important;inset:0 auto auto 0!important;top:0!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:60px!important;max-height:88vh!important;max-height:88dvh!important;display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;padding:8px 12px!important;margin:0!important;overflow-x:hidden!important;overflow-y:auto!important;z-index:95!important;box-sizing:border-box}
 html:root body[data-brm-active] [data-brm-sidebar] :is(.energy-ui-brand,.oui-brand-row,.fs-brand-row){display:flex!important;flex-direction:row!important;align-items:center!important;gap:10px!important;min-width:0!important;width:auto!important;max-width:calc(100% - 54px)!important;height:44px!important;min-height:44px!important;padding:0!important;margin:0!important;border:0!important;flex:1 1 0%!important}
 html:root body[data-brm-active] [data-brm-sidebar] :is(.brand,.ac-brand,.adm-brand,.su-brand){display:flex!important;align-items:center!important;justify-content:flex-start!important;flex:1 1 auto!important;min-width:0!important;max-width:calc(100% - 58px)!important;width:auto!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important}
 html:root body[data-brm-active] [data-brm-sidebar] :is(.brand,.ac-brand,.adm-brand)>img{display:block!important;width:auto!important;min-width:0!important;max-width:175px!important;height:40px!important;max-height:40px!important;object-fit:contain!important}
 html:root body[data-brm-active] [data-brm-sidebar] :is(.oui-brand-mark,.energy-ui-mark,.fs-brand-mark,.fs-mark,.fs-toggle,.energy-ui-collapse,.oui-sidebar-toggle,.side-label,.ac-side-caption,.adm-side-label,.su-nav-label,.ac-side-spacer){display:none!important}
 html:root body[data-brm-active] [data-brm-sidebar] :is(.br-mobile-menu-toggle,.brm-menu-toggle){display:inline-flex!important;align-items:center!important;justify-content:center!important;order:-1!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:1px solid #ceded8!important;border-radius:9px!important;background:#fff!important;color:#234d4b!important;font:600 24px/1 system-ui!important;cursor:pointer}
 html:root body[data-brm-active]:not(.br-mobile-nav-open) [data-brm-sidebar] :is(.nav,.ac-nav,.adm-nav,.su-nav,.user,.ac-user,.ac-back,.adm-user,.adm-back,.su-session,.su-back){display:none!important}
 html:root body[data-brm-active].br-mobile-nav-open [data-brm-sidebar] :is(.nav,.ac-nav,nav){position:static!important;inset:auto!important;display:flex!important;flex-direction:column!important;flex:1 0 100%!important;align-items:stretch!important;gap:6px!important;width:100%!important;max-height:none!important;margin:0!important;padding:4px 0!important;box-shadow:none!important;background:transparent!important;overflow:visible!important;border:0!important}
 html:root body[data-brm-active].br-mobile-nav-open [data-brm-sidebar] :is(.nav-btn,.ac-nav-link,.adm-nav,.su-nav){display:flex!important;align-items:center!important;justify-content:flex-start!important;flex:0 0 auto!important;gap:10px!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:46px!important;padding:12px!important;margin:0!important;font-size:14px!important;line-height:1.35!important;white-space:normal!important;box-sizing:border-box}
 html:root body[data-brm-active].br-mobile-nav-open [data-brm-sidebar] :is(.nav-btn,.ac-nav-link)>span:not([hidden]){display:inline!important;font-size:14px!important;opacity:1!important;visibility:visible!important}
 html:root body[data-brm-active].br-mobile-nav-open [data-brm-sidebar] :is(.nav-btn,.ac-nav-link) svg{max-width:24px;max-height:24px;flex:none}
 html:root body[data-brm-active].br-mobile-nav-open [data-brm-sidebar] :is(.user,.ac-user,.adm-user,.su-session){display:flex!important;flex:1 0 100%!important;margin:0!important;padding:10px!important;min-height:50px!important;height:auto!important}
 html:root body[data-brm-active].br-mobile-nav-open [data-brm-sidebar] :is(.ac-back,.adm-back,.su-back){display:block!important;flex:1 0 100%;font-size:14px!important;padding:12px!important;min-height:44px}
 html:root body[data-brm-active].br-mobile-nav-open [data-brm-sidebar] .ac-back::before{content:none!important}
 .brm-menu-backdrop{display:none;position:fixed;inset:0;z-index:90;border:0;background:#081f2b77;width:100%;height:100vh;height:100dvh}
 body.br-mobile-nav-open>.brm-menu-backdrop{display:block}
 /* Contenedores desplazables, no recortar columnas ni toda la página. */
 html:root body [data-brm-scroll]{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;box-sizing:border-box}
 html:root body [data-brm-scroll]:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
 html:root body table[data-brm-table]:not([data-brm-form-table]){table-layout:auto!important;width:100%!important;min-width:680px!important;font-size:13px!important}
 html:root body table[data-brm-table]:is([data-brm-table="1"],[data-brm-table="2"],[data-brm-table="3"]){min-width:0!important}
 html:root body table[data-brm-table] :is(th,td){font-size:12px!important;line-height:1.4!important;overflow-wrap:normal!important;word-break:normal!important}
 html:root body table[data-brm-table] td{min-width:80px!important}
 html:root body table[data-brm-table] :is(th,td):last-child{min-width:60px!important}
 /* Ventanas nativas, gestores y adjuntos, también con teclado abierto. */
 html:root body dialog{box-sizing:border-box!important;min-width:0!important;max-width:calc(100vw - 16px)!important;width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:auto!important;border-radius:12px!important;overflow-x:hidden!important;overflow-y:auto!important}
 html:root body dialog:is(.fm-dialog,.br-g-dialog,.br-local-detail){padding:16px 12px!important}
 html:root body dialog :is(form,fieldset,.br-g-content,.adm-dialog-body,.ac-dialog-body,.energy-dialog-body,.br-provider-body,.br-client-body){min-width:0!important;max-width:100%!important;box-sizing:border-box}
 html:root body dialog :is(.adm-dialog-head,.adm-dialog-body,.adm-dialog-foot,.adm-dialog-footer,.ac-dialog-head,.ac-dialog-body,.ac-dialog-footer,.energy-dialog-head,.oc-dialog-head,.br-provider-body,.br-client-body){padding:14px 12px!important}
 html:root body dialog :is(.adm-dialog-foot,.adm-dialog-footer,.fm-footer,.ac-dialog-footer,.oc-dialog-actions,.dialogactions,.energy-dialog-actions,.actions){flex-wrap:wrap!important;gap:8px!important;height:auto!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important}
 html:root body dialog :is(.adm-dialog-foot,.adm-dialog-footer,.fm-footer,.ac-dialog-footer,.oc-dialog-actions,.dialogactions,.energy-dialog-actions) button{flex:1 1 auto!important}
 html:root body dialog :is(.adm-dialog-head,.fm-head,.ac-dialog-head,.energy-dialog-head){gap:10px!important;min-width:0!important}
 html:root body dialog :is(.adm-close,.fm-close,[aria-label="Cerrar"],[aria-label="Cerrar ventana"]){min-width:44px!important;width:44px!important;min-height:44px!important;flex:0 0 44px!important}
 html:root body :is(.pdf-modal,.invoice-modal,[role="dialog"]){box-sizing:border-box;max-width:100vw!important}
 html:root body :is(.pdf-modal-shell,.br-doc-shell,.invoice-modal-content){width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:auto!important;min-width:0!important}
 html:root body :is(.pdf-toolbar,.br-doc-toolbar,.pdf-modal-head){flex-wrap:wrap!important;min-width:0!important;gap:8px!important}
 html:root body :is(.pdf-modal iframe,dialog iframe){max-width:100%!important;min-width:0!important;width:100%!important}
 html:root body dialog :is(.fm-document-row,.adm-support-types,.adm-type-options,.energy-create-options){flex-wrap:wrap!important;grid-template-columns:minmax(0,1fr)!important;min-width:0!important;max-width:100%!important}
 html:root body dialog :is(.fm-document-row>span,.fm-document-head>div){min-width:0!important;overflow-wrap:anywhere}
 /* Filas editables: etiqueta de cada columna y campo real, sin duplicación. */
 html:root body table[data-brm-form-table]{display:block!important;min-width:0!important;width:100%!important;border-collapse:separate!important}
 html:root body table[data-brm-form-table] thead{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important}
 html:root body table[data-brm-form-table] :is(tbody,tr){display:block!important;min-width:0!important;width:100%!important}
 html:root body table[data-brm-form-table] tbody>tr{padding:10px!important;border:1px solid #dce6e1!important;border-radius:9px!important;margin:0 0 12px!important;background:#fff!important;box-sizing:border-box}
 html:root body table[data-brm-form-table] td{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;border:0!important;padding:5px 0!important;box-sizing:border-box}
 html:root body table[data-brm-form-table] td[data-brm-label]::before{content:attr(data-brm-label);display:block;font:600 12px/1.4 "Segoe UI",Arial,sans-serif;color:#496574;margin-bottom:5px}
 html:root body table[data-brm-form-table] td :is(input,select,textarea){width:100%!important}
 /* Inicio y utilidades: mantener la marca, permitir desplazamiento vertical. */
 html:root body.br-areas :is(.login-shell,.auth-panel.areas-panel,.auth-panel,.left-content){min-width:0!important;max-width:100%!important;box-sizing:border-box}
 html:root body.br-areas .login-shell{height:auto!important;min-height:100svh!important;display:flex!important;flex-direction:column!important;padding:20px 14px!important;gap:20px!important;overflow:visible!important}
 html:root body.br-areas .auth-panel{width:100%!important;max-width:540px!important;min-width:0!important;padding:22px 16px!important;height:auto!important;min-height:0!important;transform:none!important}
 html:root body.br-areas .areas-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 html:root body.br-areas .area-card{min-width:0!important;max-width:100%!important;height:auto!important;min-height:118px!important;padding:14px 10px!important}
 html:root body.br-areas :is(.home-headline,.hero-heading){font-size:clamp(26px,8vw,42px)!important;white-space:normal!important}
 html:root body.br-areas .session-row{flex-wrap:wrap!important;gap:10px!important}
 html:root body.br-areas .home-network{max-width:100vw!important;left:0!important}
 html:root body :is(.ee-header,.book-header,.br-config-header){flex-wrap:wrap!important;gap:10px!important;padding:12px!important}
 html:root body .su-org-person{min-width:0!important;max-width:100%!important}
 html:root body .su-table-wrap{max-width:100%;overflow:auto}
 html:root body :is(.brm-menu-toggle,.br-mobile-menu-toggle):focus-visible{outline:3px solid #76b8d6!important;outline-offset:2px}
 /* Respetar estados ocultos de la aplicación, incluso en contenedores flex/grid. */
 html:root body [hidden],html:root body [data-brm-grid][hidden]{display:none!important}
}
@media screen and (max-width:480px){
 html:root body [data-brm-grid="filters"]{grid-template-columns:minmax(0,1fr)!important}
 html:root body :is(.adm-totals,.adm-totals.is-refund,.ac-stats){grid-template-columns:minmax(0,1fr)!important}
 html:root body .adm-expense-toolbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important}
 html:root body .adm-expense-toolbar :is(label,button){width:100%!important;max-width:100%!important}
}

@media screen and (max-width:780px),screen and (max-width:1024px) and (pointer:coarse){
 html:root body[data-brm-active] [data-brm-sidebar] :is(.energy-ui-brand,.oui-brand-row,.fs-brand-row)>.brand{max-width:100%!important;width:100%!important;flex:1 1 auto!important}
 html:root body.ops-reference .workspace>.main .ops-panel>.ops-filters[data-brm-grid]{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-flow:row!important;overflow:visible!important}
 html:root body.ops-reference .workspace>.main .ops-panel>.ops-filters[data-brm-grid]>label{grid-area:auto!important;width:100%!important;min-width:0!important;max-width:100%!important}
 html:root body.ops-reference .workspace>.main .ops-date-range{width:100%!important;grid-area:auto!important;grid-column:1 / -1!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;max-width:100%!important;min-width:0!important}
 html:root body.ops-reference .workspace>.main .ops-date-range>label{flex:1 1 130px!important;min-width:0!important;max-width:100%!important}
}
@media screen and (max-width:480px){
 html:root body.ops-reference .workspace>.main .ops-panel>.ops-filters[data-brm-grid]{grid-template-columns:minmax(0,1fr)!important}
}

@media screen and (max-width:780px),screen and (max-width:1024px) and (pointer:coarse){
 html:root body dialog.pdf-modal{padding:0!important}
 html:root body dialog.pdf-modal .pdf-modal-shell{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box}
 html:root body dialog.pdf-modal :is(.pdf-modal-header,.pdf-modal-content){max-width:100%!important;min-width:0!important;box-sizing:border-box}
 html:root body dialog.pdf-modal .pdf-modal-header{flex-wrap:wrap!important;gap:8px!important}
 html:root body dialog.pdf-modal .pdf-modal-close{min-width:44px!important;width:44px!important;height:44px!important}
}
