/* ============================================================
   inventory.css — /back-office/inventory, "the supply room".
   Same foundation as the comms set-pieces: global house classes
   from styles.css (wrap/section-pad/h1/h2/lead/eyebrow/ios/mono/
   btn), everything here namespaced `.inv-*` and scoped under
   `.inv`. Sand-blue accent layered under the house indigo; teal
   reserved for TINY in-stock/ok dots; a warm sand amber only for
   the below-par / near-expiry moment that resolves back to calm.
   Animation driver: /marketing/back-office/inventory.js (adds
   `.is-js` to each stage; JS-off every stage is a readable,
   finished static state).
   ============================================================ */

.inv {
  --inv-blue: #5a82c2;
  --inv-deep: #3d63a4;
  --inv-lite: #8aa6dd;
  --inv-wash: color-mix(in srgb, #5a82c2 8%, #fff);
  --inv-teal: #19b886;
  --inv-warn: #b97a35;
  --inv-warn-wash: color-mix(in srgb, #b97a35 10%, #fff);
  position: relative;
  isolation: isolate;
}

/* ============================================================
   shared: two-column section grid, copy column, proof points,
   live pill, stage panel
   ============================================================ */
.inv .inv-grid {
  display: grid;
  grid-template-columns: minmax(0, 10fr) minmax(0, 11fr);
  gap: clamp(34px, 5.5vw, 84px);
  align-items: center;
}
.inv .inv-grid--flip .inv-copy { order: 2; }
.inv .inv-grid--flip .inv-stagecol { order: 1; }

.inv .inv-copy .eyebrow { color: var(--inv-deep); }
.inv .inv-copy .h2 { margin: 14px 0 12px; }
.inv .inv-copy .lead { max-width: 46ch; }

/* de-boxed proof list, gradient-dot markers */
.inv .inv-points {
  list-style: none;
  margin: clamp(24px, 3vw, 36px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(14px, 1.8vw, 20px);
}
.inv .inv-points li {
  position: relative;
  padding-left: 24px;
}
.inv .inv-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--inv-blue), var(--indigo));
}
.inv .inv-points b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 2px;
}
.inv .inv-points span {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-60);
  max-width: 46ch;
}

/* live pill (pulsing dot + mono label) */
.inv .inv-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--inv-deep);
  background: var(--inv-wash);
  border: 1px solid color-mix(in srgb, var(--inv-blue) 24%, #fff);
  border-radius: var(--r-pill);
  padding: 5px 11px;
}
.inv .inv-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--inv-teal);
  animation: inv-blink 1.8s ease-in-out infinite;
}
@keyframes inv-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* stage column + ambient glow */
.inv .inv-stagecol {
  position: relative;
  min-width: 0;
}
.inv .inv-stagecol::before {
  content: "";
  position: absolute;
  inset: -8% -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 50% at 68% 32%, color-mix(in srgb, var(--inv-blue) 13%, transparent), transparent 72%),
    radial-gradient(48% 44% at 18% 82%, var(--periwinkle), transparent 70%);
}

