/* ============================================================
   GRN SCENARIOS — additional atoms on top of grn.css / pid.css
   For the design-canvas comparison sheet showing how the GRN
   detail page handles: shortage, wrong items, damaged, no-invoice
   ============================================================ */

/* Scenario artboard wrapper — uses content area only (no rail/topbar)
   Each artboard is sized 1480w × intrinsic-h */
.gsc-artboard {
  width: 1480px;
  background: var(--sd-bg-app);
  font-family: var(--sd-font);
  color: var(--sd-ink-900);
  padding: 0 0 24px 0;
}

/* Scenario header strip — sits above the artboard content, labels the case */
.gsc-head {
  background: #fff;
  border-bottom: 1px solid var(--sd-line-300);
  padding: 14px 22px 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.gsc-head__num {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--sd-blue-600);
  color: #fff;
  font-family: var(--sd-mono);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gsc-head__num--warn { background: var(--sd-amber-500); color: var(--sd-ink-900); }
.gsc-head__num--err  { background: var(--sd-red-600); }
.gsc-head__num--info { background: var(--sd-teal-600); }
.gsc-head__title-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.gsc-head__caps {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--sd-ink-400);
  font-weight: 600;
}
.gsc-head__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--sd-ink-900);
  letter-spacing: -.005em;
}
.gsc-head__sub {
  font-size: 12.5px;
  color: var(--sd-ink-500);
  margin-top: 2px;
}
.gsc-head__chips {
  display: inline-flex; gap: 6px; align-items: center;
}
.gsc-head__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--sd-radius-pill);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--sd-line-300);
  background: #fff;
  color: var(--sd-ink-700);
  font-family: var(--sd-mono);
}
.gsc-head__chip svg { width: 11px; height: 11px; }

/* Scenario page body — same grid as pid-body but sized to the artboard */
.gsc-page {
  padding: 16px 22px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gsc-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}
.gsc-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gsc-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ============================================================
   Banner — top-of-content callout for special states
   ============================================================ */
.gsc-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--sd-radius-md);
  border: 1px solid;
  font-size: 12.5px;
  line-height: 1.5;
}
.gsc-banner__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: -2px;
}
.gsc-banner__icon svg { width: 14px; height: 14px; }
.gsc-banner__body { flex: 1; min-width: 0; }
.gsc-banner__title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--sd-ink-900);
}
.gsc-banner__sub { color: var(--sd-ink-700); }
.gsc-banner__sub strong { color: var(--sd-ink-900); font-weight: 600; }
.gsc-banner__actions {
  display: inline-flex; gap: 6px; flex-shrink: 0;
}

/* Banner variants */
.gsc-banner--amber {
  background: #FFFBEF;
  border-color: #EBC07B;
}
.gsc-banner--amber .gsc-banner__icon {
  background: var(--sd-amber-500);
  color: #fff;
}
.gsc-banner--red {
  background: #FDF1F4;
  border-color: #E1A6B3;
}
.gsc-banner--red .gsc-banner__icon {
  background: var(--sd-red-600);
  color: #fff;
}
.gsc-banner--blue {
  background: var(--sd-blue-050);
  border-color: #B7CEDF;
}
.gsc-banner--blue .gsc-banner__icon {
  background: var(--sd-blue-600);
  color: #fff;
}

