/* ==========================================================================
   VerdeSoft – BASE (agnóstico de tema)
   Escopo: layout, utilitários e regras defensivas que não alteram cores/estética
   ========================================================================== */

/* ===== Layout raiz ====================================================== */
html, body { height: 100%; }
body { min-height: 100%; }

/* Área principal de conteúdo (não define cores) */
#content {
  width: 100%;
  padding: 0 10px;
  min-height: 100vh;          /* garante altura mínima de tela */
  box-sizing: border-box;
}

/* Wrapper com sidebar (estrutura) */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

/* Sidebar somente estrutura (sem tema) */
#sidebar {
  min-width: 250px;
  max-width: 250px;
  transition: all .3s;
  will-change: margin-left;
}
#sidebar.active { margin-left: -250px; }

/* ===== Navbar =========================================================== */
/* Navbar “cola” no topo sem tirar o conteúdo do fluxo */
.verdesoft-nav {
  position: sticky;           /* não é fixed -> evita sobrepor conteúdo */
  top: 0;
  z-index: 1200;              /* acima de dropdowns/poppers */
}

/* Caso sua navbar seja alta e em alguma página cubra o topo,
   você pode liberar esta classe onde precisar: */
/* .has-sticky-navbar { padding-top: 0.5rem; } */

/* ===== Utilitários genéricos =========================================== */
.text-truncate { max-width: 130px; }

/* Compat de grids (Bootstrap 4/5) */
.no-gutters { margin-right: 0; margin-left: 0; }
.no-gutters > .col,
.no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }

/* ===== Regras defensivas (não deixar mensagens flutuarem) ============== */
/* Garante que alerts que porventura recebam position:fixed em outro CSS
   NÃO flutuem dentro da área do app (#page). */
#page .alert {
  position: static !important;
  z-index: auto !important;
}

/* Se você tem popups próprios que DEVEM flutuar, estilize-os com IDs
   específicos em outro arquivo (tema), p.ex.:
   #mensagemSucessoExcluir, #mensagemErroExcluir { position: fixed; } */

/* ===== Acessibilidade e performance ==================================== */
/* Respeita usuários com redução de movimento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Previne zoom “saltado” em iOS durante inputs (opcional, seguro) */
@supports (-webkit-overflow-scrolling: touch) {
  input, select, textarea, button { font-size: 16px; }
}
