/* IT310RESPONSIVE_DEVICE_PASS2H
   Hotfix responsivo: restaura estabilidade das páginas de ferramentas no celular após PASS2G.
   Escopo: mobile only para ferramentas/menu/PWA/AVADOG. Desktop, backend, motores, rotas, QR/donate e identidade preservados. */

@media (max-width:960px){
  /* A decisão de UX mobile permanece: ferramentas usam somente menu lateral; sem appbar inferior. */
  body.it-tools-bg .it-mobile-appbar,
  body.it-tools-bg.it-sidebar-enabled .it-mobile-appbar,
  body.it-sidebar-enabled .it-mobile-appbar{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    width:0!important;
    height:0!important;
    min-width:0!important;
    min-height:0!important;
    max-width:0!important;
    max-height:0!important;
    overflow:hidden!important;
    transform:translateY(120vh)!important;
  }

  body.it-tools-bg{
    overflow-x:hidden!important;
    overscroll-behavior-x:none!important;
    background:#02040a!important;
  }

  body.it-tools-bg > .bg,
  body.it-tools-bg .space-bg{
    position:fixed!important;
    inset:0!important;
    background-attachment:scroll!important;
    transform:translate3d(0,0,0)!important;
    backface-visibility:hidden!important;
    pointer-events:none!important;
  }

  html.it-mobile-drawer-active,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open{
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open{
    touch-action:auto!important;
    background:#02040a!important;
  }

  /* O fundo técnico deve continuar presente atrás do menu. PASS2H desfaz a tela preta/recorte quebrado. */
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open main,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open footer,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .bg,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .space-bg,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .infotech-particles{
    visibility:visible!important;
    opacity:1!important;
    pointer-events:none!important;
    user-select:none!important;
    -webkit-user-select:none!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .it-sidebar-backdrop{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    z-index:10010!important;
    background:rgba(0,7,18,.58)!important;
    opacity:1!important;
    backdrop-filter:blur(3px) saturate(.9)!important;
    -webkit-backdrop-filter:blur(3px) saturate(.9)!important;
    pointer-events:auto!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded{
    position:fixed!important;
    left:8px!important;
    right:auto!important;
    top:calc(8px + env(safe-area-inset-top,0px))!important;
    bottom:auto!important;
    width:min(342px,calc(100vw - 18px))!important;
    max-width:calc(100vw - 18px)!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100svh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
    margin:0!important;
    padding:12px 11px calc(12px + env(safe-area-inset-bottom,0px))!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:8px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
    touch-action:pan-y!important;
    border-radius:20px!important;
    border:1px solid rgba(0,245,255,.34)!important;
    background:linear-gradient(180deg,rgba(2,9,23,.98),rgba(4,18,35,.97) 55%,rgba(2,8,20,.98))!important;
    box-shadow:0 24px 70px rgba(0,0,0,.62),inset 0 0 0 1px rgba(255,255,255,.035)!important;
    z-index:10050!important;
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    contain:layout paint style!important;
    box-sizing:border-box!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded *{
    box-sizing:border-box!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-sidebar-toggle{
    position:absolute!important;
    top:10px!important;
    right:10px!important;
    width:40px!important;
    min-width:40px!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    padding:0!important;
    border-radius:13px!important;
    z-index:4!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-brand{
    flex:0 0 auto!important;
    width:calc(100% - 52px)!important;
    max-width:calc(100% - 52px)!important;
    min-height:42px!important;
    max-height:54px!important;
    padding:0 0 6px!important;
    margin:0!important;
    overflow:hidden!important;
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-brand img{
    display:block!important;
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    object-fit:contain!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-brand strong{
    display:block!important;
    font-size:11px!important;
    letter-spacing:.13em!important;
    line-height:1.1!important;
    color:#fff!important;
    white-space:nowrap!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-brand em,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-brand span span{
    display:none!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-side-search{
    flex:0 0 auto!important;
    margin:0!important;
    padding:0!important;
    display:block!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-side-search label{
    display:block!important;
    font-size:9.5px!important;
    line-height:1!important;
    margin:0 0 4px!important;
    letter-spacing:.17em!important;
    color:#86f8ff!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-side-search input{
    display:block!important;
    width:100%!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    border-radius:12px!important;
    font-size:11px!important;
    padding:0 10px!important;
    color:#f8fbff!important;
    background:rgba(1,8,20,.82)!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-search-hint{
    display:none!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav{
    flex:0 0 auto!important;
    min-height:0!important;
    max-height:none!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:6px!important;
    overflow:visible!important;
    margin:0!important;
    padding:0!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-sidebar-label{
    flex:0 0 auto!important;
    height:26px!important;
    min-height:26px!important;
    max-height:26px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    padding:0 10px!important;
    margin:2px 0 0!important;
    border-radius:12px!important;
    font-size:9.5px!important;
    line-height:1!important;
    letter-spacing:.17em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    color:#91f7ff!important;
    background:rgba(0,8,22,.62)!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a{
    flex:0 0 auto!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:9px!important;
    padding:0 11px!important;
    border-radius:13px!important;
    font-size:12px!important;
    font-weight:850!important;
    line-height:1!important;
    letter-spacing:.01em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    background:rgba(2,10,24,.78)!important;
    border:1px solid rgba(106,146,210,.42)!important;
    color:#f7fbff!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a::before{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:22px!important;
    min-width:22px!important;
    margin-right:0!important;
    opacity:1!important;
    color:#ffffff!important;
    filter:drop-shadow(0 0 8px rgba(0,245,255,.22))!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="home"]::before{content:"⌂"!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="alphadesk"]::before{content:"AD"!important;font-size:10px!important;font-weight:950!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="color-tools"]::before{content:"◐"!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="dmx-tools"]::before{content:"DMX"!important;font-size:10px!important;font-weight:950!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="fixturebridge"]::before{content:"⇄"!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="fixture-builder"]::before{content:"✦"!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="led-tools"]::before{content:"▥"!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="network-tools"]::before{content:"⌁"!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="stagetools"]::before{content:"◎"!important;}
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[data-key="instagram"]::before{content:"IG"!important;font-size:10px!important;font-weight:950!important;}

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a.is-active,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[aria-current="page"]{
    border-color:rgba(0,245,255,.86)!important;
    background:linear-gradient(135deg,rgba(0,245,255,.18),rgba(255,0,212,.10),rgba(2,10,24,.82))!important;
    box-shadow:0 0 0 1px rgba(0,245,255,.24),0 0 24px rgba(0,245,255,.12)!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a[hidden],
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a.it-section-hidden:not(.it-search-override),
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-sidebar-label[hidden],
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-sidebar-section-toggle[hidden]{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    width:0!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    pointer-events:none!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-lang-toggle{
    flex:0 0 auto!important;
    display:flex!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    border-radius:13px!important;
    padding:0 10px!important;
    font-size:10.5px!important;
    margin-top:0!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-lang{
    flex:0 0 auto!important;
    max-height:118px!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-install-app-cta,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-search-empty-note{
    display:none!important;
  }

  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .infotech-support-float,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .it-pwa-toast,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .pwa-install-prompt,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .install-prompt,
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .app-install-popup{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  /* Enquanto o popup de instalação está ativo no celular, AVADOG sai totalmente para não cobrir a instalação. */
  body.it-tools-bg.it-pwa-toast-active .infotech-support-float,
  body.fixturebridge-page.it-pwa-toast-active .infotech-support-float,
  body.fixture-builder-page.it-pwa-toast-active .infotech-support-float{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  body.it-tools-bg .it-pwa-toast[data-kind="install"],
  body.it-tools-bg .it-pwa-toast[data-kind="install-help"]{
    left:10px!important;
    right:auto!important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    width:min(320px,calc(100vw - 20px))!important;
    max-width:min(320px,calc(100vw - 20px))!important;
    z-index:9500!important;
  }
}

@media (max-width:390px){
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded{
    left:7px!important;
    top:calc(7px + env(safe-area-inset-top,0px))!important;
    width:calc(100vw - 14px)!important;
    max-width:calc(100vw - 14px)!important;
    max-height:calc(100svh - 14px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
    padding:10px 9px calc(10px + env(safe-area-inset-bottom,0px))!important;
    gap:6px!important;
  }
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a{
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    font-size:11.5px!important;
    padding:0 10px!important;
  }
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-sidebar-label{
    height:24px!important;
    min-height:24px!important;
    max-height:24px!important;
    font-size:9px!important;
  }
}

@media (max-height:700px) and (max-width:960px){
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded{
    overflow-y:auto!important;
  }
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-side-search input{
    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;
  }
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav{
    gap:5px!important;
  }
  body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded .it-global-nav a{
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
  }
}