.gsc-banner__action {
  appearance: none;
  background: #fff;
  border: 1px solid currentColor;
  color: inherit;
  padding: 6px 12px;
  border-radius: var(--sd-radius-sm);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.gsc-banner__action--solid {
  background: currentColor;
}
.gsc-banner__action--solid span { color: #fff; }

/* ============================================================
   AWAITING column in 3-way recon (no-invoice scenario)
   ============================================================ */
.pid-3way__col--await {
  background: repeating-linear-gradient(
    45deg,
    var(--sd-bg-softer),
    var(--sd-bg-softer) 7px,
    #ECF0F5 7px,
    #ECF0F5 14px
  );
  border: 1.5px dashed var(--sd-line-300);
  color: var(--sd-ink-500);
}
.pid-3way__col--await .pid-3way__col-caps { color: var(--sd-ink-400); }
.pid-3way__col--await .pid-3way__col-caps .dot {
  background: var(--sd-ink-300);
}
.pid-3way__col--await .pid-3way__col-ref {
  color: var(--sd-ink-400);
  font-style: italic;
  font-family: var(--sd-font);
  font-size: 11.5px;
}
.pid-3way__col--await .pid-3way__col-val {
  color: var(--sd-ink-500);
}
.pid-3way__col--await .pid-3way__col-val::before {
  content: '~ ';
  color: var(--sd-ink-400);
  font-weight: 400;
}
.pid-3way__col--await .pid-3way__col-delta {
  color: var(--sd-ink-400);
  font-style: italic;
}

/* ============================================================
   Unmatched line — for "wrong items" scenario, a row that
   doesn't appear on the PO/invoice
   ============================================================ */
.pid-lines tbody tr.gsc-unmatched-row td {
  background: var(--sd-red-100);
}
.pid-lines tbody tr.gsc-unmatched-row td:first-child {
  box-shadow: inset 3px 0 0 var(--sd-red-600);
}
.gsc-unmatched-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: #fff;
  border: 1px solid var(--sd-red-600);
  color: #A8273F;
  border-radius: var(--sd-radius-pill);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: var(--sd-font);
  margin-left: 6px;
  white-space: nowrap;
}
.gsc-unmatched-badge svg { width: 10px; height: 10px; }

/* Missing-from-shipment row — PO line that was expected but not received */
.pid-lines tbody tr.gsc-missing-row td {
  background: #FBE9EE;
  color: var(--sd-ink-500);
}
.pid-lines tbody tr.gsc-missing-row td:first-child {
  box-shadow: inset 3px 0 0 var(--sd-red-600);
}
.pid-lines tbody tr.gsc-missing-row .pid-lines__desc {
  color: var(--sd-ink-700);
  text-decoration: line-through;
  text-decoration-color: var(--sd-red-600);
  text-decoration-thickness: 1.5px;
}
.gsc-missing-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: #fff;
  border: 1px solid var(--sd-red-600);
  color: #A8273F;
  border-radius: var(--sd-radius-pill);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: var(--sd-font);
  white-space: nowrap;
}
.gsc-missing-badge svg { width: 10px; height: 10px; }

/* Add-as-unplanned action inside an unmatched row */
.gsc-row-action {
  appearance: none;
  background: #fff;
  border: 1px solid var(--sd-red-600);
  color: #A8273F;
  padding: 4px 10px;
  border-radius: var(--sd-radius-sm);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.gsc-row-action:hover { background: var(--sd-red-100); }
.gsc-row-action svg { width: 11px; height: 11px; }

/* ============================================================
   Damaged-split qty cell — for damaged scenario, splits qty into
   "usable" + "damaged" sub-counts
   ============================================================ */
.gsc-split-cell {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}
.gsc-split-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--sd-ink-700);
  font-family: var(--sd-mono);
  font-variant-numeric: tabular-nums;
}
.gsc-split-row__lbl {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--sd-ink-400);
  font-family: var(--sd-font);
  font-weight: 600;
  width: 50px;
  text-align: left;
}
.gsc-split-row__val {
  background: var(--sd-bg-soft);
  border: 1px solid var(--sd-line-200);
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
}
.gsc-split-row--damaged .gsc-split-row__val {
  background: var(--sd-red-100);
  border-color: #E1A6B3;
  color: #A8273F;
}
.gsc-split-row--usable .gsc-split-row__val {
  background: var(--sd-green-100);
  border-color: #c4dfcf;
  color: #1F6A3F;
}

/* Photo proof on a damaged line — required indicator */
.gsc-photo-required {
  position: relative;
}
.gsc-photo-required::after {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sd-red-600);
  border: 1.5px solid #fff;
}

/* ============================================================
   "When invoice arrives" stepper — explains reconciliation flow
   for the no-invoice scenario
   ============================================================ */