/* the one soft-elevated panel per section */
.inv .inv-stage {
  position: relative;
  z-index: 1;
  margin: 0;
  background: linear-gradient(180deg, #fff, var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-float);
  padding: clamp(18px, 2vw, 26px);
}
.inv .inv-stagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.inv .inv-stagehead-note {
  font-size: 11px;
  color: var(--ink-40);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   HERO — "the supply room": centered copy over the shelf wall
   ============================================================ */
.inv-hero {
  position: relative;
  padding-top: clamp(48px, 7vw, 92px);
  padding-bottom: clamp(56px, 7vw, 104px);
  background: linear-gradient(180deg, var(--paper), #fff 42%);
  overflow: hidden;
}
.inv-hero .inv-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.inv-hero .inv-hero-a1,
.inv-hero .inv-hero-a2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
}
.inv-hero .inv-hero-a1 {
  width: 560px;
  height: 420px;
  left: -160px;
  top: -120px;
  background: color-mix(in srgb, var(--inv-blue) 16%, transparent);
}
.inv-hero .inv-hero-a2 {
  width: 620px;
  height: 460px;
  right: -180px;
  top: 60px;
  background: color-mix(in srgb, var(--periwinkle) 82%, transparent);
}
.inv-hero .wrap { position: relative; z-index: 1; }

/* centered editorial copy */
.inv-hero .inv-hero-copy {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.inv-hero .inv-hero-title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 18px 0 18px;
}
.inv-hero .inv-hero-title em {
  font-style: normal;
  color: var(--inv-deep);
}
.inv-hero .inv-hero-sub {
  max-width: 52ch;
  margin: 0 auto;
}
.inv-hero .inv-hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ── the shelf wall ── */
.inv-hero .inv-hero-stagecol {
  position: relative;
  margin-top: clamp(38px, 5vw, 60px);
}
.inv-hero .inv-hero-stagecol::before {
  content: "";
  position: absolute;
  inset: -6% -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(48% 52% at 24% 20%, color-mix(in srgb, var(--inv-blue) 11%, transparent), transparent 72%),
    radial-gradient(44% 48% at 82% 86%, var(--periwinkle), transparent 70%);
}
.inv-hero .inv-wall {
  position: relative;
  z-index: 1;
  margin: 0;
  background: linear-gradient(180deg, #fff, var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-float);
  padding: clamp(18px, 2.4vw, 28px);
}
.inv-hero .inv-wall-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.inv-hero .inv-wall-clinic {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.inv-hero .inv-wall-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-40);
  white-space: nowrap;
}

.inv-hero .inv-shelves {
  display: grid;
  gap: clamp(20px, 2.4vw, 30px);
  margin-top: clamp(16px, 2vw, 24px);
}
/* each shelf: a row of bins standing on a shelf board */
.inv-hero .inv-shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
  padding-bottom: 12px;
  position: relative;
}
.inv-hero .inv-shelf::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: 0;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--periwinkle-2), color-mix(in srgb, var(--inv-blue) 22%, var(--periwinkle)));
  box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--inv-deep) 45%, transparent);
}

/* ── a bin: fill gauge rising from the bottom, par tick, label ── */
.inv-hero .inv-bin {
  position: relative;
  height: clamp(96px, 11vw, 122px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.inv-hero .inv-bin-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill, 60%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--inv-blue) 26%, #fff), color-mix(in srgb, var(--inv-blue) 14%, #fff));
  border-top: 2px solid color-mix(in srgb, var(--inv-blue) 46%, #fff);
  transition: height 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s ease, border-color 0.4s ease;
}
.inv-hero .inv-bin-parline {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: var(--par, 30%);
  border-top: 1.5px dashed color-mix(in srgb, var(--inv-deep) 42%, #fff);
  pointer-events: none;
}
.inv-hero .inv-bin-parline::after {
  content: "par";
  position: absolute;
  right: 0;
  bottom: 2px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--inv-deep) 62%, #fff);
}
.inv-hero .inv-bin-name {
  position: absolute;
  left: 10px;
  top: 9px;
  right: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-hero .inv-bin-qty {
  position: absolute;
  left: 10px;
  top: 26px;
  font-size: 11px;
  color: var(--ink-60);
}
.inv-hero .inv-bin-qty b {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.inv-hero .inv-bin-qty b.is-pop {
  animation: inv-pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes inv-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.35); color: var(--inv-deep); }
  100% { transform: scale(1); }
}
.inv-hero .inv-bin-state {
  position: absolute;
  left: 10px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-60);
}
/* the tiny teal in-stock dot — the ONLY teal on the page */
.inv-hero .inv-bin-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--inv-teal);
}

