{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "commute-reimbursement-claims",
  "title": "Commute Reimbursement Claims",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/commute-reimbursement-claims/CommuteReimbursementClaims.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  Building2,\n  Calendar,\n  Car,\n  Check,\n  CheckCircle2,\n  Clock,\n  DollarSign,\n  Download,\n  Eye,\n  FileCheck,\n  FileText,\n  Paperclip,\n  Plus,\n  Receipt,\n  RotateCcw,\n  Search,\n  Send,\n  ShieldCheck,\n  Train,\n  TrendingUp,\n  Upload,\n  Wallet,\n  X,\n  Zap,\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 {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu'\nimport { Input } from '@/components/ui/input'\nimport { Progress } from '@/components/ui/progress'\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'\nimport { Separator } from '@/components/ui/separator'\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'\n\nexport type CommuteCategory = 'transit' | 'parking' | 'mileage' | 'ev_charging'\nexport type ClaimStatus = 'reimbursed' | 'pending'\n\nexport interface ExpenseClaim {\n  id: string\n  date: string\n  category: CommuteCategory\n  categoryLabel: string\n  description: string\n  provider: string\n  amount: number\n  status: ClaimStatus\n  statusLabel: string\n  receiptFileName: string\n  receiptFileSize: string\n  receiptDate: string\n  notes: string\n}\n\nexport interface CommuteReimbursementClaimsProps {\n  title?: string\n  policyText?: string\n  claimPeriod?: string\n  className?: string\n}\n\nconst categoryMeta: Record<\n  CommuteCategory,\n  {\n    label: string\n    shortLabel: string\n    badgeClass: string\n    icon: React.ComponentType<{ className?: string }>\n    irsLimitInfo: string\n  }\n> = {\n  transit: {\n    label: 'Public Transit Pass: BART/Metro',\n    shortLabel: 'Public Transit',\n    badgeClass: 'bg-info/10 text-info border-info/20',\n    icon: Train,\n    irsLimitInfo: 'BART, Caltrain, Metro, Subway & Commuter Bus passes (IRC § 132(f))',\n  },\n  parking: {\n    label: 'Parking (Station & Garage)',\n    shortLabel: 'Parking',\n    badgeClass: 'bg-chart-1/10 text-chart-1 border-chart-1/20',\n    icon: Building2,\n    irsLimitInfo: 'Park-and-ride commuter lots and near-office parking facilities',\n  },\n  mileage: {\n    label: 'Mileage (IRS $0.67/mi)',\n    shortLabel: 'Mileage',\n    badgeClass: 'bg-warning/10 text-warning border-warning/20',\n    icon: Car,\n    irsLimitInfo: '2026 IRS standard rate: $0.67 per business/commuter detour mile',\n  },\n  ev_charging: {\n    label: 'EV Public Charging',\n    shortLabel: 'EV Charging',\n    badgeClass: 'bg-chart-2/10 text-chart-2 border-chart-2/20',\n    icon: Zap,\n    irsLimitInfo: 'Level 2 & DC fast charging at public networks & workplace chargers',\n  },\n}\n\nconst statusStyles: Record<ClaimStatus, string> = {\n  reimbursed: 'bg-success/10 text-success border-success/20',\n  pending: 'bg-warning/10 text-warning border-warning/20',\n}\n\nconst statusDots: Record<ClaimStatus, string> = {\n  reimbursed: 'bg-success',\n  pending: 'bg-warning',\n}\n\nconst initialClaimsData: ExpenseClaim[] = [\n  {\n    id: 'CLM-8041',\n    date: 'Aug 18, 2026',\n    category: 'transit',\n    categoryLabel: 'Public Transit',\n    description: 'Monthly BART Clipper Card Pass',\n    provider: 'Bay Area Rapid Transit (BART)',\n    amount: 120.0,\n    status: 'reimbursed',\n    statusLabel: 'Reimbursed on Payroll',\n    receiptFileName: 'bart-clipper-pass-aug2026.pdf',\n    receiptFileSize: '340 KB',\n    receiptDate: 'Aug 18, 2026 · 08:14 AM',\n    notes: 'Monthly pass reload for Embarcadero ↔ Millbrae commuter route.',\n  },\n  {\n    id: 'CLM-7982',\n    date: 'Aug 12, 2026',\n    category: 'transit',\n    categoryLabel: 'Public Transit',\n    description: 'San Francisco Caltrain Monthly Pass',\n    provider: 'Caltrain Peninsula Corridor',\n    amount: 60.5,\n    status: 'reimbursed',\n    statusLabel: 'Reimbursed on Payroll',\n    receiptFileName: 'caltrain-zone1-3-pass.pdf',\n    receiptFileSize: '412 KB',\n    receiptDate: 'Aug 12, 2026 · 07:45 AM',\n    notes: 'Zone 1 to Zone 3 Caltrain commuter pass for headquarters travel.',\n  },\n  {\n    id: 'CLM-8104',\n    date: 'Aug 08, 2026',\n    category: 'parking',\n    categoryLabel: 'Parking',\n    description: 'Downtown Parking Garage',\n    provider: 'SOMA Park Management Corp.',\n    amount: 65.0,\n    status: 'pending',\n    statusLabel: 'Pending Approval',\n    receiptFileName: 'soma-garage-monthly-receipt.pdf',\n    receiptFileSize: '185 KB',\n    receiptDate: 'Aug 08, 2026 · 09:30 AM',\n    notes: 'Commuter parking space #204 during quarterly planning week.',\n  },\n  {\n    id: 'CLM-7729',\n    date: 'Aug 03, 2026',\n    category: 'ev_charging',\n    categoryLabel: 'EV Charging',\n    description: 'EV Supercharger Network',\n    provider: 'EVgo / ChargePoint Public Hub',\n    amount: 42.0,\n    status: 'reimbursed',\n    statusLabel: 'Reimbursed on Payroll',\n    receiptFileName: 'evgo-charge-sessions-aug.pdf',\n    receiptFileSize: '520 KB',\n    receiptDate: 'Aug 03, 2026 · 06:20 PM',\n    notes: '4x workplace Level-2 charge sessions during sprint week.',\n  },\n]\n\nexport function CommuteReimbursementClaims({\n  title = 'Commute & Transit Expense Claims',\n  policyText = 'Monthly Commuter Benefit Program · Up to $315.00/mo IRS pre-tax limit',\n  claimPeriod = 'August 2026',\n  className,\n}: CommuteReimbursementClaimsProps) {\n  const [claims, setClaims] = React.useState<ExpenseClaim[]>(initialClaimsData)\n\n  // Form State\n  const [formCategory, setFormCategory] = React.useState<CommuteCategory>('transit')\n  const [formDate, setFormDate] = React.useState('2026-08-20')\n  const [formProvider, setFormProvider] = React.useState('BART Clipper Card')\n  const [formDescription, setFormDescription] = React.useState('Monthly BART Clipper Card Pass')\n  const [formAmount, setFormAmount] = React.useState('120.00')\n  const [formMiles, setFormMiles] = React.useState('45')\n  const [formAttachedReceipt, setFormAttachedReceipt] = React.useState<{ name: string; size: string } | null>({\n    name: 'clipper-reload-receipt.pdf',\n    size: '240 KB',\n  })\n  const [formSubmittedNotice, setFormSubmittedNotice] = React.useState(false)\n  const [recentlySubmittedClaimId, setRecentlySubmittedClaimId] = React.useState('')\n\n  // Filter State\n  const [searchQuery, setSearchQuery] = React.useState('')\n  const [categoryFilter, setCategoryFilter] = React.useState('all')\n  const [statusFilter, setStatusFilter] = React.useState('all')\n\n  // Receipt Modal State\n  const [isReceiptModalOpen, setIsReceiptModalOpen] = React.useState(false)\n  const [selectedClaim, setSelectedClaim] = React.useState<ExpenseClaim>(initialClaimsData[0])\n\n  const openReceipt = (claim: ExpenseClaim) => {\n    setSelectedClaim(claim)\n    setIsReceiptModalOpen(true)\n  }\n\n  const handleCategoryChange = (val: CommuteCategory) => {\n    setFormCategory(val)\n    if (val === 'transit') {\n      setFormProvider('BART Clipper Card')\n      setFormDescription('Monthly BART Clipper Card Pass')\n      setFormAmount('120.00')\n    } else if (val === 'parking') {\n      setFormProvider('Downtown Station Garage')\n      setFormDescription('Monthly Station Parking Permit')\n      setFormAmount('65.00')\n    } else if (val === 'mileage') {\n      setFormProvider('Personal Vehicle (IRS Standard Rate)')\n      setFormDescription('Commute detour travel to client site')\n      const miles = parseFloat(formMiles) || 0\n      setFormAmount((miles * 0.67).toFixed(2))\n    } else if (val === 'ev_charging') {\n      setFormProvider('EVgo Fast Charging')\n      setFormDescription('Workplace EV public charging sessions')\n      setFormAmount('42.00')\n    }\n  }\n\n  const handleMilesChange = (val: string) => {\n    setFormMiles(val)\n    const miles = parseFloat(val) || 0\n    setFormAmount((miles * 0.67).toFixed(2))\n  }\n\n  const handleAttachSampleReceipt = () => {\n    setFormAttachedReceipt({\n      name: `receipt-${formCategory}-${Date.now().toString().slice(-4)}.pdf`,\n      size: '318 KB',\n    })\n  }\n\n  const handleRemoveReceipt = () => {\n    setFormAttachedReceipt(null)\n  }\n\n  const handleSubmitClaim = () => {\n    const parsedAmt = parseFloat(formAmount) || 0\n    if (parsedAmt <= 0) return\n\n    const meta = categoryMeta[formCategory]\n    const newId = `CLM-${Math.floor(8200 + Math.random() * 700)}`\n    const newClaim: ExpenseClaim = {\n      id: newId,\n      date: 'Aug 21, 2026',\n      category: formCategory,\n      categoryLabel: meta.shortLabel,\n      description: formDescription || meta.label,\n      provider: formProvider || 'Transit Provider',\n      amount: parsedAmt,\n      status: 'pending',\n      statusLabel: 'Pending Approval',\n      receiptFileName: formAttachedReceipt?.name || 'commute-claim-receipt.pdf',\n      receiptFileSize: formAttachedReceipt?.size || '290 KB',\n      receiptDate: 'Aug 21, 2026 · Just now',\n      notes: `Submitted via Commuter Benefit Portal for ${claimPeriod}.`,\n    }\n\n    setClaims((prev) => [newClaim, ...prev])\n    setRecentlySubmittedClaimId(newId)\n    setFormSubmittedNotice(true)\n\n    setTimeout(() => {\n      setFormSubmittedNotice(false)\n    }, 6000)\n  }\n\n  const handleResetForm = () => {\n    setFormCategory('transit')\n    setFormDate('2026-08-20')\n    setFormProvider('BART Clipper Card')\n    setFormDescription('Monthly BART Clipper Card Pass')\n    setFormAmount('120.00')\n    setFormMiles('45')\n    setFormAttachedReceipt({\n      name: 'clipper-reload-receipt.pdf',\n      size: '240 KB',\n    })\n    setFormSubmittedNotice(false)\n  }\n\n  const isFiltered = searchQuery.trim() !== '' || categoryFilter !== 'all' || statusFilter !== 'all'\n\n  const filteredClaims = React.useMemo(() => {\n    const q = searchQuery.trim().toLowerCase()\n    return claims.filter((claim) => {\n      const matchCat = categoryFilter === 'all' || claim.category === categoryFilter\n      const matchStatus = statusFilter === 'all' || claim.status === statusFilter\n      const matchQuery =\n        !q ||\n        claim.id.toLowerCase().includes(q) ||\n        claim.description.toLowerCase().includes(q) ||\n        claim.provider.toLowerCase().includes(q) ||\n        claim.categoryLabel.toLowerCase().includes(q)\n      return matchCat && matchStatus && matchQuery\n    })\n  }, [claims, searchQuery, categoryFilter, statusFilter])\n\n  const resetFilters = () => {\n    setSearchQuery('')\n    setCategoryFilter('all')\n    setStatusFilter('all')\n  }\n\n  const scrollToSubmitForm = () => {\n    const el = document.getElementById('commute-submit-form')\n    if (el) {\n      el.scrollIntoView({ behavior: 'smooth', block: 'start' })\n    }\n  }\n\n  const selectedCategoryMeta = categoryMeta[selectedClaim.category]\n  const SelectedCategoryIcon = selectedCategoryMeta?.icon || Train\n\n  return (\n    <div data-slot=\"commute-reimbursement-claims\" className={cn('w-full space-y-6', className)}>\n      {/* Header */}\n      <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n        <div className=\"space-y-1\">\n          <div className=\"flex flex-wrap items-center gap-2.5\">\n            <h2 className=\"text-foreground text-2xl font-bold tracking-tight sm:text-3xl\">{title}</h2>\n            <Badge wrap variant=\"outline\" className=\"border-info/30 bg-info/10 text-info text-xs font-medium\">\n              <Calendar className=\"mr-1 size-3\" aria-hidden=\"true\" />\n              {claimPeriod}\n            </Badge>\n          </div>\n          <p className=\"text-muted-foreground text-sm\">{policyText}</p>\n        </div>\n\n        <div className=\"flex flex-wrap items-center gap-2.5\">\n          <Button aria-label=\"Download attachment\" variant=\"outline\" size=\"sm\" className=\"shadow-xs\">\n            <Download className=\"size-4\" aria-hidden=\"true\" />\n            Export Statement\n          </Button>\n          <Button size=\"sm\" className=\"shadow-xs\" onClick={scrollToSubmitForm}>\n            <Plus className=\"size-4\" aria-hidden=\"true\" />\n            Submit New Claim\n          </Button>\n        </div>\n      </div>\n\n      {/* 4 Monthly Benefit Metric Cards */}\n      <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n        {/* 1. Monthly Allowance Available */}\n        <Card className=\"border-border shadow-xs\">\n          <CardContent className=\"space-y-2 p-5\">\n            <div className=\"flex items-center justify-between\">\n              <p className=\"text-muted-foreground text-sm font-medium\">Monthly Allowance</p>\n              <div className=\"bg-primary/10 text-primary flex size-8 items-center justify-center rounded-lg\">\n                <Wallet className=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n            <p className=\"text-foreground text-2xl font-bold tracking-tight tabular-nums\">$315.00 / mo</p>\n            <div className=\"text-muted-foreground flex items-center justify-between text-xs\">\n              <span>IRS Pre-tax limit</span>\n              <span className=\"text-foreground font-medium tabular-nums\">$69.50 left</span>\n            </div>\n          </CardContent>\n        </Card>\n\n        {/* 2. Claimed This Month */}\n        <Card className=\"border-border shadow-xs\">\n          <CardContent className=\"space-y-2 p-5\">\n            <div className=\"flex items-center justify-between\">\n              <p className=\"text-muted-foreground text-sm font-medium\">Claimed This Month</p>\n              <div className=\"bg-info/10 text-info flex size-8 items-center justify-center rounded-lg\">\n                <TrendingUp className=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n            <p className=\"text-foreground text-2xl font-bold tracking-tight tabular-nums\">$245.50</p>\n            <div className=\"space-y-1.5 pt-0.5\">\n              <Progress value={78} className=\"h-1.5\" />\n              <p className=\"text-muted-foreground text-xs tabular-nums\">$245.50 / $315.00 · 78% utilized</p>\n            </div>\n          </CardContent>\n        </Card>\n\n        {/* 3. Reimbursed YTD */}\n        <Card className=\"border-border shadow-xs\">\n          <CardContent className=\"space-y-2 p-5\">\n            <div className=\"flex items-center justify-between\">\n              <p className=\"text-muted-foreground text-sm font-medium\">Reimbursed YTD</p>\n              <div className=\"bg-success/10 text-success flex size-8 items-center justify-center rounded-lg\">\n                <CheckCircle2 className=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n            <p className=\"text-foreground text-2xl font-bold tracking-tight tabular-nums\">$1,890.00</p>\n            <div className=\"text-muted-foreground flex items-center gap-1.5 text-xs\">\n              <span className=\"text-success inline-flex items-center font-medium\">\n                <ShieldCheck className=\"mr-1 size-3.5\" aria-hidden=\"true\" />\n                100% Settled\n              </span>\n              <span>· 6 claims in 2026</span>\n            </div>\n          </CardContent>\n        </Card>\n\n        {/* 4. Pending Review */}\n        <Card className=\"border-border shadow-xs\">\n          <CardContent className=\"space-y-2 p-5\">\n            <div className=\"flex items-center justify-between\">\n              <p className=\"text-muted-foreground text-sm font-medium\">Pending Review</p>\n              <div className=\"bg-warning/10 text-warning flex size-8 items-center justify-center rounded-lg\">\n                <Clock className=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n            <p className=\"text-foreground text-warning text-warning text-2xl font-bold tracking-tight tabular-nums\">\n              1 Claim · $65.00\n            </p>\n            <p className=\"text-muted-foreground text-xs\">Est. payout on Sep 1st payroll</p>\n          </CardContent>\n        </Card>\n      </div>\n\n      {/* Main 2-Column Portal Section */}\n      <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-12\">\n        {/* Left Column: Submit Claim Interactive Card & Policy Card */}\n        <div className=\"space-y-6 lg:col-span-5\">\n          {/* Submit Claim Card */}\n          <Card id=\"commute-submit-form\" className=\"border-border shadow-xs\">\n            <CardHeader className=\"pb-3\">\n              <div className=\"flex items-center justify-between\">\n                <div>\n                  <CardTitle className=\"text-base font-semibold\">Submit Commute Claim</CardTitle>\n                  <CardDescription className=\"text-xs\">\n                    File transit pass, parking, mileage, or EV charging for monthly reimbursement.\n                  </CardDescription>\n                </div>\n                <Badge wrap variant=\"secondary\" className=\"text-xs font-medium\">\n                  {claimPeriod}\n                </Badge>\n              </div>\n            </CardHeader>\n\n            <CardContent className=\"space-y-4\">\n              {/* Submission Alert Notice */}\n              {formSubmittedNotice && (\n                <div className=\"border-success/30 bg-success/10 text-success dark:text-foreground flex items-start gap-2.5 rounded-lg border p-3\">\n                  <CheckCircle2 className=\"text-success mt-0.5 size-4 shrink-0\" />\n                  <div className=\"text-xs\">\n                    <p className=\"font-semibold\">Claim {recentlySubmittedClaimId} submitted successfully!</p>\n                    <p className=\"text-success/90 mt-0.5\">\n                      Itemized receipt received. Your claim has been added to pending payroll review.\n                    </p>\n                  </div>\n                </div>\n              )}\n\n              {/* Category Selector */}\n              <div className=\"space-y-1.5\">\n                <label htmlFor=\"commute-category-select\" className=\"text-foreground text-xs font-medium\">\n                  Expense Category <span className=\"text-destructive\">*</span>\n                </label>\n                <Select value={formCategory} onValueChange={(v) => handleCategoryChange(v as CommuteCategory)}>\n                  <SelectTrigger id=\"commute-category-select\" className=\"w-full text-xs\">\n                    <SelectValue placeholder=\"Select commute category\" />\n                  </SelectTrigger>\n                  <SelectContent>\n                    <SelectItem value=\"transit\">\n                      <span className=\"flex items-center gap-2\">\n                        <Train className=\"text-info size-3.5\" />\n                        <span>Public Transit Pass: BART/Metro</span>\n                      </span>\n                    </SelectItem>\n                    <SelectItem value=\"parking\">\n                      <span className=\"flex items-center gap-2\">\n                        <Building2 className=\"text-chart-1 size-3.5\" />\n                        <span>Parking (Station & Garage)</span>\n                      </span>\n                    </SelectItem>\n                    <SelectItem value=\"mileage\">\n                      <span className=\"flex items-center gap-2\">\n                        <Car className=\"text-warning size-3.5\" />\n                        <span>Mileage (IRS $0.67/mi)</span>\n                      </span>\n                    </SelectItem>\n                    <SelectItem value=\"ev_charging\">\n                      <span className=\"flex items-center gap-2\">\n                        <Zap className=\"text-success size-3.5\" />\n                        <span>EV Public Charging</span>\n                      </span>\n                    </SelectItem>\n                  </SelectContent>\n                </Select>\n                <p className=\"text-muted-foreground text-xs\">{categoryMeta[formCategory].irsLimitInfo}</p>\n              </div>\n\n              {/* Date & Provider */}\n              <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n                <div className=\"space-y-1.5\">\n                  <label htmlFor=\"commute-date-input\" className=\"text-foreground text-xs font-medium\">\n                    Date of Commute <span className=\"text-destructive\">*</span>\n                  </label>\n                  <Input\n                    id=\"commute-date-input\"\n                    value={formDate}\n                    onChange={(e) => setFormDate(e.target.value)}\n                    type=\"date\"\n                    className=\"h-9 text-xs\"\n                  />\n                </div>\n\n                <div className=\"space-y-1.5\">\n                  <label htmlFor=\"commute-provider-input\" className=\"text-foreground text-xs font-medium\">\n                    Provider / Authority <span className=\"text-destructive\">*</span>\n                  </label>\n                  <Input\n                    id=\"commute-provider-input\"\n                    value={formProvider}\n                    onChange={(e) => setFormProvider(e.target.value)}\n                    placeholder=\"e.g. BART, Caltrain, EVgo\"\n                    className=\"h-9 text-xs\"\n                  />\n                </div>\n              </div>\n\n              {/* Description */}\n              <div className=\"space-y-1.5\">\n                <label htmlFor=\"commute-desc-input\" className=\"text-foreground text-xs font-medium\">\n                  Claim Description & Route <span className=\"text-destructive\">*</span>\n                </label>\n                <Input\n                  id=\"commute-desc-input\"\n                  value={formDescription}\n                  onChange={(e) => setFormDescription(e.target.value)}\n                  placeholder=\"e.g. Monthly Clipper Pass · Embarcadero to Millbrae\"\n                  className=\"h-9 text-xs\"\n                />\n              </div>\n\n              {/* Mileage Calculation helper if mileage selected */}\n              {formCategory === 'mileage' && (\n                <div className=\"border-border bg-muted/30 space-y-2 rounded-lg border p-3\">\n                  <div className=\"flex items-center justify-between text-xs\">\n                    <span className=\"text-muted-foreground font-medium\">IRS Standard Mileage Rate</span>\n                    <Badge wrap variant=\"outline\" className=\"text-xs font-normal\">\n                      $0.67 / mile\n                    </Badge>\n                  </div>\n                  <div className=\"flex items-center gap-3\">\n                    <div className=\"flex-1\">\n                      <label htmlFor=\"commute-miles-input\" className=\"text-muted-foreground text-xs\">\n                        Total Miles Driven\n                      </label>\n                      <Input\n                        id=\"commute-miles-input\"\n                        value={formMiles}\n                        onChange={(e) => handleMilesChange(e.target.value)}\n                        type=\"number\"\n                        min=\"1\"\n                        step=\"1\"\n                        className=\"mt-1 h-8 text-xs tabular-nums\"\n                      />\n                    </div>\n                    <div className=\"flex-1 text-right\">\n                      <span className=\"text-muted-foreground text-xs\">Calculated Total</span>\n                      <p className=\"text-foreground text-base font-bold tabular-nums\">${formAmount}</p>\n                    </div>\n                  </div>\n                </div>\n              )}\n\n              {/* Claim Amount Input */}\n              <div className=\"space-y-1.5\">\n                <label htmlFor=\"commute-amount-input\" className=\"text-foreground text-xs font-medium\">\n                  Claim Amount (USD) <span className=\"text-destructive\">*</span>\n                </label>\n                <div className=\"relative\">\n                  <DollarSign className=\"text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-3.5 -translate-y-1/2\" />\n                  <Input\n                    id=\"commute-amount-input\"\n                    value={formAmount}\n                    onChange={(e) => setFormAmount(e.target.value)}\n                    type=\"text\"\n                    placeholder=\"0.00\"\n                    className=\"h-9 pl-8 text-xs font-semibold tabular-nums\"\n                  />\n                </div>\n                <div className=\"text-muted-foreground flex items-center justify-between text-xs\">\n                  <span>Maximum pre-tax monthly cap: $315.00</span>\n                  <span className=\"font-medium\">Direct Payroll Payout</span>\n                </div>\n              </div>\n\n              {/* Receipt Dropzone Placeholder */}\n              <div className=\"space-y-1.5\">\n                <label className=\"text-foreground text-xs font-medium\">\n                  Itemized Receipt Attachment <span className=\"text-destructive\">*</span>\n                </label>\n\n                {/* Attached file view */}\n                {formAttachedReceipt ? (\n                  <div className=\"border-border bg-muted/40 flex items-center justify-between gap-3 rounded-lg border p-3 text-xs\">\n                    <div className=\"flex min-w-0 items-center gap-2.5\">\n                      <div className=\"bg-primary/10 text-primary flex size-8 shrink-0 items-center justify-center rounded-md\">\n                        <FileText className=\"size-4\" />\n                      </div>\n                      <div className=\"min-w-0\">\n                        <p className=\"text-foreground truncate font-medium\">{formAttachedReceipt.name}</p>\n                        <p className=\"text-muted-foreground truncate\">\n                          {formAttachedReceipt.size} · Itemized proof attached\n                        </p>\n                      </div>\n                    </div>\n                    <div className=\"flex items-center gap-1.5\">\n                      <Badge wrap variant=\"outline\" className=\"border-success/30 bg-success/10 text-success text-xs\">\n                        <Check className=\"mr-1 size-3\" />\n                        Valid\n                      </Badge>\n                      <Button\n                        type=\"button\"\n                        variant=\"ghost\"\n                        size=\"icon-sm\"\n                        className=\"text-muted-foreground hover:text-foreground size-7\"\n                        onClick={handleRemoveReceipt}\n                      >\n                        <X className=\"size-3.5\" />\n                        <span className=\"sr-only\">Remove receipt</span>\n                      </Button>\n                    </div>\n                  </div>\n                ) : (\n                  /* Dropzone container */\n                  <button\n                    type=\"button\"\n                    className=\"border-border hover:bg-muted/40 hover:border-primary/50 focus-visible:ring-ring flex w-full flex-col items-center justify-center gap-1.5 rounded-lg border border-dashed p-4 text-center transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n                    onClick={handleAttachSampleReceipt}\n                  >\n                    <div className=\"bg-muted text-muted-foreground flex size-8 items-center justify-center rounded-full\">\n                      <Upload className=\"size-4\" />\n                    </div>\n                    <p className=\"text-foreground text-xs font-medium\">Click to upload or drag receipt file</p>\n                    <p className=\"text-muted-foreground text-xs\">\n                      PDF, PNG, or JPG up to 10MB (Itemized proof required)\n                    </p>\n                  </button>\n                )}\n              </div>\n            </CardContent>\n\n            <CardFooter className=\"border-border flex items-center justify-between border-t pt-4\">\n              <Button type=\"button\" variant=\"ghost\" size=\"sm\" className=\"text-xs\" onClick={handleResetForm}>\n                <RotateCcw className=\"mr-1.5 size-3.5\" />\n                Reset Form\n              </Button>\n              <Button\n                type=\"button\"\n                size=\"sm\"\n                className=\"gap-1.5 text-xs shadow-xs\"\n                disabled={!formAmount || parseFloat(formAmount) <= 0}\n                onClick={handleSubmitClaim}\n              >\n                <Send className=\"size-3.5\" />\n                Submit Claim\n              </Button>\n            </CardFooter>\n          </Card>\n\n          {/* Compliance & IRS Rules Notice Card */}\n          <Card className=\"border-border shadow-xs\">\n            <CardHeader className=\"pb-2\">\n              <div className=\"flex items-center gap-2\">\n                <ShieldCheck className=\"text-primary size-4\" />\n                <CardTitle className=\"text-sm font-semibold\">Commuter Benefit Program Policy</CardTitle>\n              </div>\n            </CardHeader>\n            <CardContent className=\"space-y-2.5 text-xs\">\n              <p className=\"text-muted-foreground leading-relaxed\">\n                Expenses are reimbursed under Section 132(f) Qualified Transportation Fringe Benefits. Reimbursements\n                are disbursed directly into employee payroll on the 1st of every month.\n              </p>\n              <div className=\"border-border/60 text-muted-foreground space-y-1.5 border-t pt-2\">\n                <div className=\"flex items-center gap-2\">\n                  <Check className=\"text-success size-3\" />\n                  <span>Monthly maximum pre-tax election: $315.00</span>\n                </div>\n                <div className=\"flex items-center gap-2\">\n                  <Check className=\"text-success size-3\" />\n                  <span>Receipts must reflect date, transit authority, and paid amount</span>\n                </div>\n                <div className=\"flex items-center gap-2\">\n                  <Check className=\"text-success size-3\" />\n                  <span>Deadline for current month submissions: 25th of month</span>\n                </div>\n              </div>\n            </CardContent>\n          </Card>\n        </div>\n\n        {/* Right Column: Expense Claims History Table */}\n        <div className=\"space-y-4 lg:col-span-7\">\n          <Card className=\"border-border shadow-xs\">\n            <CardHeader className=\"pb-3\">\n              <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n                <div>\n                  <CardTitle className=\"text-base font-semibold\">Expense Claims History</CardTitle>\n                  <CardDescription className=\"text-xs\">\n                    Itemized ledger of submitted commuter, transit, and EV expenses.\n                  </CardDescription>\n                </div>\n                <Badge wrap variant=\"outline\" className=\"text-xs tabular-nums\">\n                  {claims.length} Total Claims\n                </Badge>\n              </div>\n            </CardHeader>\n\n            <CardContent className=\"space-y-4\">\n              {/* Filter & Search Toolbar */}\n              <div className=\"border-border bg-muted/20 flex flex-col gap-2.5 rounded-lg border p-2.5 sm:flex-row sm:items-center sm:justify-between\">\n                <div className=\"relative flex-1 sm:max-w-xs\">\n                  <Search className=\"text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2\" />\n                  <Input\n                    value={searchQuery}\n                    onChange={(e) => setSearchQuery(e.target.value)}\n                    type=\"search\"\n                    placeholder=\"Search claims, ID, route...\"\n                    className=\"h-8 pl-8 text-xs\"\n                  />\n                </div>\n\n                <div className=\"flex flex-wrap items-center gap-2\">\n                  {/* Category Filter */}\n                  <Select value={categoryFilter} onValueChange={setCategoryFilter}>\n                    <SelectTrigger className=\"h-8 w-36 text-xs\">\n                      <SelectValue placeholder=\"All Categories\" />\n                    </SelectTrigger>\n                    <SelectContent>\n                      <SelectItem value=\"all\">All Categories</SelectItem>\n                      <SelectItem value=\"transit\">Public Transit</SelectItem>\n                      <SelectItem value=\"parking\">Parking</SelectItem>\n                      <SelectItem value=\"mileage\">Mileage</SelectItem>\n                      <SelectItem value=\"ev_charging\">EV Charging</SelectItem>\n                    </SelectContent>\n                  </Select>\n\n                  {/* Status Filter */}\n                  <Select value={statusFilter} onValueChange={setStatusFilter}>\n                    <SelectTrigger className=\"h-8 w-36 text-xs\">\n                      <SelectValue placeholder=\"All Statuses\" />\n                    </SelectTrigger>\n                    <SelectContent>\n                      <SelectItem value=\"all\">All Statuses</SelectItem>\n                      <SelectItem value=\"reimbursed\">Reimbursed</SelectItem>\n                      <SelectItem value=\"pending\">Pending</SelectItem>\n                    </SelectContent>\n                  </Select>\n\n                  {isFiltered && (\n                    <Button variant=\"ghost\" size=\"sm\" className=\"h-8 px-2 text-xs\" onClick={resetFilters}>\n                      <RotateCcw className=\"mr-1 size-3\" />\n                      Reset\n                    </Button>\n                  )}\n                </div>\n              </div>\n\n              {/* Table */}\n              <div className=\"border-border overflow-hidden rounded-lg border\">\n                <div className=\"overflow-x-auto\">\n                  <Table>\n                    <TableHeader className=\"bg-muted/40\">\n                      <TableRow>\n                        <TableHead className=\"min-w-[95px] text-xs\">Claim ID</TableHead>\n                        <TableHead className=\"min-w-[90px] text-xs\">Date</TableHead>\n                        <TableHead className=\"min-w-[110px] text-xs\">Category</TableHead>\n                        <TableHead className=\"min-w-[190px] text-xs\">Description & Provider</TableHead>\n                        <TableHead className=\"min-w-[90px] text-right text-xs\">Amount</TableHead>\n                        <TableHead className=\"min-w-[130px] text-xs\">Status</TableHead>\n                        <TableHead className=\"min-w-[80px] text-center text-xs\">Receipt</TableHead>\n                        <TableHead className=\"w-10 text-right text-xs\">\n                          <span className=\"sr-only\">Actions</span>\n                        </TableHead>\n                      </TableRow>\n                    </TableHeader>\n                    <TableBody>\n                      {filteredClaims.map((claim) => {\n                        const catMeta = categoryMeta[claim.category]\n                        const CatIcon = catMeta?.icon || Train\n                        return (\n                          <TableRow key={claim.id} className=\"hover:bg-muted/50 transition-colors\">\n                            {/* Claim ID */}\n                            <TableCell className=\"font-mono text-xs font-medium\">{claim.id}</TableCell>\n\n                            {/* Date */}\n                            <TableCell className=\"text-muted-foreground text-xs whitespace-nowrap tabular-nums\">\n                              {claim.date}\n                            </TableCell>\n\n                            {/* Category Badge */}\n                            <TableCell>\n                              <Badge wrap variant=\"outline\" className={cn('text-xs font-normal', catMeta?.badgeClass)}>\n                                <CatIcon className=\"mr-1 size-3\" />\n                                {claim.categoryLabel}\n                              </Badge>\n                            </TableCell>\n\n                            {/* Description & Provider */}\n                            <TableCell>\n                              <div className=\"min-w-0\">\n                                <p className=\"text-foreground truncate text-xs font-medium\">{claim.description}</p>\n                                <p className=\"text-muted-foreground truncate text-xs\">{claim.provider}</p>\n                              </div>\n                            </TableCell>\n\n                            {/* Amount */}\n                            <TableCell className=\"text-foreground text-right text-xs font-semibold whitespace-nowrap tabular-nums\">\n                              ${claim.amount.toFixed(2)}\n                            </TableCell>\n\n                            {/* Status Badge */}\n                            <TableCell>\n                              <Badge\n                                wrap\n                                variant=\"outline\"\n                                className={cn('text-xs font-medium', statusStyles[claim.status])}\n                              >\n                                <span\n                                  className={cn('mr-1.5 size-1.5 rounded-full', statusDots[claim.status])}\n                                  aria-hidden=\"true\"\n                                />\n                                {claim.statusLabel}\n                              </Badge>\n                            </TableCell>\n\n                            {/* Receipt Button */}\n                            <TableCell className=\"text-center\">\n                              <Button\n                                aria-label=\"Attach file\"\n                                variant=\"ghost\"\n                                size=\"sm\"\n                                className=\"h-7 px-2 text-xs\"\n                                onClick={() => openReceipt(claim)}\n                              >\n                                <Paperclip className=\"text-muted-foreground mr-1 size-3\" />\n                                <span>View</span>\n                              </Button>\n                            </TableCell>\n\n                            {/* Actions Dropdown */}\n                            <TableCell className=\"text-right\">\n                              <DropdownMenu>\n                                <DropdownMenuTrigger asChild>\n                                  <Button\n                                    variant=\"ghost\"\n                                    size=\"icon-sm\"\n                                    className=\"text-muted-foreground hover:text-foreground size-7\"\n                                  >\n                                    <Eye className=\"size-3.5\" />\n                                    <span className=\"sr-only\">Actions for {claim.id}</span>\n                                  </Button>\n                                </DropdownMenuTrigger>\n                                <DropdownMenuContent align=\"end\" className=\"w-44\">\n                                  <DropdownMenuItem\n                                    className=\"cursor-pointer text-xs\"\n                                    onClick={() => openReceipt(claim)}\n                                  >\n                                    <Receipt className=\"mr-2 size-3.5\" />\n                                    Inspect Receipt\n                                  </DropdownMenuItem>\n                                  <DropdownMenuItem className=\"cursor-pointer text-xs\">\n                                    <FileCheck className=\"mr-2 size-3.5\" />\n                                    Policy Audit Log\n                                  </DropdownMenuItem>\n                                  <DropdownMenuSeparator />\n                                  <DropdownMenuItem className=\"cursor-pointer text-xs\">\n                                    <Download className=\"mr-2 size-3.5\" />\n                                    Download Voucher\n                                  </DropdownMenuItem>\n                                </DropdownMenuContent>\n                              </DropdownMenu>\n                            </TableCell>\n                          </TableRow>\n                        )\n                      })}\n\n                      {/* Empty state */}\n                      {filteredClaims.length === 0 && (\n                        <TableRow>\n                          <TableCell colSpan={8} className=\"h-32 text-center\">\n                            <div className=\"flex flex-col items-center justify-center gap-1.5\">\n                              <Search className=\"text-muted-foreground/50 size-5\" />\n                              <p className=\"text-foreground text-xs font-medium\">No commute claims found</p>\n                              <p className=\"text-muted-foreground text-xs\">\n                                Try resetting your category or status filter\n                              </p>\n                              <Button variant=\"outline\" size=\"sm\" className=\"mt-1 h-7 text-xs\" onClick={resetFilters}>\n                                Reset filters\n                              </Button>\n                            </div>\n                          </TableCell>\n                        </TableRow>\n                      )}\n                    </TableBody>\n                  </Table>\n                </div>\n\n                {/* Table Summary Footer */}\n                <div className=\"border-border bg-muted/20 text-muted-foreground flex flex-col items-center justify-between gap-2 border-t px-3 py-2 text-xs sm:flex-row\">\n                  <p className=\"tabular-nums\">\n                    Showing <span className=\"text-foreground font-medium\">{filteredClaims.length}</span> of{' '}\n                    <span className=\"text-foreground font-medium\">{claims.length}</span> claims\n                  </p>\n                  <div className=\"flex items-center gap-3\">\n                    <span className=\"tabular-nums\">\n                      Filtered Total:{' '}\n                      <span className=\"text-foreground font-semibold\">\n                        ${filteredClaims.reduce((acc, c) => acc + c.amount, 0).toFixed(2)}\n                      </span>\n                    </span>\n                  </div>\n                </div>\n              </div>\n            </CardContent>\n          </Card>\n        </div>\n      </div>\n\n      {/* Receipt Details Modal Dialog */}\n      <Dialog open={isReceiptModalOpen} onOpenChange={setIsReceiptModalOpen}>\n        <DialogContent className=\"sm:max-w-md\">\n          <DialogHeader>\n            <div className=\"flex items-center justify-between pr-4\">\n              <div className=\"space-y-0.5\">\n                <DialogTitle className=\"text-base font-bold\">Commute Receipt Voucher</DialogTitle>\n                <DialogDescription className=\"text-xs\">\n                  IRS-compliant proof of transit and commuter benefit claim.\n                </DialogDescription>\n              </div>\n              <Badge wrap variant=\"outline\" className=\"font-mono text-xs\">\n                {selectedClaim.id}\n              </Badge>\n            </div>\n          </DialogHeader>\n\n          <div className=\"space-y-4 py-2 text-xs\">\n            {/* Itemized Receipt Box */}\n            <div className=\"border-border bg-muted/30 space-y-3 rounded-lg border p-3.5\">\n              <div className=\"flex items-center justify-between border-b pb-2\">\n                <div className=\"flex items-center gap-2\">\n                  <SelectedCategoryIcon className=\"text-primary size-4\" />\n                  <span className=\"text-foreground font-semibold\">{selectedClaim.provider}</span>\n                </div>\n                <Badge wrap className={cn('text-xs font-normal', statusStyles[selectedClaim.status])}>\n                  {selectedClaim.statusLabel}\n                </Badge>\n              </div>\n\n              <div className=\"grid grid-cols-1 gap-2 text-xs sm:grid-cols-2\">\n                <div>\n                  <span className=\"text-muted-foreground block\">Transaction Date</span>\n                  <span className=\"text-foreground font-medium\">{selectedClaim.receiptDate}</span>\n                </div>\n                <div>\n                  <span className=\"text-muted-foreground block\">Benefit Category</span>\n                  <span className=\"text-foreground font-medium\">{selectedClaim.categoryLabel}</span>\n                </div>\n                <div className=\"sm:col-span-2\">\n                  <span className=\"text-muted-foreground block\">Line Item Description</span>\n                  <span className=\"text-foreground font-medium\">{selectedClaim.description}</span>\n                </div>\n                <div className=\"sm:col-span-2\">\n                  <span className=\"text-muted-foreground block\">Employee Commute Note</span>\n                  <span className=\"text-muted-foreground italic\">\"{selectedClaim.notes}\"</span>\n                </div>\n              </div>\n\n              <Separator />\n\n              {/* Amount Breakdown */}\n              <div className=\"space-y-1.5 text-xs\">\n                <div className=\"text-muted-foreground flex justify-between\">\n                  <span>Base Fare / Charge</span>\n                  <span className=\"font-mono tabular-nums\">${selectedClaim.amount.toFixed(2)}</span>\n                </div>\n                <div className=\"text-muted-foreground flex justify-between\">\n                  <span>Pre-Tax IRS Exemption (IRC § 132f)</span>\n                  <span className=\"text-success text-success font-mono tabular-nums\">-$0.00 (Tax Free)</span>\n                </div>\n                <div className=\"border-border flex justify-between border-t pt-1.5 text-sm font-bold\">\n                  <span className=\"text-foreground\">Total Reimbursable Amount</span>\n                  <span className=\"text-foreground font-mono tabular-nums\">${selectedClaim.amount.toFixed(2)}</span>\n                </div>\n              </div>\n\n              {/* Attached File Strip */}\n              <div className=\"border-border bg-background flex items-center justify-between rounded-md border p-2 text-xs\">\n                <div className=\"flex items-center gap-2\">\n                  <FileText className=\"text-primary size-3.5\" />\n                  <span className=\"font-mono text-xs\">{selectedClaim.receiptFileName}</span>\n                  <span className=\"text-muted-foreground\">({selectedClaim.receiptFileSize})</span>\n                </div>\n                <Badge wrap variant=\"outline\" className=\"border-success/30 bg-success/10 text-success text-xs\">\n                  <ShieldCheck className=\"mr-1 size-3\" />\n                  Verified\n                </Badge>\n              </div>\n            </div>\n          </div>\n\n          <DialogFooter className=\"flex sm:justify-between\">\n            <Button variant=\"outline\" size=\"sm\" className=\"text-xs\" onClick={() => setIsReceiptModalOpen(false)}>\n              Close\n            </Button>\n            <Button\n              aria-label=\"Download attachment\"\n              size=\"sm\"\n              className=\"gap-1.5 text-xs\"\n              onClick={() => setIsReceiptModalOpen(false)}\n            >\n              <Download className=\"size-3.5\" />\n              Download Receipt PDF\n            </Button>\n          </DialogFooter>\n        </DialogContent>\n      </Dialog>\n    </div>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/CommuteReimbursementClaims.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/dialog.json",
    "https://uipkge.dev/r/react/dropdown-menu.json",
    "https://uipkge.dev/r/react/input.json",
    "https://uipkge.dev/r/react/progress.json",
    "https://uipkge.dev/r/react/select.json",
    "https://uipkge.dev/r/react/separator.json",
    "https://uipkge.dev/r/react/table.json"
  ],
  "description": "Monthly commuter transit pass, mileage, and EV charging expense claim reimbursement portal with IRS pre-tax allowance metrics, claim submission form with receipt dropzone, and claims history ledger.",
  "categories": [
    "hr",
    "app",
    "finance"
  ]
}