/* Gestão TT - interface nativa para Windows/desktop PWA.
   A barra exclusiva do aplicativo é ativada SOMENTE quando o sistema
   disponibiliza Window Controls Overlay. Navegador e mobile preservados. */
#ttDesktopTitlebar{display:none}
@media (display-mode: window-controls-overlay){
  html{background:#080808!important}
  body{
    background:#080808!important;
    padding-top:env(titlebar-area-height,32px)!important;
  }
  #ttDesktopTitlebar{
    display:flex!important;
    position:fixed!important;
    z-index:2147483100!important;
    left:env(titlebar-area-x,0px)!important;
    top:env(titlebar-area-y,0px)!important;
    width:env(titlebar-area-width,calc(100vw - 140px))!important;
    height:env(titlebar-area-height,32px)!important;
    min-height:0!important;
    padding:0 0 0 13px!important;
    box-sizing:border-box!important;
    align-items:center!important;
    justify-content:flex-start!important;
    background:#080808!important;
    color:#FFFFFF!important;
    border:0!important;
    box-shadow:none!important;
    user-select:none!important;
    -webkit-user-select:none!important;
    -webkit-app-region:drag;
    app-region:drag;
  }
  #ttDesktopTitlebar img{
    display:block!important;
    width:24px!important;
    height:24px!important;
    flex:0 0 24px!important;
    object-fit:contain!important;
    pointer-events:none!important;
    user-select:none!important;
  }
  body>.app{min-height:calc(100dvh - env(titlebar-area-height,32px))!important}
  #smyleEntryScreen.smyle-entry-screen{
    height:calc(100dvh - env(titlebar-area-height,32px))!important;
    min-height:calc(100dvh - env(titlebar-area-height,32px))!important;
    max-height:calc(100dvh - env(titlebar-area-height,32px))!important;
  }
  #portalScreen.portal{min-height:calc(100dvh - env(titlebar-area-height,32px))!important}
  #portalScreen #sidebar.sidebar{
    height:calc(100dvh - env(titlebar-area-height,32px))!important;
  }
  #loginScreen.login-shell{
    min-height:calc(100dvh - env(titlebar-area-height,32px))!important;
  }
  @media(max-width:860px){
    #portalScreen #sidebar.sidebar{
      top:env(titlebar-area-height,32px)!important;
      height:calc(100dvh - env(titlebar-area-height,32px))!important;
    }
  }
}
