:root {
  --sidebar-width: 240px;
}

body {
  background-color: #f4f6f9;
}

#sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand i {
  margin-right: 0.5rem;
}

#sidebar .nav-link {
  color: rgba(255, 255, 255, 0.75);
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
}

#sidebar .nav-link i {
  width: 20px;
  margin-right: 0.4rem;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
  border-left: 3px solid #0d6efd;
}

.nav-section {
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.9rem 1.25rem 0.25rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
}

.kpi-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.kpi-card .kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.kpi-card .kpi-label {
  color: #6c757d;
  font-size: 0.85rem;
}

.chart-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Encabezados coloreados por tabla de origen (informe Utilidad por Ventas) */
.col-vendedores { background-color: #fff3b0 !important; }
.col-clientes    { background-color: #ffd8a8 !important; }
.col-productos   { background-color: #b2f2bb !important; }
.col-ventas      { background-color: #a5d8ff !important; }
.col-estado      { background-color: #dee2e6 !important; }

.leyenda-origen span {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

@media (max-width: 991.98px) {
  #sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar-width));
    z-index: 1050;
    transition: left 0.2s ease-in-out;
  }
  #sidebar.show {
    left: 0;
  }
}
