.preloader-msg-top {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  padding: 10px 18px;
  font-size: 15px;
  color: #fff;
  text-align: center;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  z-index: 10001;
}

.preloader-msg-top.show {
  display: inline-block;
}

/* Animação para o topo deslizar para cima/baixo */
#sistema_topo {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  transform: translateY(0);
  opacity: 1;
  position: absolute;
  z-index: 600;
  width: 100%;
  will-change: transform, opacity;
  top: 0
}

#sistema_topo.topo-oculto {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Garante que o conteúdo interno do topo também seja animado */
#sistema_topo > * {
  transition: opacity 0.3s ease-in-out;
}

#sistema_topo.topo-oculto > * {
  opacity: 0;
}

/* Padding-top no módulo atual apenas quando o topo estiver visível */
#sistema_topo:not(.topo-oculto) ~ #sistema_modulo_atual {
  padding-top: 65px;
}

/* Quando o topo está oculto, remove o padding */
#sistema_topo.topo-oculto ~ #sistema_modulo_atual {
  padding-top: 0;
}

/* Topbar fixo no topo da tela */
#sistema_topo .topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
}

/* Barra de progresso para bloqueio de navegação rápida (estilo YouTube Music) */
#barra_progresso_navegacao {
  display: none;
  position: fixed;
  top: 0 !important;
  left: 0;
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.4);
  z-index: 10002 !important;
  pointer-events: none;
}

#barra_progresso_navegacao_fill {
  height: 5px;
  width: 0%;
  background: linear-gradient(90deg, #4cb5cf 0%, #3967eb 50%, #7426ef 100%);
  box-sizing: border-box;
  transition: width 0.1s linear;
  box-shadow: 
    0 0 15px rgba(74, 181, 207, 0.8),
    0 0 30px rgba(57, 103, 235, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

/* Efeito de brilho animado na barra */
#barra_progresso_navegacao_fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: barra-brilho 2s infinite;
}

@keyframes barra-brilho {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ============================================================
   REGRAS DE IMPRESSÃO: Oculta elementos de navegação ao imprimir
   ============================================================ */
@media print {
  /* Oculta todas as divs do sistema EXCETO sistema_modulo_atual */
  #log,
  #tema_exclusivo,
  #sistema_estrutura,
  #sistema_layout,
  #sistema_config,
  #sistema_parametros,
  #sistema_funcoes,
  #sistema_global,
  #sistema_layout_cliente,
  #sistema_global_cliente,
  #sistema_bd,
  #sistema_gps,
  #sistema_modulos,
  #sistema_plataforma,
  #sistema_topo,
  #sistema_rodape,
  #menuAlversoft,
  #preloader,
  #preloaderMensagemTopo,
  .preloader,
  .preloader-msg-top {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  /* Oculta todos os inputs hidden */
  input[type="hidden"] {
    display: none !important;
  }
  
  /* Remove padding e margin do módulo atual na impressão */
  #sistema_modulo_atual {
    padding-top: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Garante que o conteúdo principal ocupe toda a largura na impressão */
  body {
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
  }
  
  /* Remove espaços em branco antes do conteúdo */
  html {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Garante que não haja página em branco antes ou depois do conteúdo */
  @page {
    margin: 0 !important;
    padding: 0 !important;
    size: auto;
  }
  
  /* Garante que apenas sistema_modulo_atual seja visível e comece no topo */
  #sistema_modulo_atual {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    page-break-inside: avoid !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  
  /* Remove qualquer elemento que possa causar página em branco */
  body::before,
  body::after {
    display: none !important;
    content: none !important;
  }
  
  /* Remove espaços em branco após o conteúdo */
  #sistema_modulo_atual::after,
  body::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Evita quebras de página desnecessárias */
  #sistema_modulo_atual > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    page-break-after: avoid !important;
  }
  
  /* Remove qualquer altura mínima que possa criar página em branco */
  html,
  body {
    min-height: auto !important;
    height: auto !important;
  }
  
  /* Remove margin e padding de todos os elementos dentro do módulo */
  #sistema_modulo_atual * {
    page-break-after: avoid !important;
  }
  
  /* Remove espaços extras do último elemento de qualquer nível */
  #sistema_modulo_atual *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  
  /* Remove qualquer espaço após o último elemento filho direto */
  #sistema_modulo_atual > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
  }
  
  /* Garante que não haja altura extra no final */
  #sistema_modulo_atual {
    overflow: visible !important;
  }
  
  /* Remove qualquer espaço em branco de elementos vazios */
  #sistema_modulo_atual:empty {
    display: none !important;
  }
}





