@burdenoff/microfe-adaptercloud 2026.624.1 → 2026.625.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/adaptercloud/components/EmptyState.js +17 -21
  2. package/dist/adaptercloud/components/EmptyState.js.map +1 -1
  3. package/dist/adaptercloud/components/InvestmentCard.js +25 -23
  4. package/dist/adaptercloud/components/InvestmentCard.js.map +1 -1
  5. package/dist/adaptercloud/components/MetricsCard.js +18 -12
  6. package/dist/adaptercloud/components/MetricsCard.js.map +1 -1
  7. package/dist/adaptercloud/components/PageLayout.js +38 -19
  8. package/dist/adaptercloud/components/PageLayout.js.map +1 -1
  9. package/dist/adaptercloud/components/RatingDisplay.js +3 -3
  10. package/dist/adaptercloud/components/RatingDisplay.js.map +1 -1
  11. package/dist/adaptercloud/components/StatusBadge.js +36 -16
  12. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  13. package/dist/adaptercloud/pages/HomePage.js +242 -231
  14. package/dist/adaptercloud/pages/HomePage.js.map +1 -1
  15. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +33 -33
  16. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
  17. package/dist/adaptercloud/pages/admin/AdminDashboard.js +32 -32
  18. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
  19. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +11 -11
  20. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
  21. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +11 -11
  22. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
  23. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +3 -3
  24. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
  25. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +1 -1
  26. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
  27. package/dist/adaptercloud/pages/admin/CartManagementPage.js +28 -28
  28. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
  29. package/dist/adaptercloud/pages/admin/UserManagementPage.js +25 -25
  30. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
  31. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +19 -19
  32. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  33. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +7 -7
  34. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  35. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +40 -37
  36. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  37. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +21 -21
  38. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  39. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +24 -24
  40. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  41. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +20 -20
  42. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  43. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +36 -36
  44. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
  45. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +25 -25
  46. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
  47. package/dist/adaptercloud/pages/common/HelpSupportPage.js +43 -43
  48. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
  49. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +32 -31
  50. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -1
  51. package/dist/adaptercloud/pages/common/SettingsPage.js +8 -8
  52. package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -1
  53. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +22 -21
  54. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
  55. package/dist/adaptercloud/pages/customer/CartDetailPage.js +18 -17
  56. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
  57. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +12 -11
  58. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
  59. package/dist/adaptercloud/pages/customer/CheckoutPage.js +9 -9
  60. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
  61. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +30 -30
  62. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
  63. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +19 -19
  64. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
  65. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +24 -23
  66. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
  67. package/dist/adaptercloud/pages/customer/FavoritesPage.js +9 -8
  68. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
  69. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +4 -3
  70. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
  71. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +15 -14
  72. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
  73. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +10 -9
  74. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
  75. package/dist/adaptercloud/pages/customer/ReviewsPage.js +18 -17
  76. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
  77. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +14 -13
  78. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
  79. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +32 -32
  80. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
  81. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +14 -13
  82. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  83. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +27 -27
  84. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  85. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +16 -16
  86. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
  87. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +9 -8
  88. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  89. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +12 -12
  90. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
  91. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +19 -19
  92. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
  93. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +26 -25
  94. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
  95. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +43 -43
  96. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
  97. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +37 -36
  98. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
  99. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +34 -34
  100. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
  101. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +27 -25
  102. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -1
  103. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.js","names":[],"sources":["../../../src/adaptercloud/pages/HomePage.tsx"],"sourcesContent":["/**\n * Home Page\n * @module adaptercloud/pages\n *\n * Role-based landing page with hero section, quick stats, quick actions,\n * featured carts, recent orders, how-it-works, category browsing,\n * platform stats, and welcome banner for new users.\n */\n\nimport { useState, useMemo, useCallback } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Search,\n ShoppingBag,\n Store,\n ClipboardList,\n TrendingUp,\n LayoutDashboard,\n Users,\n IndianRupee,\n Activity,\n ArrowRight,\n Star,\n MapPin,\n Clock,\n ChefHat,\n Scissors,\n Wrench,\n Home,\n Shirt,\n Heart,\n GraduationCap,\n Package,\n ShoppingCart,\n BarChart3,\n Wallet,\n CheckCircle2,\n Zap,\n Shield,\n Sparkles,\n HandCoins,\n UserCheck,\n Truck,\n BadgeCheck,\n FileText,\n Settings,\n Loader2,\n AlertCircle,\n} from 'lucide-react';\nimport { PageLayout } from '../components/PageLayout';\nimport { MetricsCard } from '../components/MetricsCard';\nimport { CartCard } from '../components/CartCard';\nimport { StatusBadge } from '../components/StatusBadge';\nimport { EmptyState } from '../components/EmptyState';\nimport { useAdapterCloud } from '../context/AdapterCloudContext';\nimport { useAdapterCloudApi } from '../hooks/useAdapterCloudApi';\nimport { cn } from '../utils/cn';\nimport {\n formatCurrency,\n formatDate,\n formatRelativeTime,\n formatDistance,\n} from '../utils/formatters';\nimport type { UserRole, MockCart, MockOrder, DashboardStats } from '../types';\n\n// ---------------------------------------------------------------------------\n// Role-based Quick Action configs\n// ---------------------------------------------------------------------------\n\ninterface QuickAction {\n label: string;\n description: string;\n icon: React.ReactNode;\n path: string;\n color: string;\n}\n\nconst quickActionsByRole: Record<UserRole, QuickAction[]> = {\n customer: [\n {\n label: 'Discover Services',\n description: 'Browse carts near you',\n icon: <Search className=\"h-5 w-5\" />,\n path: '/customer/carts',\n color: 'bg-blue-500/10 text-blue-600 dark:text-blue-400',\n },\n {\n label: 'My Orders',\n description: 'Track your orders',\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n path: '/customer/orders',\n color: 'bg-green-500/10 text-green-600 dark:text-green-400',\n },\n {\n label: 'Favorites',\n description: 'Your saved carts',\n icon: <Heart className=\"h-5 w-5\" />,\n path: '/customer/favorites',\n color: 'bg-pink-500/10 text-pink-600 dark:text-pink-400',\n },\n {\n label: 'Settings',\n description: 'Manage preferences',\n icon: <Settings className=\"h-5 w-5\" />,\n path: '/settings',\n color: 'bg-bg-sunken text-text-secondary',\n },\n ],\n cart_owner: [\n {\n label: 'My Cart',\n description: 'Manage your cart',\n icon: <Store className=\"h-5 w-5\" />,\n path: '/owner/dashboard',\n color: 'bg-purple-500/10 text-purple-600 dark:text-purple-400',\n },\n {\n label: 'Orders',\n description: 'Incoming orders',\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n path: '/owner/orders',\n color: 'bg-blue-500/10 text-blue-600 dark:text-blue-400',\n },\n {\n label: 'Analytics',\n description: 'Revenue & insights',\n icon: <BarChart3 className=\"h-5 w-5\" />,\n path: '/owner/analytics',\n color: 'bg-emerald-500/10 text-emerald-600 dark:text-emerald-400',\n },\n {\n label: 'Staff',\n description: 'Manage workers',\n icon: <Users className=\"h-5 w-5\" />,\n path: '/owner/staff',\n color: 'bg-orange-500/10 text-orange-600 dark:text-orange-400',\n },\n ],\n worker: [\n {\n label: 'My Tasks',\n description: 'View assigned tasks',\n icon: <ClipboardList className=\"h-5 w-5\" />,\n path: '/worker/dashboard',\n color: 'bg-orange-500/10 text-orange-600 dark:text-orange-400',\n },\n {\n label: 'Schedule',\n description: 'View shifts',\n icon: <Clock className=\"h-5 w-5\" />,\n path: '/worker/schedule',\n color: 'bg-blue-500/10 text-blue-600 dark:text-blue-400',\n },\n {\n label: 'Earnings',\n description: 'Track pay',\n icon: <Wallet className=\"h-5 w-5\" />,\n path: '/worker/earnings',\n color: 'bg-green-500/10 text-green-600 dark:text-green-400',\n },\n {\n label: 'Performance',\n description: 'Ratings & stats',\n icon: <Star className=\"h-5 w-5\" />,\n path: '/worker/performance',\n color: 'bg-yellow-500/10 text-yellow-600 dark:text-yellow-400',\n },\n ],\n investor: [\n {\n label: 'Portfolio',\n description: 'Your investments',\n icon: <TrendingUp className=\"h-5 w-5\" />,\n path: '/investor/dashboard',\n color: 'bg-emerald-500/10 text-emerald-600 dark:text-emerald-400',\n },\n {\n label: 'Opportunities',\n description: 'New investments',\n icon: <HandCoins className=\"h-5 w-5\" />,\n path: '/investor/opportunities',\n color: 'bg-blue-500/10 text-blue-600 dark:text-blue-400',\n },\n {\n label: 'Returns',\n description: 'Earnings history',\n icon: <IndianRupee className=\"h-5 w-5\" />,\n path: '/investor/returns',\n color: 'bg-green-500/10 text-green-600 dark:text-green-400',\n },\n {\n label: 'Reports',\n description: 'Performance reports',\n icon: <FileText className=\"h-5 w-5\" />,\n path: '/investor/reports',\n color: 'bg-purple-500/10 text-purple-600 dark:text-purple-400',\n },\n ],\n admin: [\n {\n label: 'Dashboard',\n description: 'Platform overview',\n icon: <LayoutDashboard className=\"h-5 w-5\" />,\n path: '/admin/dashboard',\n color: 'bg-red-500/10 text-red-600 dark:text-red-400',\n },\n {\n label: 'Users',\n description: 'Manage accounts',\n icon: <Users className=\"h-5 w-5\" />,\n path: '/admin/users',\n color: 'bg-blue-500/10 text-blue-600 dark:text-blue-400',\n },\n {\n label: 'Carts',\n description: 'Approve & manage',\n icon: <Store className=\"h-5 w-5\" />,\n path: '/admin/carts',\n color: 'bg-purple-500/10 text-purple-600 dark:text-purple-400',\n },\n {\n label: 'Analytics',\n description: 'Revenue reports',\n icon: <BarChart3 className=\"h-5 w-5\" />,\n path: '/admin/analytics',\n color: 'bg-emerald-500/10 text-emerald-600 dark:text-emerald-400',\n },\n ],\n};\n\n// ---------------------------------------------------------------------------\n// Role-based Quick Stats configs\n// ---------------------------------------------------------------------------\n\nfunction getStatsForRole(\n role: UserRole,\n orders: MockOrder[],\n dashboardStats: DashboardStats | undefined\n) {\n switch (role) {\n case 'customer':\n return [\n {\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n value: orders.length.toString(),\n label: 'Total Orders',\n trend: 'up' as const,\n trendValue: '+2 this week',\n },\n {\n icon: <Store className=\"h-5 w-5\" />,\n value: (dashboardStats?.activeProviders ?? 0).toString(),\n label: 'Nearby Providers',\n trend: 'up' as const,\n trendValue: '+3',\n },\n {\n icon: <Star className=\"h-5 w-5\" />,\n value: (dashboardStats?.avgRating ?? 0).toFixed(1),\n label: 'Avg. Rating',\n trend: 'up' as const,\n trendValue: '+0.1',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(\n orders.reduce((s, o) => s + o.total, 0),\n { minimumFractionDigits: 0 }\n ),\n label: 'Total Spent',\n trend: 'neutral' as const,\n trendValue: '',\n },\n ];\n case 'cart_owner':\n return [\n {\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n value: '48',\n label: 'Orders Today',\n trend: 'up' as const,\n trendValue: '+12%',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(12850, { minimumFractionDigits: 0 }),\n label: \"Today's Revenue\",\n trend: 'up' as const,\n trendValue: '+8%',\n },\n {\n icon: <Star className=\"h-5 w-5\" />,\n value: '4.6',\n label: 'Cart Rating',\n trend: 'up' as const,\n trendValue: '+0.2',\n },\n {\n icon: <Users className=\"h-5 w-5\" />,\n value: '5',\n label: 'Active Staff',\n trend: 'neutral' as const,\n trendValue: '',\n },\n ];\n case 'worker':\n return [\n {\n icon: <ClipboardList className=\"h-5 w-5\" />,\n value: '5',\n label: 'Tasks Today',\n trend: 'up' as const,\n trendValue: '+2',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(425, { minimumFractionDigits: 0 }),\n label: \"Today's Earnings\",\n trend: 'up' as const,\n trendValue: '+15%',\n },\n {\n icon: <Star className=\"h-5 w-5\" />,\n value: '4.7',\n label: 'Rating',\n trend: 'up' as const,\n trendValue: '+0.1',\n },\n {\n icon: <CheckCircle2 className=\"h-5 w-5\" />,\n value: '96.8%',\n label: 'Completion Rate',\n trend: 'up' as const,\n trendValue: '+0.5%',\n },\n ];\n case 'investor':\n return [\n {\n icon: <TrendingUp className=\"h-5 w-5\" />,\n value: '3',\n label: 'Active Investments',\n trend: 'up' as const,\n trendValue: '+1',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(450000, { minimumFractionDigits: 0 }),\n label: 'Total Invested',\n trend: 'up' as const,\n trendValue: '',\n },\n {\n icon: <HandCoins className=\"h-5 w-5\" />,\n value: '16.5%',\n label: 'Avg. Returns',\n trend: 'up' as const,\n trendValue: '+2.1%',\n },\n {\n icon: <BarChart3 className=\"h-5 w-5\" />,\n value: formatCurrency(74250, { minimumFractionDigits: 0 }),\n label: 'Total Returns',\n trend: 'up' as const,\n trendValue: '+8.5%',\n },\n ];\n case 'admin':\n default:\n return [\n {\n icon: <Users className=\"h-5 w-5\" />,\n value: (dashboardStats?.activeCustomers ?? 0).toLocaleString('en-IN'),\n label: 'Active Customers',\n trend: 'up' as const,\n trendValue: '+50',\n },\n {\n icon: <Store className=\"h-5 w-5\" />,\n value: (dashboardStats?.activeProviders ?? 0).toString(),\n label: 'Service Providers',\n trend: 'up' as const,\n trendValue: '+3',\n },\n {\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n value: (dashboardStats?.totalOrders ?? 0).toLocaleString('en-IN'),\n label: 'Total Orders',\n trend: 'up' as const,\n trendValue: '+12%',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(dashboardStats?.totalRevenue ?? 0, { minimumFractionDigits: 0 }),\n label: 'Total Revenue',\n trend: 'up' as const,\n trendValue: '+8.5%',\n },\n ];\n }\n}\n\n// ---------------------------------------------------------------------------\n// Category data\n// ---------------------------------------------------------------------------\n\nconst categories = [\n {\n label: 'Food & Beverage',\n icon: <ChefHat className=\"h-6 w-6\" />,\n color: 'bg-orange-500/10 text-orange-600 dark:text-orange-400',\n },\n {\n label: 'Personal Care & Beauty',\n icon: <Scissors className=\"h-6 w-6\" />,\n color: 'bg-pink-500/10 text-pink-600 dark:text-pink-400',\n },\n {\n label: 'Repair & Maintenance',\n icon: <Wrench className=\"h-6 w-6\" />,\n color: 'bg-blue-500/10 text-blue-600 dark:text-blue-400',\n },\n {\n label: 'Home Services',\n icon: <Home className=\"h-6 w-6\" />,\n color: 'bg-emerald-500/10 text-emerald-600 dark:text-emerald-400',\n },\n {\n label: 'Clothing & Fashion',\n icon: <Shirt className=\"h-6 w-6\" />,\n color: 'bg-purple-500/10 text-purple-600 dark:text-purple-400',\n },\n {\n label: 'Health & Wellness',\n icon: <Heart className=\"h-6 w-6\" />,\n color: 'bg-red-500/10 text-red-600 dark:text-red-400',\n },\n {\n label: 'Education & Skills',\n icon: <GraduationCap className=\"h-6 w-6\" />,\n color: 'bg-yellow-500/10 text-yellow-600 dark:text-yellow-400',\n },\n {\n label: 'Retail & Merchandise',\n icon: <Package className=\"h-6 w-6\" />,\n color: 'bg-indigo-500/10 text-indigo-600 dark:text-indigo-400',\n },\n {\n label: 'Grocery & Essentials',\n icon: <ShoppingCart className=\"h-6 w-6\" />,\n color: 'bg-green-500/10 text-green-600 dark:text-green-400',\n },\n];\n\n// ---------------------------------------------------------------------------\n// How It Works steps\n// ---------------------------------------------------------------------------\n\nconst howItWorks = [\n {\n step: 1,\n title: 'Browse Services',\n description: 'Discover local service providers and carts near you.',\n icon: <Search className=\"h-6 w-6\" />,\n },\n {\n step: 2,\n title: 'Place an Order',\n description: 'Select items or services and place your order seamlessly.',\n icon: <ShoppingBag className=\"h-6 w-6\" />,\n },\n {\n step: 3,\n title: 'Track in Real-time',\n description: 'Get live updates on your order from confirmation to delivery.',\n icon: <Truck className=\"h-6 w-6\" />,\n },\n {\n step: 4,\n title: 'Rate & Review',\n description: 'Share your experience and help others find great services.',\n icon: <Star className=\"h-6 w-6\" />,\n },\n];\n\n// ---------------------------------------------------------------------------\n// Recent activity mock\n// ---------------------------------------------------------------------------\n\nconst mockRecentActivity = [\n {\n id: 'ha-1',\n description: 'New order placed at Dosa Express',\n time: '2 mins ago',\n type: 'order',\n },\n {\n id: 'ha-2',\n description: 'Quick Cuts Salon received a new review',\n time: '15 mins ago',\n type: 'review',\n },\n {\n id: 'ha-3',\n description: 'Investment opportunity funded: Spotless Cleaning',\n time: '1 hour ago',\n type: 'investment',\n },\n {\n id: 'ha-4',\n description: 'New cart registered: Gadget Zone Brigade',\n time: '3 hours ago',\n type: 'cart',\n },\n {\n id: 'ha-5',\n description: 'Order delivered: Fix-It Mobile Repair',\n time: '5 hours ago',\n type: 'order',\n },\n];\n\n// ---------------------------------------------------------------------------\n// Platform Stats\n// ---------------------------------------------------------------------------\n\nconst platformStats = [\n { label: 'Service Providers', value: '21+', icon: <Store className=\"h-5 w-5\" /> },\n { label: 'Categories', value: '9', icon: <Package className=\"h-5 w-5\" /> },\n { label: 'Happy Customers', value: '534+', icon: <Users className=\"h-5 w-5\" /> },\n { label: 'Orders Completed', value: '1,247+', icon: <CheckCircle2 className=\"h-5 w-5\" /> },\n];\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function HomePage() {\n const { navigateTo, currentUser } = useAdapterCloud();\n const { t: translate } = useI18n();\n const [searchQuery, setSearchQuery] = useState('');\n\n const { providers, orders, dashboardStats } = useAdapterCloudApi();\n\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n\n const firstName = currentUser?.firstName ?? currentUser?.name ?? 'there';\n const userRole: UserRole = (currentUser?.role as UserRole) ?? 'customer';\n\n const roleLabel: Record<UserRole, string> = {\n customer: t('adaptercloud.home.role.customer', 'Customer'),\n cart_owner: t('adaptercloud.home.role.cartOwner', 'Cart Owner'),\n worker: t('adaptercloud.home.role.worker', 'Worker'),\n investor: t('adaptercloud.home.role.investor', 'Investor'),\n admin: t('adaptercloud.home.role.admin', 'Administrator'),\n };\n\n const roleGreetings: Record<UserRole, string> = {\n customer: t('adaptercloud.home.greeting.customer', 'Discover amazing services near you'),\n cart_owner: t('adaptercloud.home.greeting.cartOwner', 'Manage your business and grow'),\n worker: t('adaptercloud.home.greeting.worker', 'Check your tasks and earnings'),\n investor: t('adaptercloud.home.greeting.investor', 'Track your investments and returns'),\n admin: t('adaptercloud.home.greeting.admin', 'Monitor and manage the platform'),\n };\n\n const quickActions = quickActionsByRole[userRole] ?? quickActionsByRole.customer;\n const stats = getStatsForRole(userRole, orders.data ?? [], dashboardStats.data);\n\n // Featured carts (top-rated, open)\n const featuredCarts = useMemo(() => {\n let carts = (providers.data ?? []).filter((c) => c.isOpen);\n if (searchQuery) {\n const q = searchQuery.toLowerCase();\n carts = carts.filter(\n (c) => c.name.toLowerCase().includes(q) || c.category.toLowerCase().includes(q)\n );\n }\n return carts.sort((a, b) => b.rating - a.rating).slice(0, 6);\n }, [providers.data, searchQuery]);\n\n // Recent orders\n const recentOrders = useMemo(() => {\n return [...(orders.data ?? [])]\n .sort((a, b) => new Date(b.orderDate).getTime() - new Date(a.orderDate).getTime())\n .slice(0, 3);\n }, [orders.data]);\n\n const activityIcons: Record<string, string> = {\n order: 'text-blue-600 dark:text-blue-400',\n review: 'text-yellow-600 dark:text-yellow-400',\n investment: 'text-green-600 dark:text-green-400',\n cart: 'text-purple-600 dark:text-purple-400',\n };\n\n // Check if \"new user\" (no orders)\n const isNewUser = (orders.data ?? []).length === 0 && !orders.isLoading;\n\n const isLoading = providers.isLoading || orders.isLoading || dashboardStats.isLoading;\n const isError = providers.isError || orders.isError || dashboardStats.isError;\n\n if (isLoading) {\n return (\n <PageLayout title={t('adaptercloud.common.loading', 'Loading...')}>\n <div className=\"flex h-[60vh] items-center justify-center\">\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (isError) {\n return (\n <PageLayout title={t('adaptercloud.common.error', 'Error')}>\n <div className=\"flex h-[60vh] flex-col items-center justify-center gap-4\">\n <AlertCircle className=\"h-12 w-12 text-status-error-text\" />\n <h2 className=\"text-xl font-semibold\">\n {t('adaptercloud.common.errorLoading', 'Error loading data')}\n </h2>\n <p className=\"text-text-secondary\">\n {t('adaptercloud.common.tryAgain', 'Please try again later.')}\n </p>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={`${t('adaptercloud.home.hello', 'Hello')}, ${firstName}!`}\n description={roleGreetings[userRole]}\n >\n {/* Welcome Banner for New Users */}\n {isNewUser && (\n <section className=\"mb-6 rounded-xl border border-border-subtle bg-gradient-to-r from-primary/5 via-primary/10 to-primary/5 p-6\">\n <div className=\"flex items-start gap-4\">\n <div className=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10\">\n <Sparkles className=\"h-6 w-6 text-primary\" />\n </div>\n <div className=\"flex-1\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {t('adaptercloud.home.welcomeTitle', 'Welcome to AdapterCloud!')}\n </h2>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {t(\n 'adaptercloud.home.welcomeDescription',\n 'Your local services marketplace. Start by exploring service providers near you or browse categories to find what you need.'\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/carts')}\n className=\"mt-3 inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Search className=\"h-4 w-4\" />\n {t('adaptercloud.home.exploreServices', 'Explore Services')}\n </button>\n </div>\n </div>\n </section>\n )}\n\n {/* Hero Section with Role Info */}\n <section className=\"mb-6 rounded-xl border border-border-subtle bg-bg-surface p-6\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <div className=\"flex items-center gap-2 mb-1\">\n <span className=\"inline-flex items-center rounded-full bg-action-primary-bg/10 px-2.5 py-0.5 text-xs font-medium text-primary\">\n <BadgeCheck className=\"mr-1 h-3 w-3\" />\n {roleLabel[userRole]}\n </span>\n </div>\n <h2 className=\"text-xl font-bold text-text-primary\">\n {t('adaptercloud.home.good', 'Good')}{' '}\n {new Date().getHours() < 12\n ? t('adaptercloud.home.time.morning', 'morning')\n : new Date().getHours() < 17\n ? t('adaptercloud.home.time.afternoon', 'afternoon')\n : t('adaptercloud.home.time.evening', 'evening')}\n , {firstName}\n </h2>\n <p className=\"mt-1 text-sm text-text-secondary\">{roleGreetings[userRole]}</p>\n </div>\n <div className=\"relative w-full sm:w-72\">\n <Search className=\"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary\" />\n <input\n type=\"text\"\n placeholder={t('adaptercloud.home.searchPlaceholder', 'Search services, carts...')}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"w-full rounded-lg border border-border-subtle bg-bg-surface py-2.5 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n </section>\n\n {/* Quick Stats */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.quickStats', 'Quick Stats')}\n </h2>\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n {stats.map((stat) => (\n <MetricsCard\n key={stat.label}\n icon={stat.icon}\n value={stat.value}\n label={stat.label}\n trend={stat.trend}\n trendValue={stat.trendValue}\n />\n ))}\n </div>\n </section>\n\n {/* Quick Actions */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.quickActions', 'Quick Actions')}\n </h2>\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n {quickActions.map((action) => (\n <button\n key={action.label}\n type=\"button\"\n onClick={() => navigateTo(action.path)}\n className={cn(\n 'flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4 text-left shadow-sm transition-all',\n 'hover:border-accent-foreground/20 hover:shadow-md'\n )}\n >\n <div\n className={cn(\n 'flex h-10 w-10 shrink-0 items-center justify-center rounded-lg',\n action.color\n )}\n >\n {action.icon}\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-semibold text-text-primary\">{action.label}</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{action.description}</p>\n </div>\n <ArrowRight className=\"h-4 w-4 text-text-secondary shrink-0 mt-1\" />\n </button>\n ))}\n </div>\n </section>\n\n {/* Featured / Nearby Carts */}\n <section className=\"mb-8\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {searchQuery\n ? t('adaptercloud.home.searchResults', 'Search Results')\n : t('adaptercloud.home.featuredCarts', 'Featured Carts')}\n </h2>\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/carts')}\n className=\"flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {t('adaptercloud.common.viewAll', 'View All')} <ArrowRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n\n {featuredCarts.length === 0 ? (\n <EmptyState\n icon={<Search className=\"h-10 w-10\" />}\n title={t('adaptercloud.home.noCartsFound', 'No carts found')}\n description={t(\n 'adaptercloud.home.noCartsDescription',\n 'Try adjusting your search or browse all categories'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => setSearchQuery('')}\n className=\"rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n {t('adaptercloud.home.clearSearch', 'Clear Search')}\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {featuredCarts.map((cart) => (\n <div\n key={cart.id}\n role=\"button\"\n tabIndex={0}\n onClick={() => navigateTo(`/customer/cart/${cart.id}`)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n navigateTo(`/customer/cart/${cart.id}`);\n }\n }}\n className=\"rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-accent-foreground/20 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n {/* Image */}\n <div className=\"relative h-40 bg-bg-sunken\">\n <img\n src={cart.image}\n alt={cart.name}\n className=\"h-full w-full object-cover\"\n loading=\"lazy\"\n />\n <div className=\"absolute top-2 right-2\">\n <StatusBadge status={cart.isOpen ? 'open' : 'closed'} />\n </div>\n {cart.isVerified && (\n <div className=\"absolute top-2 left-2\">\n <span className=\"inline-flex items-center gap-1 rounded-full bg-blue-500/90 px-2 py-0.5 text-xs font-medium text-white backdrop-blur-sm\">\n <BadgeCheck className=\"h-3 w-3\" />{' '}\n {t('adaptercloud.home.verified', 'Verified')}\n </span>\n </div>\n )}\n <div className=\"absolute bottom-2 right-2\">\n <span className=\"inline-flex items-center gap-1 rounded-full bg-black/60 px-2 py-0.5 text-xs text-white backdrop-blur-sm\">\n <Clock className=\"h-3 w-3\" /> {cart.estimatedTime} min\n </span>\n </div>\n </div>\n\n {/* Details */}\n <div className=\"p-4\">\n <div className=\"flex items-start justify-between\">\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"text-base font-semibold text-text-primary truncate\">\n {cart.name}\n </h3>\n <p className=\"mt-0.5 text-sm text-text-secondary\">{cart.category}</p>\n </div>\n <div className=\"flex items-center gap-1 rounded bg-green-600 px-1.5 py-0.5 ml-2 shrink-0\">\n <Star className=\"h-3 w-3 fill-white text-white\" />\n <span className=\"text-xs font-bold text-white\">{cart.rating}</span>\n </div>\n </div>\n\n <div className=\"mt-3 flex items-center gap-4 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <MapPin className=\"h-3 w-3\" /> {formatDistance(cart.distance)}\n </span>\n <span className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3\" /> {cart.totalRatings}{' '}\n {t('adaptercloud.home.reviews', 'reviews')}\n </span>\n {cart.averageOrderValue && (\n <span className=\"flex items-center gap-1\">\n <IndianRupee className=\"h-3 w-3\" /> {t('adaptercloud.home.average', 'Avg.')}{' '}\n {formatCurrency(cart.averageOrderValue, { minimumFractionDigits: 0 })}\n </span>\n )}\n </div>\n\n {/* Tags / service types */}\n {cart.serviceTypes && cart.serviceTypes.length > 0 && (\n <div className=\"mt-3 flex flex-wrap gap-1.5\">\n {cart.serviceTypes.slice(0, 3).map((st) => (\n <span\n key={st}\n className=\"inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary\"\n >\n {st.replace(/_/g, ' ')}\n </span>\n ))}\n </div>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </section>\n\n {/* Recent Orders */}\n {recentOrders.length > 0 && (\n <section className=\"mb-8\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {t('adaptercloud.home.recentOrders', 'Recent Orders')}\n </h2>\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/orders')}\n className=\"flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {t('adaptercloud.common.viewAll', 'View All')} <ArrowRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border\">\n {recentOrders.map((order) => (\n <div\n key={order.id}\n role=\"button\"\n tabIndex={0}\n onClick={() => navigateTo(`/customer/order/${order.id}`)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n navigateTo(`/customer/order/${order.id}`);\n }\n }}\n className=\"flex items-center gap-4 px-4 py-3 hover:bg-accent/50 transition-colors cursor-pointer\"\n >\n <img\n src={order.cartImage}\n alt={order.cartName}\n className=\"h-12 w-12 rounded-lg object-cover shrink-0\"\n />\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium text-text-primary truncate\">{order.cartName}</p>\n <StatusBadge status={order.status} />\n </div>\n <p className=\"text-xs text-text-secondary mt-0.5\">\n {order.items.map((i) => i.name).join(', ')}\n </p>\n </div>\n <div className=\"text-right shrink-0\">\n <p className=\"text-sm font-semibold text-text-primary\">\n {formatCurrency(order.total, { minimumFractionDigits: 0 })}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {formatRelativeTime(order.orderDate)}\n </p>\n </div>\n </div>\n ))}\n </div>\n </section>\n )}\n\n {/* How It Works */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.howItWorks', 'How It Works')}\n </h2>\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n {howItWorks.map((item) => (\n <div\n key={item.step}\n className=\"relative rounded-lg border border-border-subtle bg-bg-surface p-5 text-center\"\n >\n <div className=\"absolute -top-3 left-1/2 -translate-x-1/2\">\n <span className=\"inline-flex h-6 w-6 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text\">\n {item.step}\n </span>\n </div>\n <div className=\"mt-2 flex justify-center text-text-secondary mb-3\">{item.icon}</div>\n <h3 className=\"text-sm font-semibold text-text-primary\">{item.title}</h3>\n <p className=\"mt-1 text-xs text-text-secondary\">{item.description}</p>\n </div>\n ))}\n </div>\n </section>\n\n {/* Browse by Category */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.browseByCategory', 'Browse by Category')}\n </h2>\n <div className=\"grid grid-cols-3 gap-3 sm:grid-cols-4 lg:grid-cols-5\">\n {categories.map((cat) => (\n <button\n key={cat.label}\n type=\"button\"\n onClick={() =>\n navigateTo(`/customer/carts?category=${encodeURIComponent(cat.label)}`)\n }\n className=\"flex flex-col items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface p-4 text-center hover:shadow-sm hover:border-accent-foreground/20 transition-all\"\n >\n <div\n className={cn('flex h-12 w-12 items-center justify-center rounded-full', cat.color)}\n >\n {cat.icon}\n </div>\n <span className=\"text-xs font-medium text-text-primary leading-tight\">{cat.label}</span>\n </button>\n ))}\n </div>\n </section>\n\n {/* Platform Stats */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.platformStats', 'Platform Stats')}\n </h2>\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n {platformStats.map((stat) => (\n <div\n key={stat.label}\n className=\"flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4\"\n >\n <div className=\"flex h-10 w-10 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary shrink-0\">\n {stat.icon}\n </div>\n <div>\n <p className=\"text-lg font-bold text-text-primary\">{stat.value}</p>\n <p className=\"text-xs text-text-secondary\">{stat.label}</p>\n </div>\n </div>\n ))}\n </div>\n </section>\n\n {/* Recent Activity */}\n <section>\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.recentActivity', 'Recent Activity')}\n </h2>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border\">\n {mockRecentActivity.map((item) => (\n <div key={item.id} className=\"flex items-center gap-3 px-4 py-3\">\n <div className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken\">\n <Activity\n className={cn('h-4 w-4', activityIcons[item.type] ?? 'text-text-secondary')}\n />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm text-text-primary truncate\">{item.description}</p>\n </div>\n <span className=\"text-xs text-text-secondary whitespace-nowrap\">{item.time}</span>\n </div>\n ))}\n </div>\n </section>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA6EA,IAAM,IAAsD;CAC1D,UAAU;EACR;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA;GACpC,MAAM;GACN,OAAO;GACR;EACD;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAa,WAAU,WAAY,CAAA;GACzC,MAAM;GACN,OAAO;GACR;EACD;G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ACF;QAVC,EAAK,MAUN,CACN;KACE,CAAA,CACE;;GAGV,kBAAC,WAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cACX,EAAE,oCAAoC,kBAAkB;IACtD,CAAA,EACL,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAmB,KAAK,MACvB,kBAAC,OAAD;KAAmB,WAAU;eAA7B;MACE,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,GAAD,EACE,WAAW,EAAG,WAAW,EAAc,EAAK,SAAS,sBAAsB,EAC3E,CAAA;OACE,CAAA;MACN,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,KAAD;QAAG,WAAU;kBAAsC,EAAK;QAAgB,CAAA;OACpE,CAAA;MACN,kBAAC,QAAD;OAAM,WAAU;iBAAiD,EAAK;OAAY,CAAA;MAC9E;OAVI,EAAK,GAUT,CACN;IACE,CAAA,CACE,EAAA,CAAA;GACC"}
