/* =========================================================================
   RESPONSIVIDADE GLOBAL (DESKTOP, TABLET, ANDROID E iOS/SAFARI) — GESTORQ
   ========================================================================= */

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Impede zoom automático no iPhone/iPad ao tocar em campos de formulário */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Garante área de toque confortável em botões no celular */
  button, a[class*="px-"] {
    min-height: 40px;
  }

  /* Modais ocupam quase toda a tela no celular com rolagem suave */
  #app-modal {
    padding: 0.5rem !important;
    align-items: flex-end !important;
  }

  #app-modal-box {
    margin: 0 !important;
    max-width: 100% !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
  }

  #app-modal-body {
    max-height: 82vh !important;
    padding: 1rem !important;
  }

  /* Evita que qualquer tabela estoure a largura da tela */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ajusta cabeçalho do app para não espremer os botões no celular */
  header .h-16, header .h-20 {
    height: auto !important;
    min-height: 4rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    flex-wrap: wrap;
  }
}

/* Barra de módulos deslizável com o dedo no celular e tablet */
nav.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}
nav.overflow-x-auto::-webkit-scrollbar {
  display: none; /* Chrome / Safari */
}

/* Respeita a barra inferior (notch/home indicator) de iPhones e Androids */
body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}