/* Declarada primeiro no HTML: esta camada corrige também os !important legados. */
@layer confiniMobile76 {
 @media screen and (max-width:767px), screen and (max-width:1100px) and (max-height:550px) {
  html body {--confini-control-height:44px;}
  html body :is(button,input[type="button"],input[type="submit"],[role="button"],a.confini-whatsapp-button):not(:where(#relFolha *,#confiniRelImpressao *)) {
   box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
   width:auto!important;height:auto!important;min-height:44px!important;max-height:none!important;
   padding:8px clamp(8px,2.5vw,12px)!important;font-size:clamp(12px,3.4vw,14px)!important;
   line-height:1.3!important;white-space:normal!important;overflow-wrap:break-word!important;
   word-break:normal!important;text-overflow:clip!important;flex-shrink:1!important;
  }
  html body button:is([data-confini-icon-only="true"],.icon) {width:44px!important;min-width:44px!important;padding:8px!important;}
  html body :is(button,[role="button"])::before {flex:0 0 auto!important;font-size:1em!important;}
  html body :is(.form,.fields,.confiniGridV48)>button,
  html body :is(.form,.fields,.confiniGridV48)>.wide {width:100%!important;}
  html body :is(.actions,.heading-actions,.confiniTableActions,.contaActions,.scAcoes42,.dialog-actions,.fichaAnimalHead) {
   min-width:0!important;max-width:100%!important;flex-wrap:wrap!important;gap:6px!important;
  }
  html body :is(.actions,.heading-actions,.confiniTableActions,.contaActions,.scAcoes42,.dialog-actions)>button {flex:1 1 auto!important;}
  html body :is(.appSidebar,#sidebar,.sidebar) button {width:100%!important;text-align:left!important;}
  html body :is(.appSidebar,#sidebar,.sidebar) .navLabel {white-space:normal!important;min-width:0!important;}
  html body #app .confiniTabs49 {
   display:flex!important;flex-wrap:nowrap!important;
   width:100%!important;min-width:0!important;max-width:100%!important;
   overflow-x:auto!important;overflow-y:hidden!important;gap:4px!important;padding:0!important;border-bottom:0!important;scrollbar-width:thin;
   align-items:stretch!important;
  }
  html body #app .confiniTabs49>button.confiniTab49:not([hidden]):not(.hidden) {
   display:flex!important;align-items:center!important;justify-content:center!important;
   flex:0 0 calc((100% - 4px)/2)!important;width:calc((100% - 4px)/2)!important;min-width:0!important;max-width:none!important;
   height:30px!important;min-height:30px!important;max-height:30px!important;
   display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
   line-height:28px!important;text-align:center!important;padding:0 8px!important;
   border:1px solid #b5c6ba!important;border-radius:9px!important;
  }
  html body :is(#app #dash .confiniMenuTitleRow,.confiniMenuTitleRow) {
   display:grid!important;grid-template-columns:minmax(0,1fr)!important;
   gap:6px!important;min-width:0!important;align-items:center!important;
  }
  html body #app #dash .confiniMenuTitleRow>h2 {grid-column:1/-1!important;grid-row:1!important;}
  html body #app #dash .confiniMenuTitleRow>.confiniMenuSelectors {
   grid-column:1/-1!important;grid-row:2!important;grid-template-columns:minmax(0,1fr)!important;
   min-width:0!important;width:100%!important;
  }
  html body #app #dash .confiniMenuSelectors>label {height:auto!important;min-height:40px!important;}
  html body #app #dash .confiniMenuSelectors select,
  html body #app #dash :is(#dashVisao,#dashCurral) {
   box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
   height:40px!important;min-height:40px!important;max-height:40px!important;font-size:16px!important;
   padding:6px 8px!important;line-height:normal!important;
  }
  html body button[data-confini-refresh53="true"],html body .confiniRefreshButton {
   height:auto!important;min-height:40px!important;min-width:0!important;max-width:100%!important;
   line-height:1.3!important;padding:8px!important;white-space:normal!important;
  }
  html body :is(.confiniMenuTitleRow)>.confiniRefreshButton {
   grid-column:1/-1!important;grid-row:3!important;
   width:100%!important;height:40px!important;min-height:40px!important;max-height:40px!important;
  }
  html body :is(#mobileHeader,#adminMobileHeader,#app>.appHeader.topbar) {
   display:grid!important;grid-template-columns:44px minmax(0,1fr) auto auto!important;
   align-items:center!important;gap:8px!important;box-sizing:border-box!important;
   width:100%!important;min-width:0!important;max-width:100%!important;
   height:auto!important;min-height:0!important;max-height:none!important;
   padding:calc(env(safe-area-inset-top,0px) + 8px) max(8px,env(safe-area-inset-right,0px)) 8px max(8px,env(safe-area-inset-left,0px))!important;
  }
  html body :is(#mobileHeader,#adminMobileHeader)>.confiniFieldV48Wrap:has(select),
  html body :is(#mobileHeader,#adminMobileHeader)>select,
  html body #app>.appHeader.topbar .property-picker {
   grid-column:1/-1!important;grid-row:2!important;width:100%!important;min-width:0!important;max-width:100%!important;
   margin:0!important;flex:none!important;
  }
  html body :is(#mobileHeader,#adminMobileHeader) label {color:#fff!important;font-size:12px!important;margin:0!important;line-height:1.2!important;}
  html body :is(#mobileHeader,#adminMobileHeader,#app>.appHeader.topbar) select {
   box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
   height:44px!important;min-height:44px!important;max-height:44px!important;
   font-size:16px!important;line-height:normal!important;padding:6px 8px!important;flex:none!important;
  }
  html body :is(#mobileMenuBtn,#adminMobileMenu,#openMenu) {
   grid-column:1!important;grid-row:1!important;width:44px!important;min-width:44px!important;
   height:44px!important;min-height:44px!important;padding:8px!important;font-size:22px!important;
  }
  html body :is(#mobileHeader,#adminMobileHeader)>img,
  html body #mobileHeader .mobileLogo,html body #app>.appHeader.topbar .appBrand {
   grid-column:2!important;grid-row:1!important;min-width:0!important;
   width:64px!important;max-width:100%!important;height:44px!important;object-fit:contain!important;
  }
  html body #app>.appHeader.topbar .appConfiniLogo {width:64px!important;height:44px!important;object-fit:contain!important;}
  html body #app>.appHeader.topbar :is(.appTopControls,.confiniHeaderActions) {display:contents!important;}
  html body #app>.appHeader.topbar .confiniHeaderIdentity {display:none!important;}
  html body :is(#beefMobileConta,#adminMobileConta,#accountButton):not([hidden]):not(.hidden) {
   display:inline-flex!important;align-items:center!important;justify-content:center!important;
   grid-column:3!important;grid-row:1!important;
  }
  html body :is(#mobileLogout,#adminMobileLogout,#logoutButton):not([hidden]):not(.hidden) {
   display:inline-flex!important;align-items:center!important;justify-content:center!important;
   grid-column:4!important;grid-row:1!important;
  }
  html body :is(#beefMobileConta,#adminMobileConta,#accountButton,#mobileLogout,#adminMobileLogout,#logoutButton) {
   width:auto!important;min-width:52px!important;max-width:100%!important;height:auto!important;min-height:44px!important;
   padding:8px!important;font-size:13px!important;line-height:1.3!important;
  }
  html body #app>.appHeader.topbar :is(#farmManageProperties,#farmSystemSelect):not([hidden]):not(.hidden) {grid-column:1/-1!important;grid-row:auto!important;}
  html body #app:has(>#mobileHeader)>.appWorkspace,
  html body #app:has(>.appHeader.topbar)>#main,
  html body:has(#adminMobileHeader) #app>.appWorkspace {
   top:var(--confini-mobile-height76,128px)!important;min-width:0!important;max-width:100%!important;
  }
  html body :is(#app>.appSidebar,#app>#sidebar) {padding-top:calc(var(--confini-mobile-height76,128px) + 10px)!important;}
  html body :is(dialog,.senhaBox,.fichaAnimalBox,.finDialog,.vfDialog) {box-sizing:border-box!important;max-width:calc(100vw - 16px)!important;}
  html body :is(.fichaAnimalHead,.dialog-top) {min-width:0!important;gap:8px!important;}
  html body :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {min-width:0!important;max-width:100%!important;font-size:16px!important;}
 }
}
