.sidebar-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Flex columns must be able to shrink below their intrinsic content width
   so that wide descendants (e.g. .table-responsive) scroll locally
   instead of stretching the whole page. */
.flex-grow-1.d-flex.flex-column,
main.flex-grow-1 {
  min-width: 0;
}

.module-card {
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08) !important;
}

/* --- High Dollar Orders table --- */

/* Row highlights — more saturated for readability */
.table tr.hdo-fully-reserved td {
  background-color: #d1fae5; /* emerald-100 */
}
.table td.hdo-shipped {
  background-color: #fde68a; /* amber-200 */
}
.table tr.hdo-fully-reserved td.hdo-shipped {
  /* shipped cell in a fully-reserved row — keep the shipped color */
  background-color: #fcd34d; /* amber-300 */
}

/* Force single-line cells; scroll horizontally */
.hdo-table th,
.hdo-table td {
  white-space: nowrap;
}
.hdo-table-shell {
  max-height: 65vh;
  overflow: auto;
}

/* Legend swatches */
.hdo-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.1);
  vertical-align: middle;
}
.hdo-legend-swatch--reserved { background-color: #d1fae5; }
.hdo-legend-swatch--shipped  { background-color: #fde68a; }

/* Production schedule row highlight */
.table tr.ps-row-balanced td {
  background-color: #ecfdf5;
}

/* Status chips for changes view */
.status-chip {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.2rem;
  color: #fff;
  background: #6c757d;
}
.status-chip--moved-up       { background: #198754; }
.status-chip--pushed-out     { background: #dc3545; }
.status-chip--qty-increased  { background: #0d6efd; }
.status-chip--qty-decreased  { background: #fd7e14; }
.status-chip--new-order      { background: #6f42c1; }

.status-toggle.active {
  font-weight: 600;
}

.scroll-table-shell {
  max-height: 60vh;
  overflow: auto;
}

@media print {
  .sidebar, .no-print, header:not(.print-keep) {
    display: none !important;
  }
}

/* --- Users split-panel (admin) --- */
.users-panel {
  height: calc(100vh - 48px);
}

.users-sidebar {
  border-right: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.users-list {
  flex: 1;
  overflow-y: auto;
}

.user-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f0f2f4;
  cursor: pointer;
  transition: background 0.1s;
}

.user-list-item:hover { background: #f4f8fc; }

.user-list-item--active {
  background: #e8f4fd;
  border-left: 3px solid #0078E6;
}

.user-list-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.user-list-info > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #BACBD4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 26px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot--active   { background: #198754; }
.status-dot--pending  { background: #ffc107; }
.status-dot--disabled { background: #E60514; }

.users-detail {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: #f4f6f8;
}

.users-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

@media (max-width: 991.98px) {
  .users-panel { height: auto; min-height: 100vh; flex-direction: column; }
  .users-sidebar { border-right: none; border-bottom: 1px solid #dee2e6; max-height: 40vh; }
  .users-detail { min-height: 60vh; }
}
