.modal.show {
  overflow-x: hidden;
  overflow-y: auto;
}

.stock-row-break {
  height: 0;
  padding: 0 !important;
}

#stockModal .modal-dialog {
  height: calc(100vh - 2rem);
  margin: 1rem auto;
}

#stockModal .modal-content {
  display: flex;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#stockModal .modal-content > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#stockModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

#stockModal .modal-footer {
  flex: 0 0 auto;
}

.po-group-row td {
  background: #f8fafc !important;
  border-bottom: 1px solid #dce1e7;
  border-top: 2px solid #dce1e7;
  color: #17212b;
  font-size: .85rem;
  padding: .65rem 1rem !important;
  text-align: left;
}

.po-group-row strong { color: #c58f05; }
.po-group-row .add-issue-details { float: right; margin-left: 1rem; }

.po-group-summary {
  color: #6c757d;
  display: inline-flex;
  font-size: .75rem;
  flex-wrap: wrap;
  gap: .2rem 1rem;
  line-height: 1.5;
  margin-left: 1.5rem;
}

.po-meta-item b { color: #334155; }

.stock-detail-table { min-width: 1450px; }

.dashboard-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.toolbar-stat {
  align-items: center;
  border-radius: 6px;
  color: #fff;
  display: flex;
  gap: .45rem;
  min-height: 38px;
  padding: .35rem .7rem;
}

.toolbar-stat.s1 { background: linear-gradient(135deg,#1a3c5e,#2a5c8e); }
.toolbar-stat.s2 { background: linear-gradient(135deg,#2d6a4f,#40916c); }
.toolbar-stat.s3 { background: linear-gradient(135deg,#7b4f00,#b27200); }
.toolbar-stat-number { font-family: Georgia,serif; font-size: 1.15rem; font-weight: 700; }
.toolbar-stat-label { font-size: .68rem; white-space: nowrap; }

.admin-readonly .stock-detail-table thead th:last-child,
.admin-readonly .stock-detail-table tbody tr:not(.po-group-row) > td:last-child {
  display: none;
}
