/* Industrial B2B — Inventory (aligned with admin indigo theme) */
:root {
  --inv-bg: #f4f6f9;
  --inv-sidebar: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  --inv-accent: #6366f1;
  --inv-accent-dark: #4f46e5;
  --inv-text: #111827;
  --inv-muted: #6b7280;
  --inv-card: #fff;
  --inv-radius: 12px;
}

body.inv-no-scroll {
  overflow: hidden;
}

.inv-app {
  background: var(--inv-bg);
  color: var(--inv-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.inv-sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--inv-sidebar);
  color: #cbd5e1;
  padding: 1.25rem 0;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.inv-brand {
  padding: 0 1.25rem 1.25rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.5rem;
}

.inv-brand i {
  color: var(--inv-accent);
  margin-right: 0.35rem;
}

.inv-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.inv-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, padding-left 0.15s;
}

.inv-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-left-color: var(--inv-accent);
  padding-left: 1.35rem;
}

.inv-nav a i {
  opacity: 0.85;
  font-size: 1.05rem;
}

.inv-sidebar-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-sidebar-foot a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fca5a5;
  text-decoration: none;
  font-size: 0.9rem;
}

.inv-sidebar-foot a:hover {
  color: #fecaca;
}

.inv-main {
  margin-left: 260px;
  min-width: 0;
  background: var(--inv-bg);
}

.inv-topbar {
  padding: 0.75rem 1rem;
  background: var(--inv-card);
  border-bottom: 1px solid #e5e7eb;
}

.inv-content {
  max-width: 1200px;
}

.inv-content h1,
.inv-content h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.inv-card {
  background: var(--inv-card);
  border-radius: var(--inv-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.inv-table-wrap {
  overflow-x: auto;
  border-radius: var(--inv-radius);
  background: var(--inv-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.inv-table-wrap table {
  margin-bottom: 0;
}

.inv-table-wrap thead th {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: #fff;
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
}

.inv-table-wrap tbody tr:hover {
  background: #f9fafb;
}

.inv-actions a {
  margin-right: 0.5rem;
}

.btn-inv-primary {
  background: linear-gradient(135deg, var(--inv-accent), var(--inv-accent-dark));
  border: none;
  color: #fff;
}

.btn-inv-primary:hover {
  color: #fff;
  filter: brightness(1.05);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.stock-low {
  background: #fee2e2 !important;
  color: #991b1b !important;
  font-weight: 600;
}

.stock-ok {
  background: #d1fae5 !important;
  color: #065f46 !important;
}

.stock-high {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.inv-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1030;
}

@media (max-width: 991.98px) {
  .inv-sidebar {
    transform: translateX(-100%);
  }

  .inv-sidebar.open {
    transform: translateX(0);
  }

  .inv-main {
    margin-left: 0;
  }
}

@media (min-width: 992px) {
  .inv-topbar {
    display: none !important;
  }
}

html {
  overflow-x: hidden;
}

.inv-app {
  overflow-x: hidden;
}

.inv-content {
  padding-left: clamp(0.75rem, 3vw, 1.5rem);
  padding-right: clamp(0.75rem, 3vw, 1.5rem);
}

.inv-table-wrap {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
  .row.g-2 { flex-direction: column; }
  .inv-card {
    padding: 1rem;
  }

  .inv-content h1,
  .inv-content h2 {
    font-size: 1.25rem;
  }

  .table {
    font-size: 0.8rem;
  }

  .btn,
  .btn-sm {
    min-height: 44px;
  }
}

@media (max-width: 400px) {
  .inv-sidebar {
    width: min(90vw, 260px);
  }

  .inv-nav a {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
  }
}