.gsc-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 4px;
}
.gsc-flow__step {
  position: relative;
  padding: 0 0 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 36px;
}
.gsc-flow__step:last-child { padding-bottom: 0; }
.gsc-flow__step::before {
  content: '';
  position: absolute;
  left: 11px; top: 18px; bottom: 0;
  width: 1.5px;
  background: var(--sd-line-200);
  border-left: 1.5px dashed var(--sd-line-200);
  background: transparent;
}
.gsc-flow__step:last-child::before { display: none; }
.gsc-flow__dot {
  position: absolute;
  left: 4px; top: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--sd-line-100);
  border: 1.5px solid var(--sd-line-300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--sd-ink-500);
}
.gsc-flow__step--done .gsc-flow__dot {
  background: var(--sd-green-600);
  border-color: var(--sd-green-600);
  color: #fff;
}
.gsc-flow__step--done .gsc-flow__dot svg { width: 10px; height: 10px; }
.gsc-flow__step--current .gsc-flow__dot {
  background: var(--sd-blue-600);
  border-color: var(--sd-blue-600);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(7,98,173,.18);
}
.gsc-flow__step--done::before,
.gsc-flow__step--current::before {
  border-left-color: var(--sd-blue-600);
}
.gsc-flow__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--sd-ink-900);
}
.gsc-flow__step--pending .gsc-flow__title { color: var(--sd-ink-500); font-weight: 500; }
.gsc-flow__meta {
  font-size: 11px;
  color: var(--sd-ink-500);
  line-height: 1.4;
}

/* ============================================================
   Reason chips inline on a row — quick selector for line variance
   ============================================================ */
.gsc-reasonchip-row {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}
.gsc-reasonchip {
  appearance: none;
  background: #fff;
  border: 1px solid var(--sd-line-300);
  border-radius: var(--sd-radius-pill);
  padding: 2px 8px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--sd-ink-700);
  cursor: pointer;
}
.gsc-reasonchip:hover {
  border-color: var(--sd-amber-500);
  background: var(--sd-amber-100);
  color: var(--sd-amber-text);
}
.gsc-reasonchip.is-active {
  background: var(--sd-amber-100);
  border-color: var(--sd-amber-500);
  color: var(--sd-amber-text);
  font-weight: 600;
}

/* ============================================================
   Action bar override per scenario — primary button variants
   ============================================================ */
