/* ═══════════════════════════════════════════════════════════════════
   ORDERING MODULE — Unified "Inventory & Ordering" hub (Track B)
   Brand: dark UI, neon pink/cyan. Reuses styles.css tokens + components.
   Only NEW rules live here (the hub chrome, the receive modal, the
   demo-data pill, and inline-edit affordances). Do NOT duplicate
   .order-card / .bar-meter / .status-pill — those stay in styles.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ── "demo data" guardrail pill (until NCR_LIVE=true) ───────────────── */
.rr-demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--rr-yellow);
  background: rgba(255, 241, 64, 0.10);
  border: 1px solid rgba(255, 241, 64, 0.38);
  vertical-align: middle;
}
.rr-demo-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rr-yellow);
  box-shadow: 0 0 6px var(--rr-yellow);
}

/* ── inline-edit cells in the stock table ───────────────────────────── */
.rr-inv-input {
  width: 74px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(88, 249, 244, 0.18);
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
}
.rr-inv-input:focus { outline: none; border-color: var(--rr-cyan); }
.rr-inv-input.par { border-color: rgba(255, 55, 199, 0.22); }

/* ── forecast adjustment chip in the "why" column ───────────────────── */
.rr-fc-adj {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
}
.rr-fc-adj.up   { color: #ff9a3c; background: rgba(255, 154, 60, 0.12); border: 1px solid rgba(255, 154, 60, 0.3); }
.rr-fc-adj.down { color: #7ee787; background: rgba(46, 213, 115, 0.12); border: 1px solid rgba(46, 213, 115, 0.3); }
.rr-fc-adj.flat { color: var(--rr-text-muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--rr-border); }

/* ── Receive modal (mirrors the schedule .sm-* modal conventions) ───── */
.rr-rcv-backdrop {
  position: fixed; inset: 0;
  background: rgba(4, 2, 14, 0.72);
  backdrop-filter: blur(3px);
  z-index: 9000;
}
.rr-rcv-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  /* neon-glass overlay recipe (tokens live in styles.css :root) */
  background: var(--ng-sheen), var(--ng-tint-overlay);
  -webkit-backdrop-filter: blur(var(--ng-blur-overlay)) saturate(var(--ng-sat));
  backdrop-filter: blur(var(--ng-blur-overlay)) saturate(var(--ng-sat));
  border: 1px solid var(--ng-edge-pink);
  border-radius: 14px;
  padding: 22px 22px 20px;
  z-index: 9001;
  box-shadow: inset 0 1px 0 var(--ng-edge-spec),
              inset 0 0 0 1px var(--ng-edge-cyan),
              var(--ng-shadow-overlay);
}
.rr-rcv-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rr-rcv-h h3 { margin: 0; font-size: 18px; }
.rr-rcv-x { cursor: pointer; color: var(--rr-text-muted); font-size: 16px; text-decoration: none; line-height: 1; }
.rr-rcv-x:hover { color: var(--rr-pink); }
.rr-rcv-sub { font-size: 12px; color: var(--rr-text-muted); margin-bottom: 14px; }
.rr-rcv-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.rr-rcv-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rr-text-muted);
  padding: 4px 6px;
  border-bottom: 1px solid var(--rr-border);
}
.rr-rcv-table td { padding: 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 13px; }
.rr-rcv-table input[type="number"] {
  width: 70px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(88, 249, 244, 0.3);
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
}
.rr-rcv-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.rr-rcv-actions .btn { min-width: 96px; }
.rr-rcv-empty { padding: 28px; text-align: center; color: var(--rr-text-muted); }

/* per-vendor "Mark received" launcher in the order card actions */
.rr-rcv-btn {
  border: 1px solid rgba(46, 213, 115, 0.4);
  color: #7ee787;
}

@media (max-width: 640px) {
  .rr-rcv-modal { padding: 18px 16px; }
  .rr-rcv-table input[type="number"] { font-size: 16px; } /* avoid iOS zoom */
}

/* no backdrop-filter support → opaque fallback (mirrors styles.css) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .rr-rcv-modal { background: rgba(20, 4, 34, 0.97); }
}
