html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  background: #f7f9fc;
  color: #0f172a;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: #f7f9fc;
}

.app-sidebar {
  width: 260px;
  background: #0b1120;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  width: 42px;
  border-radius: 12px;
  background: #2563eb;
  font-weight: 700;
  color: #fff;
}

.brand-title {
  font-weight: 600;
  font-size: 1rem;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #9ca3af;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  flex: 1;
}

.nav-section {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 10px 12px 4px;
}

.sidebar-nav .nav-link {
  color: #e5e7eb;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
}

.sidebar-nav .nav-link i {
  width: 18px;
  text-align: center;
  opacity: 0.85;
}

.nav-group {
  position: relative;
}

.nav-toggle {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  text-decoration: none;
}

.toggle-icon {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  opacity: 0.6;
  width: auto !important;
  margin-left: auto;
}

.nav-group.active .toggle-icon {
  transform: rotate(180deg);
}

.nav-submenu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.nav-group.active .nav-submenu {
  display: flex;
}

.nav-sublink {
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 400;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-sublink:hover,
.nav-sublink.active {
  background: rgba(37, 99, 235, 0.12);
  color: #fff;
}

.nav-sublink i {
  width: 16px;
  text-align: center;
  opacity: 0.75;
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.topbar-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
  color: #0f172a;
}

.topbar-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eff6ff;
  padding: 8px 12px;
  border-radius: 999px;
}

.profile-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0b1120;
  color: #fff;
  font-weight: 600;
}

.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-role {
  font-size: 0.75rem;
  color: #6b7280;
}

.app-content {
  padding: 28px 32px 40px;
}

.app-footer {
  padding: 16px 32px 24px;
  color: #6b7280;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  color: #0f172a;
}

.page-title i {
  margin-right: 8px;
  opacity: 0.9;
}

.page-subtitle {
  margin: 4px 0 0;
  color: #6b7280;
}

.page-actions {
  display: flex;
  gap: 10px;
}

.metric-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.metric-title {
  color: #6b7280;
  font-size: 0.9rem;
}

.metric-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  color: #fff;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: #0f172a;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: flex-end;
}

.search-box {
  flex: 1;
}

.filter-group {
  display: flex;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-instock {
  background: #e0f2fe;
  color: #1d4ed8;
}

.status-lowstock {
  background: #fef9c3;
  color: #a16207;
}

.status-critical {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn i {
  margin-right: 6px;
}

.btn-outline-primary:hover {
  background: #2563eb;
  color: #fff;
}

.table thead th {
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.table tbody tr {
  border-color: #e5e7eb;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
}

.form-label {
  font-weight: 600;
  color: #374151;
}

.form-label i {
  margin-right: 6px;
  color: #6b7280;
}


.btn i {
  margin-right: 6px;
}

.text-center i {
  margin-right: 8px;
}