/* ========= Ruptura — Custom CSS ========= */

/* --- Touch targets mínimos para mobile --- */
.btn { min-height: 44px; }
.btn-sm { min-height: 36px; }
.btn-icon { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.form-control, .form-select { min-height: 44px; }
.form-control-sm, .form-select-sm { min-height: 36px; }

/* --- Safe area insets (notch / barra de navegacao Android) --- */
main { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.position-fixed.bottom-0 { padding-bottom: max(.75rem, env(safe-area-inset-bottom)) !important; }

/* --- Navbar --- */
.navbar-brand { font-size: 1.15rem; letter-spacing: .02em; }

/* --- Dashboard cards --- */
.dash-card {
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
  border-radius: .75rem !important;
}
.dash-card:hover, .dash-card:active {
  transform: translateY(-3px);
  box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.12) !important;
}
.dash-icon { font-size: 2.5rem; }

/* --- Produto cards --- */
.produto-card {
  border-radius: .75rem !important;
  cursor: pointer;
  transition: box-shadow .15s;
}
.produto-card:hover { box-shadow: 0 .35rem 1rem rgba(0,0,0,.1) !important; }

/* --- Scanner reader --- */
#reader, #readerLista {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-radius: .5rem;
  overflow: hidden;
}

/* Linha animada de scan (modo nativo BarcodeDetector) */
.scanner-linha {
  position: absolute;
  left: 5%;
  width: 90%;
  height: 2px;
  background: rgba(13, 110, 253, .85);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(13, 110, 253, .6);
  animation: scanLine 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scanLine {
  0%, 100% { top: 20%; }
  50%       { top: 80%; }
}

/* --- Font monospace para codigos --- */
.font-monospace { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }

/* --- Scrollbar fina (webkit) --- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 4px; }

/* --- Prevent zoom on input focus iOS --- */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* --- Cards list spacing --- */
.list-group-item { font-size: .875rem; }

/* --- Sticky bottom em mobile para botao de validar --- */
@media (max-width: 575px) {
  #btnValidar {
    position: sticky;
    bottom: 1rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(13, 110, 253, .35);
  }
}

/* --- Badge limpo --- */
.badge { font-weight: 500; }

/* --- Animacao de entrada de toast --- */
.toast.show { animation: slideUp .2s ease; }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* --- Evita overflow horizontal --- */
body { overflow-x: hidden; }

/* --- Modal editar usuario: scroll (form quebra flex nativo do Bootstrap) --- */
#modalEditarUsuario .modal-body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
