/* ERP 1.6.3: camada de responsividade incremental, sem alterar regras de negócio. */
html { scroll-padding-top: 1rem; }
html, body { max-width: 100%; }
body { overflow-x: clip; }
main, .container-fluid, .row > *, .card, .card-body { min-width: 0; }
img, video, svg, canvas { max-width: 100%; }
.table-responsive { max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-responsive > table { width: max-content; min-width: 100%; }
.modal-dialog { max-width: min(94vw, 800px); margin-inline: auto; }
.modal-content { max-height: calc(100dvh - 2rem); overflow-y: auto; }
form .row > *, .btn-toolbar, .page-header { min-width: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea { max-width: 100%; }
:focus-visible { outline: 3px solid #0a9bc7; outline-offset: 3px; }
.nav-link, .btn, button, input, select, textarea { touch-action: manipulation; }
.btn:not(.btn-sm), .form-control:not(.form-control-sm), .form-select:not(.form-select-sm) { min-height: 42px; }
.pwa-install-container { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 1040; }
.pwa-install-container .btn { border-radius: 999px; box-shadow: 0 8px 24px #11284d50; }
@media (max-width: 991.98px) {
  .sidebar { max-width: min(300px, 88vw); }
  .navbar .marca { max-width: 75vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { width: 100%; margin: 0 !important; }
  .page-header { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
  .card .table-responsive { margin-inline: 0; }
}
@media (max-width: 767.98px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .container-fluid { padding-inline: 12px !important; }
  h1, .h1 { overflow-wrap: anywhere; }
  .card-body { padding: 1rem; }
  .btn-group { max-width: 100%; flex-wrap: wrap; gap: .25rem; }
  .modal-dialog { margin-block: .5rem; }
  .modal-content { max-height: calc(100dvh - 1rem); }
  input, textarea, select, .form-control, .form-select { font-size: 16px !important; }
  .turbo-credit { flex-wrap: wrap; text-align: center; }
}
@media (max-width: 359px) { .navbar .marca { font-size: .88rem; } .card-body { padding: .85rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
