{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "return-merchandise-inspection",
  "title": "Return Merchandise Inspection",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/return-merchandise-inspection/ReturnMerchandiseInspection.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  AlertTriangle,\n  ArrowRight,\n  Barcode,\n  Box,\n  CheckCircle2,\n  Clock,\n  CornerDownLeft,\n  CreditCard,\n  Download,\n  FileCheck,\n  Gift,\n  Package,\n  PackageCheck,\n  Printer,\n  Radio,\n  RotateCcw,\n  ScanLine,\n  Tag,\n  UserCheck,\n  Warehouse,\n} from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'\nimport { Checkbox } from '@/components/ui/checkbox'\nimport { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'\nimport { Separator } from '@/components/ui/separator'\nimport { Textarea } from '@/components/ui/textarea'\n\nexport type ConditionGrade = 'grade-a' | 'grade-b' | 'grade-c' | 'grade-d'\nexport type RefundAction = 'full-refund' | 'store-credit' | 'restock-fee'\n\nexport interface InspectionChecklist {\n  tagsAttached: boolean\n  originalBox: boolean\n  allAccessories: boolean\n  odorStainFree: boolean\n}\n\nexport interface ReturnInspectionData {\n  rmaNumber: string\n  stationId: string\n  inspectorName: string\n  returnReason: string\n  item: {\n    name: string\n    variant: string\n    msrp: number\n    sku: string\n    upc: string\n    verified: boolean\n  }\n  grade: ConditionGrade\n  checklist: InspectionChecklist\n  refundAction: RefundAction\n  qcNotes: string\n  dispositionOutcome: {\n    route: string\n    destinationBin: string\n    lpnCode: string\n    priority: string\n  }\n}\n\nexport interface ReturnMerchandiseInspectionProps {\n  initialRma?: string\n  initialGrade?: ConditionGrade\n  initialRefundAction?: RefundAction\n  initialSubmitted?: boolean\n  inspectorName?: string\n  stationName?: string\n  className?: string\n  onComplete?: (data: ReturnInspectionData) => void\n}\n\nconst itemData = {\n  name: 'Aero Minimalist Runner · Size 10.5 · Matte Black',\n  variant: 'Matte Black / US 10.5 M',\n  sku: 'AMR-BLK-105',\n  upc: 'UPC-018249',\n  msrp: 145.0,\n  orderRef: '#ORD-98421',\n  carrier: 'FedEx Return Express',\n  trackingNumber: '7946 1102 9842',\n  returnReason: 'Customer reported wrong size ordered',\n}\n\nconst gradeDefinitions: Record<\n  ConditionGrade,\n  {\n    id: ConditionGrade\n    code: string\n    title: string\n    conditionLabel: string\n    summary: string\n    route: string\n    targetBin: string\n    lpnCode: string\n    priority: string\n    badgeClasses: string\n    activeBorderBg: string\n    indicatorColor: string\n    statusText: string\n  }\n> = {\n  'grade-a': {\n    id: 'grade-a',\n    code: 'Grade A',\n    title: 'Grade A: Brand New / Unopened',\n    conditionLabel: 'Brand New / Pristine',\n    summary: 'Original tags & packaging intact',\n    route: 'Restock to Primary Inventory',\n    targetBin: 'Aisle 04-B · Bin #04-B-12',\n    lpnCode: 'LPN-849201-RESTOCK-A',\n    priority: 'High · Inventory Replenishment',\n    badgeClasses: 'border-success/30 bg-success/10 text-success font-semibold',\n    activeBorderBg: 'border-success/40 bg-success/5 shadow-xs ring-1 ring-success/20',\n    indicatorColor: 'bg-success',\n    statusText: 'Primary Inventory Restock Approved',\n  },\n  'grade-b': {\n    id: 'grade-b',\n    code: 'Grade B',\n    title: 'Grade B: Open Box / Minor Cosmetic',\n    conditionLabel: 'Open Box / Inspected',\n    summary: 'No functional damage, packaging opened',\n    route: 'Route to Outlet / Refurbished Store',\n    targetBin: 'Secondary Channel · Pallet #03',\n    lpnCode: 'LPN-849201-OUTLET-B',\n    priority: 'Standard · Secondary Routing',\n    badgeClasses: 'border-warning/30 bg-warning/10 text-warning font-semibold',\n    activeBorderBg: 'border-warning/40 bg-warning/5 shadow-xs ring-1 ring-warning/20',\n    indicatorColor: 'bg-warning',\n    statusText: 'Secondary Channel Re-routing',\n  },\n  'grade-c': {\n    id: 'grade-c',\n    code: 'Grade C',\n    title: 'Grade C: Worn / Used',\n    conditionLabel: 'Worn / Blemished',\n    summary: 'Minor wear on soles, visible creasing',\n    route: 'Liquidation Batch #LQ-409',\n    targetBin: 'Bulk Liquidation Pallet #C-88',\n    lpnCode: 'LPN-849201-LIQUIDATE-C',\n    priority: 'Batch Weekly Dispatch',\n    badgeClasses: 'border-orange-500/30 bg-orange-500/10 text-orange-700 dark:text-orange-400 font-semibold',\n    activeBorderBg: 'border-orange-500/40 bg-orange-500/5 dark:bg-orange-950/20 shadow-xs ring-1 ring-orange-500/20',\n    indicatorColor: 'bg-orange-500',\n    statusText: 'Wholesale Liquidation Staging',\n  },\n  'grade-d': {\n    id: 'grade-d',\n    code: 'Grade D',\n    title: 'Grade D: Damaged / Defective',\n    conditionLabel: 'Defective / Damaged',\n    summary: 'Torn fabric, seam defect, structural flaw',\n    route: 'Quarantine / Return to Vendor (RTV)',\n    targetBin: 'Quarantine Bay Q-08 (Vendor Claims)',\n    lpnCode: 'LPN-849201-QUARANTINE-D',\n    priority: 'Urgent · Vendor RTV Credit Hold',\n    badgeClasses: 'border-destructive/30 bg-destructive/10 text-destructive font-semibold',\n    activeBorderBg: 'border-destructive/40 bg-destructive/5 shadow-xs ring-1 ring-destructive/20',\n    indicatorColor: 'bg-destructive',\n    statusText: 'Quarantine Hold & Vendor Credit Claim',\n  },\n}\n\nfunction formatCurrency(val: number) {\n  return new Intl.NumberFormat('en-US', {\n    style: 'currency',\n    currency: 'USD',\n    minimumFractionDigits: 2,\n  }).format(val)\n}\n\nexport function ReturnMerchandiseInspection({\n  initialRma = '#RMA-849201',\n  initialGrade = 'grade-a',\n  initialRefundAction = 'full-refund',\n  initialSubmitted = false,\n  inspectorName = 'Alex Rivera · QC Lead',\n  stationName = 'Warehouse Returns Intake & Grading Station #02',\n  className,\n  onComplete,\n}: ReturnMerchandiseInspectionProps) {\n  const [rmaNumber, setRmaNumber] = React.useState(initialRma)\n  const [selectedGrade, setSelectedGrade] = React.useState<ConditionGrade>(initialGrade)\n  const [selectedRefundAction, setSelectedRefundAction] = React.useState<RefundAction>(initialRefundAction)\n  const [submitted, setSubmitted] = React.useState(initialSubmitted)\n  const [qcNotes, setQcNotes] = React.useState(\n    'Outer packaging opened by customer. All interior packaging materials, extra shoelaces, and brand care card verified in pristine condition. Zero sole wear detected.',\n  )\n\n  const [checklist, setChecklist] = React.useState<InspectionChecklist>({\n    tagsAttached: true,\n    originalBox: true,\n    allAccessories: true,\n    odorStainFree: true,\n  })\n\n  React.useEffect(() => {\n    setSelectedGrade(initialGrade)\n  }, [initialGrade])\n\n  React.useEffect(() => {\n    setSelectedRefundAction(initialRefundAction)\n  }, [initialRefundAction])\n\n  React.useEffect(() => {\n    setSubmitted(initialSubmitted)\n  }, [initialSubmitted])\n\n  const currentGrade = gradeDefinitions[selectedGrade]\n\n  const totalChecklistCount = 4\n  const checkedChecklistCount = React.useMemo(() => {\n    let count = 0\n    if (checklist.tagsAttached) count++\n    if (checklist.originalBox) count++\n    if (checklist.allAccessories) count++\n    if (checklist.odorStainFree) count++\n    return count\n  }, [checklist])\n\n  const allChecksPassed = checkedChecklistCount === totalChecklistCount\n\n  const refundCalculations = React.useMemo(() => {\n    const msrp = itemData.msrp\n    if (selectedRefundAction === 'store-credit') {\n      const bonus = msrp * 0.1\n      return {\n        subtotal: msrp,\n        adjustmentLabel: 'Store Credit Bonus (+10%)',\n        adjustmentAmount: bonus,\n        isBonus: true,\n        totalRefund: msrp + bonus,\n        methodLabel: 'Digital Gift Card (sarah.c@example.com)',\n        payoutSpeed: 'Instant email delivery upon grading',\n      }\n    }\n\n    if (selectedRefundAction === 'restock-fee') {\n      const fee = 15.0\n      return {\n        subtotal: msrp,\n        adjustmentLabel: 'Restocking & Repacking Fee',\n        adjustmentAmount: fee,\n        isBonus: false,\n        totalRefund: msrp - fee,\n        methodLabel: 'Net Credit to Visa •••• 4242',\n        payoutSpeed: '3–5 business days to card',\n      }\n    }\n\n    return {\n      subtotal: msrp,\n      adjustmentLabel: 'Restocking Fee Waived',\n      adjustmentAmount: 0,\n      isBonus: false,\n      totalRefund: msrp,\n      methodLabel: 'Full Refund to Visa •••• 4242',\n      payoutSpeed: '3–5 business days to card',\n    }\n  }, [selectedRefundAction])\n\n  const selectAllChecklist = (pass: boolean) => {\n    setChecklist({\n      tagsAttached: pass,\n      originalBox: pass,\n      allAccessories: pass,\n      odorStainFree: pass,\n    })\n  }\n\n  const applyPresetNote = (note: string) => {\n    if (!qcNotes.includes(note)) {\n      setQcNotes(qcNotes ? `${qcNotes} ${note}` : note)\n    }\n  }\n\n  const handleCompleteInspection = () => {\n    setSubmitted(true)\n    onComplete?.({\n      rmaNumber,\n      stationId: 'STATION-02-B',\n      inspectorName,\n      returnReason: itemData.returnReason,\n      item: {\n        name: itemData.name,\n        variant: itemData.variant,\n        msrp: itemData.msrp,\n        sku: itemData.sku,\n        upc: itemData.upc,\n        verified: true,\n      },\n      grade: selectedGrade,\n      checklist: { ...checklist },\n      refundAction: selectedRefundAction,\n      qcNotes,\n      dispositionOutcome: {\n        route: currentGrade.route,\n        destinationBin: currentGrade.targetBin,\n        lpnCode: currentGrade.lpnCode,\n        priority: currentGrade.priority,\n      },\n    })\n  }\n\n  const handleReset = () => {\n    setSubmitted(false)\n    setSelectedGrade('grade-a')\n    setSelectedRefundAction('full-refund')\n    selectAllChecklist(true)\n    setQcNotes(\n      'Outer packaging opened by customer. All interior packaging materials, extra shoelaces, and brand care card verified in pristine condition. Zero sole wear detected.',\n    )\n  }\n\n  return (\n    <div\n      data-slot=\"return-merchandise-inspection\"\n      className={cn('text-foreground mx-auto w-full max-w-6xl space-y-6', className)}\n    >\n      {/* ================================================================= */}\n      {/* POST-SUBMISSION CONFIRMATION RECEIPT VIEW                         */}\n      {/* ================================================================= */}\n      {submitted ? (\n        <div className=\"space-y-6\">\n          <Card className=\"border-border overflow-hidden shadow-xs\">\n            <div\n              className={cn(\n                'border-b p-6 text-center sm:p-8',\n                selectedGrade === 'grade-d'\n                  ? 'border-destructive/30 bg-destructive/10'\n                  : 'border-success/30 bg-success/10',\n              )}\n            >\n              <div className=\"relative mx-auto mb-4 size-16\">\n                <span\n                  className={cn(\n                    'absolute inset-0 rounded-full blur-xl',\n                    selectedGrade === 'grade-d' ? 'bg-destructive/30' : 'bg-success/30',\n                  )}\n                  aria-hidden=\"true\"\n                />\n                <span\n                  className={cn(\n                    'relative flex size-16 items-center justify-center rounded-full border shadow-xs',\n                    selectedGrade === 'grade-d'\n                      ? 'border-destructive/40 bg-destructive/20 text-destructive'\n                      : 'border-success/40 bg-success/20 text-success',\n                  )}\n                >\n                  {selectedGrade !== 'grade-d' ? (\n                    <PackageCheck className=\"size-8\" aria-hidden=\"true\" />\n                  ) : (\n                    <AlertTriangle className=\"size-8\" aria-hidden=\"true\" />\n                  )}\n                </span>\n              </div>\n\n              <Badge\n                variant={selectedGrade === 'grade-d' ? 'destructive' : 'outline'}\n                className={cn(\n                  'mb-2 font-mono text-xs tracking-wider uppercase',\n                  selectedGrade !== 'grade-d' && 'border-success/30 bg-success/10 text-success',\n                )}\n              >\n                RMA Disposition Manifest Dispatched\n              </Badge>\n\n              <h2 className=\"text-foreground text-2xl font-bold tracking-tight sm:text-3xl\">\n                {selectedGrade === 'grade-d'\n                  ? 'RMA Inspection Flagged · Quarantine RTV Initiated'\n                  : 'Inspection Complete · Automated Routing Logged'}\n              </h2>\n              <p className=\"text-muted-foreground mx-auto mt-1.5 max-w-2xl text-xs sm:text-sm\">\n                Disposition for <span className=\"text-foreground font-medium\">{itemData.name}</span> has been recorded.\n                Warehouse routing slip and automated customer refund authorization have been queued.\n              </p>\n\n              <div className=\"border-border bg-muted/60 mt-4 inline-flex flex-wrap items-center gap-2 rounded-full border px-3.5 py-1 text-xs\">\n                <span className=\"text-muted-foreground font-medium\">RMA Reference:</span>\n                <span className=\"text-foreground font-mono font-bold\">{rmaNumber}</span>\n                <span className=\"text-muted-foreground font-medium\">LPN:</span>\n                <span className=\"text-foreground font-mono font-bold\">{currentGrade.lpnCode}</span>\n              </div>\n            </div>\n\n            <CardContent className=\"space-y-6 p-6\">\n              {/* Disposition Summary Meta Grid */}\n              <div className=\"grid gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n                <div className=\"border-border bg-muted/20 space-y-1 rounded-lg border p-3.5\">\n                  <span className=\"text-muted-foreground block text-xs font-medium\">Condition Grade</span>\n                  <span className=\"text-foreground block text-sm font-semibold\">{currentGrade.title}</span>\n                  <span className=\"text-muted-foreground text-xs\">{currentGrade.summary}</span>\n                </div>\n\n                <div className=\"border-border bg-muted/20 space-y-1 rounded-lg border p-3.5\">\n                  <span className=\"text-muted-foreground block text-xs font-medium\">Warehouse Destination</span>\n                  <span className=\"text-foreground block text-sm font-semibold\">{currentGrade.targetBin}</span>\n                  <span className=\"text-muted-foreground text-xs\">{currentGrade.route}</span>\n                </div>\n\n                <div className=\"border-border bg-muted/20 space-y-1 rounded-lg border p-3.5\">\n                  <span className=\"text-muted-foreground block text-xs font-medium\">Customer Resolution</span>\n                  <span className=\"text-foreground block text-sm font-semibold tabular-nums\">\n                    {formatCurrency(refundCalculations.totalRefund)}\n                  </span>\n                  <span className=\"text-muted-foreground block truncate text-xs\">{refundCalculations.methodLabel}</span>\n                </div>\n\n                <div className=\"border-border bg-muted/20 space-y-1 rounded-lg border p-3.5\">\n                  <span className=\"text-muted-foreground block text-xs font-medium\">QC Inspector</span>\n                  <span className=\"text-foreground block text-sm font-semibold\">{inspectorName}</span>\n                  <span className=\"text-muted-foreground text-xs\">Station #02 · Timestamped</span>\n                </div>\n              </div>\n\n              {/* LPN Barcode & Routing Pass Box */}\n              <div className=\"border-border bg-muted/15 space-y-3 rounded-xl border p-4 sm:p-5\">\n                <div className=\"flex flex-wrap items-center justify-between gap-2\">\n                  <div className=\"flex flex-wrap items-center gap-2\">\n                    <Barcode className=\"text-primary size-4\" />\n                    <span className=\"text-foreground text-xs font-semibold tracking-wide uppercase\">\n                      Pallet / Tote License Plate Number (LPN)\n                    </span>\n                  </div>\n                  <Badge variant=\"outline\" className=\"font-mono text-xs\">\n                    READY FOR PUTAWAY\n                  </Badge>\n                </div>\n\n                <div className=\"border-border bg-card flex flex-col items-center justify-center space-y-2 rounded-lg border p-4 text-center\">\n                  {/* Barcode SVG visualization */}\n                  <svg\n                    className=\"text-foreground h-12 w-full max-w-sm\"\n                    viewBox=\"0 0 280 48\"\n                    fill=\"currentColor\"\n                    aria-label=\"LPN Warehouse Barcode\"\n                  >\n                    <rect x=\"0\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"7\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"12\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"20\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"25\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"34\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"40\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"45\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"53\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"60\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"69\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"74\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"81\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"88\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"96\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"101\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"110\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"116\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"123\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"128\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"136\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"142\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"151\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"156\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"163\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"170\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"178\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"183\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"192\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"199\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"204\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"212\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"218\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"227\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"232\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"239\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"245\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"253\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"258\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"267\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"273\" y=\"0\" width=\"4\" height=\"48\" />\n                  </svg>\n                  <div className=\"flex items-center gap-3 font-mono text-xs font-bold\">\n                    <span className=\"text-foreground tracking-wider\">{currentGrade.lpnCode}</span>\n                    <span className=\"text-muted-foreground font-normal\">{currentGrade.targetBin}</span>\n                  </div>\n                </div>\n\n                {/* Inspector Notes Display */}\n                {qcNotes && (\n                  <div className=\"space-y-1 pt-1 text-xs\">\n                    <span className=\"text-muted-foreground font-medium\">Logged Inspector Notes:</span>\n                    <p className=\"border-border bg-card text-foreground rounded-md border p-3 leading-relaxed italic\">\n                      “{qcNotes}”\n                    </p>\n                  </div>\n                )}\n              </div>\n\n              {/* Actions Strip */}\n              <div className=\"flex flex-wrap items-center justify-between gap-3 pt-2\">\n                <Button variant=\"outline\" size=\"sm\" className=\"gap-1.5 text-xs font-medium\" onClick={handleReset}>\n                  <RotateCcw className=\"size-3.5\" />\n                  Start Next RMA Inspection\n                </Button>\n\n                <div className=\"flex flex-wrap items-center gap-2\">\n                  <Button variant=\"outline\" size=\"sm\" className=\"gap-1.5 text-xs font-medium\">\n                    <Printer className=\"size-3.5\" />\n                    Print LPN Tote Label\n                  </Button>\n                  <Button aria-label=\"Download attachment\" size=\"sm\" className=\"gap-1.5 text-xs font-medium\">\n                    <Download className=\"size-3.5\" />\n                    Download Disposition PDF\n                  </Button>\n                </div>\n              </div>\n            </CardContent>\n          </Card>\n        </div>\n      ) : (\n        /* ================================================================= */\n        /* ACTIVE INSPECTION WORKBENCH VIEW                                  */\n        /* ================================================================= */\n        <div className=\"space-y-6\">\n          {/* Top Station Header Card */}\n          <Card className=\"border-border shadow-xs\">\n            <CardHeader className=\"pb-4\">\n              <div className=\"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between\">\n                <div className=\"space-y-2\">\n                  <div className=\"flex flex-wrap items-center gap-2\">\n                    <Badge\n                      variant=\"outline\"\n                      className=\"border-primary/30 bg-primary/10 text-primary gap-1.5 py-0.5 text-xs\"\n                    >\n                      <Warehouse className=\"size-3.5\" />\n                      Station #02 · Returns Intake & Grading\n                    </Badge>\n                    <Badge variant=\"outline\" className=\"gap-1.5 py-0.5 font-mono text-xs\">\n                      <Tag className=\"size-3\" />\n                      {rmaNumber}\n                    </Badge>\n                    <Badge\n                      variant=\"outline\"\n                      className=\"border-success/30 bg-success/10 text-success gap-1.5 py-0.5 text-xs\"\n                    >\n                      <Radio className=\"text-success size-3\" />\n                      Scanner Online\n                    </Badge>\n                  </div>\n\n                  <div>\n                    <CardTitle className=\"text-xl font-bold tracking-tight sm:text-2xl\">\n                      Warehouse Returns Intake & Grading Station #02\n                    </CardTitle>\n                    <CardDescription className=\"text-xs sm:text-sm\">\n                      RMA intake verification, physical condition evaluation, restock/quarantine disposition routing,\n                      and customer refund action.\n                    </CardDescription>\n                  </div>\n                </div>\n\n                {/* Primary Header CTA */}\n                <div className=\"flex shrink-0 items-center gap-2\">\n                  <Button\n                    type=\"button\"\n                    size=\"default\"\n                    className=\"gap-2 text-xs font-semibold sm:text-sm\"\n                    onClick={handleCompleteInspection}\n                  >\n                    <FileCheck className=\"size-4\" />\n                    Complete Inspection & Disposition\n                  </Button>\n                </div>\n              </div>\n            </CardHeader>\n\n            {/* Metadata Ribbon Bar */}\n            <CardContent className=\"pt-0 pb-4\">\n              <div className=\"border-border bg-muted/20 grid gap-3 rounded-lg border p-3.5 sm:grid-cols-2 lg:grid-cols-4\">\n                <div className=\"space-y-0.5\">\n                  <div className=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <Tag className=\"text-primary size-3.5\" />\n                    <span>RMA Reference</span>\n                  </div>\n                  <p className=\"text-foreground font-mono text-xs font-semibold\">{rmaNumber}</p>\n                  <p className=\"text-muted-foreground text-xs\">Order: {itemData.orderRef}</p>\n                </div>\n\n                <div className=\"space-y-0.5\">\n                  <div className=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <UserCheck className=\"text-primary size-3.5\" />\n                    <span>Inspector / Station</span>\n                  </div>\n                  <p className=\"text-foreground text-xs font-semibold\">{inspectorName}</p>\n                  <p className=\"text-muted-foreground text-xs\">Terminal Station #02</p>\n                </div>\n\n                <div className=\"space-y-0.5\">\n                  <div className=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <CornerDownLeft className=\"text-primary size-3.5\" />\n                    <span>Customer Return Reason</span>\n                  </div>\n                  <p className=\"text-foreground truncate text-xs font-semibold\">{itemData.returnReason}</p>\n                  <p className=\"text-muted-foreground text-xs\">Carrier: {itemData.carrier}</p>\n                </div>\n\n                <div className=\"space-y-0.5\">\n                  <div className=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <Clock className=\"text-primary size-3.5\" />\n                    <span>Intake Status</span>\n                  </div>\n                  <p className=\"text-foreground text-xs font-semibold\">In Progress · Pending Disposition</p>\n                  <p className=\"text-muted-foreground font-mono text-xs\">{itemData.trackingNumber}</p>\n                </div>\n              </div>\n            </CardContent>\n          </Card>\n\n          {/* =============================================================== */}\n          {/* 2-COLUMN INSPECTION WORKBENCH                                   */}\n          {/* =============================================================== */}\n          <div className=\"grid grid-cols-1 items-start gap-6 lg:grid-cols-12\">\n            {/* LEFT COLUMN: Item Verification & Condition Grading (7 Cols) */}\n            <div className=\"space-y-6 lg:col-span-7\">\n              {/* 1. Scanned Item Verification Card */}\n              <Card className=\"border-border shadow-xs\">\n                <CardHeader className=\"pb-3\">\n                  <div className=\"flex items-center justify-between\">\n                    <div className=\"flex flex-wrap items-center gap-2\">\n                      <ScanLine className=\"text-primary size-4\" />\n                      <CardTitle className=\"text-sm font-semibold\">Intake Item Scanned</CardTitle>\n                    </div>\n                    <Badge variant=\"outline\" className=\"border-success/30 bg-success/10 text-success gap-1 text-xs\">\n                      <CheckCircle2 className=\"size-3\" />\n                      Match Verified\n                    </Badge>\n                  </div>\n                </CardHeader>\n\n                <CardContent className=\"space-y-4\">\n                  <div className=\"border-border bg-card flex flex-col gap-3 rounded-lg border p-3.5 sm:flex-row sm:items-center\">\n                    <div className=\"border-border bg-muted/60 text-muted-foreground flex size-14 shrink-0 items-center justify-center rounded-lg border\">\n                      <Package className=\"text-primary size-7\" />\n                    </div>\n\n                    <div className=\"min-w-0 flex-1 space-y-1\">\n                      <div className=\"flex flex-wrap items-start justify-between gap-2\">\n                        <div>\n                          <h4 className=\"text-foreground text-sm leading-tight font-semibold\">{itemData.name}</h4>\n                          <p className=\"text-muted-foreground text-xs\">\n                            {itemData.variant} · SKU: <span className=\"font-mono font-medium\">{itemData.sku}</span>\n                          </p>\n                        </div>\n                        <div className=\"text-right\">\n                          <span className=\"text-foreground text-base font-bold tabular-nums\">\n                            {formatCurrency(itemData.msrp)}\n                          </span>\n                          <span className=\"text-muted-foreground block text-xs\">MSRP</span>\n                        </div>\n                      </div>\n\n                      <div className=\"flex flex-wrap items-center gap-3 pt-1 text-xs\">\n                        <div className=\"text-muted-foreground flex items-center gap-1.5 font-mono\">\n                          <Barcode className=\"text-success size-3.5\" />\n                          <span className=\"text-foreground font-semibold\">{itemData.upc}</span>\n                          <Badge variant=\"outline\" className=\"text-success h-4 px-1.5 py-0 text-xs\">\n                            UPC OK\n                          </Badge>\n                        </div>\n                        <Separator orientation=\"vertical\" className=\"h-3.5\" />\n                        <span className=\"text-muted-foreground\">Order: {itemData.orderRef}</span>\n                      </div>\n                    </div>\n                  </div>\n                </CardContent>\n              </Card>\n\n              {/* 2. Condition Grading Radio Cards */}\n              <Card className=\"border-border shadow-xs\">\n                <CardHeader className=\"pb-3\">\n                  <div className=\"flex items-center justify-between\">\n                    <div className=\"space-y-0.5\">\n                      <CardTitle className=\"text-sm font-semibold\">Condition Grading Assessment</CardTitle>\n                      <CardDescription className=\"text-xs\">\n                        Select physical grading level to trigger automated warehouse routing rules.\n                      </CardDescription>\n                    </div>\n                    <Badge className={currentGrade.badgeClasses}>{currentGrade.code}</Badge>\n                  </div>\n                </CardHeader>\n\n                <CardContent>\n                  <RadioGroup\n                    value={selectedGrade}\n                    onValueChange={(val) => setSelectedGrade(val as ConditionGrade)}\n                    className=\"grid grid-cols-1 gap-2.5\"\n                  >\n                    {/* Grade A */}\n                    <div\n                      className={cn(\n                        'flex cursor-pointer items-start gap-3 rounded-lg border p-3.5 transition-colors select-none',\n                        selectedGrade === 'grade-a'\n                          ? gradeDefinitions['grade-a'].activeBorderBg\n                          : 'border-border bg-card hover:bg-muted/30',\n                      )}\n                      onClick={() => setSelectedGrade('grade-a')}\n                    >\n                      <RadioGroupItem id=\"grade-a\" value=\"grade-a\" className=\"mt-0.5\" />\n                      <div className=\"flex-1 space-y-1\">\n                        <div className=\"flex flex-wrap items-center justify-between gap-2\">\n                          <label\n                            htmlFor=\"grade-a\"\n                            className=\"text-foreground cursor-pointer text-xs font-semibold sm:text-sm\"\n                          >\n                            Grade A: Brand New / Unopened\n                          </label>\n                          <Badge variant=\"outline\" className=\"border-success/30 bg-success/10 text-success text-xs\">\n                            Primary Restock\n                          </Badge>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs leading-relaxed\">\n                          Original factory tags & packaging intact. No cosmetic or functional flaws.\n                        </p>\n                        <div className=\"text-muted-foreground flex items-center gap-1.5 pt-1 text-xs\">\n                          <ArrowRight className=\"text-primary size-3\" />\n                          <span>\n                            Target:{' '}\n                            <strong className=\"text-foreground font-medium\">\n                              Restock to Primary Inventory (Aisle 04-B)\n                            </strong>\n                          </span>\n                        </div>\n                      </div>\n                    </div>\n\n                    {/* Grade B */}\n                    <div\n                      className={cn(\n                        'flex cursor-pointer items-start gap-3 rounded-lg border p-3.5 transition-colors select-none',\n                        selectedGrade === 'grade-b'\n                          ? gradeDefinitions['grade-b'].activeBorderBg\n                          : 'border-border bg-card hover:bg-muted/30',\n                      )}\n                      onClick={() => setSelectedGrade('grade-b')}\n                    >\n                      <RadioGroupItem id=\"grade-b\" value=\"grade-b\" className=\"mt-0.5\" />\n                      <div className=\"flex-1 space-y-1\">\n                        <div className=\"flex flex-wrap items-center justify-between gap-2\">\n                          <label\n                            htmlFor=\"grade-b\"\n                            className=\"text-foreground cursor-pointer text-xs font-semibold sm:text-sm\"\n                          >\n                            Grade B: Open Box / Minor Cosmetic\n                          </label>\n                          <Badge variant=\"outline\" className=\"border-warning/30 bg-warning/10 text-warning text-xs\">\n                            Outlet Store\n                          </Badge>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs leading-relaxed\">\n                          Box opened or minor package scuffs, but product is 100% unworn and fully functional.\n                        </p>\n                        <div className=\"text-muted-foreground flex items-center gap-1.5 pt-1 text-xs\">\n                          <ArrowRight className=\"text-primary size-3\" />\n                          <span>\n                            Target:{' '}\n                            <strong className=\"text-foreground font-medium\">Route to Outlet / Refurbished Store</strong>\n                          </span>\n                        </div>\n                      </div>\n                    </div>\n\n                    {/* Grade C */}\n                    <div\n                      className={cn(\n                        'flex cursor-pointer items-start gap-3 rounded-lg border p-3.5 transition-colors select-none',\n                        selectedGrade === 'grade-c'\n                          ? gradeDefinitions['grade-c'].activeBorderBg\n                          : 'border-border bg-card hover:bg-muted/30',\n                      )}\n                      onClick={() => setSelectedGrade('grade-c')}\n                    >\n                      <RadioGroupItem id=\"grade-c\" value=\"grade-c\" className=\"mt-0.5\" />\n                      <div className=\"flex-1 space-y-1\">\n                        <div className=\"flex flex-wrap items-center justify-between gap-2\">\n                          <label\n                            htmlFor=\"grade-c\"\n                            className=\"text-foreground cursor-pointer text-xs font-semibold sm:text-sm\"\n                          >\n                            Grade C: Worn / Used\n                          </label>\n                          <Badge\n                            variant=\"outline\"\n                            className=\"border-orange-500/30 bg-orange-500/10 text-xs text-orange-700 dark:text-orange-400\"\n                          >\n                            Liquidation\n                          </Badge>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs leading-relaxed\">\n                          Visible wear on soles, minor creasing or cosmetic stains. Not suitable for retail shelves.\n                        </p>\n                        <div className=\"text-muted-foreground flex items-center gap-1.5 pt-1 text-xs\">\n                          <ArrowRight className=\"text-primary size-3\" />\n                          <span>\n                            Target:{' '}\n                            <strong className=\"text-foreground font-medium\">\n                              Liquidation Batch #LQ-409 (Wholesale Lot)\n                            </strong>\n                          </span>\n                        </div>\n                      </div>\n                    </div>\n\n                    {/* Grade D */}\n                    <div\n                      className={cn(\n                        'flex cursor-pointer items-start gap-3 rounded-lg border p-3.5 transition-colors select-none',\n                        selectedGrade === 'grade-d'\n                          ? gradeDefinitions['grade-d'].activeBorderBg\n                          : 'border-border bg-card hover:bg-muted/30',\n                      )}\n                      onClick={() => setSelectedGrade('grade-d')}\n                    >\n                      <RadioGroupItem id=\"grade-d\" value=\"grade-d\" className=\"mt-0.5\" />\n                      <div className=\"flex-1 space-y-1\">\n                        <div className=\"flex flex-wrap items-center justify-between gap-2\">\n                          <label\n                            htmlFor=\"grade-d\"\n                            className=\"text-foreground cursor-pointer text-xs font-semibold sm:text-sm\"\n                          >\n                            Grade D: Damaged / Defective\n                          </label>\n                          <Badge variant=\"destructive\" className=\"text-xs\">\n                            Quarantine RTV\n                          </Badge>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs leading-relaxed\">\n                          Torn fabric, broken seam, outsole separation, or manufacturing defect.\n                        </p>\n                        <div className=\"text-muted-foreground flex items-center gap-1.5 pt-1 text-xs\">\n                          <ArrowRight className=\"text-primary size-3\" />\n                          <span>\n                            Target:{' '}\n                            <strong className=\"text-foreground font-medium\">\n                              Quarantine Bay Q-08 / Return to Vendor (RTV)\n                            </strong>\n                          </span>\n                        </div>\n                      </div>\n                    </div>\n                  </RadioGroup>\n                </CardContent>\n              </Card>\n\n              {/* 3. Physical Inspection Checklist */}\n              <Card className=\"border-border shadow-xs\">\n                <CardHeader className=\"pb-3\">\n                  <div className=\"flex items-center justify-between\">\n                    <div className=\"space-y-0.5\">\n                      <CardTitle className=\"text-sm font-semibold\">Physical Inspection Checklist</CardTitle>\n                      <CardDescription className=\"text-xs\">\n                        Verify all physical criteria before approving final warehouse putaway.\n                      </CardDescription>\n                    </div>\n                    <div className=\"flex flex-wrap items-center gap-2\">\n                      <Badge variant=\"secondary\" className=\"font-mono text-xs\">\n                        {checkedChecklistCount}/{totalChecklistCount} Passed\n                      </Badge>\n                      <Button\n                        type=\"button\"\n                        variant=\"ghost\"\n                        size=\"sm\"\n                        className=\"text-muted-foreground hover:text-foreground h-7 text-xs\"\n                        onClick={() => selectAllChecklist(!allChecksPassed)}\n                      >\n                        {allChecksPassed ? 'Uncheck All' : 'Pass All'}\n                      </Button>\n                    </div>\n                  </div>\n                </CardHeader>\n\n                <CardContent className=\"space-y-2.5\">\n                  {/* Item 1: Tags Attached */}\n                  <div\n                    className={cn(\n                      'flex items-start gap-3 rounded-lg border p-3 transition-colors',\n                      checklist.tagsAttached ? 'border-border bg-card' : 'border-warning/30 bg-warning/5',\n                    )}\n                  >\n                    <Checkbox\n                      id=\"chk-tags\"\n                      checked={checklist.tagsAttached}\n                      onCheckedChange={(val) => setChecklist((prev) => ({ ...prev, tagsAttached: Boolean(val) }))}\n                      className=\"mt-0.5\"\n                    />\n                    <div className=\"flex-1 space-y-0.5\">\n                      <label\n                        htmlFor=\"chk-tags\"\n                        className=\"text-foreground cursor-pointer text-xs font-semibold select-none\"\n                      >\n                        Tags attached\n                      </label>\n                      <p className=\"text-muted-foreground text-xs\">\n                        Factory hangtags, barcode UPC stickers, and care labels intact.\n                      </p>\n                    </div>\n                  </div>\n\n                  {/* Item 2: Original Box Present */}\n                  <div\n                    className={cn(\n                      'flex items-start gap-3 rounded-lg border p-3 transition-colors',\n                      checklist.originalBox ? 'border-border bg-card' : 'border-warning/30 bg-warning/5',\n                    )}\n                  >\n                    <Checkbox\n                      id=\"chk-box\"\n                      checked={checklist.originalBox}\n                      onCheckedChange={(val) => setChecklist((prev) => ({ ...prev, originalBox: Boolean(val) }))}\n                      className=\"mt-0.5\"\n                    />\n                    <div className=\"flex-1 space-y-0.5\">\n                      <label\n                        htmlFor=\"chk-box\"\n                        className=\"text-foreground cursor-pointer text-xs font-semibold select-none\"\n                      >\n                        Original box present\n                      </label>\n                      <p className=\"text-muted-foreground text-xs\">\n                        Manufacturer shoebox present with readable SKU and size label.\n                      </p>\n                    </div>\n                  </div>\n\n                  {/* Item 3: Accessories in Box */}\n                  <div\n                    className={cn(\n                      'flex items-start gap-3 rounded-lg border p-3 transition-colors',\n                      checklist.allAccessories ? 'border-border bg-card' : 'border-warning/30 bg-warning/5',\n                    )}\n                  >\n                    <Checkbox\n                      id=\"chk-acc\"\n                      checked={checklist.allAccessories}\n                      onCheckedChange={(val) => setChecklist((prev) => ({ ...prev, allAccessories: Boolean(val) }))}\n                      className=\"mt-0.5\"\n                    />\n                    <div className=\"flex-1 space-y-0.5\">\n                      <label\n                        htmlFor=\"chk-acc\"\n                        className=\"text-foreground cursor-pointer text-xs font-semibold select-none\"\n                      >\n                        All accessories in box\n                      </label>\n                      <p className=\"text-muted-foreground text-xs\">\n                        Extra pair of laces, dust bag, and product manual verified.\n                      </p>\n                    </div>\n                  </div>\n\n                  {/* Item 4: Odor and Stain Free */}\n                  <div\n                    className={cn(\n                      'flex items-start gap-3 rounded-lg border p-3 transition-colors',\n                      checklist.odorStainFree ? 'border-border bg-card' : 'border-warning/30 bg-warning/5',\n                    )}\n                  >\n                    <Checkbox\n                      id=\"chk-odor\"\n                      checked={checklist.odorStainFree}\n                      onCheckedChange={(val) => setChecklist((prev) => ({ ...prev, odorStainFree: Boolean(val) }))}\n                      className=\"mt-0.5\"\n                    />\n                    <div className=\"flex-1 space-y-0.5\">\n                      <label\n                        htmlFor=\"chk-odor\"\n                        className=\"text-foreground cursor-pointer text-xs font-semibold select-none\"\n                      >\n                        Odor & stain free\n                      </label>\n                      <p className=\"text-muted-foreground text-xs\">\n                        Free from perfume scent, tobacco smoke, pet hair, dirt, or cosmetic scuffs.\n                      </p>\n                    </div>\n                  </div>\n                </CardContent>\n              </Card>\n            </div>\n\n            {/* RIGHT COLUMN: Disposition & Customer Refund Action Card (5 Cols) */}\n            <div className=\"space-y-6 lg:col-span-5\">\n              {/* 1. Selected Automated Warehouse Disposition Card */}\n              <Card className=\"border-border overflow-hidden shadow-xs\">\n                <CardHeader className=\"bg-muted/15 border-border border-b pb-3\">\n                  <div className=\"flex items-center justify-between\">\n                    <div className=\"flex flex-wrap items-center gap-2\">\n                      <Warehouse className=\"text-primary size-4\" />\n                      <CardTitle className=\"text-sm font-semibold\">Warehouse Routing Outcome</CardTitle>\n                    </div>\n                    <Badge className={currentGrade.badgeClasses}>{currentGrade.code}</Badge>\n                  </div>\n                </CardHeader>\n\n                <CardContent className=\"space-y-4 p-4\">\n                  {/* Active Outcome Card Banner */}\n                  <div className={cn('rounded-lg border p-4 transition-colors', currentGrade.activeBorderBg)}>\n                    <div className=\"flex items-start gap-3\">\n                      <div className=\"border-border bg-background/80 text-foreground flex size-9 shrink-0 items-center justify-center rounded-md border\">\n                        <Box className=\"text-primary size-5\" />\n                      </div>\n                      <div className=\"min-w-0 flex-1 space-y-1\">\n                        <div className=\"flex flex-wrap items-center gap-2\">\n                          <span className=\"text-foreground text-xs font-bold sm:text-sm\">{currentGrade.route}</span>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs\">\n                          Destination Bin:{' '}\n                          <strong className=\"text-foreground font-mono font-semibold\">{currentGrade.targetBin}</strong>\n                        </p>\n                        <p className=\"text-muted-foreground text-xs\">\n                          Priority: <span className=\"text-foreground font-medium\">{currentGrade.priority}</span>\n                        </p>\n                      </div>\n                    </div>\n\n                    <div className=\"border-border/60 mt-3.5 flex items-center justify-between border-t pt-3 text-xs\">\n                      <span className=\"text-muted-foreground font-mono\">LPN: {currentGrade.lpnCode}</span>\n                      <Badge variant=\"outline\" className=\"font-mono text-xs\">\n                        READY FOR SCAN\n                      </Badge>\n                    </div>\n                  </div>\n                </CardContent>\n              </Card>\n\n              {/* 2. Customer Refund Action Card */}\n              <Card className=\"border-border shadow-xs\">\n                <CardHeader className=\"pb-3\">\n                  <div className=\"flex items-center justify-between\">\n                    <div className=\"space-y-0.5\">\n                      <CardTitle className=\"text-sm font-semibold\">Customer Refund Action</CardTitle>\n                      <CardDescription className=\"text-xs\">\n                        Choose financial settlement for RMA {rmaNumber}.\n                      </CardDescription>\n                    </div>\n                    <CreditCard className=\"text-muted-foreground size-4\" />\n                  </div>\n                </CardHeader>\n\n                <CardContent className=\"space-y-4\">\n                  <RadioGroup\n                    value={selectedRefundAction}\n                    onValueChange={(val) => setSelectedRefundAction(val as RefundAction)}\n                    className=\"grid grid-cols-1 gap-2.5\"\n                  >\n                    {/* Option 1: Full Refund */}\n                    <div\n                      className={cn(\n                        'flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors select-none',\n                        selectedRefundAction === 'full-refund'\n                          ? 'border-primary bg-primary/[0.03] dark:bg-primary/10 shadow-xs'\n                          : 'border-border bg-card hover:bg-muted/30',\n                      )}\n                      onClick={() => setSelectedRefundAction('full-refund')}\n                    >\n                      <RadioGroupItem id=\"ref-full\" value=\"full-refund\" className=\"mt-0.5\" />\n                      <div className=\"flex-1 space-y-0.5\">\n                        <div className=\"flex items-center justify-between\">\n                          <label htmlFor=\"ref-full\" className=\"text-foreground cursor-pointer text-xs font-semibold\">\n                            Authorize Full Refund\n                          </label>\n                          <span className=\"text-foreground text-xs font-semibold tabular-nums\">\n                            {formatCurrency(itemData.msrp)}\n                          </span>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs\">\n                          100% refund to <span className=\"text-foreground font-medium\">Visa •••• 4242</span>. 3–5\n                          business days.\n                        </p>\n                      </div>\n                    </div>\n\n                    {/* Option 2: Store Credit (+10% Bonus) */}\n                    <div\n                      className={cn(\n                        'flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors select-none',\n                        selectedRefundAction === 'store-credit'\n                          ? 'border-success/50 bg-success/5 ring-success/20 dark:bg-success/10 shadow-xs ring-1'\n                          : 'border-border bg-card hover:bg-muted/30',\n                      )}\n                      onClick={() => setSelectedRefundAction('store-credit')}\n                    >\n                      <RadioGroupItem id=\"ref-credit\" value=\"store-credit\" className=\"mt-0.5\" />\n                      <div className=\"flex-1 space-y-0.5\">\n                        <div className=\"flex items-center justify-between\">\n                          <div className=\"flex items-center gap-1.5\">\n                            <Gift className=\"text-success size-3\" />\n                            <label\n                              htmlFor=\"ref-credit\"\n                              className=\"text-foreground cursor-pointer text-xs font-semibold\"\n                            >\n                              Issue Store Credit (+10%)\n                            </label>\n                          </div>\n                          <span className=\"text-success text-success text-xs font-semibold tabular-nums\">\n                            {formatCurrency(itemData.msrp * 1.1)}\n                          </span>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs\">\n                          Includes{' '}\n                          <span className=\"text-foreground font-medium\">+{formatCurrency(itemData.msrp * 0.1)}</span>{' '}\n                          bonus credit. Delivered instantly by email.\n                        </p>\n                      </div>\n                    </div>\n\n                    {/* Option 3: Charge Restocking Fee */}\n                    <div\n                      className={cn(\n                        'flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors select-none',\n                        selectedRefundAction === 'restock-fee'\n                          ? 'border-primary bg-primary/[0.03] dark:bg-primary/10 shadow-xs'\n                          : 'border-border bg-card hover:bg-muted/30',\n                      )}\n                      onClick={() => setSelectedRefundAction('restock-fee')}\n                    >\n                      <RadioGroupItem id=\"ref-fee\" value=\"restock-fee\" className=\"mt-0.5\" />\n                      <div className=\"flex-1 space-y-0.5\">\n                        <div className=\"flex items-center justify-between\">\n                          <label htmlFor=\"ref-fee\" className=\"text-foreground cursor-pointer text-xs font-semibold\">\n                            Charge Restocking Fee (-$15)\n                          </label>\n                          <span className=\"text-foreground text-xs font-semibold tabular-nums\">\n                            {formatCurrency(itemData.msrp - 15)}\n                          </span>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs\">\n                          $15.00 repackaging & inspection deduction. Net to{' '}\n                          <span className=\"text-foreground font-medium\">Visa •••• 4242</span>.\n                        </p>\n                      </div>\n                    </div>\n                  </RadioGroup>\n\n                  {/* Settlement Calculation Summary Box */}\n                  <div className=\"border-border bg-muted/30 space-y-1.5 rounded-lg border p-3 text-xs\">\n                    <div className=\"text-muted-foreground flex items-center justify-between\">\n                      <span>Item MSRP</span>\n                      <span className=\"text-foreground font-mono font-medium\">\n                        {formatCurrency(refundCalculations.subtotal)}\n                      </span>\n                    </div>\n                    {selectedRefundAction === 'store-credit' ? (\n                      <div className=\"text-success flex items-center justify-between\">\n                        <span>{refundCalculations.adjustmentLabel}</span>\n                        <span className=\"font-mono font-medium\">\n                          +{formatCurrency(refundCalculations.adjustmentAmount)}\n                        </span>\n                      </div>\n                    ) : selectedRefundAction === 'restock-fee' ? (\n                      <div className=\"text-destructive flex items-center justify-between\">\n                        <span>{refundCalculations.adjustmentLabel}</span>\n                        <span className=\"font-mono font-medium\">\n                          -{formatCurrency(refundCalculations.adjustmentAmount)}\n                        </span>\n                      </div>\n                    ) : null}\n                    <div className=\"border-border text-foreground flex items-center justify-between border-t pt-1.5 font-bold\">\n                      <span>Authorized Net Settlement</span>\n                      <span\n                        className={cn(\n                          'font-mono text-sm font-bold tabular-nums',\n                          selectedRefundAction === 'store-credit' && 'text-success',\n                        )}\n                      >\n                        {formatCurrency(refundCalculations.totalRefund)}\n                      </span>\n                    </div>\n                  </div>\n                </CardContent>\n              </Card>\n\n              {/* 3. Internal QC Inspection Notes */}\n              <Card className=\"border-border shadow-xs\">\n                <CardHeader className=\"pb-3\">\n                  <div className=\"flex items-center justify-between\">\n                    <div className=\"space-y-0.5\">\n                      <CardTitle className=\"text-sm font-semibold\">Internal QC Inspection Notes</CardTitle>\n                      <CardDescription className=\"text-xs\">\n                        Station audit log appended to inventory history.\n                      </CardDescription>\n                    </div>\n                  </div>\n                </CardHeader>\n\n                <CardContent className=\"space-y-3\">\n                  <Textarea\n                    value={qcNotes}\n                    onValueChange={setQcNotes}\n                    rows={3}\n                    placeholder=\"Enter internal inspection notes, physical defect description, or warehouse packaging details...\"\n                    className=\"text-xs\"\n                  />\n\n                  {/* Quick Tag Helpers */}\n                  <div className=\"space-y-1.5\">\n                    <span className=\"text-muted-foreground block text-xs font-medium\">Quick Preset Tags:</span>\n                    <div className=\"flex flex-wrap gap-1.5\">\n                      <button\n                        type=\"button\"\n                        className=\"border-border bg-muted/40 hover:bg-muted text-muted-foreground hover:text-foreground min-h-6 cursor-pointer rounded-md border px-2 py-0.5 text-xs transition-colors\"\n                        onClick={() => applyPresetNote('Pristine unworn condition.')}\n                      >\n                        + Pristine Condition\n                      </button>\n                      <button\n                        type=\"button\"\n                        className=\"border-border bg-muted/40 hover:bg-muted text-muted-foreground hover:text-foreground min-h-6 cursor-pointer rounded-md border px-2 py-0.5 text-xs transition-colors\"\n                        onClick={() => applyPresetNote('Minor outer box scuff; shoes mint.')}\n                      >\n                        + Box Scuffed\n                      </button>\n                      <button\n                        type=\"button\"\n                        className=\"border-border bg-muted/40 hover:bg-muted text-muted-foreground hover:text-foreground min-h-6 cursor-pointer rounded-md border px-2 py-0.5 text-xs transition-colors\"\n                        onClick={() => applyPresetNote('Slight sole friction detected.')}\n                      >\n                        + Sole Friction\n                      </button>\n                      <button\n                        type=\"button\"\n                        className=\"border-border bg-muted/40 hover:bg-muted text-muted-foreground hover:text-foreground min-h-6 cursor-pointer rounded-md border px-2 py-0.5 text-xs transition-colors\"\n                        onClick={() => applyPresetNote('Factory seam defect identified - Flagged RTV.')}\n                      >\n                        + Flagged RTV\n                      </button>\n                    </div>\n                  </div>\n                </CardContent>\n\n                <CardFooter className=\"border-border bg-muted/15 flex items-center justify-between border-t p-4\">\n                  <span className=\"text-muted-foreground text-xs\">\n                    Audit sign-off: <strong className=\"text-foreground font-medium\">{inspectorName}</strong>\n                  </span>\n                  <Button size=\"sm\" className=\"gap-1.5 text-xs font-semibold\" onClick={handleCompleteInspection}>\n                    <FileCheck className=\"size-3.5\" />\n                    Complete Inspection\n                  </Button>\n                </CardFooter>\n              </Card>\n            </div>\n          </div>\n        </div>\n      )}\n    </div>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/ReturnMerchandiseInspection.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/card.json",
    "https://uipkge.dev/r/react/checkbox.json",
    "https://uipkge.dev/r/react/radio-group.json",
    "https://uipkge.dev/r/react/separator.json",
    "https://uipkge.dev/r/react/textarea.json"
  ],
  "description": "Warehouse returns intake inspection station, RMA condition grading, and restock vs quarantine disposition workbench.",
  "categories": [
    "logistics",
    "ecommerce",
    "app"
  ]
}