#inventoryStockHistory {
  width: min(1180px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 18px;
  color: var(--text, #111827);
  background: #fff;
  box-shadow: 0 24px 80px #11182733;
}
#inventoryStockHistory::backdrop { background: #11182766; }
#inventoryStockHistory [hidden] { display: none !important; }
.stock-history-head, .stock-history-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; }
.stock-history-head { border-bottom: 1px solid var(--line, #e5e7eb); align-items: flex-start; }
.stock-history-head h2 { margin: 0 0 6px; font-size: 20px; }
.stock-history-head p { margin: 0; color: var(--muted, #64748b); font-size: 13px; line-height: 1.5; }
.stock-history-body { padding: 18px 22px; }
.stock-history-summary { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.stock-history-summary > div { flex: 1; min-width: 150px; padding: 14px; background: #f7f8fa; border-radius: 10px; }
.stock-history-summary span { display: block; color: var(--muted, #64748b); font-size: 12px; margin-bottom: 6px; }
.stock-history-summary strong { font-size: 19px; }
.stock-history-status:empty { display: none; }
.stock-history-status.error { color: #b91c1c; }
.stock-history-table { overflow: auto; max-height: 48dvh; margin: 16px 0 10px; }
.stock-history-table table { min-width: 1000px; width: 100%; border-collapse: collapse; }
.stock-history-table th { position: sticky; top: 0; z-index: 1; background: #f7f8fa; }
.stock-history-table th, .stock-history-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line, #e5e7eb); }
.stock-history-table .number { text-align: right; font-weight: 600; white-space: nowrap; }
.stock-history-table td { overflow-wrap: anywhere; }
.stock-history-footer { border-top: 1px solid var(--line, #e5e7eb); }
@media (max-width: 600px) {
  #inventoryStockHistory { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .stock-history-head, .stock-history-body, .stock-history-footer { padding: 14px; }
  .stock-history-summary { gap: 8px; }
  .stock-history-summary > div { min-width: 110px; padding: 10px; }
}
