/* ========================================================
   GLOBAL DASHBOARD STYLES (Strict Dark Mode & Mobile First)
   ======================================================== */

body {
  /* Forzamos el color de fondo a un oscuro profundo (puedes ajustar el hex) */
  background-color: #121212 !important;
  color: #e0e0e0;
}

/* Tarjetas interactivas del Dashboard */
.dashboard-card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background-color: var(--bs-body-bg); /* Hereda del dark mode */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
}

/* Sección de Bienvenida Gradient (Adaptado para oscurecer) */
.welcome-section {
  background: linear-gradient(135deg, #4b5d9c 0%, #462c64 100%);
  color: white;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Overlay de Carga Moderno */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 18, 18, 0.85); /* Fondo oscuro semitransparente */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Sección de Filtros */
.filter-section {
  background-color: var(--bs-body-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.filter-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #adb5bd; /* Gris claro para etiquetas */
}

/* Tablas: Forzar contraste en hover */
.table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Offcanvas: Bordes y sombras oscuras */
.offcanvas {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.8);
}
.offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(255, 255, 255, 0.02);
}

/* Panel de info del Offcanvas (SKU, Factura) */
.info-panel-dark {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
}

/* ========================================================
   TABLAS RESPONSIVAS -> MOBILE CARDS VIEW
   ======================================================== */
@media (max-width: 767.98px) {
  .table-mobile-cards thead {
    display: none;
  }

  .table-mobile-cards tbody tr {
    display: block;
    margin-bottom: 1rem;
    background-color: var(--bs-body-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  }

  .table-mobile-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0.5rem;
    text-align: right;
  }

  .table-mobile-cards tbody td:last-child {
    border-bottom: none;
    justify-content: center;
    padding-top: 1rem;
  }

  .table-mobile-cards tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #adb5bd;
    text-align: left;
    margin-right: 1rem;
    flex-shrink: 0;
  }
}