.pid-btn--danger {
  background: var(--sd-red-600);
  border-color: var(--sd-red-600);
  color: #fff;
}
.pid-btn--danger:hover { background: #971f33; border-color: #971f33; }

.pid-btn--warn {
  background: var(--sd-amber-500);
  border-color: var(--sd-amber-500);
  color: var(--sd-ink-900);
}
.pid-btn--warn:hover { background: #c2841f; border-color: #c2841f; color: #fff; }

.pid-btn--provisional {
  background: var(--sd-teal-600);
  border-color: var(--sd-teal-600);
  color: #fff;
}
.pid-btn--provisional:hover { background: #117a8b; border-color: #117a8b; }

/* Small clarification text on the action bar's primary button */
.pid-actionbar__primary-sub {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .85;
  margin-top: 1px;
  font-family: var(--sd-mono);
}

/* ============================================================
   Pending invoice "watchlist" card row in sidebar
   ============================================================ */
.gsc-watch {
  background: var(--sd-blue-050);
  border: 1px solid #B7CEDF;
  border-radius: var(--sd-radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gsc-watch__head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--sd-blue-700);
}
.gsc-watch__head svg { width: 12px; height: 12px; }
.gsc-watch__body {
  font-size: 12px;
  color: var(--sd-ink-800);
  line-height: 1.5;
}
.gsc-watch__body strong { color: var(--sd-ink-900); font-weight: 600; }
.gsc-watch__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid #B7CEDF;
}
.gsc-watch__metric .lbl {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--sd-ink-500);
}
.gsc-watch__metric .val {
  font-size: 14px;
  font-weight: 600;
  color: var(--sd-ink-900);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.gsc-watch__metric .val--mono { font-family: var(--sd-mono); font-size: 12px; }

/* ============================================================
   v2 ADDITIONS — aligned with the Rane DMS / Discrepancy brief
   ============================================================ */

/* ----------- Stock bucket chip — inline next to qty values ----------- */
.gsc-bucket {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-family: var(--sd-font);
  border: 1px solid;
  white-space: nowrap;
  line-height: 1.5;
}
.gsc-bucket::before {
  content: '';
  width: 4px; height: 10px;
  border-radius: 1px;
  background: currentColor;
  display: inline-block;
}
.gsc-bucket--confirmed   { background: var(--sd-green-100); color: #1F6A3F; border-color: #c4dfcf; }
.gsc-bucket--disputed    { background: var(--sd-amber-100); color: var(--sd-amber-text); border-color: #EBC07B; }
.gsc-bucket--damaged     { background: var(--sd-red-100); color: #A8273F; border-color: #E1A6B3; }
.gsc-bucket--custody     { background: var(--sd-blue-050); color: var(--sd-blue-700); border-color: #B7CEDF; }
.gsc-bucket--returnpending { background: #EAF1F5; color: #225d83; border-color: #B7CEDF; }
.gsc-bucket--disputed-inward { background: #F1EBFB; color: #5B3F92; border-color: #C9B8E0; }

/* Sm chip used inside qty cells under the input */
.gsc-bucket--sm {
  font-size: 9px;
  padding: 0 5px 0 4px;
  letter-spacing: .04em;
  border-radius: 2px;
}
.gsc-bucket--sm::before { height: 8px; width: 3px; }

/* ----------- Linked-discrepancy callout (sits inside identity card pill row) ----------- */
.gsc-linked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: var(--sd-radius-pill);
  background: #F1EBFB;
  border: 1px solid #C9B8E0;
  color: #5B3F92;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--sd-mono);
}
.gsc-linked svg { width: 11px; height: 11px; }
.gsc-linked strong { font-weight: 700; }

/* ----------- "Stock impact" summary card (single card on each detail screen) ----------- */
.gsc-stockimpact {
  background: #fff;
  border: 1px solid var(--sd-line-300);
  border-radius: var(--sd-radius-lg);
  box-shadow: var(--sd-shadow-md);
  overflow: hidden;
}
.gsc-stockimpact__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sd-line-100);
  background: var(--sd-bg-softer);
}
.gsc-stockimpact__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sd-ink-700);
  display: inline-flex; gap: 8px; align-items: center;
}
.gsc-stockimpact__title svg { width: 13px; height: 13px; color: var(--sd-ink-400); }
.gsc-stockimpact__rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
}
.gsc-stockimpact__row {
  padding: 12px 16px;
  border-right: 1px solid var(--sd-line-100);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gsc-stockimpact__row:last-child { border-right: 0; }
.gsc-stockimpact__row-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--sd-ink-500);
}
.gsc-stockimpact__row-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--sd-ink-900);
  font-variant-numeric: tabular-nums;
}
.gsc-stockimpact__row-val .small {
  font-size: 11px;
  font-weight: 500;
  color: var(--sd-ink-500);
  margin-left: 4px;
}
.gsc-stockimpact__row-meta {
  font-size: 11px;
  color: var(--sd-ink-500);
}

/* ----------- Discrepancy detail — different from GRN detail
   (no 3-way recon; source references card instead) ----------- */

/* Source references card — for discrepancies that have no invoice */
.gsc-refs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 14px 16px;
}
.gsc-refs__col {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--sd-line-200);
  border-radius: var(--sd-radius-sm);
  background: var(--sd-bg-softer);
  min-width: 0;
}
.gsc-refs__col--strong {
  background: var(--sd-blue-050);
  border-color: var(--sd-blue-600);
}
.gsc-refs__col--empty {
  border-style: dashed;
  background: transparent;
  color: var(--sd-ink-400);
}
.gsc-refs__caps {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--sd-ink-400);
}
.gsc-refs__val {
  font-family: var(--sd-mono);
  font-size: 12px;
  color: var(--sd-ink-900);
  font-weight: 500;
}
.gsc-refs__col--empty .gsc-refs__val { color: var(--sd-ink-400); font-style: italic; }
.gsc-refs__col--strong .gsc-refs__val { color: var(--sd-blue-700); }
.gsc-refs__sub {
  font-size: 10.5px;
  color: var(--sd-ink-500);
}