1
+ {"version":3,"file":"HomePage.js","names":[],"sources":["../../../src/adaptercloud/pages/HomePage.tsx"],"sourcesContent":["/**\n * Home Page\n * @module adaptercloud/pages\n *\n * Role-based landing page with hero section, quick stats, quick actions,\n * featured carts, recent orders, how-it-works, category browsing,\n * platform stats, and welcome banner for new users.\n */\n\nimport { useState, useMemo, useCallback } from'react';\nimport { useI18n } from'@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Search,\n ShoppingBag,\n Store,\n ClipboardList,\n TrendingUp,\n LayoutDashboard,\n Users,\n IndianRupee,\n Activity,\n ArrowRight,\n Star,\n MapPin,\n Clock,\n ChefHat,\n Scissors,\n Wrench,\n Home,\n Shirt,\n Heart,\n GraduationCap,\n Package,\n ShoppingCart,\n BarChart3,\n Wallet,\n CheckCircle2,\n Zap,\n Shield,\n Sparkles,\n HandCoins,\n UserCheck,\n Truck,\n BadgeCheck,\n FileText,\n Settings,\n Loader2,\n AlertCircle,\n} from'lucide-react';\nimport { EmphasisPanel, GlassCard, GradientText } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from'../components/PageLayout';\nimport { MetricsCard } from'../components/MetricsCard';\nimport { CartCard } from'../components/CartCard';\nimport { StatusBadge } from'../components/StatusBadge';\nimport { EmptyState } from'../components/EmptyState';\nimport { useAdapterCloud } from'../context/AdapterCloudContext';\nimport { useAdapterCloudApi } from'../hooks/useAdapterCloudApi';\nimport { cn } from'../utils/cn';\nimport {\n formatCurrency,\n formatDate,\n formatRelativeTime,\n formatDistance,\n} from'../utils/formatters';\nimport type { UserRole, MockCart, MockOrder, DashboardStats } from'../types';\n\n// ---------------------------------------------------------------------------\n// Role-based Quick Action configs\n// ---------------------------------------------------------------------------\n\ninterface QuickAction {\n label: string;\n description: string;\n icon: React.ReactNode;\n path: string;\n color: string;\n}\n\nconst quickActionsByRole: Record<UserRole, QuickAction[]> = {\n customer: [\n {\n label: 'Discover Services',\n description: 'Browse carts near you',\n icon: <Search className=\"h-5 w-5\" />,\n path: '/customer/carts',\n color: 'bg-accent-blue-subtle/10 text-accent-blue',\n },\n {\n label: 'My Orders',\n description: 'Track your orders',\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n path: '/customer/orders',\n color: 'bg-status-success-bg-subtle/10 text-status-success-text',\n },\n {\n label: 'Favorites',\n description: 'Your saved carts',\n icon: <Heart className=\"h-5 w-5\" />,\n path: '/customer/favorites',\n color: 'bg-accent-pink-subtle/10 text-accent-pink',\n },\n {\n label: 'Settings',\n description: 'Manage preferences',\n icon: <Settings className=\"h-5 w-5\" />,\n path: '/settings',\n color: 'bg-bg-sunken text-text-secondary',\n },\n ],\n cart_owner: [\n {\n label: 'My Cart',\n description: 'Manage your cart',\n icon: <Store className=\"h-5 w-5\" />,\n path: '/owner/dashboard',\n color: 'bg-accent-purple-subtle/10 text-accent-purple',\n },\n {\n label: 'Orders',\n description: 'Incoming orders',\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n path: '/owner/orders',\n color: 'bg-accent-blue-subtle/10 text-accent-blue',\n },\n {\n label: 'Analytics',\n description: 'Revenue & insights',\n icon: <BarChart3 className=\"h-5 w-5\" />,\n path: '/owner/analytics',\n color: 'bg-status-success-bg-subtle/10 text-status-success-text',\n },\n {\n label: 'Staff',\n description: 'Manage workers',\n icon: <Users className=\"h-5 w-5\" />,\n path: '/owner/staff',\n color: 'bg-accent-orange-subtle/10 text-accent-orange',\n },\n ],\n worker: [\n {\n label: 'My Tasks',\n description: 'View assigned tasks',\n icon: <ClipboardList className=\"h-5 w-5\" />,\n path: '/worker/dashboard',\n color: 'bg-accent-orange-subtle/10 text-accent-orange',\n },\n {\n label: 'Schedule',\n description: 'View shifts',\n icon: <Clock className=\"h-5 w-5\" />,\n path: '/worker/schedule',\n color: 'bg-accent-blue-subtle/10 text-accent-blue',\n },\n {\n label: 'Earnings',\n description: 'Track pay',\n icon: <Wallet className=\"h-5 w-5\" />,\n path: '/worker/earnings',\n color: 'bg-status-success-bg-subtle/10 text-status-success-text',\n },\n {\n label: 'Performance',\n description: 'Ratings & stats',\n icon: <Star className=\"h-5 w-5\" />,\n path: '/worker/performance',\n color: 'bg-status-warning-bg-subtle/10 text-status-warning-text',\n },\n ],\n investor: [\n {\n label: 'Portfolio',\n description: 'Your investments',\n icon: <TrendingUp className=\"h-5 w-5\" />,\n path: '/investor/dashboard',\n color: 'bg-status-success-bg-subtle/10 text-status-success-text',\n },\n {\n label: 'Opportunities',\n description: 'New investments',\n icon: <HandCoins className=\"h-5 w-5\" />,\n path: '/investor/opportunities',\n color: 'bg-accent-blue-subtle/10 text-accent-blue',\n },\n {\n label: 'Returns',\n description: 'Earnings history',\n icon: <IndianRupee className=\"h-5 w-5\" />,\n path: '/investor/returns',\n color: 'bg-status-success-bg-subtle/10 text-status-success-text',\n },\n {\n label: 'Reports',\n description: 'Performance reports',\n icon: <FileText className=\"h-5 w-5\" />,\n path: '/investor/reports',\n color: 'bg-accent-purple-subtle/10 text-accent-purple',\n },\n ],\n admin: [\n {\n label: 'Dashboard',\n description: 'Platform overview',\n icon: <LayoutDashboard className=\"h-5 w-5\" />,\n path: '/admin/dashboard',\n color: 'bg-status-error-bg-subtle/10 text-status-error-text',\n },\n {\n label: 'Users',\n description: 'Manage accounts',\n icon: <Users className=\"h-5 w-5\" />,\n path: '/admin/users',\n color: 'bg-accent-blue-subtle/10 text-accent-blue',\n },\n {\n label: 'Carts',\n description: 'Approve & manage',\n icon: <Store className=\"h-5 w-5\" />,\n path: '/admin/carts',\n color: 'bg-accent-purple-subtle/10 text-accent-purple',\n },\n {\n label: 'Analytics',\n description: 'Revenue reports',\n icon: <BarChart3 className=\"h-5 w-5\" />,\n path: '/admin/analytics',\n color: 'bg-status-success-bg-subtle/10 text-status-success-text',\n },\n ],\n};\n\n// ---------------------------------------------------------------------------\n// Role-based Quick Stats configs\n// ---------------------------------------------------------------------------\n\nfunction getStatsForRole(\n role: UserRole,\n orders: MockOrder[],\n dashboardStats: DashboardStats | undefined\n) {\n switch (role) {\n case'customer':\n return [\n {\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n value: orders.length.toString(),\n label: 'Total Orders',\n trend: 'up' as const,\n trendValue: '+2 this week',\n },\n {\n icon: <Store className=\"h-5 w-5\" />,\n value: (dashboardStats?.activeProviders ?? 0).toString(),\n label: 'Nearby Providers',\n trend: 'up' as const,\n trendValue: '+3',\n },\n {\n icon: <Star className=\"h-5 w-5\" />,\n value: (dashboardStats?.avgRating ?? 0).toFixed(1),\n label: 'Avg. Rating',\n trend: 'up' as const,\n trendValue: '+0.1',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(\n orders.reduce((s, o) => s + o.total, 0),\n { minimumFractionDigits: 0 }\n ),\n label: 'Total Spent',\n trend: 'neutral' as const,\n trendValue: '',\n },\n ];\n case'cart_owner':\n return [\n {\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n value: '48',\n label: 'Orders Today',\n trend: 'up' as const,\n trendValue: '+12%',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(12850, { minimumFractionDigits: 0 }),\n label: \"Today's Revenue\",\n trend: 'up' as const,\n trendValue: '+8%',\n },\n {\n icon: <Star className=\"h-5 w-5\" />,\n value: '4.6',\n label: 'Cart Rating',\n trend: 'up' as const,\n trendValue: '+0.2',\n },\n {\n icon: <Users className=\"h-5 w-5\" />,\n value: '5',\n label: 'Active Staff',\n trend: 'neutral' as const,\n trendValue: '',\n },\n ];\n case'worker':\n return [\n {\n icon: <ClipboardList className=\"h-5 w-5\" />,\n value: '5',\n label: 'Tasks Today',\n trend: 'up' as const,\n trendValue: '+2',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(425, { minimumFractionDigits: 0 }),\n label: \"Today's Earnings\",\n trend: 'up' as const,\n trendValue: '+15%',\n },\n {\n icon: <Star className=\"h-5 w-5\" />,\n value: '4.7',\n label: 'Rating',\n trend: 'up' as const,\n trendValue: '+0.1',\n },\n {\n icon: <CheckCircle2 className=\"h-5 w-5\" />,\n value: '96.8%',\n label: 'Completion Rate',\n trend: 'up' as const,\n trendValue: '+0.5%',\n },\n ];\n case'investor':\n return [\n {\n icon: <TrendingUp className=\"h-5 w-5\" />,\n value: '3',\n label: 'Active Investments',\n trend: 'up' as const,\n trendValue: '+1',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(450000, { minimumFractionDigits: 0 }),\n label: 'Total Invested',\n trend: 'up' as const,\n trendValue: '',\n },\n {\n icon: <HandCoins className=\"h-5 w-5\" />,\n value: '16.5%',\n label: 'Avg. Returns',\n trend: 'up' as const,\n trendValue: '+2.1%',\n },\n {\n icon: <BarChart3 className=\"h-5 w-5\" />,\n value: formatCurrency(74250, { minimumFractionDigits: 0 }),\n label: 'Total Returns',\n trend: 'up' as const,\n trendValue: '+8.5%',\n },\n ];\n case'admin':\n default:\n return [\n {\n icon: <Users className=\"h-5 w-5\" />,\n value: (dashboardStats?.activeCustomers ?? 0).toLocaleString('en-IN'),\n label: 'Active Customers',\n trend: 'up' as const,\n trendValue: '+50',\n },\n {\n icon: <Store className=\"h-5 w-5\" />,\n value: (dashboardStats?.activeProviders ?? 0).toString(),\n label: 'Service Providers',\n trend: 'up' as const,\n trendValue: '+3',\n },\n {\n icon: <ShoppingBag className=\"h-5 w-5\" />,\n value: (dashboardStats?.totalOrders ?? 0).toLocaleString('en-IN'),\n label: 'Total Orders',\n trend: 'up' as const,\n trendValue: '+12%',\n },\n {\n icon: <IndianRupee className=\"h-5 w-5\" />,\n value: formatCurrency(dashboardStats?.totalRevenue ?? 0, { minimumFractionDigits: 0 }),\n label: 'Total Revenue',\n trend: 'up' as const,\n trendValue: '+8.5%',\n },\n ];\n }\n}\n\n// ---------------------------------------------------------------------------\n// Category data\n// ---------------------------------------------------------------------------\n\nconst categories = [\n {\n label: 'Food & Beverage',\n icon: <ChefHat className=\"h-6 w-6\" />,\n color: 'bg-accent-orange-subtle/10 text-accent-orange',\n },\n {\n label: 'Personal Care & Beauty',\n icon: <Scissors className=\"h-6 w-6\" />,\n color: 'bg-accent-pink-subtle/10 text-accent-pink',\n },\n {\n label: 'Repair & Maintenance',\n icon: <Wrench className=\"h-6 w-6\" />,\n color: 'bg-accent-blue-subtle/10 text-accent-blue',\n },\n {\n label: 'Home Services',\n icon: <Home className=\"h-6 w-6\" />,\n color: 'bg-status-success-bg-subtle/10 text-status-success-text',\n },\n {\n label: 'Clothing & Fashion',\n icon: <Shirt className=\"h-6 w-6\" />,\n color: 'bg-accent-purple-subtle/10 text-accent-purple',\n },\n {\n label: 'Health & Wellness',\n icon: <Heart className=\"h-6 w-6\" />,\n color: 'bg-status-error-bg-subtle/10 text-status-error-text',\n },\n {\n label: 'Education & Skills',\n icon: <GraduationCap className=\"h-6 w-6\" />,\n color: 'bg-status-warning-bg-subtle/10 text-status-warning-text',\n },\n {\n label: 'Retail & Merchandise',\n icon: <Package className=\"h-6 w-6\" />,\n color: 'bg-accent-indigo-subtle/10 text-accent-indigo',\n },\n {\n label: 'Grocery & Essentials',\n icon: <ShoppingCart className=\"h-6 w-6\" />,\n color: 'bg-status-success-bg-subtle/10 text-status-success-text',\n },\n];\n\n// ---------------------------------------------------------------------------\n// How It Works steps\n// ---------------------------------------------------------------------------\n\nconst howItWorks = [\n {\n step: 1,\n title: 'Browse Services',\n description: 'Discover local service providers and carts near you.',\n icon: <Search className=\"h-6 w-6\" />,\n },\n {\n step: 2,\n title: 'Place an Order',\n description: 'Select items or services and place your order seamlessly.',\n icon: <ShoppingBag className=\"h-6 w-6\" />,\n },\n {\n step: 3,\n title: 'Track in Real-time',\n description: 'Get live updates on your order from confirmation to delivery.',\n icon: <Truck className=\"h-6 w-6\" />,\n },\n {\n step: 4,\n title: 'Rate & Review',\n description: 'Share your experience and help others find great services.',\n icon: <Star className=\"h-6 w-6\" />,\n },\n];\n\n// ---------------------------------------------------------------------------\n// Recent activity mock\n// ---------------------------------------------------------------------------\n\nconst mockRecentActivity = [\n {\n id: 'ha-1',\n description: 'New order placed at Dosa Express',\n time: '2 mins ago',\n type: 'order',\n },\n {\n id: 'ha-2',\n description: 'Quick Cuts Salon received a new review',\n time: '15 mins ago',\n type: 'review',\n },\n {\n id: 'ha-3',\n description: 'Investment opportunity funded: Spotless Cleaning',\n time: '1 hour ago',\n type: 'investment',\n },\n {\n id: 'ha-4',\n description: 'New cart registered: Gadget Zone Brigade',\n time: '3 hours ago',\n type: 'cart',\n },\n {\n id: 'ha-5',\n description: 'Order delivered: Fix-It Mobile Repair',\n time: '5 hours ago',\n type: 'order',\n },\n];\n\n// ---------------------------------------------------------------------------\n// Platform Stats\n// ---------------------------------------------------------------------------\n\nconst platformStats = [\n { label: 'Service Providers', value: '21+', icon: <Store className=\"h-5 w-5\" /> },\n { label: 'Categories', value: '9', icon: <Package className=\"h-5 w-5\" /> },\n { label: 'Happy Customers', value: '534+', icon: <Users className=\"h-5 w-5\" /> },\n { label: 'Orders Completed', value: '1,247+', icon: <CheckCircle2 className=\"h-5 w-5\" /> },\n];\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport function HomePage() {\n const { navigateTo, currentUser } = useAdapterCloud();\n const { t: translate } = useI18n();\n const [searchQuery, setSearchQuery] = useState('');\n\n const { providers, orders, dashboardStats } = useAdapterCloudApi();\n\n const t = useCallback(\n (key: string, fallback: string): string => {\n const value = translate(key);\n return value === key ? fallback : value;\n },\n [translate]\n );\n\n const firstName = currentUser?.firstName ?? currentUser?.name ?? 'there';\n const userRole: UserRole = (currentUser?.role as UserRole) ?? 'customer';\n\n const roleLabel: Record<UserRole, string> = {\n customer: t('adaptercloud.home.role.customer', 'Customer'),\n cart_owner: t('adaptercloud.home.role.cartOwner', 'Cart Owner'),\n worker: t('adaptercloud.home.role.worker', 'Worker'),\n investor: t('adaptercloud.home.role.investor', 'Investor'),\n admin: t('adaptercloud.home.role.admin', 'Administrator'),\n };\n\n const roleGreetings: Record<UserRole, string> = {\n customer: t('adaptercloud.home.greeting.customer', 'Discover amazing services near you'),\n cart_owner: t('adaptercloud.home.greeting.cartOwner', 'Manage your business and grow'),\n worker: t('adaptercloud.home.greeting.worker', 'Check your tasks and earnings'),\n investor: t('adaptercloud.home.greeting.investor', 'Track your investments and returns'),\n admin: t('adaptercloud.home.greeting.admin', 'Monitor and manage the platform'),\n };\n\n const quickActions = quickActionsByRole[userRole] ?? quickActionsByRole.customer;\n const stats = getStatsForRole(userRole, orders.data ?? [], dashboardStats.data);\n\n // Featured carts (top-rated, open)\n const featuredCarts = useMemo(() => {\n let carts = (providers.data ?? []).filter((c) => c.isOpen);\n if (searchQuery) {\n const q = searchQuery.toLowerCase();\n carts = carts.filter(\n (c) => c.name.toLowerCase().includes(q) || c.category.toLowerCase().includes(q)\n );\n }\n return carts.sort((a, b) => b.rating - a.rating).slice(0, 6);\n }, [providers.data, searchQuery]);\n\n // Recent orders\n const recentOrders = useMemo(() => {\n return [...(orders.data ?? [])]\n .sort((a, b) => new Date(b.orderDate).getTime() - new Date(a.orderDate).getTime())\n .slice(0, 3);\n }, [orders.data]);\n\n const activityIcons: Record<string, string> = {\n order: 'text-accent-blue',\n review: 'text-status-warning-text',\n investment: 'text-status-success-text',\n cart: 'text-accent-purple',\n };\n\n // Check if\"new user\" (no orders)\n const isNewUser = (orders.data ?? []).length === 0 && !orders.isLoading;\n\n const isLoading = providers.isLoading || orders.isLoading || dashboardStats.isLoading;\n const isError = providers.isError || orders.isError || dashboardStats.isError;\n\n if (isLoading) {\n return (\n <PageLayout title={t('adaptercloud.common.loading', 'Loading...')}>\n <div className=\"flex h-[60vh] items-center justify-center\">\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (isError) {\n return (\n <PageLayout title={t('adaptercloud.common.error', 'Error')}>\n <div className=\"flex h-[60vh] flex-col items-center justify-center gap-4\">\n <AlertCircle className=\"h-12 w-12 text-status-error-text\" />\n <h2 className=\"text-xl font-semibold\">\n {t('adaptercloud.common.errorLoading', 'Error loading data')}\n </h2>\n <p className=\"text-text-secondary\">\n {t('adaptercloud.common.tryAgain', 'Please try again later.')}\n </p>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n hero\n title={\n <>\n {t('adaptercloud.home.hello', 'Hello')},{' '}\n <GradientText>{firstName}</GradientText>!\n </>\n }\n description={roleGreetings[userRole]}\n >\n {/* Welcome Banner for New Users */}\n {isNewUser && (\n <EmphasisPanel className=\"mb-6 p-6\">\n <div className=\"flex items-start gap-4\">\n <div className=\"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10\">\n <Sparkles className=\"h-6 w-6 text-primary\" />\n </div>\n <div className=\"flex-1\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {t('adaptercloud.home.welcomeTitle', 'Welcome to AdapterCloud!')}\n </h2>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {t(\n 'adaptercloud.home.welcomeDescription',\n 'Your local services marketplace. Start by exploring service providers near you or browse categories to find what you need.'\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/carts')}\n className=\"mt-3 inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Search className=\"h-4 w-4\" />\n {t('adaptercloud.home.exploreServices', 'Explore Services')}\n </button>\n </div>\n </div>\n </EmphasisPanel>\n )}\n\n {/* Hero Section with Role Info */}\n <GlassCard treatment=\"glass\" className=\"mb-6 p-6\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <div className=\"flex items-center gap-2 mb-1\">\n <span className=\"inline-flex items-center rounded-full bg-action-primary-bg/10 px-2.5 py-0.5 text-xs font-medium text-primary\">\n <BadgeCheck className=\"mr-1 h-3 w-3\" />\n {roleLabel[userRole]}\n </span>\n </div>\n <h2 className=\"text-xl font-bold text-text-primary\">\n {t('adaptercloud.home.good', 'Good')}{' '}\n {new Date().getHours() < 12\n ? t('adaptercloud.home.time.morning', 'morning')\n : new Date().getHours() < 17\n ? t('adaptercloud.home.time.afternoon', 'afternoon')\n : t('adaptercloud.home.time.evening', 'evening')}\n , {firstName}\n </h2>\n <p className=\"mt-1 text-sm text-text-secondary\">{roleGreetings[userRole]}</p>\n </div>\n <div className=\"relative w-full sm:w-72\">\n <Search className=\"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary\" />\n <input\n type=\"text\"\n placeholder={t('adaptercloud.home.searchPlaceholder', 'Search services, carts...')}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"w-full rounded-lg border border-border-subtle bg-bg-surface py-2.5 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n </GlassCard>\n\n {/* Quick Stats */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.quickStats', 'Quick Stats')}\n </h2>\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n {stats.map((stat, index) => (\n <MetricsCard\n key={stat.label}\n featured={index === 0}\n icon={stat.icon}\n value={stat.value}\n label={stat.label}\n trend={stat.trend}\n trendValue={stat.trendValue}\n />\n ))}\n </div>\n </section>\n\n {/* Quick Actions */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.quickActions', 'Quick Actions')}\n </h2>\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n {quickActions.map((action) => (\n <button\n key={action.label}\n type=\"button\"\n onClick={() => navigateTo(action.path)}\n className={cn(\n 'flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left transition-all bg-gloss-card shadow-pop',\n 'hover:border-accent-foreground/20 hover:shadow-md'\n )}\n >\n <div\n className={cn(\n 'flex h-10 w-10 shrink-0 items-center justify-center rounded-lg',\n action.color\n )}\n >\n {action.icon}\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-semibold text-text-primary\">{action.label}</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">{action.description}</p>\n </div>\n <ArrowRight className=\"h-4 w-4 text-text-secondary shrink-0 mt-1\" />\n </button>\n ))}\n </div>\n </section>\n\n {/* Featured / Nearby Carts */}\n <section className=\"mb-8\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {searchQuery\n ? t('adaptercloud.home.searchResults', 'Search Results')\n : t('adaptercloud.home.featuredCarts', 'Featured Carts')}\n </h2>\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/carts')}\n className=\"flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {t('adaptercloud.common.viewAll', 'View All')} <ArrowRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n\n {featuredCarts.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<Search className=\"h-10 w-10\" />}\n title={t('adaptercloud.home.noCartsFound', 'No carts found')}\n description={t(\n 'adaptercloud.home.noCartsDescription',\n 'Try adjusting your search or browse all categories'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => setSearchQuery('')}\n className=\"rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n {t('adaptercloud.home.clearSearch', 'Clear Search')}\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {featuredCarts.map((cart) => (\n <div\n key={cart.id}\n role=\"button\"\n tabIndex={0}\n onClick={() => navigateTo(`/customer/cart/${cart.id}`)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n navigateTo(`/customer/cart/${cart.id}`);\n }\n }}\n className=\"rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-accent-foreground/20 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n {/* Image */}\n <div className=\"relative h-40 bg-bg-sunken\">\n <img\n src={cart.image}\n alt={cart.name}\n className=\"h-full w-full object-cover\"\n loading=\"lazy\"\n />\n <div className=\"absolute top-2 right-2\">\n <StatusBadge status={cart.isOpen ? 'open' : 'closed'} />\n </div>\n {cart.isVerified && (\n <div className=\"absolute top-2 left-2\">\n <span className=\"inline-flex items-center gap-1 rounded-full bg-accent-blue-subtle/90 px-2 py-0.5 text-xs font-medium text-white backdrop-blur-sm\">\n <BadgeCheck className=\"h-3 w-3\" />{' '}\n {t('adaptercloud.home.verified', 'Verified')}\n </span>\n </div>\n )}\n <div className=\"absolute bottom-2 right-2\">\n <span className=\"inline-flex items-center gap-1 rounded-full bg-black/60 px-2 py-0.5 text-xs text-white backdrop-blur-sm\">\n <Clock className=\"h-3 w-3\" /> {cart.estimatedTime} min\n </span>\n </div>\n </div>\n\n {/* Details */}\n <div className=\"p-4\">\n <div className=\"flex items-start justify-between\">\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"text-base font-semibold text-text-primary truncate\">\n {cart.name}\n </h3>\n <p className=\"mt-0.5 text-sm text-text-secondary\">{cart.category}</p>\n </div>\n <div className=\"flex items-center gap-1 rounded bg-status-success-bg-subtle px-1.5 py-0.5 ml-2 shrink-0\">\n <Star className=\"h-3 w-3 fill-white text-white\" />\n <span className=\"text-xs font-bold text-white\">{cart.rating}</span>\n </div>\n </div>\n\n <div className=\"mt-3 flex items-center gap-4 text-xs text-text-secondary\">\n <span className=\"flex items-center gap-1\">\n <MapPin className=\"h-3 w-3\" /> {formatDistance(cart.distance)}\n </span>\n <span className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3\" /> {cart.totalRatings}{' '}\n {t('adaptercloud.home.reviews', 'reviews')}\n </span>\n {cart.averageOrderValue && (\n <span className=\"flex items-center gap-1\">\n <IndianRupee className=\"h-3 w-3\" /> {t('adaptercloud.home.average', 'Avg.')}{' '}\n {formatCurrency(cart.averageOrderValue, { minimumFractionDigits: 0 })}\n </span>\n )}\n </div>\n\n {/* Tags / service types */}\n {cart.serviceTypes && cart.serviceTypes.length > 0 && (\n <div className=\"mt-3 flex flex-wrap gap-1.5\">\n {cart.serviceTypes.slice(0, 3).map((st) => (\n <span\n key={st}\n className=\"inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary\"\n >\n {st.replace(/_/g, ' ')}\n </span>\n ))}\n </div>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </section>\n\n {/* Recent Orders */}\n {recentOrders.length > 0 && (\n <section className=\"mb-8\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {t('adaptercloud.home.recentOrders', 'Recent Orders')}\n </h2>\n <button\n type=\"button\"\n onClick={() => navigateTo('/customer/orders')}\n className=\"flex items-center gap-1 text-sm font-medium text-primary hover:underline\"\n >\n {t('adaptercloud.common.viewAll', 'View All')} <ArrowRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border\">\n {recentOrders.map((order) => (\n <div\n key={order.id}\n role=\"button\"\n tabIndex={0}\n onClick={() => navigateTo(`/customer/order/${order.id}`)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n navigateTo(`/customer/order/${order.id}`);\n }\n }}\n className=\"flex items-center gap-4 px-4 py-3 hover:bg-accent/50 transition-colors cursor-pointer\"\n >\n <img\n src={order.cartImage}\n alt={order.cartName}\n className=\"h-12 w-12 rounded-lg object-cover shrink-0\"\n />\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium text-text-primary truncate\">{order.cartName}</p>\n <StatusBadge status={order.status} />\n </div>\n <p className=\"text-xs text-text-secondary mt-0.5\">\n {order.items.map((i) => i.name).join(', ')}\n </p>\n </div>\n <div className=\"text-right shrink-0\">\n <p className=\"text-sm font-semibold text-text-primary\">\n {formatCurrency(order.total, { minimumFractionDigits: 0 })}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {formatRelativeTime(order.orderDate)}\n </p>\n </div>\n </div>\n ))}\n </div>\n </section>\n )}\n\n {/* How It Works */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.howItWorks', 'How It Works')}\n </h2>\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n {howItWorks.map((item) => (\n <div\n key={item.step}\n className=\"relative rounded-lg border border-border-seam bg-bg-surface p-5 text-center bg-gloss-card shadow-pop\"\n >\n <div className=\"absolute -top-3 left-1/2 -translate-x-1/2\">\n <span className=\"inline-flex h-6 w-6 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text\">\n {item.step}\n </span>\n </div>\n <div className=\"mt-2 flex justify-center text-text-secondary mb-3\">{item.icon}</div>\n <h3 className=\"text-sm font-semibold text-text-primary\">{item.title}</h3>\n <p className=\"mt-1 text-xs text-text-secondary\">{item.description}</p>\n </div>\n ))}\n </div>\n </section>\n\n {/* Browse by Category */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.browseByCategory', 'Browse by Category')}\n </h2>\n <div className=\"grid grid-cols-3 gap-3 sm:grid-cols-4 lg:grid-cols-5\">\n {categories.map((cat) => (\n <button\n key={cat.label}\n type=\"button\"\n onClick={() =>\n navigateTo(`/customer/carts?category=${encodeURIComponent(cat.label)}`)\n }\n className=\"flex flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center hover:shadow-sm hover:border-accent-foreground/20 transition-all bg-gloss-card shadow-pop\"\n >\n <div\n className={cn('flex h-12 w-12 items-center justify-center rounded-full', cat.color)}\n >\n {cat.icon}\n </div>\n <span className=\"text-xs font-medium text-text-primary leading-tight\">{cat.label}</span>\n </button>\n ))}\n </div>\n </section>\n\n {/* Platform Stats */}\n <section className=\"mb-8\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.platformStats', 'Platform Stats')}\n </h2>\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n {platformStats.map((stat) => (\n <div\n key={stat.label}\n className=\"flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\"\n >\n <div className=\"flex h-10 w-10 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary shrink-0\">\n {stat.icon}\n </div>\n <div>\n <p className=\"text-lg font-bold text-text-primary\">{stat.value}</p>\n <p className=\"text-xs text-text-secondary\">{stat.label}</p>\n </div>\n </div>\n ))}\n </div>\n </section>\n\n {/* Recent Activity */}\n <section>\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {t('adaptercloud.home.recentActivity', 'Recent Activity')}\n </h2>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border\">\n {mockRecentActivity.map((item) => (\n <div key={item.id} className=\"flex items-center gap-3 px-4 py-3\">\n <div className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken\">\n <Activity\n className={cn('h-4 w-4', activityIcons[item.type] ?? 'text-text-secondary')}\n />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm text-text-primary truncate\">{item.description}</p>\n </div>\n <span className=\"text-xs text-text-secondary whitespace-nowrap\">{item.time}</span>\n </div>\n ))}\n </div>\n </section>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA8EA,IAAM,IAAsD;CAC1D,UAAU;EACR;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA;GACpC,MAAM;GACN,OAAO;GACR;EACD;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAa,WAAU,WAAY,CAAA;GACzC,MAAM;GACN,OAAO;GACR;EACD;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAO,WAAU,WAAY,CAAA;GACnC,MAAM;GACN,OAAO;GACR;EACD;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAU,WAAU,WAAY,CAAA;GACtC,MAAM;GACN,OAAO;GACR;EACF;CACD,YAAY;EACV;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAO,WAAU,WAAY,CAAA;GACnC,MAAM;GACN,OAAO;GACR;EACD;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAa,WAAU,WAAY,CAAA;GACzC,MAAM;GACN,OAAO;GACR;EACD;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA;GACvC,MAAM;GACN,OAAO;GACR;EACD;GACE,OAAO;GACP,aAAa;GACb,MAAM,kBAAC,GAAD,EAAO,WAAU,WAAY,CAAA;GACnC,MAAM;GACN,OAAO;GACR;EACF;CACD,QAAQ;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AAK;OAAY,CAAA;MAC9E;OAVI,EAAK,GAUT,CACN;IACE,CAAA,CACE,EAAA,CAAA;GACC"}
@@ -118,7 +118,7 @@ function v() {
118
118
  }, 800);
119
119
  return () => clearTimeout(e);
120
120
  }, [C]);
