/* Transfer Workflow View - shell plein ecran qui hote le TransferModal. */
#view-transfer-workflow {
  min-height: 100vh;
  background: var(--bg, #f5f7fb);
}
.tw-shell {
  position: relative;
  min-height: 100vh;
  width: 100%;
}
.tw-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted, #555);
}
.tw-manual-toggle {
  vertical-align: middle;
}

/* PO Receive Transfer wrapper. */
#view-po-receive {
  min-height: 100vh;
  background: var(--bg, #f5f7fb);
  padding: 0.75rem;
}
.po-receive-wrap {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.po-receive-header {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e6ee);
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
}
.po-receive-header h2 { margin: 0; font-size: 1.05rem; }
.po-receive-meta { font-size: 0.85rem; color: var(--text-muted, #666); }
.po-receive-toggle {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.po-receive-toggle .btn { padding: 0.4rem 0.75rem; }
.po-receive-toggle .btn.active {
  background: var(--primary, #1f5db8);
  color: #fff;
  border-color: var(--primary, #1f5db8);
}
.po-receive-scan {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e6ee);
  border-radius: 0.6rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.po-receive-scan input {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid var(--border, #e2e6ee);
  border-radius: 0.4rem;
}
.po-receive-list {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e6ee);
  border-radius: 0.6rem;
  padding: 0.5rem 0;
}
.po-receive-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-soft, #f0f1f5);
}
.po-receive-line:last-child { border-bottom: none; }
.po-receive-line .desc { font-weight: 500; }
.po-receive-line .pk   { font-size: 0.8rem; color: var(--text-muted, #777); }
.po-receive-line .qty  { font-variant-numeric: tabular-nums; }
.po-receive-line.depleted { opacity: 0.5; }
.po-receive-line.depleted .qty::after { content: ' ✓'; color: var(--success, #2a9d4a); }

.po-receive-banner {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}
.po-receive-help strong { color: var(--primary, #0369a1); }
.po-receive-session-pill {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #5eead4;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  vertical-align: middle;
}

.po-receive-shelf-wrap .po-receive-header {
  align-items: flex-start;
}
.po-receive-shelf-card {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  background: var(--card-bg, #fff);
  border: 2px solid var(--primary, #0369a1);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px rgba(3, 105, 161, 0.08);
}
.po-receive-shelf-visual {
  flex-shrink: 0;
  width: 120px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
}
.po-receive-shelf-img {
  max-width: 120px;
  max-height: 140px;
  object-fit: contain;
}
.po-receive-shelf-ph { font-size: 3rem; opacity: 0.35; }
.po-receive-shelf-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.po-receive-shelf-meta { font-size: 0.85rem; color: var(--text-muted, #64748b); margin-bottom: 0.5rem; }
.po-receive-shelf-qty { font-size: 1rem; color: #0f172a; }
.po-receive-shelf-loc-hint {
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.po-receive-shelf-loc-hint code { font-size: 0.95em; }
.po-receive-shelf-loc-known {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #0f172a;
}
.po-receive-shelf-loc-unknown {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}
.po-receive-shelf-loc-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
}
.po-receive-shelf-loc-unknown .po-receive-shelf-loc-sub { color: #92400e; }
.po-receive-shelf-scanbox { margin-top: 0.5rem; }
.po-receive-queue-mini {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 0.85rem;
}
.po-receive-queue-mini ul { margin: 0.35rem 0 0 1rem; padding: 0; }
.po-receive-queue-mini li.active { font-weight: 600; color: var(--primary, #0369a1); }
.po-receive-done { padding: 1rem; text-align: center; max-width: 420px; margin: 1rem auto; }

/* RMAs view */
#view-rmas {
  padding: 1rem;
}
.rma-list { display: flex; flex-direction: column; gap: 0.5rem; }
.rma-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e6ee);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}
.rma-card.frozen { border-left: 4px solid var(--warning, #d97706); }

/* Procurement queue tab in price-requests */
.pq-queue-table { width: 100%; border-collapse: collapse; }
.pq-queue-table th, .pq-queue-table td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border-soft, #f0f1f5);
  font-size: 0.9rem;
}
.pq-queue-banner {
  background: #fff7e6;
  border: 1px solid #f3d07a;
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pq-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

/* PO bin-style block on ticket detail */
.tkt-bin.po-bin { border-left: 4px solid #4f7be6; }
.tkt-bin.po-bin.frozen { border-left-color: #d97706; }
.tkt-bin.po-bin .tkt-bin-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.tkt-bin .pq-counter, .tkt-bin .doc-counter {
  font-size: 0.8rem;
  color: var(--text-muted, #777);
}