/* Discrepancy identity card — leverages pid-ident with a discrepancy variant */
.gsc-ident--disc {
  background: linear-gradient(180deg, #faf7ff 0%, #fff 36px);
}
.pid-ident--disc .pid-ident__id { color: #5B3F92; }
.pid-ident--disc .pid-ident__caps { color: #5B3F92; }

/* ----------- Resolution panel — owner + actions for the CSM/Admin view ----------- */
.gsc-resolution {
  background: linear-gradient(180deg, var(--sd-bg-softer) 0%, #fff 60px);
  border: 1px solid var(--sd-line-300);
  border-radius: var(--sd-radius-lg);
  box-shadow: var(--sd-shadow-md);
  overflow: hidden;
}
.gsc-resolution__head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--sd-line-100);
  display: flex; align-items: center; justify-content: space-between;
}
.gsc-resolution__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--sd-ink-700);
}
.gsc-resolution__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }

.gsc-owner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--sd-blue-050);
  border: 1px solid #B7CEDF;
  border-radius: var(--sd-radius-md);
}
.gsc-owner__mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--sd-teal-600);
  color: #fff;
  font-family: var(--sd-mono);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gsc-owner__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.gsc-owner__caps {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--sd-blue-700);
}
.gsc-owner__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sd-ink-900);
}
.gsc-owner__sub {
  font-size: 11px;
  color: var(--sd-ink-500);
}

/* Role-gated action — shows up on Rane persona only (visually hinted) */
.gsc-resact {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--sd-radius-sm);
  background: var(--sd-bg-softer);
  border: 1px solid var(--sd-line-200);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.gsc-resact:hover { background: var(--sd-blue-050); border-color: var(--sd-blue-600); }
.gsc-resact__icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--sd-blue-100);
  color: var(--sd-blue-700);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gsc-resact__icon svg { width: 13px; height: 13px; }
.gsc-resact__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gsc-resact__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sd-ink-900);
}
.gsc-resact__sub {
  font-size: 10.5px;
  color: var(--sd-ink-500);
}
.gsc-resact__chev {
  color: var(--sd-ink-400);
}
.gsc-resact__chev svg { width: 13px; height: 13px; }
.gsc-resact--gated {
  opacity: .55;
  cursor: not-allowed;
  position: relative;
}
.gsc-resact--gated::after {
  content: 'CSM only';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--sd-ink-400);
}

.gsc-resgroup {
  display: flex; flex-direction: column; gap: 6px;
}
.gsc-resgroup__caps {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--sd-ink-400);
  margin-bottom: 2px;
}

/* ----------- Discrepancy product line — flexible (may have no PO/invoice qty) ----------- */
.gsc-discline {
  padding: 10px 14px;
  border-bottom: 1px solid var(--sd-line-100);
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 2fr) minmax(80px, 0.6fr) minmax(80px, 0.6fr) minmax(110px, 0.9fr);
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
}
.gsc-discline:last-child { border-bottom: 0; }
.gsc-discline__part {
  font-family: var(--sd-mono);
  font-size: 11px;
  background: var(--sd-bg-soft);
  border: 1px solid var(--sd-line-200);
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 500;
  color: var(--sd-ink-900);
  display: inline-block;
  width: fit-content;
}
.gsc-discline__part--unknown {
  background: var(--sd-line-100);
  color: var(--sd-ink-500);
  font-style: italic;
  border-style: dashed;
}
.gsc-discline__desc { font-weight: 500; color: var(--sd-ink-900); }
.gsc-discline__sub { font-size: 11px; color: var(--sd-ink-500); margin-top: 2px; }
.gsc-discline__qty {
  font-family: var(--sd-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}
.gsc-discline__qty .lbl {
  display: block;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--sd-ink-400);
  font-family: var(--sd-font);
}
.gsc-discline__bucket-cell {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-end;
}

/* Custody / unidentified product entry — manual */
.gsc-manual-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--sd-bg-soft);
  border: 1px dashed var(--sd-line-300);
  color: var(--sd-ink-500);
  font-family: var(--sd-font);
  margin-left: 4px;
}