121
- let D = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : i(e, { minimumFractionDigits: 0 }), O = (e) => e === 0 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-yellow-500" }) : e === 1 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-gray-400" }) : e === 2 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-amber-700" }) : /* @__PURE__ */ g(c, { className: "h-5 w-5 text-text-secondary" });
121
+ let D = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : i(e, { minimumFractionDigits: 0 }), O = (e) => e === 0 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-status-warning-text" }) : e === 1 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-text-secondary" }) : e === 2 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ g(c, { className: "h-5 w-5 text-text-secondary" });
122
122
  if (x || !y) return /* @__PURE__ */ g(n, {
123
123
  title: "Platform Analytics",
124
124
  description: "Loading analytics...",
@@ -252,52 +252,52 @@ function v() {
252
252
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
253
253
  children: [
254
254
  /* @__PURE__ */ _("div", {
255
- className: "rounded-lg border border-green-500/30 bg-green-500/10 p-4",
255
+ className: "rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/10 p-4",
256
256
  children: [
257
257
  /* @__PURE__ */ g("p", {
258
- className: "text-sm text-green-600 dark:text-green-400",
258
+ className: "text-sm text-status-success-text",
259
259
  children: "Completed Orders"
260
260
  }),
261
261
  /* @__PURE__ */ g("p", {
262
- className: "text-2xl font-bold text-green-700 dark:text-green-300",
262
+ className: "text-2xl font-bold text-status-success-text",
263
263
  children: y.orders.completed.toLocaleString("en-IN")
264
264
  }),
265
265
  /* @__PURE__ */ _("p", {
266
- className: "text-sm text-green-600/80 dark:text-green-400/80",
266
+ className: "text-sm text-status-success-text",
267
267
  children: [(y.orders.completed / y.orders.total * 100).toFixed(1), "% of total"]
268
268
  })
269
269
  ]
270
270
  }),
271
271
  /* @__PURE__ */ _("div", {
272
- className: "rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-4",
272
+ className: "rounded-lg border border-status-warning-border/30 bg-status-warning-bg-subtle/10 p-4",
273
273
  children: [
274
274
  /* @__PURE__ */ g("p", {
275
- className: "text-sm text-yellow-600 dark:text-yellow-400",
275
+ className: "text-sm text-status-warning-text",
276
276
  children: "Pending Orders"
277
277
  }),
278
278
  /* @__PURE__ */ g("p", {
279
- className: "text-2xl font-bold text-yellow-700 dark:text-yellow-300",
279
+ className: "text-2xl font-bold text-status-warning-text",
280
280
  children: y.orders.pending.toLocaleString("en-IN")
281
281
  }),
282
282
  /* @__PURE__ */ _("p", {
283
- className: "text-sm text-yellow-600/80 dark:text-yellow-400/80",
283
+ className: "text-sm text-status-warning-text",
284
284
  children: [(y.orders.pending / y.orders.total * 100).toFixed(1), "% of total"]
285
285
  })
286
286
  ]
287
287
  }),
288
288
  /* @__PURE__ */ _("div", {
289
- className: "rounded-lg border border-red-500/30 bg-red-500/10 p-4",
289
+ className: "rounded-lg border border-status-error-border/30 bg-status-error-bg-subtle/10 p-4",
290
290
  children: [
291
291
  /* @__PURE__ */ g("p", {
292
- className: "text-sm text-red-600 dark:text-red-400",
292
+ className: "text-sm text-status-error-text",
293
293
  children: "Cancelled Orders"
294
294
  }),
295
295
  /* @__PURE__ */ g("p", {
296
- className: "text-2xl font-bold text-red-700 dark:text-red-300",
296
+ className: "text-2xl font-bold text-status-error-text",
297
297
  children: y.orders.cancelled.toLocaleString("en-IN")
298
298
  }),
299
299
  /* @__PURE__ */ _("p", {
300
- className: "text-sm text-red-600/80 dark:text-red-400/80",
300
+ className: "text-sm text-status-error-text",
301
301
  children: [(y.orders.cancelled / y.orders.total * 100).toFixed(1), "% of total"]
302
302
  })
303
303
  ]
@@ -357,7 +357,7 @@ function v() {
357
357
  className: "px-4 py-3 text-sm text-right text-text-primary",
358
358
  children: /* @__PURE__ */ _("span", {
359
359
  className: "flex items-center justify-end gap-1",
360
- children: [/* @__PURE__ */ g(f, { className: "h-3.5 w-3.5 fill-yellow-400 text-yellow-400" }), e.rating]
360
+ children: [/* @__PURE__ */ g(f, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), e.rating]
361
361
  })
362
362
  })
363
363
  ]
@@ -372,12 +372,12 @@ function v() {
372
372
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
373
373
  children: [
374
374
  /* @__PURE__ */ _("div", {
375
- className: "rounded-lg border border-blue-500/30 bg-blue-500/10 p-6",
375
+ className: "rounded-lg border border-accent-blue-subtle/30 bg-accent-blue-subtle/10 p-6",
376
376
  children: [/* @__PURE__ */ g("h4", {
377
- className: "text-sm font-medium text-blue-600 dark:text-blue-400 mb-2",
377
+ className: "text-sm font-medium text-accent-blue mb-2",
378
378
  children: "This Month"
379
379
  }), /* @__PURE__ */ g("p", {
380
- className: "text-2xl font-bold text-blue-700 dark:text-blue-300",
380
+ className: "text-2xl font-bold text-accent-blue",
381
381
  children: D(y.revenue.thisMonth)
382
382
  })]
383
383
  }),
@@ -392,12 +392,12 @@ function v() {
392
392
  })]
393
393
  }),
394
394
  /* @__PURE__ */ _("div", {
395
- className: "rounded-lg border border-green-500/30 bg-green-500/10 p-6",
395
+ className: "rounded-lg border border-status-success-border/30 bg-status-success-bg-subtle/10 p-6",
396
396
  children: [/* @__PURE__ */ g("h4", {
397
- className: "text-sm font-medium text-green-600 dark:text-green-400 mb-2",
397
+ className: "text-sm font-medium text-status-success-text mb-2",
398
398
  children: "Average Order Value"
399
399
  }), /* @__PURE__ */ _("p", {
400
- className: "text-2xl font-bold text-green-700 dark:text-green-300",
400
+ className: "text-2xl font-bold text-status-success-text",
401
401
  children: ["₹", y.orders.averageOrderValue]
402
402
  })]
403
403
  })
@@ -484,13 +484,13 @@ function v() {
484
484
  className: "text-sm text-text-secondary mb-2",
485
485
  children: "New Users This Month"
486
486
  }), /* @__PURE__ */ g("p", {
487
- className: "text-3xl font-bold text-blue-600 dark:text-blue-400",
487
+ className: "text-3xl font-bold text-accent-blue",
488
488
  children: y.users.newThisMonth
489
489
  })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
490
490
  className: "text-sm text-text-secondary mb-2",
491
491
  children: "Active Users Rate"
492
492
  }), /* @__PURE__ */ _("p", {
493
- className: "text-3xl font-bold text-green-600 dark:text-green-400",
493
+ className: "text-3xl font-bold text-status-success-text",
494
494
  children: [(y.users.active / y.users.total * 100).toFixed(1), "%"]
495
495
  })] })]
