/* =============================================
   INVENTARIO HESEGO - Estilos Globales
   ============================================= */

body {
  background-color: #f5f6fa;
}

/* --- Navbar --- */
.navbar-brand {
  font-weight: 600;
}

/* --- Cards --- */
.card {
  border-radius: 0.75rem;
}

.flash-wrapper {
  margin-bottom: 1rem;
}

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* --- Tablas Responsive --- */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.table th {
  white-space: nowrap;
  vertical-align: middle;
}

.table td {
  vertical-align: middle;
}

/* Oculta badges incrustados en tabla de materiales */
#tablaMateriales .badge {
  display: none !important;
}

/* =============================================
   RESPONSIVE - Mobile First
   ============================================= */

/* Full-width en móviles */
@media (max-width: 767.98px) {
  .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  /* Navbar items más compactos */
  .navbar-nav .nav-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Tablas: scroll horizontal en móviles */
  .table-responsive {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    width: calc(100% + 1rem);
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .table th, .table td {
    padding: 0.4rem 0.5rem;
  }
  
  /* Columnas responsive: stack en móvil */
  .row > [class*="col-"] {
    margin-bottom: 0.5rem;
  }
  
  /* Badges más pequeños */
  .badge {
    font-size: 0.7rem;
  }
  
  /* Botones full-width en móvil */
  .btn-mobile-full {
    width: 100%;
  }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
  .container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .table {
    font-size: 0.9rem;
  }
}

/* --- Utilidades --- */
.text-truncate-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fila seleccionada en tabla */
.table tr.selected {
  background-color: rgba(13, 110, 253, 0.08) !important;
}

/* Animación de carga */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeInUp 0.3s ease-out;
}