/* ----------- Evidence-required slot card on discrepancy detail ----------- */
.gsc-evid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px 16px;
}
.gsc-evid__slot {
  border: 1.5px dashed var(--sd-line-300);
  background: var(--sd-bg-softer);
  border-radius: var(--sd-radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 96px;
  justify-content: center;
  position: relative;
}
.gsc-evid__slot--filled {
  border-style: solid;
  background: linear-gradient(135deg, var(--sd-blue-050), var(--sd-blue-100));
}
.gsc-evid__slot--required {
  border-color: var(--sd-red-600);
  background: #FDF1F4;
}
.gsc-evid__slot-icon {
  width: 28px; height: 28px;
  color: var(--sd-ink-400);
}
.gsc-evid__slot--filled .gsc-evid__slot-icon { color: var(--sd-blue-700); }
.gsc-evid__slot--required .gsc-evid__slot-icon { color: var(--sd-red-600); }
.gsc-evid__slot-icon svg { width: 100%; height: 100%; }
.gsc-evid__slot-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--sd-ink-700);
  text-align: center;
}
.gsc-evid__slot-meta {
  font-size: 10px;
  color: var(--sd-ink-500);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.gsc-evid__slot--required .gsc-evid__slot-meta { color: var(--sd-red-600); }

/* ----------- Vocabulary helper — status pill variants (extended) ----------- */
.pid-pill--disputed     { background: #F1EBFB; color: #5B3F92; border-color: #C9B8E0; }
.pid-pill--custody      { background: var(--sd-blue-050); color: var(--sd-blue-700); border-color: #B7CEDF; }
.pid-pill--unidentified { background: #F4F2EE; color: #6B5C3A; border-color: #D4C9A8; }

/* Quick helper for primary CTA on discrepancy raise */
.pid-btn--raise {
  background: #5B3F92;
  border-color: #5B3F92;
  color: #fff;
}
.pid-btn--raise:hover { background: #4a3275; border-color: #4a3275; }

/* ============================================================
   PERSONA-AWARE RESOLUTION PANEL
   Body data-persona toggles which actions are enabled vs gated.
   Defaults assume SS Branch persona.
   ============================================================ */

/* Persona indicator pill (shown in resolution panel head when CSM active) */
.gsc-resgroup--rane {
  position: relative;
}

/* CSM persona — un-gate Rane actions, gate Branch actions */
body[data-persona="rane"] .gsc-resgroup--rane .gsc-resact--gated {
  opacity: 1;
  cursor: pointer;
  background: var(--sd-blue-050);
  border-color: var(--sd-blue-600);
}
body[data-persona="rane"] .gsc-resgroup--rane .gsc-resact--gated::after {
  display: none;
}
body[data-persona="rane"] .gsc-resgroup--rane .gsc-resact:hover {
  background: var(--sd-teal-050);
  border-color: var(--sd-teal-600);
}
body[data-persona="rane"] .gsc-resgroup--branch .gsc-resact {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}
body[data-persona="rane"] .gsc-resgroup--branch .gsc-resact::after {
  content: 'view only';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--sd-ink-400);
}

/* CSM persona — highlight the CSM resgroup with a teal accent */
body[data-persona="rane"] .gsc-resgroup--rane::before {
  content: 'YOU';
  position: absolute;
  top: -7px;
  right: 0;
  background: var(--sd-teal-600);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--sd-mono);
}

/* SS HO persona — view + comment, no edit */
body[data-persona="ho"] .gsc-resgroup--branch .gsc-resact,
body[data-persona="ho"] .gsc-resgroup--rane .gsc-resact {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
body[data-persona="ho"] .gsc-resgroup--branch .gsc-resact::after,
body[data-persona="ho"] .gsc-resgroup--rane .gsc-resact::after {
  content: 'HO · view only';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  color: var(--sd-ink-400);
}
body[data-persona="ho"] .gsc-resgroup--rane .gsc-resact--gated::after {
  content: 'HO · view only';
}

/* Persona switcher visual addition for Rane mark */
.persona__mark--rane {
  background: var(--sd-teal-600);
  color: #fff;
}