496
496
  })]
@@ -503,7 +503,7 @@ function v() {
503
503
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
504
504
  children: [
505
505
  /* @__PURE__ */ _("div", {
506
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
506
+ className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
507
507
  children: [
508
508
  /* @__PURE__ */ _("div", {
509
509
  className: "flex items-center gap-2 mb-2",
@@ -523,7 +523,7 @@ function v() {
523
523
  ]
524
524
  }),
525
525
  /* @__PURE__ */ _("div", {
526
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
526
+ className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
527
527
  children: [
528
528
  /* @__PURE__ */ _("div", {
529
529
  className: "flex items-center gap-2 mb-2",
@@ -534,7 +534,7 @@ function v() {
534
534
  }),
535
535
  /* @__PURE__ */ _("p", {
536
536
  className: "text-3xl font-bold text-text-primary flex items-center gap-1",
537
- children: [/* @__PURE__ */ g(f, { className: "h-6 w-6 fill-yellow-400 text-yellow-400" }), y.performance.customerSatisfaction]
537
+ children: [/* @__PURE__ */ g(f, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), y.performance.customerSatisfaction]
538
538
  }),
539
539
  /* @__PURE__ */ g("p", {
540
540
  className: "text-sm text-text-secondary mt-1",
@@ -543,7 +543,7 @@ function v() {
543
543
  ]
544
544
  }),
545
545
  /* @__PURE__ */ _("div", {
546
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
546
+ className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
547
547
  children: [
548
548
  /* @__PURE__ */ _("div", {
549
549
  className: "flex items-center gap-2 mb-2",
@@ -578,27 +578,27 @@ function v() {
578
578
  className: "text-sm text-text-secondary mb-2",
579
579
  children: "Operating Costs"
580
580
  }), /* @__PURE__ */ g("p", {
581
- className: "text-2xl font-bold text-red-600 dark:text-red-400",
581
+ className: "text-2xl font-bold text-status-error-text",
582
582
  children: D(y.performance.operatingCosts)
583
583
  })] }),
584
584
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
585
585
  className: "text-sm text-text-secondary mb-2",
586
586
  children: "Total Revenue"
587
587
  }), /* @__PURE__ */ g("p", {
588
- className: "text-2xl font-bold text-blue-600 dark:text-blue-400",
588
+ className: "text-2xl font-bold text-accent-blue",
589
589
  children: D(y.revenue.total)
590
590
  })] }),
591
591
  /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
592
592
  className: "text-sm text-text-secondary mb-2",
593
593
  children: "Net Profit"
594
594
  }), /* @__PURE__ */ g("p", {
595
- className: "text-2xl font-bold text-green-600 dark:text-green-400",
595
+ className: "text-2xl font-bold text-status-success-text",
596
596
  children: D(y.performance.netProfit)
597
597
  })] })
