/* ORBITA_COMMERCIAL_STOCK_PUTAWAY_V1 — web panel (matches balance page light slate + teal accent) */
#cspPanel, .csp-panel-mount { margin: 0 0 14px; }
.csp-panel--attention {
  border: 1px solid #99f6e4; border-radius: 10px; padding: 10px 12px;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
  box-shadow: 0 1px 0 rgba(13, 148, 136, 0.08);
}
.csp-panel--warn .csp-empty--warn {
  color: #92400e; background: #fffbeb; border-color: #fde68a;
}
.csp-count {
  display: inline-block; font-size: 11px; font-weight: 700; color: #0f766e;
  background: #ccfbf1; border: 1px solid #99f6e4; border-radius: 999px; padding: 2px 8px;
  margin-left: 4px; vertical-align: middle;
}
.csp-head { margin-bottom: 8px; }
.csp-head h2 { margin: 0 0 3px; font-size: 15px; font-weight: 800; color: #0f172a; }
.csp-mobile-link { font-size: 11px; font-weight: 700; color: #0d5c63; text-decoration: none; margin-left: 8px; vertical-align: middle; }
.csp-mobile-link:hover { text-decoration: underline; }
.csp-sub { margin: 0; color: #64748b; font-size: 12px; line-height: 1.45; max-width: 56rem; }
.csp-refresh-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px; font-size: 11px; color: #64748b; font-weight: 600;
}
.csp-refresh-bar--loading { color: #0d5c63; }
.csp-refresh-spinner {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 2px solid #cbd5e1; border-top-color: #0d9488;
  border-radius: 50%; animation: csp-refresh-spin 0.75s linear infinite;
}
@keyframes csp-refresh-spin { to { transform: rotate(360deg); } }
.csp-mobile-scroll-hint { display: none; margin: 0 0 6px; font-size: 11px; color: #64748b; }
@media (max-width: 767.98px) {
  .csp-mobile-scroll-hint.orbita-table-scroll-hint { display: block; }
}
.csp-empty {
  margin: 6px 0 0; font-size: 12px; color: #166534; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 8px; padding: 8px 10px;
}
.csp-table-wrap { overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.csp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.csp-table th {
  background: #f8fafc; color: #64748b; font-weight: 700; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.04em; text-align: left; padding: 7px 10px;
  border-bottom: 1px solid #e2e8f0;
}
.csp-table th.num, .csp-table td.num { text-align: right; }
.csp-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; color: #0f172a; vertical-align: middle; }
.csp-table tr:last-child td { border-bottom: none; }
.csp-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.csp-unit { font-size: 10px; font-weight: 700; color: #64748b; margin-left: 3px; }
.csp-qty-main { font-weight: 800; color: #0f172a; }
.csp-qty-sub { font-size: 10px; color: #64748b; margin-top: 2px; line-height: 1.35; }
.csp-act-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.csp-act-hint { margin: 0; font-size: 10px; line-height: 1.35; color: #64748b; max-width: 14rem; }
.csp-badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #f8fafc; color: #475569;
}
.csp-badge--frozen { border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }
.csp-badge--chill { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.csp-badge--ambient { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.csp-need-storage { font-size: 11px; color: #b91c1c; }
.csp-sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; color: #94a3b8; margin-top: 2px; }
.csp-muted { font-size: 11px; color: #94a3b8; }
.csp-rack-ok { font-size: 11px; font-weight: 700; color: #15803d; }
.csp-rack-missing { font-size: 11px; font-weight: 700; color: #b45309; }

/* Transfer status badges */
.csp-status { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; }
.csp-status--storage { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.csp-status--rack { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.csp-status--ready { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.csp-status--partial { border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }

.csp-btn {
  padding: 6px 12px; border-radius: 6px; border: 1px solid #0d9488; background: #0d9488;
  color: #fff; font-weight: 700; cursor: pointer; font-size: 12px;
}
.csp-btn:hover { background: #0f766e; border-color: #0f766e; }
.csp-btn--ghost { background: #f8fafc; color: #475569; border-color: #cbd5e1; }
.csp-btn--ghost:hover { background: #eef2f6; }
.csp-btn--warn { background: #d97706; border-color: #d97706; }
.csp-btn--warn:hover { background: #b45309; border-color: #b45309; }
.csp-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Storage type picker (confirm modal) */
.csp-field-label { font-size: 11px; font-weight: 700; color: #475569; margin: 0 0 6px; }
.csp-storage-opts { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.csp-storage-opt {
  flex: 1 1 0; min-width: 90px; padding: 10px 8px; border-radius: 8px; border: 1px solid #cbd5e1;
  background: #f8fafc; color: #334155; font-weight: 700; font-size: 13px; cursor: pointer;
}
.csp-storage-opt:hover { border-color: #0d9488; }
.csp-storage-opt.is-selected { border-color: #0d9488; background: #ecfeff; color: #0f766e; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }

/* Modal */
.csp-modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: flex-start; justify-content: center; z-index: 9999; padding: 5vh 12px;
  overflow: auto;
}
.csp-modal {
  background: #fff; border-radius: 12px; width: min(520px, 96vw); padding: 18px 18px 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25); position: relative; border: 1px solid #e2e8f0;
}
.csp-modal-section {
  margin-bottom: 12px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fafafa;
}
.csp-modal-section-title { margin: 0 0 6px; font-size: 12px; font-weight: 800; color: #0f172a; text-transform: uppercase; letter-spacing: 0.04em; }
.csp-pack-preview { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: #0d5c63; }
.csp-sub-line { font-size: 11px; color: #64748b; margin: 4px 0 0; }
.csp-sub-line a { color: #0d5c63; font-weight: 700; }
.csp-ratio-ok { font-size: 11px; font-weight: 700; color: #0d5c63; }
.csp-modal h3 { margin: 0 0 12px; font-size: 16px; font-weight: 800; color: #0f172a; }
.csp-modal-x {
  position: absolute; top: 10px; right: 12px; border: none; background: transparent;
  font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer;
}
.csp-modal-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px;
}
.csp-modal-meta span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 700; }
.csp-modal-meta b { display: block; margin-top: 2px; font-size: 13px; color: #0f172a; }
.csp-field { display: block; margin-bottom: 10px; }
.csp-field span { display: block; font-size: 11px; font-weight: 700; color: #475569; margin-bottom: 4px; }
.csp-field input, .csp-field select {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #cbd5e1;
  border-radius: 8px; font-size: 13px; color: #0f172a; background: #fff;
}
.csp-field input:focus, .csp-field select:focus { outline: none; border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
.csp-split-preview { margin: -4px 0 10px; font-size: 11px; color: #0d5c63; font-weight: 600; min-height: 14px; }
.csp-zone-note { margin: 0 0 10px; font-size: 11px; color: #64748b; }
.csp-err {
  color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
  padding: 8px 10px; font-size: 12px; margin: 0 0 10px;
}
.csp-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.csp-result { margin-top: 12px; border-top: 1px solid #e2e8f0; padding-top: 12px; }
.csp-result-head {
  font-size: 13px; font-weight: 700; color: #166534; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px;
}
.csp-lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.csp-lp { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px; text-align: center; background: #fff; }
.csp-qr { width: 96px; height: 96px; object-fit: contain; image-rendering: pixelated; }
.csp-lp-meta b { display: block; font-size: 9px; font-family: ui-monospace, monospace; color: #334155; word-break: break-all; }
.csp-lp-meta span { display: block; font-size: 12px; font-weight: 800; color: #0f172a; margin-top: 2px; }
.csp-recommendedTag { color: #0d5c63; }

/* Variance table inline transition actions */
.csp-row-block { margin-bottom: 6px; }
.csp-row-meta { margin-bottom: 4px; }
.csp-row-act .csp-row-btn { width: 100%; max-width: 11rem; text-align: center; }
.csp-row-badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.csp-row-badge--pending { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }
.csp-row-links-sep {
  height: 1px; background: #e2e8f0; margin: 6px 0;
}
.bal-next-cell { min-width: 10rem; vertical-align: top; }
.bal-next-cell .btn-link { font-size: 11px; }
