.inventory-page {
  width: 100%;
}

.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.summary-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.inventory-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.inventory-toolbar input,
.inventory-toolbar select {
  max-width: 320px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
}

.inventory-row.low-stock {
  background: #fee2e2;
}

.inventory-row.inactive td:not(:last-child) {
  opacity: 0.55;
}

.status-text.active {
  color: #16a34a;
  font-weight: 800;
}

.status-text.inactive {
  color: #64748b;
  font-weight: 800;
}

.action-menu-wrap {
  position: relative;
}

.action-toggle {
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 8px 11px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.action-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 38px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  min-width: 140px;
  z-index: 9999;
  overflow: visible;
}



.action-menu.active {
  display: grid;
}

.action-menu button {
  border: none;
  background: white;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.action-menu button:hover {
  background: #f3f4f6;
}

@media (max-width: 900px) {
  .inventory-summary-grid {
    grid-template-columns: 1fr;
  }

  .page-title-row,
  .inventory-toolbar {
    flex-direction: column;
  }

  .inventory-toolbar input,
  .inventory-toolbar select {
    max-width: 100%;
  }
}



.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.modal-header,
.modal-actions {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.modal-body {
  padding: 22px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border);
  border-bottom: none;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}







.inventory-log-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  margin-right: 8px;
  font-size: 1rem;
}

.inventory-log-btn:hover {
  transform: scale(1.1);
}

.inventory-history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f9fafb;
}

.history-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.empty-history {
  color: var(--muted);
}