598
598
  ]
599
599
  }),
600
600
  /* @__PURE__ */ _("div", {
601
- className: "mt-4 rounded-lg border border-border-subtle bg-bg-surface p-4",
601
+ className: "mt-4 rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
602
602
  children: [/* @__PURE__ */ g("p", {
603
603
  className: "text-sm text-text-secondary",
604
604
  children: "Profit Margin"
@@ -610,7 +610,7 @@ function v() {
610
610
  ]
611
611
  }),
612
612
  /* @__PURE__ */ _("div", {
613
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
613
+ className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
614
614
  children: [/* @__PURE__ */ g("h3", {
615
615
  className: "text-lg font-semibold text-text-primary mb-4",
616
616
  children: "Today's Performance"
@@ -620,13 +620,13 @@ function v() {
620
620
  className: "text-sm text-text-secondary mb-2",
621
621
  children: "Orders Today"
622
622
  }), /* @__PURE__ */ g("p", {
623
- className: "text-3xl font-bold text-blue-600 dark:text-blue-400",
623
+ className: "text-3xl font-bold text-accent-blue",
624
624
  children: y.orders.ordersToday
625
625
  })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
626
626
  className: "text-sm text-text-secondary mb-2",
627
627
  children: "Estimated Revenue"
628
628
  }), /* @__PURE__ */ g("p", {
629
- className: "text-3xl font-bold text-green-600 dark:text-green-400",
629
+ className: "text-3xl font-bold text-status-success-text",
630
630
  children: D(y.orders.ordersToday * y.orders.averageOrderValue)
631
631
  })] })]
632
632
  })]