/* ===== Reorder suggestions + forecast box ===== */

/* ---- Forecast box (reused on the product detail page) ---- */
.forecast-box {
  font-size: 0.85rem;
}

/* ---- Status pills (coloured per urgency) ---- */
.forecast-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.forecast-status-order-now {
  background-color: #fdecec;
  color: #b42318;
}
.forecast-status-order-soon {
  background-color: #fff3e6;
  color: #b54708;
}
.forecast-status-ok {
  background-color: #e7f6ee;
  color: #18794e;
}
.forecast-status-low-history,
.forecast-status-no-sales {
  background-color: #f0f2f5;
  color: #6d7480;
}
[data-bs-theme="dark"] .forecast-status-order-now {
  background-color: rgba(180, 35, 24, 0.22);
}
[data-bs-theme="dark"] .forecast-status-order-soon {
  background-color: rgba(181, 71, 8, 0.22);
}
[data-bs-theme="dark"] .forecast-status-ok {
  background-color: rgba(24, 121, 78, 0.22);
}
[data-bs-theme="dark"] .forecast-status-low-history,
[data-bs-theme="dark"] .forecast-status-no-sales {
  background-color: rgba(109, 116, 128, 0.2);
}

/* ---- Chip buttons (reuse Bootstrap btn; mark active state) ---- */
[data-forecast-chip].active {
  font-weight: 700;
}

/* ---- Basic plan: hide the suggestion columns that require full data ---- */
.forecast-basic .forecast-col-suggested,
.forecast-basic .forecast-col-supplier {
  display: none;
}

/* ---- Numeric / alignment helpers ---- */
.forecast-col-numeric {
  font-variant-numeric: tabular-nums;
}
.forecast-col-suggested .text-muted {
  font-variant-numeric: tabular-nums;
}
.forecast-status-pill small {
  font-weight: 400;
}

/* ---- Actions bar ---- */
[data-forecast-actions] .btn + .btn {
  margin-left: 0.25rem;
}

/* ---- Purchase-order modal ---- */
.forecast-po-group {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}
.forecast-po-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.forecast-po-item-row {
  gap: 0.5rem;
}
.forecast-po-supplier-cell {
  flex-shrink: 0;
}

/* ---- Upgrade note ---- */
.forecast-upgrade-note {
  border-color: var(--brand-secondary);
  color: #745953;
}
[data-bs-theme="dark"] .forecast-upgrade-note {
  color: #e2d6d3;
}

/* ---- Phone widths: table scrolls inside its own container ---- */
@media (max-width: 575.98px) {
  .forecast-col-product .text-muted {
    display: none;
  }
  [data-forecast-page] .table-responsive {
    font-size: 0.85rem;
  }
}
