/* ==========================================================================
   PMS build overrides — loaded AFTER app.css.

   app.css is a byte-identical copy of the design system's stylesheet
   (resources/design/css/app.css) and must stay that way so it can be re-synced.
   This file holds ONLY corrections of flaws that exist in that stylesheet
   itself, each found in the visual audit of 2026-09-18 by rendering the app
   next to the original design pages. One rule per flaw, each with its reason.
   ========================================================================== */

/* 1. A DISABLED primary button turned Bootstrap blue.
      app.css paints .btn-primary with the brand red, but Bootstrap's
      `.btn:disabled { background-color: var(--bs-btn-disabled-bg) }` outranks it
      (0,2,0 vs 0,1,0) and that variable is still Bootstrap's #0d6efd. Every gated
      action showed it: "Add" on the order forms, "Submit report", "Show". */
.btn-primary,
.btn-primary:disabled,
.btn-primary.disabled {
  --bs-btn-disabled-bg: var(--color-brand-red);
  --bs-btn-disabled-border-color: var(--color-brand-red);
  --bs-btn-disabled-color: var(--color-white, #fff);
}

/* 2. Tables inside a two-column split were clipped.
      `.table-scroll .table-x { min-width: 640px }` is right for a full-width card,
      but each half of `.dss-2col` is ~577px at a 1440px viewport, so the last
      column ("Anticipated ₹" on the IMS dashboard) slid under the divider — in the
      original design page too. Inside a split the table simply fits its column. */
.dss-2col .table-scroll .table-x {
  min-width: 0;
}

/* 3. The order forms' item editor lost its action column on laptop screens.
      The international line table needs more width than the card offers below
      ~1460px, so "Add" (and each row's edit / delete) scrolled off to the right —
      the original design clips its own Add button at 1440px. The action column
      now stays pinned to the right edge of the scrolling table. The view also
      asks for 1140px instead of 1180px: the sum of its own column widths. */
#line-table th.col-actions,
#line-table td.col-actions {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--color-white, #fff);
  box-shadow: -8px 0 8px -8px rgba(15, 23, 42, 0.12);
}
#line-table thead th.col-actions { background: var(--color-bg); }
#line-table tr.th-sub td.col-actions { background: var(--color-neutral-soft); }   /* the entry row is tinted */
