body {
  background-color: #f7f8fa;
  overflow-x: hidden;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1050;
}

.navbar-brand {
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 0.9rem !important;
    max-width: 50vw;
  }
  
  .navbar {
    padding: 0.5rem 0.75rem !important;
  }
}

#sidebar {
  transition: transform 0.3s ease-in-out;
  position: relative;
  z-index: 1040;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1030;
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

@media (max-width: 767px) {
  #sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    height: calc(100vh - 56px);
    transform: translateX(-100%);
    z-index: 1040;
  }

  #sidebar.show {
    transform: translateX(0);
  }

  #sidebarToggle {
    display: inline-block;
  }
}

@media (min-width: 768px) {
  #sidebarToggle {
    display: none;
  }
  
  .sidebar-overlay {
    display: none !important;
  }
}

.nav-link:hover {
  background-color: #0d6efd;
  border-radius: 5px;
}

.nav-link.active {
  background-color: #0d6efd;
  border-radius: 5px;
  font-weight: 500;
}

table th {
  font-weight: 600;
}

#section-inventario table {
  font-size: 0.95rem;
}

#formProducto input {
  border-radius: 8px;
}

.card {
  border-radius: 12px;
  border: none;
}

.card-title {
  border-bottom: 2px solid #0d6efd30;
  padding-bottom: 0.5rem;
}

.form-control {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.2);
}

.btn-success {
  border-radius: 8px;
  font-weight: 500;
}

#content {
  width: 100%;
  overflow-x: auto;
}

@media (max-width: 767px) {
  #content {
    padding: 1rem !important;
  }

  .card {
    margin-bottom: 1rem;
  }

  #section-inventario table {
    font-size: 0.8rem;
  }

  #section-inventario th,
  #section-inventario td {
    padding: 0.5rem 0.25rem;
    white-space: nowrap;
  }

  .row.mt-4 {
    gap: 0.75rem;
  }

  h3, h5 {
    font-size: 1.25rem;
  }
}