/* bin moment states */
.inv-hero .inv-bin--hot {
  /* the live storyline bin — sits above its shelf-mates so its
     low/restock glow rings never clip under a neighbour */
  z-index: 1;
}
.inv-hero .inv-bin.is-low {
  border-color: color-mix(in srgb, var(--inv-warn) 46%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-warn) 14%, transparent);
}
.inv-hero .inv-bin.is-low .inv-bin-fill {
  background: linear-gradient(180deg, color-mix(in srgb, var(--inv-warn) 26%, #fff), color-mix(in srgb, var(--inv-warn) 14%, #fff));
  border-top-color: color-mix(in srgb, var(--inv-warn) 52%, #fff);
}
.inv-hero .inv-bin.is-low .inv-bin-state { color: var(--inv-warn); }
.inv-hero .inv-bin.is-low .inv-bin-state::before { background: var(--inv-warn); }
.inv-hero .inv-bin.is-restock {
  border-color: color-mix(in srgb, var(--inv-blue) 44%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-blue) 13%, transparent);
}
.inv-hero .inv-bin.is-blip .inv-bin-fill {
  background: linear-gradient(180deg, color-mix(in srgb, var(--inv-blue) 34%, #fff), color-mix(in srgb, var(--inv-blue) 18%, #fff));
}

.inv-hero .inv-wall-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-40);
}
.inv-hero .inv-wall-foot b {
  font-weight: 600;
  color: var(--ink);
}

/* ── the Auto-PO chip overlapping the wall's edge ── */
.inv-hero .inv-po {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 20px);
  margin: -17px 0 0 clamp(16px, 3vw, 40px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 16px 9px 13px;
  box-shadow: var(--shadow-2);
  font-size: 12.5px;
  color: var(--ink-60);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s;
}
.inv-hero .inv-po.is-on {
  opacity: 1;
  transform: none;
}
.inv-hero .inv-po-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--inv-deep);
  transition: background 0.3s;
}
.inv-hero .inv-po-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--inv-deep);
  animation: inv-ping 1.9s ease-out infinite;
}
@keyframes inv-ping {
  0%        { transform: scale(0.45); opacity: 0.7; }
  80%, 100% { transform: scale(1.5); opacity: 0; }
}
.inv-hero .inv-po-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--inv-deep);
}
.inv-hero .inv-po-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-hero .inv-po.is-placed { border-color: color-mix(in srgb, var(--inv-blue) 40%, #fff); }
.inv-hero .inv-po.is-done .inv-po-dot { background: var(--inv-teal); }
.inv-hero .inv-po.is-done .inv-po-dot::after { border-color: var(--inv-teal); }

/* ============================================================
   VENDORS — three-catalog price face-off
   ============================================================ */
.inv-vend {
  position: relative;
  background: linear-gradient(180deg, #fff, var(--paper) 55%, #fff);
  overflow: hidden;
}
.inv-vend .inv-quotes {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.inv-vend .inv-quote {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "v price tag"
    "note price tag";
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s, box-shadow 0.35s, background 0.35s;
}
.inv-vend .inv-quote-v {
  grid-area: v;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.inv-vend .inv-quote-note {
  grid-area: note;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-40);
}
.inv-vend .inv-quote-note::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: none;
}
.inv-vend .inv-quote-note.is-in-stock::before { background: var(--inv-teal); }
.inv-vend .inv-quote-note.is-back::before { background: var(--inv-warn); }
.inv-vend .inv-quote-price {
  grid-area: price;
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.inv-vend .inv-quote-tag {
  grid-area: tag;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: 4px 10px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.inv-vend .inv-quote-tag:empty { display: none; }

/* skipped: cheapest but backordered */
.inv-vend .inv-quote.is-skip {
  opacity: 0.55;
  background: var(--paper);
}
.inv-vend .inv-quote.is-skip .inv-quote-price {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--inv-warn) 60%, transparent);
  color: var(--ink-40);
}
.inv-vend .inv-quote.is-skip .inv-quote-tag {
  opacity: 1;
  transform: none;
  color: var(--inv-warn);
  background: var(--inv-warn-wash);
  border: 1px solid color-mix(in srgb, var(--inv-warn) 28%, #fff);
}

/* winner: cheapest in stock */
.inv-vend .inv-quote.is-win {
  border-color: color-mix(in srgb, var(--inv-blue) 44%, #fff);
  background: var(--inv-wash);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-blue) 12%, transparent);
}
.inv-vend .inv-quote.is-win .inv-quote-price { color: var(--inv-deep); }
.inv-vend .inv-quote.is-win .inv-quote-tag {
  opacity: 1;
  transform: none;
  color: #fff;
  background: var(--inv-deep);
  border: 1px solid var(--inv-deep);
}

/* JS mode: quotes land one by one */
.inv-vend .inv-vend-stage.is-js .inv-quote {
  opacity: 0;
  transform: translateY(10px);
}
.inv-vend .inv-vend-stage.is-js .inv-quote.is-in { transform: none; }
.inv-vend .inv-vend-stage.is-js .inv-quote.is-in:not(.is-skip) { opacity: 1; }
.inv-vend .inv-vend-stage.is-js .inv-quote.is-in.is-skip { opacity: 0.55; }

/* placed-PO result chip */
.inv-vend .inv-vend-result {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--inv-deep);
  background: #fff;
  border: 1px dashed color-mix(in srgb, var(--inv-blue) 38%, #fff);
  border-radius: var(--r-pill);
  padding: 7px 13px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-vend .inv-vend-stage.is-js .inv-vend-result {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.inv-vend .inv-vend-stage.is-js .inv-vend-result.is-on {
  opacity: 1;
  transform: none;
}

/* ============================================================
   PANEL — chairside quick-panel (operatory screen)
   ============================================================ */
.inv-panel {
  position: relative;
  background: #fff;
  overflow: hidden;
}
.inv-panel .inv-op-rows {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.inv-panel .inv-op-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "name count btns"
    "flag flag flag";
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.35s, background 0.35s, box-shadow 0.35s;
}
.inv-panel .inv-op-name {
  grid-area: name;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.inv-panel .inv-op-auto {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--inv-deep);
}
.inv-panel .inv-op-count {
  grid-area: count;
  font-size: 12px;
  color: var(--ink-60);
  white-space: nowrap;
}
.inv-panel .inv-op-count b {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.inv-panel .inv-op-count b.is-pop {
  animation: inv-pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.inv-panel .inv-op-btns {
  grid-area: btns;
  display: inline-flex;
  gap: 7px;
}
.inv-panel .inv-op-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--inv-deep);
  background: var(--inv-wash);
  border: 1px solid color-mix(in srgb, var(--inv-blue) 26%, #fff);
  border-radius: var(--r-pill);
  padding: 7px 13px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}
.inv-panel .inv-op-btn--low {
  color: var(--ink-60);
  background: #fff;
  border-color: var(--line);
}
/* the simulated tap: press + expanding ring */
.inv-panel .inv-op-btn.is-tap {
  transform: scale(0.94);
  background: color-mix(in srgb, var(--inv-blue) 20%, #fff);
}
.inv-panel .inv-op-btn.is-tap::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: var(--r-pill);
  border: 2px solid color-mix(in srgb, var(--inv-blue) 55%, #fff);
  animation: inv-tapring 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  pointer-events: none;
}
.inv-panel .inv-op-btn--low.is-tap {
  background: var(--inv-warn-wash);
}
.inv-panel .inv-op-btn--low.is-tap::after {
  border-color: color-mix(in srgb, var(--inv-warn) 55%, #fff);
}
@keyframes inv-tapring {
  0%   { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* flagged-low row + its note line */
.inv-panel .inv-op-item.is-lowflag {
  border-color: color-mix(in srgb, var(--inv-warn) 42%, #fff);
  background: var(--inv-warn-wash);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-warn) 12%, transparent);
}
.inv-panel .inv-op-flag {
  grid-area: flag;
  display: inline-flex;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--inv-warn);
}
/* JS mode: the flag + auto chip only appear when played in */
.inv-panel .inv-op.is-js .inv-op-flag,
.inv-panel .inv-op.is-js .inv-op-auto {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.inv-panel .inv-op.is-js .inv-op-flag.is-on,
.inv-panel .inv-op.is-js .inv-op-auto.is-on {
  opacity: 1;
  transform: none;
}
.inv-panel .inv-op-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-40);
}

/* ============================================================
   LOTS — FIFO lot ledger with the short-dated trap
   ============================================================ */
.inv-lots {
  position: relative;
  background: linear-gradient(180deg, var(--paper), #fff 45%);
  overflow: hidden;
}
.inv-lots .inv-lot-rows {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.inv-lots .inv-lot-cols,
.inv-lots .inv-lot {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 0.5fr);
  column-gap: 10px;
  align-items: center;
}
.inv-lots .inv-lot-cols {
  padding: 0 14px;
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.inv-lots .inv-lot {
  position: relative;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  transition: border-color 0.35s, background 0.35s, box-shadow 0.35s;
}
.inv-lots .inv-lot-id {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.inv-lots .inv-lot-recv {
  font-size: 12px;
  color: var(--ink-60);
}
.inv-lots .inv-lot-exp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-60);
  white-space: nowrap;
}
.inv-lots .inv-lot-qty {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}
/* days-to-expiry badge */
.inv-lots .inv-lot-days {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--inv-warn);
  background: var(--inv-warn-wash);
  border: 1px solid color-mix(in srgb, var(--inv-warn) 30%, #fff);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}
/* "use next" pick pointer — rides the row's right edge */
.inv-lots .inv-lot-next {
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%) scale(0.85);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  background: var(--inv-deep);
  border-radius: var(--r-pill);
  padding: 4px 9px;
  box-shadow: var(--shadow-1);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.inv-lots .inv-lot.is-next .inv-lot-next {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.inv-lots .inv-lot.is-next {
  border-color: color-mix(in srgb, var(--inv-blue) 42%, #fff);
  background: var(--inv-wash);
}
/* the ledger sweep */
.inv-lots .inv-lot.is-scan {
  background: color-mix(in srgb, var(--inv-blue) 7%, #fff);
  border-color: color-mix(in srgb, var(--inv-blue) 30%, #fff);
}
/* the short-dated lot */
.inv-lots .inv-lot.is-exp {
  border-color: color-mix(in srgb, var(--inv-warn) 44%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-warn) 12%, transparent);
}
.inv-lots .inv-lot.is-exp .inv-lot-exp { color: var(--inv-warn); }
.inv-lots .inv-lot.is-exp.is-next {
  background: var(--inv-warn-wash);
}
.inv-lots .inv-lot.is-exp.is-next .inv-lot-next { background: var(--inv-warn); }
/* JS mode: badge + alert only appear when played in */
.inv-lots .inv-lot-stage.is-js .inv-lot-days {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.inv-lots .inv-lot-stage.is-js .inv-lot-days.is-on {
  opacity: 1;
  transform: none;
}
.inv-lots .inv-lot-alert {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--inv-warn);
  background: #fff;
  border: 1px dashed color-mix(in srgb, var(--inv-warn) 42%, #fff);
  border-radius: var(--r-pill);
  padding: 7px 13px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-lots .inv-lot-stage.is-js .inv-lot-alert {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.inv-lots .inv-lot-stage.is-js .inv-lot-alert.is-on {
  opacity: 1;
  transform: none;
}

/* ============================================================
   CTA — closing band
   ============================================================ */
.inv-cta {
  background:
    radial-gradient(120% 120% at 50% 0%, var(--periwinkle) 0%, transparent 60%),
    linear-gradient(180deg, #f4f7fc, #fff);
  border-top: 1px solid var(--line);
  padding-block: clamp(72px, 10vw, 128px);
  text-align: center;
}
.inv-cta .inv-cta-inner { max-width: 720px; }
.inv-cta .inv-cta-eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--inv-deep);
}
.inv-cta .inv-cta-h {
  font-size: clamp(30px, 4.4vw, 54px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--ink);
  margin: 16px 0 16px;
}
.inv-cta .inv-cta-sub {
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.6;
  color: var(--ink-60);
  max-width: 52ch;
  margin: 0 auto 30px;
}
.inv-cta .inv-cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.inv-cta .inv-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-70);
  padding: 12px 8px;
}
.inv-cta .inv-cta-ghost:hover { color: var(--inv-deep); }
.inv-cta .inv-cta-ghost .arrow { transition: transform 0.2s ease; }
.inv-cta .inv-cta-ghost:hover .arrow { transform: translateX(3px); }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 960px) {
  .inv .inv-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .inv .inv-grid--flip .inv-copy { order: 1; }
  .inv .inv-grid--flip .inv-stagecol { order: 2; }
  .inv .inv-copy .lead,
  .inv .inv-points span {
    max-width: none;
  }
}
@media (max-width: 720px) {
  .inv-hero .inv-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-hero .inv-wall-meta { display: none; }
  .inv-hero .inv-po { margin-left: 10px; }
}
@media (max-width: 560px) {
  .inv .inv-stagehead-note { display: none; }
  .inv-vend .inv-quote {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "v price"
      "note tag";
    row-gap: 4px;
  }
  .inv-vend .inv-quote-tag { justify-self: end; }
  .inv-panel .inv-op-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name count"
      "btns btns"
      "flag flag";
    row-gap: 8px;
  }
  .inv-lots .inv-lot-recv,
  .inv-lots .inv-lot-cols span:nth-child(2) { display: none; }
  .inv-lots .inv-lot-cols,
  .inv-lots .inv-lot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 0.5fr);
  }
  .inv-vend .inv-vend-result,
  .inv-lots .inv-lot-alert { white-space: normal; }
}

/* ── phone hardening — the same collapses as the 560px pass, widened to
   the 700px phone threshold so larger phones (561-700px) get them too;
   desktop/tablet (>700px) is untouched. ── */
@media (max-width: 700px) {
  .inv .inv-stagehead-note { display: none; }
  .inv-vend .inv-quote {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "v price"
      "note tag";
    row-gap: 4px;
  }
  .inv-vend .inv-quote-tag { justify-self: end; }
  .inv-panel .inv-op-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name count"
      "btns btns"
      "flag flag";
    row-gap: 8px;
  }
  .inv-lots .inv-lot-recv,
  .inv-lots .inv-lot-cols span:nth-child(2) { display: none; }
  .inv-lots .inv-lot-cols,
  .inv-lots .inv-lot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 0.5fr);
  }
  .inv-vend .inv-vend-result,
  .inv-lots .inv-lot-alert { white-space: normal; }
}
@media (max-width: 460px) {
  .inv-hero .inv-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .inv-hero .inv-bin-name { font-size: 10.5px; }
  .inv-lots .inv-lot-cols,
  .inv-lots .inv-lot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 0.5fr); column-gap: 6px; }
  .inv-panel .inv-op-btns { flex-wrap: wrap; }
}

/* ============================================================
   reduced motion: everything static, end-states fully visible
   ============================================================ */
@media (prefers-reduced-motion: reduce), (max-width: 700px) {
  .inv *,
  .inv *::before,
  .inv *::after {
    animation: none !important;
    transition: none !important;
  }
  /* these reveals are gated by a base opacity/width/transform value, not
     just a transition — killing the transition alone leaves them stuck
     hidden, so force the finished state explicitly */
  .inv-hero .inv-po { opacity: 1 !important; transform: none !important; }
  .inv-vend .inv-vend-stage.is-js .inv-quote { opacity: 1 !important; transform: none !important; }
  .inv-vend .inv-vend-stage.is-js .inv-quote.is-skip { opacity: 0.55 !important; }
  .inv-vend .inv-vend-stage.is-js .inv-vend-result { opacity: 1 !important; transform: none !important; }
  .inv-panel .inv-op.is-js .inv-op-flag,
  .inv-panel .inv-op.is-js .inv-op-auto { opacity: 1 !important; transform: none !important; }
  .inv-lots .inv-lot-stage.is-js .inv-lot-days,
  .inv-lots .inv-lot-stage.is-js .inv-lot-alert { opacity: 1 !important; transform: none !important; }
}
