@optifye/dashboard-core 6.5.2 → 6.5.4

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.
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ import { noop, warning, invariant, progress, secondsToMilliseconds, milliseconds
13
13
  import { getValueTransition, hover, press, isPrimaryPointer, GroupPlaybackControls, setDragLock, supportsLinearEasing, attachTimeline, isGenerator, calcGeneratorDuration, isWaapiSupportedEasing, mapEasingToNativeEasing, maxGeneratorDuration, generateLinearEasing, isBezierDefinition } from 'motion-dom';
14
14
  import { BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Bar, LabelList, ResponsiveContainer, LineChart as LineChart$1, Line, PieChart, Pie, Cell, ReferenceLine, ComposedChart, Area, ScatterChart, Scatter } from 'recharts';
15
15
  import { Slot } from '@radix-ui/react-slot';
16
- import { Camera, ChevronDown, ChevronUp, Check, ShieldCheck, Star, Award, X, Coffee, Plus, ArrowLeft, Clock, Calendar, Save, Minus, ArrowDown, ArrowUp, Settings2, CheckCircle2, Search, Loader2, AlertCircle, Edit2, CheckCircle, AlertTriangle, Info, Share2, Trophy, Target, Download, User, XCircle, ChevronLeft, ChevronRight, Sun, Moon, MessageSquare, Trash2, RefreshCw, Menu, Send, Copy, UserCheck, LogOut, Package, TrendingUp, TrendingDown, Activity, Settings, LifeBuoy, EyeOff, Eye, Zap, UserCircle } from 'lucide-react';
16
+ import { Camera, ChevronDown, ChevronUp, Check, ShieldCheck, Star, Award, X, Coffee, Plus, ArrowLeft, Clock, Calendar, Save, Minus, ArrowDown, ArrowUp, Settings2, CheckCircle2, Search, Loader2, AlertCircle, Edit2, CheckCircle, AlertTriangle, Info, Share2, Trophy, Target, Download, User, XCircle, ChevronLeft, ChevronRight, Activity, Sun, Moon, MessageSquare, Trash2, RefreshCw, Menu, Send, Copy, UserCheck, LogOut, Package, TrendingUp, TrendingDown, Settings, LifeBuoy, EyeOff, Eye, Zap, UserCircle } from 'lucide-react';
17
17
  import { DayPicker, useNavigation as useNavigation$1 } from 'react-day-picker';
18
18
  import { XMarkIcon, ArrowRightIcon, HomeIcon, TrophyIcon, ChartBarIcon, AdjustmentsHorizontalIcon, ClockIcon, CubeIcon, SparklesIcon, QuestionMarkCircleIcon, HeartIcon, UserCircleIcon, ExclamationCircleIcon, EnvelopeIcon, DocumentTextIcon, ChevronUpIcon, ChevronDownIcon, Bars3Icon, CheckCircleIcon, ChatBubbleLeftRightIcon, XCircleIcon, InformationCircleIcon, ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/24/outline';
19
19
  import { CheckIcon } from '@heroicons/react/24/solid';
@@ -1875,7 +1875,29 @@ var WorkspaceHealthService = class _WorkspaceHealthService {
1875
1875
  throw error;
1876
1876
  }
1877
1877
  const processedData = (data || []).map((item) => this.processHealthStatus(item));
1878
- let filteredData = processedData;
1878
+ let uptimeMap = /* @__PURE__ */ new Map();
1879
+ if (options.companyId || data && data.length > 0) {
1880
+ const companyId = options.companyId || data[0]?.company_id;
1881
+ if (companyId) {
1882
+ try {
1883
+ uptimeMap = await this.calculateWorkspaceUptime(companyId);
1884
+ } catch (error2) {
1885
+ console.error("Error calculating uptime:", error2);
1886
+ }
1887
+ }
1888
+ }
1889
+ const dataWithUptime = processedData.map((workspace) => {
1890
+ const uptimeDetails = uptimeMap.get(workspace.workspace_id);
1891
+ if (uptimeDetails) {
1892
+ return {
1893
+ ...workspace,
1894
+ uptimePercentage: uptimeDetails.percentage,
1895
+ uptimeDetails
1896
+ };
1897
+ }
1898
+ return workspace;
1899
+ });
1900
+ let filteredData = dataWithUptime;
1879
1901
  try {
1880
1902
  const { data: enabledWorkspaces, error: workspaceError } = await supabase.from("workspaces").select("workspace_id, display_name").eq("enable", true);
1881
1903
  if (!workspaceError && enabledWorkspaces && enabledWorkspaces.length > 0) {
@@ -1951,13 +1973,31 @@ var WorkspaceHealthService = class _WorkspaceHealthService {
1951
1973
  const healthyWorkspaces = workspaces.filter((w) => w.status === "healthy").length;
1952
1974
  const unhealthyWorkspaces = workspaces.filter((w) => w.status === "unhealthy").length;
1953
1975
  const warningWorkspaces = workspaces.filter((w) => w.status === "warning").length;
1954
- const uptimePercentage = totalWorkspaces > 0 ? healthyWorkspaces / totalWorkspaces * 100 : 0;
1976
+ let uptimePercentage = 0;
1977
+ let totalDowntimeMinutes = 0;
1978
+ if (totalWorkspaces > 0) {
1979
+ const workspacesWithUptime = workspaces.filter((w) => w.uptimePercentage !== void 0 && w.uptimeDetails !== void 0);
1980
+ if (workspacesWithUptime.length > 0) {
1981
+ const totalUptime = workspacesWithUptime.reduce((sum, w) => sum + (w.uptimePercentage || 0), 0);
1982
+ uptimePercentage = totalUptime / workspacesWithUptime.length;
1983
+ totalDowntimeMinutes = workspacesWithUptime.reduce((sum, w) => {
1984
+ if (w.uptimeDetails) {
1985
+ const downtime = Math.max(0, w.uptimeDetails.expectedMinutes - w.uptimeDetails.actualMinutes);
1986
+ return sum + downtime;
1987
+ }
1988
+ return sum;
1989
+ }, 0);
1990
+ } else {
1991
+ uptimePercentage = healthyWorkspaces / totalWorkspaces * 100;
1992
+ }
1993
+ }
1955
1994
  return {
1956
1995
  totalWorkspaces,
1957
1996
  healthyWorkspaces,
1958
1997
  unhealthyWorkspaces,
1959
1998
  warningWorkspaces,
1960
1999
  uptimePercentage,
2000
+ totalDowntimeMinutes,
1961
2001
  lastUpdated: (/* @__PURE__ */ new Date()).toISOString()
1962
2002
  };
1963
2003
  }
@@ -2037,6 +2077,155 @@ var WorkspaceHealthService = class _WorkspaceHealthService {
2037
2077
  clearCache() {
2038
2078
  this.cache.clear();
2039
2079
  }
2080
+ async calculateWorkspaceUptime(companyId) {
2081
+ const supabase = _getSupabaseInstance();
2082
+ if (!supabase) throw new Error("Supabase client not initialized");
2083
+ const dashboardConfig = _getDashboardConfigInstance();
2084
+ const timezone = dashboardConfig?.dateTimeConfig?.defaultTimezone || "UTC";
2085
+ const shiftConfig = dashboardConfig?.shiftConfig;
2086
+ const currentShiftInfo = getCurrentShift(timezone, shiftConfig);
2087
+ const currentDate = currentShiftInfo.date;
2088
+ const currentShiftId = currentShiftInfo.shiftId;
2089
+ const now2 = /* @__PURE__ */ new Date();
2090
+ const currentHour = now2.getHours();
2091
+ const currentMinute = now2.getMinutes();
2092
+ let shiftStartHour;
2093
+ let shiftEndHour;
2094
+ if (currentShiftId === 0) {
2095
+ shiftStartHour = 9;
2096
+ shiftEndHour = 18;
2097
+ } else {
2098
+ shiftStartHour = 20;
2099
+ shiftEndHour = 3;
2100
+ }
2101
+ let elapsedMinutes = 0;
2102
+ if (currentShiftId === 0) {
2103
+ if (currentHour >= shiftStartHour && currentHour < shiftEndHour) {
2104
+ elapsedMinutes = (currentHour - shiftStartHour) * 60 + currentMinute;
2105
+ } else if (currentHour >= shiftEndHour) {
2106
+ elapsedMinutes = (shiftEndHour - shiftStartHour) * 60;
2107
+ }
2108
+ } else {
2109
+ if (currentHour >= shiftStartHour) {
2110
+ elapsedMinutes = (currentHour - shiftStartHour) * 60 + currentMinute;
2111
+ } else if (currentHour < shiftEndHour) {
2112
+ elapsedMinutes = (24 - shiftStartHour + currentHour) * 60 + currentMinute;
2113
+ }
2114
+ }
2115
+ const tableName = `performance_metrics_${companyId.replace(/-/g, "_")}`;
2116
+ const query = `
2117
+ WITH workspace_uptime AS (
2118
+ SELECT
2119
+ workspace_id,
2120
+ workspace_display_name,
2121
+ idle_time_hourly,
2122
+ output_hourly,
2123
+ shift_start,
2124
+ shift_end
2125
+ FROM ${tableName}
2126
+ WHERE date = $1::date
2127
+ AND shift_id = $2
2128
+ ),
2129
+ calculated_uptime AS (
2130
+ SELECT
2131
+ workspace_id,
2132
+ workspace_display_name,
2133
+ -- Calculate actual minutes from hourly data
2134
+ (
2135
+ SELECT COALESCE(SUM(
2136
+ CASE
2137
+ WHEN jsonb_array_length(idle_time_hourly->key::text) >= 58 THEN 60
2138
+ WHEN jsonb_array_length(idle_time_hourly->key::text) > 0 THEN jsonb_array_length(idle_time_hourly->key::text)
2139
+ ELSE 0
2140
+ END
2141
+ ), 0)
2142
+ FROM jsonb_object_keys(idle_time_hourly) AS key
2143
+ WHERE key::int >= $3 AND key::int < $4
2144
+ ) +
2145
+ -- Add current hour's data if applicable
2146
+ CASE
2147
+ WHEN $4::int >= $3 AND $4::int < $5 THEN
2148
+ LEAST($6::int,
2149
+ COALESCE(jsonb_array_length(idle_time_hourly->$4::text), 0))
2150
+ ELSE 0
2151
+ END as actual_minutes
2152
+ FROM workspace_uptime
2153
+ )
2154
+ SELECT
2155
+ workspace_id,
2156
+ workspace_display_name,
2157
+ actual_minutes,
2158
+ $7::int as expected_minutes,
2159
+ ROUND(
2160
+ CASE
2161
+ WHEN $7::int > 0 THEN (actual_minutes::numeric / $7::numeric) * 100
2162
+ ELSE 100
2163
+ END, 1
2164
+ ) as uptime_percentage
2165
+ FROM calculated_uptime
2166
+ `;
2167
+ try {
2168
+ const { data, error } = await supabase.rpc("sql_query", {
2169
+ query_text: query,
2170
+ params: [
2171
+ currentDate,
2172
+ currentShiftId,
2173
+ shiftStartHour,
2174
+ currentHour,
2175
+ shiftEndHour,
2176
+ currentMinute,
2177
+ elapsedMinutes
2178
+ ]
2179
+ }).single();
2180
+ if (error) {
2181
+ const { data: queryData, error: queryError } = await supabase.from(tableName).select("workspace_id, workspace_display_name, idle_time_hourly, output_hourly").eq("date", currentDate).eq("shift_id", currentShiftId);
2182
+ if (queryError) {
2183
+ console.error("Error fetching performance metrics:", queryError);
2184
+ return /* @__PURE__ */ new Map();
2185
+ }
2186
+ const uptimeMap2 = /* @__PURE__ */ new Map();
2187
+ for (const record of queryData || []) {
2188
+ let actualMinutes = 0;
2189
+ const idleTimeHourly = record.idle_time_hourly || {};
2190
+ if (idleTimeHourly && typeof idleTimeHourly === "object") {
2191
+ for (const [hour, dataArray] of Object.entries(idleTimeHourly)) {
2192
+ const hourNum = parseInt(hour);
2193
+ if (hourNum >= shiftStartHour && hourNum < currentHour) {
2194
+ const arrayLength = Array.isArray(dataArray) ? dataArray.length : 0;
2195
+ actualMinutes += arrayLength >= 58 ? 60 : arrayLength;
2196
+ } else if (hourNum === currentHour && currentHour >= shiftStartHour) {
2197
+ const arrayLength = Array.isArray(dataArray) ? dataArray.length : 0;
2198
+ actualMinutes += Math.min(currentMinute, arrayLength);
2199
+ }
2200
+ }
2201
+ }
2202
+ const percentage = elapsedMinutes > 0 ? Math.round(actualMinutes / elapsedMinutes * 1e3) / 10 : 100;
2203
+ uptimeMap2.set(record.workspace_id, {
2204
+ expectedMinutes: elapsedMinutes,
2205
+ actualMinutes,
2206
+ percentage,
2207
+ lastCalculated: (/* @__PURE__ */ new Date()).toISOString()
2208
+ });
2209
+ }
2210
+ return uptimeMap2;
2211
+ }
2212
+ const uptimeMap = /* @__PURE__ */ new Map();
2213
+ if (Array.isArray(data)) {
2214
+ for (const record of data) {
2215
+ uptimeMap.set(record.workspace_id, {
2216
+ expectedMinutes: record.expected_minutes,
2217
+ actualMinutes: record.actual_minutes,
2218
+ percentage: record.uptime_percentage,
2219
+ lastCalculated: (/* @__PURE__ */ new Date()).toISOString()
2220
+ });
2221
+ }
2222
+ }
2223
+ return uptimeMap;
2224
+ } catch (error) {
2225
+ console.error("Error calculating workspace uptime:", error);
2226
+ return /* @__PURE__ */ new Map();
2227
+ }
2228
+ }
2040
2229
  };
2041
2230
  var workspaceHealthService = WorkspaceHealthService.getInstance();
2042
2231
 
@@ -19695,7 +19884,7 @@ var OptifyeLogoLoader = ({
19695
19884
  className: `${sizeClasses[size]} h-auto animate-pulse select-none pointer-events-none`
19696
19885
  }
19697
19886
  ),
19698
- message && /* @__PURE__ */ jsx("div", { className: "mt-3 text-gray-600 text-sm font-medium text-center", children: message })
19887
+ message && /* @__PURE__ */ jsx("div", { className: "mt-3 text-gray-600 text-base sm:text-sm font-medium text-center", children: message })
19699
19888
  ]
19700
19889
  }
19701
19890
  );
@@ -21584,11 +21773,13 @@ var VideoCard = React19__default.memo(({
21584
21773
  return /* @__PURE__ */ jsxs(
21585
21774
  "div",
21586
21775
  {
21587
- className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer transform hover:scale-[1.005] transition-transform duration-200 shadow-sm ${className}`,
21776
+ className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer transform hover:scale-[1.005] active:scale-[0.995] transition-transform duration-200 shadow-sm touch-manipulation ${className}`,
21588
21777
  style: { width: "100%", height: "100%" },
21589
21778
  onClick: handleClick,
21590
21779
  onMouseEnter,
21591
21780
  onMouseLeave,
21781
+ onTouchStart: (e) => e.currentTarget.classList.add("touch-active"),
21782
+ onTouchEnd: (e) => e.currentTarget.classList.remove("touch-active"),
21592
21783
  title: displayName,
21593
21784
  tabIndex: 0,
21594
21785
  "aria-label": `Open workspace ${displayName}`,
@@ -21606,8 +21797,8 @@ var VideoCard = React19__default.memo(({
21606
21797
  ] }) }),
21607
21798
  /* @__PURE__ */ jsxs("div", { className: "relative w-full h-full overflow-hidden bg-black", children: [
21608
21799
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black z-0", children: /* @__PURE__ */ jsxs("div", { className: "animate-pulse flex flex-col items-center", children: [
21609
- /* @__PURE__ */ jsx(Camera, { className: `${compact ? "w-4 h-4" : "w-6 h-6"} text-gray-500` }),
21610
- /* @__PURE__ */ jsx("span", { className: `${compact ? "text-[10px]" : "text-xs"} text-gray-500 mt-1`, children: "Loading..." })
21800
+ /* @__PURE__ */ jsx(Camera, { className: `w-5 h-5 sm:${compact ? "w-4 h-4" : "w-6 h-6"} text-gray-500` }),
21801
+ /* @__PURE__ */ jsx("span", { className: `text-[11px] sm:${compact ? "text-[10px]" : "text-xs"} text-gray-500 mt-1`, children: "Loading..." })
21611
21802
  ] }) }),
21612
21803
  /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 z-10", children: [
21613
21804
  /* @__PURE__ */ jsx(
@@ -21642,10 +21833,10 @@ var VideoCard = React19__default.memo(({
21642
21833
  }
21643
21834
  ) })
21644
21835
  ] }),
21645
- /* @__PURE__ */ jsxs("div", { className: `absolute bottom-0 left-0 right-0 bg-black bg-opacity-60 ${compact ? "p-1" : "p-1.5"} flex justify-between items-center z-10`, children: [
21836
+ /* @__PURE__ */ jsxs("div", { className: `absolute bottom-0 left-0 right-0 bg-black bg-opacity-60 p-1.5 sm:${compact ? "p-1" : "p-1.5"} flex justify-between items-center z-10`, children: [
21646
21837
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
21647
21838
  /* @__PURE__ */ jsx(Camera, { size: compact ? 10 : 12, className: "text-white" }),
21648
- /* @__PURE__ */ jsx("p", { className: `text-white ${compact ? "text-[10px]" : "text-xs"} font-medium tracking-wide`, children: displayName })
21839
+ /* @__PURE__ */ jsx("p", { className: `text-white text-[11px] sm:${compact ? "text-[10px]" : "text-xs"} font-medium tracking-wide`, children: displayName })
21649
21840
  ] }),
21650
21841
  /* @__PURE__ */ jsxs("div", { className: `flex items-center ${compact ? "gap-1" : "gap-1.5"}`, children: [
21651
21842
  trendInfo && /* @__PURE__ */ jsx(
@@ -21657,7 +21848,7 @@ var VideoCard = React19__default.memo(({
21657
21848
  }
21658
21849
  ),
21659
21850
  /* @__PURE__ */ jsx("div", { className: `${compact ? "w-1 h-1" : "w-1.5 h-1.5"} rounded-full bg-green-500` }),
21660
- /* @__PURE__ */ jsx("span", { className: `text-white ${compact ? "text-[10px]" : "text-xs"}`, children: "Live" })
21851
+ /* @__PURE__ */ jsx("span", { className: `text-white text-[11px] sm:${compact ? "text-[10px]" : "text-xs"}`, children: "Live" })
21661
21852
  ] })
21662
21853
  ] })
21663
21854
  ]
@@ -21867,10 +22058,10 @@ var VideoGridView = React19__default.memo(({
21867
22058
  view_type: "video_grid"
21868
22059
  });
21869
22060
  }, []);
21870
- return /* @__PURE__ */ jsx("div", { className: `relative overflow-hidden h-full w-full ${className}`, children: /* @__PURE__ */ jsx("div", { ref: containerRef, className: "h-full w-full p-2", children: /* @__PURE__ */ jsx(
22061
+ return /* @__PURE__ */ jsx("div", { className: `relative overflow-hidden h-full w-full ${className}`, children: /* @__PURE__ */ jsx("div", { ref: containerRef, className: "h-full w-full p-3 sm:p-2", children: /* @__PURE__ */ jsx(
21871
22062
  "div",
21872
22063
  {
21873
- className: "grid h-full w-full gap-2",
22064
+ className: "grid h-full w-full gap-3 sm:gap-2",
21874
22065
  style: {
21875
22066
  gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
21876
22067
  gridTemplateRows: `repeat(${gridRows}, 1fr)`,
@@ -22655,15 +22846,15 @@ var BreakNotificationPopup = ({
22655
22846
  /* @__PURE__ */ jsx("div", { className: "w-2 h-2 bg-amber-500 rounded-full animate-pulse flex-shrink-0 mt-2" }),
22656
22847
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
22657
22848
  /* @__PURE__ */ jsxs("div", { className: "mb-1", children: [
22658
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-sm text-gray-900", children: breakItem.remarks || "Break" }),
22659
- (activeBreaks.length > 1 || lineNames[breakItem.lineId]) && /* @__PURE__ */ jsx("div", { className: "text-xs text-gray-500 mt-0.5", children: lineNames[breakItem.lineId] || `Line ${breakItem.lineId.substring(0, 8)}` })
22849
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-base sm:text-sm text-gray-900", children: breakItem.remarks || "Break" }),
22850
+ (activeBreaks.length > 1 || lineNames[breakItem.lineId]) && /* @__PURE__ */ jsx("div", { className: "text-sm sm:text-xs text-gray-500 mt-0.5", children: lineNames[breakItem.lineId] || `Line ${breakItem.lineId.substring(0, 8)}` })
22660
22851
  ] }),
22661
- /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-600 font-medium", children: [
22852
+ /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxs("div", { className: "text-sm sm:text-xs text-gray-600 font-medium", children: [
22662
22853
  breakItem.startTime,
22663
22854
  " - ",
22664
22855
  breakItem.endTime
22665
22856
  ] }) }),
22666
- /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-500", children: [
22857
+ /* @__PURE__ */ jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxs("div", { className: "text-sm sm:text-xs text-gray-500", children: [
22667
22858
  formatTime3(breakItem.elapsedMinutes),
22668
22859
  " / ",
22669
22860
  formatTime3(breakItem.duration)
@@ -22683,9 +22874,11 @@ var BreakNotificationPopup = ({
22683
22874
  "button",
22684
22875
  {
22685
22876
  onClick: handleDismiss,
22686
- className: "ml-2 text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",
22877
+ onTouchStart: () => {
22878
+ },
22879
+ className: "ml-2 text-gray-400 hover:text-gray-600 transition-colors p-2 sm:p-1 rounded-full hover:bg-gray-100 active:bg-gray-200 touch-manipulation min-h-[44px] min-w-[44px] sm:min-h-0 sm:min-w-0 flex items-center justify-center",
22687
22880
  "aria-label": "Dismiss notification",
22688
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
22881
+ children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4 sm:w-3 sm:h-3" })
22689
22882
  }
22690
22883
  )
22691
22884
  ] })
@@ -23381,7 +23574,7 @@ var TimeDisplay = ({ className, variant = "default" }) => {
23381
23574
  className: `flex items-center space-x-1.5 bg-white/60 backdrop-blur-sm px-2 py-0.5 rounded-md shadow-xs ${className || ""}`,
23382
23575
  children: [
23383
23576
  /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-3 w-3 text-[var(--primary-DEFAULT)]", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z", clipRule: "evenodd" }) }),
23384
- /* @__PURE__ */ jsxs("span", { className: "text-[11px] font-medium text-gray-800 tabular-nums tracking-tight", children: [
23577
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-[11px] font-medium text-gray-800 tabular-nums tracking-tight", children: [
23385
23578
  time2,
23386
23579
  " ",
23387
23580
  timeSuffix
@@ -25940,7 +26133,7 @@ var SelectTrigger = React19.forwardRef(({ className, children, ...props }, ref)
25940
26133
  {
25941
26134
  ref,
25942
26135
  className: cn(
25943
- "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
26136
+ "flex h-11 sm:h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 touch-manipulation",
25944
26137
  className
25945
26138
  ),
25946
26139
  ...props,
@@ -28057,23 +28250,23 @@ var WorkspaceGridItem = React19__default.memo(({
28057
28250
  isVeryLowEfficiency && !isInactive && /* @__PURE__ */ jsx("div", { className: "absolute -top-10 left-1/2 -translate-x-1/2 z-30", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
28058
28251
  /* @__PURE__ */ jsx("div", { className: "absolute -inset-1 bg-red-400/50 rounded-full blur-sm animate-pulse" }),
28059
28252
  /* @__PURE__ */ jsx("div", { className: "absolute -inset-0.5 bg-red-500/30 rounded-full blur-md animate-ping [animation-duration:1.5s]" }),
28060
- /* @__PURE__ */ jsx("div", { className: "bg-[#E34329] w-9 h-9 rounded-full flex items-center justify-center text-white font-bold text-lg shadow-lg ring-2 ring-red-400/40 border border-red-400/80 animate-pulse", children: "!" })
28253
+ /* @__PURE__ */ jsx("div", { className: "bg-[#E34329] w-8 h-8 sm:w-9 sm:h-9 rounded-full flex items-center justify-center text-white font-bold text-base sm:text-lg shadow-lg ring-2 ring-red-400/40 border border-red-400/80 animate-pulse", children: "!" })
28061
28254
  ] }) }),
28062
28255
  /* @__PURE__ */ jsx(
28063
28256
  "button",
28064
28257
  {
28065
28258
  onClick: handleClick,
28066
- className: `${styles2} ${colorClass} ${isBottleneck ? "ring-2 ring-red-500/70" : ""} ${isVeryLowEfficiency ? "ring-2 ring-red-500/50" : ""} ${isInactive ? "bg-gray-200" : ""} shadow-lg`,
28259
+ className: `${styles2} ${colorClass} ${isBottleneck ? "ring-2 ring-red-500/70" : ""} ${isVeryLowEfficiency ? "ring-2 ring-red-500/50" : ""} ${isInactive ? "bg-gray-200" : ""} shadow-lg touch-manipulation active:scale-[0.98] transition-transform`,
28067
28260
  "aria-label": isInactive ? `Inactive workspace ${workspaceNumber}` : `View details for workspace ${workspaceNumber}`,
28068
28261
  title: isInactive ? `Inactive: ${getWorkspaceDisplayName(data.workspace_name, data.line_id)}` : getWorkspaceDisplayName(data.workspace_name, data.line_id),
28069
- children: /* @__PURE__ */ jsx("div", { className: `font-semibold tracking-wide text-[min(4vw,2rem)] uppercase ${isInactive ? "text-gray-400" : "text-white"} drop-shadow-sm`, children: workspaceNumber })
28262
+ children: /* @__PURE__ */ jsx("div", { className: `font-semibold tracking-wide text-lg sm:text-xl md:text-[min(4vw,2rem)] uppercase ${isInactive ? "text-gray-400" : "text-white"} drop-shadow-sm`, children: workspaceNumber })
28070
28263
  }
28071
28264
  ),
28072
28265
  arrow && !isInactive && /* @__PURE__ */ jsx(
28073
28266
  "div",
28074
28267
  {
28075
28268
  className: `absolute left-1/2 -translate-x-1/2 ${arrowPosition}
28076
- text-[min(3.5vw,2.25rem)] font-bold tracking-tight ${arrowColor} drop-shadow-sm`,
28269
+ text-base sm:text-lg md:text-[min(3.5vw,2.25rem)] font-bold tracking-tight ${arrowColor} drop-shadow-sm`,
28077
28270
  style: { bottom: "-2.5rem", lineHeight: 1, display: "flex", alignItems: "center", justifyContent: "center" },
28078
28271
  children: arrow
28079
28272
  }
@@ -28103,11 +28296,11 @@ var WorkspaceGrid = React19__default.memo(({
28103
28296
  }, [workspaces.length]);
28104
28297
  const { VideoGridView: VideoGridViewComponent } = useRegistry();
28105
28298
  return /* @__PURE__ */ jsxs("div", { className: `relative w-full h-full overflow-hidden ${className}`, children: [
28106
- /* @__PURE__ */ jsxs("div", { className: "absolute top-0 left-2 sm:left-4 right-2 sm:right-8 z-20", children: [
28107
- /* @__PURE__ */ jsx("div", { className: "flex flex-row items-center justify-between py-1 sm:py-1.5 gap-2", children: /* @__PURE__ */ jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx(Legend6, {}) }) }),
28108
- /* @__PURE__ */ jsx("div", { className: "sm:hidden mt-1", children: /* @__PURE__ */ jsx(Legend6, {}) })
28299
+ /* @__PURE__ */ jsxs("div", { className: "absolute top-0 left-4 sm:left-4 right-4 sm:right-8 z-20", children: [
28300
+ /* @__PURE__ */ jsx("div", { className: "flex flex-row items-center justify-between py-2 sm:py-1.5 gap-2", children: /* @__PURE__ */ jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx(Legend6, {}) }) }),
28301
+ /* @__PURE__ */ jsx("div", { className: "sm:hidden mt-2", children: /* @__PURE__ */ jsx(Legend6, {}) })
28109
28302
  ] }),
28110
- /* @__PURE__ */ jsx("div", { className: "absolute top-10 sm:top-16 left-0 right-0 bottom-0", children: /* @__PURE__ */ jsx(
28303
+ /* @__PURE__ */ jsx("div", { className: "absolute top-12 sm:top-16 left-0 right-0 bottom-0", children: /* @__PURE__ */ jsx(
28111
28304
  VideoGridViewComponent,
28112
28305
  {
28113
28306
  workspaces,
@@ -28322,8 +28515,8 @@ var KPICard = ({
28322
28515
  const cardClasses = clsx(
28323
28516
  // Base classes
28324
28517
  "rounded-lg transition-all duration-200",
28325
- // Sizing based on compact mode - extra compact on mobile
28326
- "p-1.5 sm:p-3 md:p-4",
28518
+ // Sizing based on compact mode - better padding on mobile
28519
+ "p-2.5 sm:p-3 md:p-4",
28327
28520
  // Variant-specific styling
28328
28521
  {
28329
28522
  "bg-white/50 backdrop-blur-sm border border-gray-200/60 shadow-sm hover:shadow-md dark:bg-gray-800/50 dark:border-gray-700/60": style.variant === "default",
@@ -28331,10 +28524,10 @@ var KPICard = ({
28331
28524
  "bg-blue-50 border border-blue-200 dark:bg-blue-900/20 dark:border-blue-800/30": style.variant === "filled",
28332
28525
  "bg-gray-50/50 dark:bg-gray-800/30": style.variant === "subtle"
28333
28526
  },
28334
- // Width for src matching - compact on mobile, flexible on small screens
28335
- !className?.includes("w-") && "w-[120px] sm:w-[180px] md:w-[220px]",
28336
- // Interactive styling if onClick is provided
28337
- onClick && "cursor-pointer hover:scale-[1.01] active:scale-[0.99]",
28527
+ // Width for src matching - better mobile width, flexible on small screens
28528
+ !className?.includes("w-") && "w-[110px] sm:w-[180px] md:w-[220px]",
28529
+ // Interactive styling if onClick is provided - better touch targets
28530
+ onClick && "cursor-pointer hover:scale-[1.01] active:scale-[0.99] touch-manipulation min-h-[44px] min-w-[44px]",
28338
28531
  // Loading state
28339
28532
  isLoading && "animate-pulse",
28340
28533
  // User-provided classes
@@ -28345,20 +28538,22 @@ var KPICard = ({
28345
28538
  {
28346
28539
  className: cardClasses,
28347
28540
  onClick,
28541
+ onTouchStart: onClick ? () => {
28542
+ } : void 0,
28348
28543
  role: onClick ? "button" : void 0,
28349
28544
  tabIndex: onClick ? 0 : void 0,
28350
28545
  onKeyDown: onClick ? (e) => e.key === "Enter" && onClick() : void 0,
28351
28546
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
28352
28547
  /* @__PURE__ */ jsx("span", { className: clsx(
28353
28548
  "font-medium text-gray-500 dark:text-gray-400",
28354
- "text-[9px] sm:text-xs md:text-sm",
28355
- "mb-0.5 sm:mb-1 md:mb-2",
28356
- "uppercase tracking-wider"
28549
+ "text-[10px] sm:text-xs md:text-sm",
28550
+ "mb-1 sm:mb-1 md:mb-2",
28551
+ "uppercase tracking-wide sm:tracking-wider"
28357
28552
  ), children: title }),
28358
28553
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-0.5 sm:gap-2 flex-wrap", children: [
28359
28554
  /* @__PURE__ */ jsx("span", { className: clsx(
28360
28555
  "font-bold text-gray-900 dark:text-gray-50",
28361
- "text-sm sm:text-xl md:text-2xl"
28556
+ "text-base sm:text-xl md:text-2xl"
28362
28557
  ), children: isLoading ? "\u2014" : formattedValue }),
28363
28558
  suffix && !isLoading && /* @__PURE__ */ jsx("span", { className: clsx(
28364
28559
  "font-medium text-gray-600 dark:text-gray-300",
@@ -28533,35 +28728,46 @@ var KPISection = memo(({
28533
28728
  const outputDifference = kpis.outputProgress.current - kpis.outputProgress.idealOutput;
28534
28729
  const outputIsOnTarget = outputDifference >= 0;
28535
28730
  if (useSrcLayout) {
28536
- return /* @__PURE__ */ jsxs("div", { className: `flex gap-1 sm:gap-3 overflow-x-auto sm:overflow-visible pb-1 sm:pb-0 ${className || ""}`, children: [
28537
- /* @__PURE__ */ jsx(
28538
- KPICard,
28539
- {
28540
- title: "Underperforming",
28541
- value: "2/3",
28542
- change: 0
28543
- }
28544
- ),
28545
- /* @__PURE__ */ jsx(
28546
- KPICard,
28547
- {
28548
- title: "Efficiency",
28549
- value: kpis.efficiency.value,
28550
- change: kpis.efficiency.change,
28551
- suffix: "%"
28552
- }
28553
- ),
28554
- /* @__PURE__ */ jsx(
28555
- KPICard,
28556
- {
28557
- title: "Output Progress",
28558
- value: `${kpis.outputProgress.current}/${kpis.outputProgress.target}`,
28559
- change: kpis.outputProgress.change,
28560
- outputDifference,
28561
- showOutputDetails: true
28562
- }
28563
- )
28564
- ] });
28731
+ return /* @__PURE__ */ jsxs(
28732
+ "div",
28733
+ {
28734
+ className: `flex gap-2 sm:gap-3 overflow-x-auto sm:overflow-visible pb-2 sm:pb-0 ${className || ""}`,
28735
+ style: {
28736
+ scrollbarWidth: "none",
28737
+ msOverflowStyle: "none",
28738
+ WebkitScrollbar: { display: "none" }
28739
+ },
28740
+ children: [
28741
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx(
28742
+ KPICard,
28743
+ {
28744
+ title: "Underperforming",
28745
+ value: "2/3",
28746
+ change: 0
28747
+ }
28748
+ ) }),
28749
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx(
28750
+ KPICard,
28751
+ {
28752
+ title: "Efficiency",
28753
+ value: kpis.efficiency.value,
28754
+ change: kpis.efficiency.change,
28755
+ suffix: "%"
28756
+ }
28757
+ ) }),
28758
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx(
28759
+ KPICard,
28760
+ {
28761
+ title: "Output Progress",
28762
+ value: `${kpis.outputProgress.current}/${kpis.outputProgress.target}`,
28763
+ change: kpis.outputProgress.change,
28764
+ outputDifference,
28765
+ showOutputDetails: true
28766
+ }
28767
+ ) })
28768
+ ]
28769
+ }
28770
+ );
28565
28771
  }
28566
28772
  const kpiCardData = [
28567
28773
  {
@@ -28694,6 +28900,19 @@ var WorkspaceHealthCard = ({
28694
28900
  const formatTimeAgo = (timeString) => {
28695
28901
  return timeString.replace("about ", "").replace(" ago", "");
28696
28902
  };
28903
+ const formatDowntime = (uptimeDetails) => {
28904
+ if (!uptimeDetails) return "";
28905
+ const downtimeMinutes = Math.max(0, uptimeDetails.expectedMinutes - uptimeDetails.actualMinutes);
28906
+ if (downtimeMinutes === 0) return "No downtime";
28907
+ if (downtimeMinutes < 1) return "< 1 min downtime";
28908
+ if (downtimeMinutes < 60) return `${downtimeMinutes} min downtime`;
28909
+ const hours = Math.floor(downtimeMinutes / 60);
28910
+ const minutes = downtimeMinutes % 60;
28911
+ if (minutes === 0) {
28912
+ return `${hours} hr downtime`;
28913
+ }
28914
+ return `${hours} hr ${minutes} min downtime`;
28915
+ };
28697
28916
  return /* @__PURE__ */ jsx(
28698
28917
  Card2,
28699
28918
  {
@@ -28727,13 +28946,32 @@ var WorkspaceHealthCard = ({
28727
28946
  /* @__PURE__ */ jsx("span", { children: config.statusText })
28728
28947
  ] })
28729
28948
  ] }),
28730
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
28731
- /* @__PURE__ */ jsx(Clock, { className: "h-3.5 w-3.5 text-gray-400" }),
28732
- /* @__PURE__ */ jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 whitespace-nowrap", children: [
28733
- "Last seen: ",
28734
- /* @__PURE__ */ jsx("span", { className: "font-medium", children: formatTimeAgo(workspace.timeSinceLastUpdate) })
28735
- ] })
28736
- ] }) }) })
28949
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
28950
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
28951
+ /* @__PURE__ */ jsx(Clock, { className: "h-3.5 w-3.5 text-gray-400" }),
28952
+ /* @__PURE__ */ jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 whitespace-nowrap", children: [
28953
+ "Last seen: ",
28954
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: formatTimeAgo(workspace.timeSinceLastUpdate) })
28955
+ ] })
28956
+ ] }),
28957
+ workspace.uptimePercentage !== void 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
28958
+ /* @__PURE__ */ jsx(Activity, { className: "h-3.5 w-3.5 text-gray-400" }),
28959
+ /* @__PURE__ */ jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 whitespace-nowrap", children: [
28960
+ "Uptime today: ",
28961
+ /* @__PURE__ */ jsxs("span", { className: clsx(
28962
+ "font-medium",
28963
+ workspace.uptimePercentage >= 97 ? "text-green-600 dark:text-green-400" : workspace.uptimePercentage >= 90 ? "text-yellow-600 dark:text-yellow-400" : "text-red-600 dark:text-red-400"
28964
+ ), children: [
28965
+ workspace.uptimePercentage.toFixed(1),
28966
+ "%"
28967
+ ] })
28968
+ ] })
28969
+ ] }),
28970
+ workspace.uptimeDetails && workspace.uptimeDetails.expectedMinutes > workspace.uptimeDetails.actualMinutes && workspace.uptimePercentage !== void 0 && /* @__PURE__ */ jsx("div", { className: "flex", children: /* @__PURE__ */ jsx("span", { className: clsx(
28971
+ "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",
28972
+ workspace.uptimePercentage >= 97 ? "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" : workspace.uptimePercentage >= 90 ? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400" : "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
28973
+ ), children: formatDowntime(workspace.uptimeDetails) }) })
28974
+ ] })
28737
28975
  ] })
28738
28976
  }
28739
28977
  );
@@ -28804,6 +29042,20 @@ var CompactWorkspaceHealthCard = ({
28804
29042
  ] })
28805
29043
  ] }),
28806
29044
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
29045
+ workspace.uptimePercentage !== void 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
29046
+ /* @__PURE__ */ jsxs("p", { className: clsx(
29047
+ "text-xs font-medium",
29048
+ workspace.uptimePercentage >= 97 ? "text-green-600 dark:text-green-400" : workspace.uptimePercentage >= 90 ? "text-yellow-600 dark:text-yellow-400" : "text-red-600 dark:text-red-400"
29049
+ ), children: [
29050
+ workspace.uptimePercentage.toFixed(1),
29051
+ "%"
29052
+ ] }),
29053
+ workspace.uptimeDetails && workspace.uptimeDetails.expectedMinutes > workspace.uptimeDetails.actualMinutes && /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-400 dark:text-gray-400", children: "\u2022" }),
29054
+ workspace.uptimeDetails && workspace.uptimeDetails.expectedMinutes > workspace.uptimeDetails.actualMinutes && /* @__PURE__ */ jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
29055
+ Math.max(0, workspace.uptimeDetails.expectedMinutes - workspace.uptimeDetails.actualMinutes),
29056
+ "m down"
29057
+ ] })
29058
+ ] }),
28807
29059
  /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: workspace.timeSinceLastUpdate }),
28808
29060
  /* @__PURE__ */ jsx("div", { className: clsx("h-2 w-2 rounded-full", config.dot) })
28809
29061
  ] })
@@ -29025,33 +29277,33 @@ var DashboardHeader = memo(({ lineTitle, className = "", headerControls }) => {
29025
29277
  return /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" }) });
29026
29278
  }
29027
29279
  };
29028
- return /* @__PURE__ */ jsxs("div", { className: `flex flex-row items-center justify-between w-full ${className}`, children: [
29280
+ return /* @__PURE__ */ jsxs("div", { className: `flex flex-col sm:flex-row items-start sm:items-center justify-between w-full gap-3 sm:gap-4 ${className}`, children: [
29029
29281
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
29030
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 sm:gap-2 md:gap-3", children: [
29031
- /* @__PURE__ */ jsx("h1", { className: "text-base sm:text-xl md:text-2xl lg:text-3xl font-bold text-gray-800 tracking-tight leading-none", children: lineTitle }),
29032
- /* @__PURE__ */ jsx("div", { className: "h-1 w-1 sm:h-1.5 sm:w-1.5 md:h-2 md:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1" })
29282
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2 md:gap-3", children: [
29283
+ /* @__PURE__ */ jsx("h1", { className: "text-base sm:text-lg md:text-xl lg:text-2xl xl:text-3xl font-bold text-gray-800 tracking-tight leading-none truncate max-w-[200px] sm:max-w-[250px] md:max-w-[350px] lg:max-w-none", children: lineTitle }),
29284
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 w-1.5 sm:h-1.5 sm:w-1.5 md:h-2 md:w-2 rounded-full bg-green-500 animate-pulse ring-2 sm:ring-2 ring-green-500/30 ring-offset-1 flex-shrink-0" })
29033
29285
  ] }),
29034
- /* @__PURE__ */ jsxs("div", { className: "mt-2 inline-flex items-center gap-3", children: [
29035
- /* @__PURE__ */ jsxs("div", { className: "text-sm font-medium text-gray-600", children: [
29286
+ /* @__PURE__ */ jsxs("div", { className: "mt-1 sm:mt-2 inline-flex flex-wrap items-center gap-2 sm:gap-3", children: [
29287
+ /* @__PURE__ */ jsxs("div", { className: "text-[10px] sm:text-xs md:text-sm font-medium text-gray-600 whitespace-nowrap", children: [
29036
29288
  /* @__PURE__ */ jsx(ISTTimer2, {}),
29037
29289
  " IST"
29038
29290
  ] }),
29039
29291
  /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-1", children: [
29040
29292
  /* @__PURE__ */ jsx("div", { className: "text-gray-600", children: getShiftIcon() }),
29041
- /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-gray-600", children: [
29293
+ /* @__PURE__ */ jsxs("span", { className: "text-[10px] sm:text-xs md:text-sm font-medium text-gray-600 whitespace-nowrap", children: [
29042
29294
  getShiftName(),
29043
29295
  " Shift"
29044
29296
  ] })
29045
29297
  ] })
29046
29298
  ] })
29047
29299
  ] }),
29048
- headerControls && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-4", children: headerControls })
29300
+ headerControls && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-4 w-full sm:w-auto justify-end", children: headerControls })
29049
29301
  ] });
29050
29302
  });
29051
29303
  DashboardHeader.displayName = "DashboardHeader";
29052
- var NoWorkspaceData = memo(({ message = "No workspace data available", className = "" }) => /* @__PURE__ */ jsx("div", { className: `flex h-full items-center justify-center ${className}`, children: /* @__PURE__ */ jsx("div", { className: "rounded-lg bg-white p-4 shadow-md", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 text-gray-500", children: [
29053
- /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) }),
29054
- /* @__PURE__ */ jsx("span", { children: message })
29304
+ var NoWorkspaceData = memo(({ message = "No workspace data available", className = "" }) => /* @__PURE__ */ jsx("div", { className: `flex h-full items-center justify-center ${className}`, children: /* @__PURE__ */ jsx("div", { className: "rounded-lg bg-white p-5 sm:p-4 shadow-md", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3 sm:space-x-2 text-gray-500", children: [
29305
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6 sm:h-5 sm:w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) }),
29306
+ /* @__PURE__ */ jsx("span", { className: "text-base sm:text-sm", children: message })
29055
29307
  ] }) }) }));
29056
29308
  NoWorkspaceData.displayName = "NoWorkspaceData";
29057
29309
  var WorkspaceMonthlyDataFetcher = ({
@@ -29176,10 +29428,10 @@ var HamburgerButton = ({
29176
29428
  "button",
29177
29429
  {
29178
29430
  type: "button",
29179
- className: `md:hidden p-2 rounded-md text-gray-500 hover:text-gray-600 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 ${className}`,
29431
+ className: `md:hidden p-2.5 rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-100 active:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors ${className}`,
29180
29432
  onClick,
29181
29433
  "aria-label": ariaLabel,
29182
- children: /* @__PURE__ */ jsx(Bars3Icon, { className: "w-6 h-6" })
29434
+ children: /* @__PURE__ */ jsx(Bars3Icon, { className: "w-7 h-7" })
29183
29435
  }
29184
29436
  );
29185
29437
  };
@@ -29357,27 +29609,27 @@ var PageHeader = ({
29357
29609
  className
29358
29610
  ),
29359
29611
  children: [
29360
- /* @__PURE__ */ jsxs("div", { className: "h-16 mx-auto px-4 sm:px-6 lg:px-8 flex items-center justify-between", children: [
29361
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
29612
+ /* @__PURE__ */ jsxs("div", { className: "h-14 sm:h-16 mx-auto px-3 sm:px-4 md:px-6 lg:px-8 flex items-center justify-between", children: [
29613
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0 flex-1", children: [
29362
29614
  onMobileMenuOpen && /* @__PURE__ */ jsx(HamburgerButton, { onClick: onMobileMenuOpen }),
29363
- headerLogo && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mr-2 md:hidden", children: headerLogo }),
29615
+ headerLogo && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mr-1 sm:mr-2 md:hidden", children: headerLogo }),
29364
29616
  " ",
29365
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
29617
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0 flex-1", children: [
29366
29618
  breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Breadcrumbs, { items: breadcrumbs }),
29367
- /* @__PURE__ */ jsx("h1", { className: "text-lg md:text-xl font-semibold text-gray-900 dark:text-white truncate", title, children: title })
29619
+ /* @__PURE__ */ jsx("h1", { className: "text-sm sm:text-base md:text-lg lg:text-xl font-semibold text-gray-900 dark:text-white truncate", title, children: title })
29368
29620
  ] })
29369
29621
  ] }),
29370
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 md:gap-4", children: [
29371
- actions && /* @__PURE__ */ jsx("div", { className: "hidden md:flex items-center gap-2", children: actions }),
29372
- /* @__PURE__ */ jsxs("button", { onClick: toggleDarkMode, className: "p-1.5 rounded-md text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-indigo-500", children: [
29373
- darkMode ? /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
29622
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-4 flex-shrink-0", children: [
29623
+ actions && /* @__PURE__ */ jsx("div", { className: "hidden sm:flex items-center gap-2", children: actions }),
29624
+ /* @__PURE__ */ jsxs("button", { onClick: toggleDarkMode, className: "p-1 sm:p-1.5 rounded-md text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-indigo-500", children: [
29625
+ darkMode ? /* @__PURE__ */ jsx(Sun, { className: "h-4 w-4 sm:h-5 sm:w-5" }) : /* @__PURE__ */ jsx(Moon, { className: "h-4 w-4 sm:h-5 sm:w-5" }),
29374
29626
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle dark mode" })
29375
29627
  ] }),
29376
- showDateTime && /* @__PURE__ */ jsx(DateTimeDisplay, { className: "hidden lg:flex" }),
29628
+ showDateTime && /* @__PURE__ */ jsx(DateTimeDisplay, { className: "hidden sm:flex text-xs sm:text-sm" }),
29377
29629
  userProfileConfig && /* @__PURE__ */ jsx(UserProfileDropdown, { config: userProfileConfig })
29378
29630
  ] })
29379
29631
  ] }),
29380
- actions && /* @__PURE__ */ jsx("div", { className: "md:hidden px-4 pb-2 border-t border-gray-200 dark:border-gray-700 flex items-center justify-end gap-2", children: actions })
29632
+ actions && /* @__PURE__ */ jsx("div", { className: "sm:hidden px-3 py-2 border-t border-gray-200 dark:border-gray-700 flex items-center justify-end gap-2", children: actions })
29381
29633
  ]
29382
29634
  }
29383
29635
  );
@@ -29401,9 +29653,9 @@ var SideNavBar = memo(({
29401
29653
  const pathname = propPathname || router.pathname;
29402
29654
  const getButtonClasses = useCallback((path) => {
29403
29655
  const isActive = pathname === path || pathname.startsWith(path + "/");
29404
- return `w-full flex flex-col items-center justify-center py-3 px-1 rounded-lg relative group
29405
- ${isActive ? "bg-blue-100 text-blue-700 shadow-md border border-blue-200 font-semibold" : "hover:bg-gray-50 text-gray-500 hover:text-gray-700 font-medium"}
29406
- transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2`;
29656
+ return `w-full flex flex-col items-center justify-center py-4 sm:py-3 px-2 sm:px-1 rounded-lg relative group min-h-[44px] sm:min-h-0
29657
+ ${isActive ? "bg-blue-100 text-blue-700 shadow-md border border-blue-200 font-semibold" : "hover:bg-gray-50 text-gray-500 hover:text-gray-700 font-medium active:bg-gray-100"}
29658
+ transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 active:scale-[0.98]`;
29407
29659
  }, [pathname]);
29408
29660
  const handleHomeClick = useCallback(() => {
29409
29661
  navigate("/", {
@@ -29567,7 +29819,7 @@ var SideNavBar = memo(({
29567
29819
  "aria-selected": pathname === "/" || pathname.startsWith("//"),
29568
29820
  children: [
29569
29821
  /* @__PURE__ */ jsx(HomeIcon, { className: "w-5 h-5 mb-1" }),
29570
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Home" })
29822
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Home" })
29571
29823
  ]
29572
29824
  }
29573
29825
  ) }),
@@ -29583,7 +29835,7 @@ var SideNavBar = memo(({
29583
29835
  "aria-selected": pathname === "/leaderboard" || pathname.startsWith("/leaderboard/"),
29584
29836
  children: [
29585
29837
  /* @__PURE__ */ jsx(TrophyIcon, { className: "w-5 h-5 mb-1" }),
29586
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Leaders" })
29838
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Leaders" })
29587
29839
  ]
29588
29840
  }
29589
29841
  ),
@@ -29598,7 +29850,7 @@ var SideNavBar = memo(({
29598
29850
  "aria-selected": pathname === "/kpis" || pathname.startsWith("/kpis/"),
29599
29851
  children: [
29600
29852
  /* @__PURE__ */ jsx(ChartBarIcon, { className: "w-5 h-5 mb-1" }),
29601
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Lines" })
29853
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Lines" })
29602
29854
  ]
29603
29855
  }
29604
29856
  ),
@@ -29613,7 +29865,7 @@ var SideNavBar = memo(({
29613
29865
  "aria-selected": pathname === "/targets" || pathname.startsWith("/targets/"),
29614
29866
  children: [
29615
29867
  /* @__PURE__ */ jsx(AdjustmentsHorizontalIcon, { className: "w-5 h-5 mb-1" }),
29616
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Targets" })
29868
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Targets" })
29617
29869
  ]
29618
29870
  }
29619
29871
  ),
@@ -29628,7 +29880,7 @@ var SideNavBar = memo(({
29628
29880
  "aria-selected": pathname === "/shifts" || pathname.startsWith("/shifts/"),
29629
29881
  children: [
29630
29882
  /* @__PURE__ */ jsx(ClockIcon, { className: "w-5 h-5 mb-1" }),
29631
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Shifts" })
29883
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Shifts" })
29632
29884
  ]
29633
29885
  }
29634
29886
  ),
@@ -29643,7 +29895,7 @@ var SideNavBar = memo(({
29643
29895
  "aria-selected": pathname === "/skus" || pathname.startsWith("/skus/"),
29644
29896
  children: [
29645
29897
  /* @__PURE__ */ jsx(CubeIcon, { className: "w-5 h-5 mb-1" }),
29646
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "SKUs" })
29898
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "SKUs" })
29647
29899
  ]
29648
29900
  }
29649
29901
  ),
@@ -29658,7 +29910,7 @@ var SideNavBar = memo(({
29658
29910
  "aria-selected": pathname === "/ai-agent" || pathname.startsWith("/ai-agent/"),
29659
29911
  children: [
29660
29912
  /* @__PURE__ */ jsx(SparklesIcon, { className: "w-5 h-5 mb-1" }),
29661
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Axel" })
29913
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Axel" })
29662
29914
  ]
29663
29915
  }
29664
29916
  ),
@@ -29673,7 +29925,7 @@ var SideNavBar = memo(({
29673
29925
  "aria-selected": pathname === "/help" || pathname.startsWith("/help/"),
29674
29926
  children: [
29675
29927
  /* @__PURE__ */ jsx(QuestionMarkCircleIcon, { className: "w-5 h-5 mb-1" }),
29676
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Help" })
29928
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Help" })
29677
29929
  ]
29678
29930
  }
29679
29931
  ),
@@ -29688,7 +29940,7 @@ var SideNavBar = memo(({
29688
29940
  "aria-selected": pathname === "/health" || pathname.startsWith("/health/"),
29689
29941
  children: [
29690
29942
  /* @__PURE__ */ jsx(HeartIcon, { className: "w-5 h-5 mb-1" }),
29691
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Health" })
29943
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Health" })
29692
29944
  ]
29693
29945
  }
29694
29946
  )
@@ -29705,33 +29957,194 @@ var SideNavBar = memo(({
29705
29957
  "aria-selected": pathname === "/profile" || pathname.startsWith("/profile/"),
29706
29958
  children: [
29707
29959
  /* @__PURE__ */ jsx(UserCircleIcon, { className: "w-5 h-5 mb-1" }),
29708
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Profile" })
29960
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Profile" })
29709
29961
  ]
29710
29962
  }
29711
29963
  ) })
29712
29964
  ] });
29965
+ const MobileNavigationContent = () => {
29966
+ const isActive = (path) => {
29967
+ if (path === "/" && pathname === "/") return true;
29968
+ if (path !== "/" && pathname.startsWith(path)) return true;
29969
+ return false;
29970
+ };
29971
+ const getMobileButtonClass = (path) => {
29972
+ const active = isActive(path);
29973
+ return `w-full flex items-center gap-3 px-5 py-3.5 rounded-lg transition-colors active:scale-[0.98] ${active ? "bg-blue-50 text-blue-700" : "text-gray-700 hover:bg-gray-100 active:bg-gray-200"}`;
29974
+ };
29975
+ const getIconClass = (path) => {
29976
+ const active = isActive(path);
29977
+ return `w-7 h-7 ${active ? "text-blue-600" : "text-gray-600"}`;
29978
+ };
29979
+ const handleMobileNavClick = (handler) => {
29980
+ return () => {
29981
+ handler();
29982
+ onMobileMenuClose?.();
29983
+ };
29984
+ };
29985
+ return /* @__PURE__ */ jsxs("nav", { className: "px-5 py-6", children: [
29986
+ /* @__PURE__ */ jsxs(
29987
+ "button",
29988
+ {
29989
+ onClick: handleMobileNavClick(handleHomeClick),
29990
+ className: getMobileButtonClass("/"),
29991
+ "aria-label": "Home",
29992
+ children: [
29993
+ /* @__PURE__ */ jsx(HomeIcon, { className: getIconClass("/") }),
29994
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Home" })
29995
+ ]
29996
+ }
29997
+ ),
29998
+ /* @__PURE__ */ jsxs("div", { className: "mt-6 space-y-2", children: [
29999
+ /* @__PURE__ */ jsxs(
30000
+ "button",
30001
+ {
30002
+ onClick: handleMobileNavClick(handleLeaderboardClick),
30003
+ className: getMobileButtonClass("/leaderboard"),
30004
+ "aria-label": "Leaderboard",
30005
+ children: [
30006
+ /* @__PURE__ */ jsx(TrophyIcon, { className: getIconClass("/leaderboard") }),
30007
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Leaderboard" })
30008
+ ]
30009
+ }
30010
+ ),
30011
+ /* @__PURE__ */ jsxs(
30012
+ "button",
30013
+ {
30014
+ onClick: handleMobileNavClick(handleKPIsClick),
30015
+ className: getMobileButtonClass("/kpis"),
30016
+ "aria-label": "Lines",
30017
+ children: [
30018
+ /* @__PURE__ */ jsx(ChartBarIcon, { className: getIconClass("/kpis") }),
30019
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Lines" })
30020
+ ]
30021
+ }
30022
+ ),
30023
+ /* @__PURE__ */ jsxs(
30024
+ "button",
30025
+ {
30026
+ onClick: handleMobileNavClick(handleTargetsClick),
30027
+ className: getMobileButtonClass("/targets"),
30028
+ "aria-label": "Targets",
30029
+ children: [
30030
+ /* @__PURE__ */ jsx(AdjustmentsHorizontalIcon, { className: getIconClass("/targets") }),
30031
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Targets" })
30032
+ ]
30033
+ }
30034
+ ),
30035
+ /* @__PURE__ */ jsxs(
30036
+ "button",
30037
+ {
30038
+ onClick: handleMobileNavClick(handleShiftsClick),
30039
+ className: getMobileButtonClass("/shifts"),
30040
+ "aria-label": "Shift Management",
30041
+ children: [
30042
+ /* @__PURE__ */ jsx(ClockIcon, { className: getIconClass("/shifts") }),
30043
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Shifts" })
30044
+ ]
30045
+ }
30046
+ ),
30047
+ skuEnabled && /* @__PURE__ */ jsxs(
30048
+ "button",
30049
+ {
30050
+ onClick: handleMobileNavClick(handleSKUsClick),
30051
+ className: getMobileButtonClass("/skus"),
30052
+ "aria-label": "SKU Management",
30053
+ children: [
30054
+ /* @__PURE__ */ jsx(CubeIcon, { className: getIconClass("/skus") }),
30055
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "SKUs" })
30056
+ ]
30057
+ }
30058
+ ),
30059
+ /* @__PURE__ */ jsxs(
30060
+ "button",
30061
+ {
30062
+ onClick: handleMobileNavClick(handleAIAgentClick),
30063
+ className: getMobileButtonClass("/ai-agent"),
30064
+ "aria-label": "AI Manufacturing Expert",
30065
+ children: [
30066
+ /* @__PURE__ */ jsx(SparklesIcon, { className: getIconClass("/ai-agent") }),
30067
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Axel AI" })
30068
+ ]
30069
+ }
30070
+ ),
30071
+ /* @__PURE__ */ jsxs(
30072
+ "button",
30073
+ {
30074
+ onClick: handleMobileNavClick(handleHelpClick),
30075
+ className: getMobileButtonClass("/help"),
30076
+ "aria-label": "Help & Support",
30077
+ children: [
30078
+ /* @__PURE__ */ jsx(QuestionMarkCircleIcon, { className: getIconClass("/help") }),
30079
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Help" })
30080
+ ]
30081
+ }
30082
+ ),
30083
+ /* @__PURE__ */ jsxs(
30084
+ "button",
30085
+ {
30086
+ onClick: handleMobileNavClick(handleHealthClick),
30087
+ className: getMobileButtonClass("/health"),
30088
+ "aria-label": "System Health",
30089
+ children: [
30090
+ /* @__PURE__ */ jsx(HeartIcon, { className: getIconClass("/health") }),
30091
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "System Health" })
30092
+ ]
30093
+ }
30094
+ )
30095
+ ] }),
30096
+ /* @__PURE__ */ jsx("div", { className: "mt-8 pt-6 border-t border-gray-200", children: /* @__PURE__ */ jsxs(
30097
+ "button",
30098
+ {
30099
+ onClick: handleMobileNavClick(handleProfileClick),
30100
+ className: getMobileButtonClass("/profile"),
30101
+ "aria-label": "Profile & Settings",
30102
+ children: [
30103
+ /* @__PURE__ */ jsx(UserCircleIcon, { className: getIconClass("/profile") }),
30104
+ /* @__PURE__ */ jsx("span", { className: "text-base font-medium", children: "Profile" })
30105
+ ]
30106
+ }
30107
+ ) })
30108
+ ] });
30109
+ };
29713
30110
  return /* @__PURE__ */ jsxs(Fragment, { children: [
29714
30111
  /* @__PURE__ */ jsx("aside", { className: `hidden md:flex w-20 h-screen bg-white shadow-lg border-r border-gray-100 flex-col items-center fixed ${className}`, children: /* @__PURE__ */ jsx(NavigationContent, {}) }),
29715
- isMobileMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
30112
+ /* @__PURE__ */ jsxs(Fragment, { children: [
29716
30113
  /* @__PURE__ */ jsx(
29717
30114
  "div",
29718
30115
  {
29719
- className: "md:hidden fixed inset-0 bg-black bg-opacity-50 z-40",
30116
+ className: `md:hidden fixed inset-0 bg-black/60 backdrop-blur-sm z-40 transition-opacity duration-300 ease-in-out ${isMobileMenuOpen ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
29720
30117
  onClick: onMobileMenuClose,
29721
30118
  "aria-hidden": "true"
29722
30119
  }
29723
30120
  ),
29724
- /* @__PURE__ */ jsxs("aside", { className: "md:hidden fixed inset-y-0 left-0 w-20 bg-white shadow-lg border-r border-gray-100 flex flex-col items-center z-50", children: [
29725
- /* @__PURE__ */ jsx("div", { className: "absolute top-4 right-4", children: /* @__PURE__ */ jsx(
29726
- "button",
29727
- {
29728
- onClick: onMobileMenuClose,
29729
- className: "p-2 rounded-md text-gray-400 hover:text-gray-600 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500",
29730
- "aria-label": "Close menu",
29731
- children: /* @__PURE__ */ jsx(XMarkIcon, { className: "w-5 h-5" })
29732
- }
29733
- ) }),
29734
- /* @__PURE__ */ jsx(NavigationContent, {})
30121
+ /* @__PURE__ */ jsxs("aside", { className: `md:hidden fixed inset-y-0 left-0 w-72 xs:w-80 bg-white shadow-2xl flex flex-col z-50 transform transition-transform duration-300 ease-in-out ${isMobileMenuOpen ? "translate-x-0" : "-translate-x-full"}`, children: [
30122
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-5 py-4 border-b border-gray-200 bg-gradient-to-r from-blue-50 to-white", children: [
30123
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(
30124
+ "img",
30125
+ {
30126
+ src: "/optifye-logo.png",
30127
+ alt: "Optifye",
30128
+ className: "w-11 h-11 object-contain",
30129
+ onError: (e) => {
30130
+ e.currentTarget.style.display = "none";
30131
+ if (e.currentTarget.parentElement) {
30132
+ e.currentTarget.parentElement.innerHTML = '<span class="text-blue-600 font-bold text-xl">Optifye</span>';
30133
+ }
30134
+ }
30135
+ }
30136
+ ) }),
30137
+ /* @__PURE__ */ jsx(
30138
+ "button",
30139
+ {
30140
+ onClick: onMobileMenuClose,
30141
+ className: "p-2.5 rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-100 active:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all active:scale-95",
30142
+ "aria-label": "Close menu",
30143
+ children: /* @__PURE__ */ jsx(XMarkIcon, { className: "w-7 h-7" })
30144
+ }
30145
+ )
30146
+ ] }),
30147
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(MobileNavigationContent, {}) })
29735
30148
  ] })
29736
30149
  ] })
29737
30150
  ] });
@@ -29823,17 +30236,39 @@ var MainLayout = ({
29823
30236
  logo
29824
30237
  }) => {
29825
30238
  const router = useRouter();
30239
+ const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
30240
+ const handleMobileMenuOpen = () => setIsMobileMenuOpen(true);
30241
+ const handleMobileMenuClose = () => setIsMobileMenuOpen(false);
29826
30242
  return /* @__PURE__ */ jsxs("div", { className: `min-h-screen ${className}`, children: [
30243
+ /* @__PURE__ */ jsx("header", { className: "md:hidden bg-white border-b border-gray-200 shadow-sm px-5 py-3.5 flex items-center justify-between sticky top-0 z-40", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
30244
+ /* @__PURE__ */ jsx(HamburgerButton, { onClick: handleMobileMenuOpen }),
30245
+ /* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(
30246
+ "img",
30247
+ {
30248
+ src: "/optifye-logo.png",
30249
+ alt: "Optifye",
30250
+ className: "h-9 w-9 object-contain",
30251
+ onError: (e) => {
30252
+ e.currentTarget.style.display = "none";
30253
+ if (e.currentTarget.parentElement) {
30254
+ e.currentTarget.parentElement.innerHTML = '<span class="text-blue-600 font-bold text-lg">Optifye</span>';
30255
+ }
30256
+ }
30257
+ }
30258
+ ) })
30259
+ ] }) }),
29827
30260
  /* @__PURE__ */ jsx(
29828
30261
  SideNavBar,
29829
30262
  {
29830
30263
  navItems,
29831
30264
  currentPathname: router.pathname,
29832
30265
  currentQuery: router.query,
29833
- logo
30266
+ logo,
30267
+ isMobileMenuOpen,
30268
+ onMobileMenuClose: handleMobileMenuClose
29834
30269
  }
29835
30270
  ),
29836
- /* @__PURE__ */ jsx("main", { className: "ml-20 bg-gray-50 min-h-screen", children })
30271
+ /* @__PURE__ */ jsx("main", { className: "md:ml-20 bg-gray-50 min-h-screen transition-all duration-300", children: /* @__PURE__ */ jsx("div", { className: "h-full", children }) })
29837
30272
  ] });
29838
30273
  };
29839
30274
  var Header = ({
@@ -29852,29 +30287,32 @@ var Header = ({
29852
30287
  const handleLogout = async () => {
29853
30288
  await signOut();
29854
30289
  };
29855
- return /* @__PURE__ */ jsx("header", { className: `fixed top-0 left-0 right-0 h-16 bg-white border-b border-gray-200 z-50 ${className}`, children: /* @__PURE__ */ jsxs("div", { className: "h-full max-w-[1920px] mx-auto px-6 flex items-center justify-between", children: [
29856
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-6", children: /* @__PURE__ */ jsx("h1", { className: "text-xl font-semibold text-gray-900", children: getPageTitle() }) }),
29857
- user && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
30290
+ return /* @__PURE__ */ jsx("header", { className: `fixed top-0 left-0 right-0 h-14 sm:h-16 bg-white border-b border-gray-200 z-50 ${className}`, children: /* @__PURE__ */ jsxs("div", { className: "h-full max-w-[1920px] mx-auto px-3 sm:px-4 md:px-6 flex items-center justify-between", children: [
30291
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 sm:gap-4 md:gap-6 min-w-0", children: /* @__PURE__ */ jsx("h1", { className: "text-sm sm:text-base md:text-lg lg:text-xl font-semibold text-gray-900 truncate", children: getPageTitle() }) }),
30292
+ user && /* @__PURE__ */ jsxs("div", { className: "relative flex-shrink-0", children: [
29858
30293
  /* @__PURE__ */ jsxs(
29859
30294
  "button",
29860
30295
  {
29861
30296
  onClick: () => setShowDropdown(!showDropdown),
29862
- className: "flex items-center gap-2 px-3 py-2 rounded-md hover:bg-gray-100 transition-colors",
30297
+ className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-3 py-1 sm:py-2 rounded-md hover:bg-gray-100 transition-colors",
29863
30298
  children: [
29864
- /* @__PURE__ */ jsx("div", { className: "w-8 h-8 bg-indigo-600 rounded-full flex items-center justify-center text-white text-sm font-medium", children: user.email?.[0]?.toUpperCase() || "U" }),
29865
- /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700", children: user.email }),
29866
- /* @__PURE__ */ jsx("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })
30299
+ /* @__PURE__ */ jsx("div", { className: "w-6 h-6 sm:w-7 sm:h-7 md:w-8 md:h-8 bg-indigo-600 rounded-full flex items-center justify-center text-white text-xs sm:text-sm font-medium flex-shrink-0", children: user.email?.[0]?.toUpperCase() || "U" }),
30300
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm text-gray-700 truncate max-w-[100px] sm:max-w-[150px] md:max-w-[200px] lg:max-w-none hidden sm:block", children: user.email }),
30301
+ /* @__PURE__ */ jsx("svg", { className: "w-3 h-3 sm:w-4 sm:h-4 text-gray-400 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })
29867
30302
  ]
29868
30303
  }
29869
30304
  ),
29870
- showDropdown && /* @__PURE__ */ jsx("div", { className: "absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50", children: /* @__PURE__ */ jsx(
29871
- "button",
29872
- {
29873
- onClick: handleLogout,
29874
- className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",
29875
- children: "Sign out"
29876
- }
29877
- ) })
30305
+ showDropdown && /* @__PURE__ */ jsxs("div", { className: "absolute right-0 mt-1 sm:mt-2 w-40 sm:w-48 bg-white rounded-md shadow-lg py-1 z-50", children: [
30306
+ /* @__PURE__ */ jsx("div", { className: "block sm:hidden px-4 py-2 text-xs text-gray-500 border-b border-gray-100", children: user.email }),
30307
+ /* @__PURE__ */ jsx(
30308
+ "button",
30309
+ {
30310
+ onClick: handleLogout,
30311
+ className: "block w-full text-left px-4 py-2 text-xs sm:text-sm text-gray-700 hover:bg-gray-100",
30312
+ children: "Sign out"
30313
+ }
30314
+ )
30315
+ ] })
29878
30316
  ] })
29879
30317
  ] }) });
29880
30318
  };
@@ -30225,7 +30663,7 @@ var ThreadSidebar = ({
30225
30663
  ] });
30226
30664
  };
30227
30665
  var axelProfilePng = "/axel-profile.png";
30228
- var ProfilePicture = React19__default.memo(({ alt = "Axel", className = "w-12 h-12" }) => {
30666
+ var ProfilePicture = React19__default.memo(({ alt = "Axel", className = "w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12" }) => {
30229
30667
  return /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: `${className} rounded-xl overflow-hidden shadow-sm`, children: /* @__PURE__ */ jsx(
30230
30668
  "img",
30231
30669
  {
@@ -31831,54 +32269,105 @@ var AIAgentView = () => {
31831
32269
  }
31832
32270
  `
31833
32271
  } }),
31834
- /* @__PURE__ */ jsxs("div", { className: `flex-1 flex flex-col h-screen transition-all duration-300 ${isSidebarOpen ? "mr-80" : "mr-0"}`, children: [
31835
- /* @__PURE__ */ jsx("header", { className: "flex-shrink-0 bg-white px-8 py-6 shadow-sm border-b border-gray-200/80 sticky top-0 z-10", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between relative", children: [
31836
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
31837
- BackButtonMinimal,
31838
- {
31839
- onClick: () => navigate("/"),
31840
- text: "Back",
31841
- size: "default",
31842
- "aria-label": "Navigate back to dashboard"
31843
- }
31844
- ) }),
31845
- /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
31846
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3 mb-1", children: [
31847
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Chat with Axel" }),
31848
- /* @__PURE__ */ jsx("div", { className: "h-1 w-1 sm:h-1.5 sm:w-1.5 md:h-2 md:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1" })
32272
+ /* @__PURE__ */ jsxs("div", { className: `flex-1 flex flex-col h-screen transition-all duration-300 ${isSidebarOpen ? "lg:mr-80 mr-0" : "mr-0"}`, children: [
32273
+ /* @__PURE__ */ jsxs("header", { className: "flex-shrink-0 bg-white px-3 sm:px-6 md:px-8 py-3 sm:py-5 md:py-6 shadow-sm border-b border-gray-200/80 sticky top-0 z-10", children: [
32274
+ /* @__PURE__ */ jsxs("div", { className: "sm:hidden", children: [
32275
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
32276
+ /* @__PURE__ */ jsx(
32277
+ BackButtonMinimal,
32278
+ {
32279
+ onClick: () => navigate("/"),
32280
+ text: "Back",
32281
+ size: "sm",
32282
+ "aria-label": "Navigate back to dashboard"
32283
+ }
32284
+ ),
32285
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
32286
+ /* @__PURE__ */ jsxs(
32287
+ "button",
32288
+ {
32289
+ onClick: handleNewThread,
32290
+ className: "flex items-center gap-1 px-2.5 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-xs font-medium",
32291
+ children: [
32292
+ /* @__PURE__ */ jsx(RefreshCw, { className: "w-3.5 h-3.5" }),
32293
+ /* @__PURE__ */ jsx("span", { children: "New" })
32294
+ ]
32295
+ }
32296
+ ),
32297
+ /* @__PURE__ */ jsx(
32298
+ "button",
32299
+ {
32300
+ onClick: () => setIsSidebarOpen(!isSidebarOpen),
32301
+ className: "relative flex items-center gap-1 px-2.5 py-1.5 text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors text-xs font-medium",
32302
+ "aria-label": "Toggle chat history",
32303
+ children: isSidebarOpen ? /* @__PURE__ */ jsxs(Fragment, { children: [
32304
+ /* @__PURE__ */ jsx(X, { className: "w-3.5 h-3.5" }),
32305
+ /* @__PURE__ */ jsx("span", { children: "Hide" })
32306
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
32307
+ /* @__PURE__ */ jsx(Menu, { className: "w-3.5 h-3.5" }),
32308
+ /* @__PURE__ */ jsx("span", { children: "History" }),
32309
+ newChatCount > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 bg-red-500 text-white text-xs rounded-full px-1.5 py-0.5 font-medium", children: newChatCount })
32310
+ ] })
32311
+ }
32312
+ )
32313
+ ] })
31849
32314
  ] }),
31850
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-500", children: /* @__PURE__ */ jsx(ISTTimer_default, {}) }) })
32315
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
32316
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 mb-0.5", children: [
32317
+ /* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-gray-900", children: "Chat with Axel" }),
32318
+ /* @__PURE__ */ jsx("div", { className: "h-1 w-1 rounded-full bg-green-500 animate-pulse ring-1 ring-green-500/30 ring-offset-1" })
32319
+ ] }),
32320
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500", children: /* @__PURE__ */ jsx(ISTTimer_default, {}) }) })
32321
+ ] })
31851
32322
  ] }),
31852
- /* @__PURE__ */ jsxs("div", { className: "absolute right-0 flex items-center gap-2", children: [
31853
- /* @__PURE__ */ jsxs(
31854
- "button",
31855
- {
31856
- onClick: handleNewThread,
31857
- className: "flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm font-medium",
31858
- children: [
31859
- /* @__PURE__ */ jsx(RefreshCw, { className: "w-4 h-4" }),
31860
- "New Chat"
31861
- ]
31862
- }
31863
- ),
31864
- /* @__PURE__ */ jsx(
31865
- "button",
32323
+ /* @__PURE__ */ jsxs("div", { className: "hidden sm:flex items-center justify-between relative", children: [
32324
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
32325
+ BackButtonMinimal,
31866
32326
  {
31867
- onClick: () => setIsSidebarOpen(!isSidebarOpen),
31868
- className: "relative flex items-center gap-2 px-4 py-2 text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors text-sm font-medium",
31869
- "aria-label": "Toggle chat history",
31870
- children: isSidebarOpen ? /* @__PURE__ */ jsxs(Fragment, { children: [
31871
- /* @__PURE__ */ jsx(X, { className: "w-4 h-4" }),
31872
- /* @__PURE__ */ jsx("span", { children: "Hide History" })
31873
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
31874
- /* @__PURE__ */ jsx(Menu, { className: "w-4 h-4" }),
31875
- /* @__PURE__ */ jsx("span", { children: "Chat History" }),
31876
- newChatCount > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 bg-red-500 text-white text-xs rounded-full px-2 py-0.5 font-medium", children: newChatCount })
31877
- ] })
32327
+ onClick: () => navigate("/"),
32328
+ text: "Back",
32329
+ size: "default",
32330
+ "aria-label": "Navigate back to dashboard"
31878
32331
  }
31879
- )
32332
+ ) }),
32333
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
32334
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3 mb-1", children: [
32335
+ /* @__PURE__ */ jsx("h1", { className: "text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "Chat with Axel" }),
32336
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 w-1.5 md:h-2 md:w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
32337
+ ] }),
32338
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-500", children: /* @__PURE__ */ jsx(ISTTimer_default, {}) }) })
32339
+ ] }),
32340
+ /* @__PURE__ */ jsxs("div", { className: "absolute right-0 flex items-center gap-2", children: [
32341
+ /* @__PURE__ */ jsxs(
32342
+ "button",
32343
+ {
32344
+ onClick: handleNewThread,
32345
+ className: "flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm font-medium",
32346
+ children: [
32347
+ /* @__PURE__ */ jsx(RefreshCw, { className: "w-4 h-4" }),
32348
+ /* @__PURE__ */ jsx("span", { children: "New Chat" })
32349
+ ]
32350
+ }
32351
+ ),
32352
+ /* @__PURE__ */ jsx(
32353
+ "button",
32354
+ {
32355
+ onClick: () => setIsSidebarOpen(!isSidebarOpen),
32356
+ className: "relative flex items-center gap-2 px-4 py-2 text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors text-sm font-medium",
32357
+ "aria-label": "Toggle chat history",
32358
+ children: isSidebarOpen ? /* @__PURE__ */ jsxs(Fragment, { children: [
32359
+ /* @__PURE__ */ jsx(X, { className: "w-4 h-4" }),
32360
+ /* @__PURE__ */ jsx("span", { children: "Hide History" })
32361
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
32362
+ /* @__PURE__ */ jsx(Menu, { className: "w-4 h-4" }),
32363
+ /* @__PURE__ */ jsx("span", { children: "Chat History" }),
32364
+ newChatCount > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 bg-red-500 text-white text-xs rounded-full px-2 py-0.5 font-medium", children: newChatCount })
32365
+ ] })
32366
+ }
32367
+ )
32368
+ ] })
31880
32369
  ] })
31881
- ] }) }),
32370
+ ] }),
31882
32371
  /* @__PURE__ */ jsx(
31883
32372
  "main",
31884
32373
  {
@@ -31886,16 +32375,16 @@ var AIAgentView = () => {
31886
32375
  className: `flex-1 bg-gray-50/50 min-h-0 ${displayMessages.length === 0 && !isTransitioning ? "flex items-center justify-center" : "overflow-y-auto"}`,
31887
32376
  children: !activeThreadId && displayMessages.length === 0 && !isTransitioning ? (
31888
32377
  /* Centered welcome and input for new chat */
31889
- /* @__PURE__ */ jsxs("div", { className: "w-full max-w-3xl mx-auto px-4 sm:px-6 flex flex-col items-center justify-center space-y-12 -mt-16", children: [
32378
+ /* @__PURE__ */ jsxs("div", { className: "w-full max-w-3xl mx-auto px-3 sm:px-4 md:px-6 flex flex-col items-center justify-center space-y-8 sm:space-y-12 -mt-8 sm:-mt-16", children: [
31890
32379
  /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
31891
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-8", children: /* @__PURE__ */ jsx(ProfilePicture, { alt: "Axel - AI Manufacturing Expert", className: "w-24 h-24" }) }),
31892
- /* @__PURE__ */ jsxs("h2", { className: "text-3xl font-semibold text-gray-900", children: [
32380
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center mb-4 sm:mb-6 md:mb-8", children: /* @__PURE__ */ jsx(ProfilePicture, { alt: "Axel - AI Manufacturing Expert", className: "w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24" }) }),
32381
+ /* @__PURE__ */ jsxs("h2", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900 px-2 sm:px-4", children: [
31893
32382
  typedText,
31894
32383
  typedText.length < "Hi, I'm Axel - Your AI Supervisor".length && /* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "|" })
31895
32384
  ] })
31896
32385
  ] }),
31897
32386
  /* @__PURE__ */ jsx("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, children: [
31898
- /* @__PURE__ */ jsx("div", { className: "relative bg-white rounded-3xl shadow-lg border border-gray-200 focus-within:border-gray-300 transition-all duration-200", children: /* @__PURE__ */ jsx("div", { className: "flex items-end gap-2 p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 relative", children: [
32387
+ /* @__PURE__ */ jsx("div", { className: "relative bg-white rounded-2xl sm:rounded-3xl shadow-lg border border-gray-200 focus-within:border-gray-300 transition-all duration-200", children: /* @__PURE__ */ jsx("div", { className: "flex items-end gap-2 p-3 sm:p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 relative", children: [
31899
32388
  /* @__PURE__ */ jsx(
31900
32389
  "textarea",
31901
32390
  {
@@ -31926,24 +32415,24 @@ var AIAgentView = () => {
31926
32415
  });
31927
32416
  },
31928
32417
  placeholder: "Ask me anything about your shop-floor",
31929
- className: "w-full resize-none bg-transparent px-2 py-2 pr-12 focus:outline-none placeholder-gray-500 text-gray-900 text-sm leading-relaxed",
32418
+ className: "w-full resize-none bg-transparent px-3 sm:px-4 py-3 sm:py-2 pr-12 sm:pr-14 focus:outline-none placeholder-gray-500 text-gray-900 text-sm sm:text-base leading-relaxed",
31930
32419
  rows: 1,
31931
- style: { minHeight: "24px", maxHeight: "120px" }
32420
+ style: { minHeight: "40px", maxHeight: "120px" }
31932
32421
  }
31933
32422
  ),
31934
- /* @__PURE__ */ jsx("div", { className: "absolute right-2 bottom-2 flex items-center gap-2", children: /* @__PURE__ */ jsx(
32423
+ /* @__PURE__ */ jsx("div", { className: "absolute right-2 sm:right-3 bottom-2 sm:bottom-2 flex items-center gap-2", children: /* @__PURE__ */ jsx(
31935
32424
  "button",
31936
32425
  {
31937
32426
  type: "submit",
31938
32427
  disabled: !inputValue.trim() || isCurrentThreadLoading,
31939
- className: "inline-flex items-center justify-center w-8 h-8 bg-gray-900 text-white rounded-full hover:bg-gray-800 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-gray-500/20",
32428
+ className: "inline-flex items-center justify-center w-8 h-8 sm:w-9 sm:h-9 bg-gray-900 text-white rounded-full hover:bg-gray-800 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-gray-500/20",
31940
32429
  children: /* @__PURE__ */ jsx(Send, { className: "w-4 h-4" })
31941
32430
  }
31942
32431
  ) })
31943
32432
  ] }) }) }),
31944
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center mt-2 text-xs text-gray-400", children: [
31945
- /* @__PURE__ */ jsx("span", { children: isCurrentThreadLoading ? "You can type your next message while Axel responds" : "Press Enter to send \u2022 Shift+Enter for new line" }),
31946
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 ml-4", children: [
32433
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-center justify-center gap-2 sm:gap-4 mt-2 text-xs text-gray-400", children: [
32434
+ /* @__PURE__ */ jsx("span", { className: "text-center", children: isCurrentThreadLoading ? "You can type your next message while Axel responds" : "Press Enter to send \u2022 Shift+Enter for new line" }),
32435
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
31947
32436
  /* @__PURE__ */ jsx("div", { className: `w-1.5 h-1.5 rounded-full ${isCurrentThreadLoading ? "bg-orange-500" : "bg-green-500"}` }),
31948
32437
  /* @__PURE__ */ jsx("span", { children: isCurrentThreadLoading ? "Responding..." : "Connected" })
31949
32438
  ] })
@@ -31952,17 +32441,17 @@ var AIAgentView = () => {
31952
32441
  ] })
31953
32442
  ) : isTransitioning ? (
31954
32443
  /* Transition state - show user message first, then thinking */
31955
- /* @__PURE__ */ jsx("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 py-6 pb-32", children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
32444
+ /* @__PURE__ */ jsx("div", { className: "max-w-4xl mx-auto px-3 sm:px-4 md:px-6 py-4 sm:py-6 pb-24 sm:pb-32", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4 sm:space-y-6", children: [
31956
32445
  displayMessages.map((message, index) => /* @__PURE__ */ jsxs(
31957
32446
  "div",
31958
32447
  {
31959
- className: `flex gap-4 ${message.role === "user" ? "justify-end" : "justify-start"}`,
32448
+ className: `flex gap-2 sm:gap-3 md:gap-4 ${message.role === "user" ? "justify-end" : "justify-start"}`,
31960
32449
  children: [
31961
32450
  message.role === "assistant" && /* @__PURE__ */ jsx(ProfilePicture, {}),
31962
32451
  /* @__PURE__ */ jsx("div", { className: `max-w-none w-full group ${message.role === "user" ? "order-1" : ""}`, children: /* @__PURE__ */ jsx(
31963
32452
  "div",
31964
32453
  {
31965
- className: `relative px-5 py-4 rounded-2xl shadow-sm ${message.role === "user" ? "bg-blue-600 text-white max-w-[85%] ml-auto" : "bg-white border border-gray-200/80 max-w-full"}`,
32454
+ className: `relative px-3 sm:px-4 md:px-5 py-3 sm:py-4 rounded-xl sm:rounded-2xl shadow-sm ${message.role === "user" ? "bg-blue-600 text-white max-w-[90%] sm:max-w-[85%] ml-auto" : "bg-white border border-gray-200/80 max-w-full"}`,
31966
32455
  children: /* @__PURE__ */ jsxs("div", { className: `${message.role === "user" ? "text-white" : "text-gray-800"}`, children: [
31967
32456
  message.role === "assistant" ? message.id === -1 ? /* @__PURE__ */ jsx(
31968
32457
  "div",
@@ -31986,18 +32475,18 @@ var AIAgentView = () => {
31986
32475
  ] }) })
31987
32476
  ) : (
31988
32477
  /* Regular chat view with messages */
31989
- /* @__PURE__ */ jsx("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 py-6 pb-32", children: /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
32478
+ /* @__PURE__ */ jsx("div", { className: "max-w-4xl mx-auto px-3 sm:px-4 md:px-6 py-4 sm:py-6 pb-24 sm:pb-32", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4 sm:space-y-6", children: [
31990
32479
  displayMessages.map((message, index) => /* @__PURE__ */ jsxs(
31991
32480
  "div",
31992
32481
  {
31993
- className: `flex gap-4 ${message.role === "user" ? "justify-end" : "justify-start"}`,
32482
+ className: `flex gap-2 sm:gap-3 md:gap-4 ${message.role === "user" ? "justify-end" : "justify-start"}`,
31994
32483
  children: [
31995
32484
  message.role === "assistant" && /* @__PURE__ */ jsx(ProfilePicture, {}),
31996
32485
  /* @__PURE__ */ jsxs("div", { className: `max-w-none w-full group ${message.role === "user" ? "order-1" : ""}`, children: [
31997
32486
  /* @__PURE__ */ jsxs(
31998
32487
  "div",
31999
32488
  {
32000
- className: `relative px-5 py-4 rounded-2xl shadow-sm ${message.role === "user" ? "bg-blue-600 text-white max-w-[85%] ml-auto" : "bg-white border border-gray-200/80 max-w-full"}`,
32489
+ className: `relative px-3 sm:px-4 md:px-5 py-3 sm:py-4 rounded-xl sm:rounded-2xl shadow-sm ${message.role === "user" ? "bg-blue-600 text-white max-w-[90%] sm:max-w-[85%] ml-auto" : "bg-white border border-gray-200/80 max-w-full"}`,
32001
32490
  children: [
32002
32491
  /* @__PURE__ */ jsxs("div", { className: `${message.role === "user" ? "text-white" : "text-gray-800"}`, children: [
32003
32492
  message.role === "assistant" ? message.id === -1 ? /* @__PURE__ */ jsx(
@@ -32013,9 +32502,9 @@ var AIAgentView = () => {
32013
32502
  "button",
32014
32503
  {
32015
32504
  onClick: () => copyToClipboard(message.content, message.id.toString()),
32016
- className: "absolute top-3 right-3 opacity-0 group-hover:opacity-100 transition-opacity duration-200 p-1.5 hover:bg-gray-100 rounded-lg",
32505
+ className: "absolute top-2 sm:top-3 right-2 sm:right-3 opacity-100 sm:opacity-0 group-hover:opacity-100 transition-opacity duration-200 p-1 sm:p-1.5 hover:bg-gray-100 rounded-lg",
32017
32506
  title: "Copy message",
32018
- children: copiedMessageId === message.id.toString() ? /* @__PURE__ */ jsx(Check, { className: "w-4 h-4 text-green-600" }) : /* @__PURE__ */ jsx(Copy, { className: "w-4 h-4 text-gray-500" })
32507
+ children: copiedMessageId === message.id.toString() ? /* @__PURE__ */ jsx(Check, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-green-600" }) : /* @__PURE__ */ jsx(Copy, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-500" })
32019
32508
  }
32020
32509
  ),
32021
32510
  message.reasoning && /* @__PURE__ */ jsxs("details", { className: "mt-3 pt-3 border-t border-gray-200", children: [
@@ -32025,7 +32514,7 @@ var AIAgentView = () => {
32025
32514
  ]
32026
32515
  }
32027
32516
  ),
32028
- /* @__PURE__ */ jsxs("div", { className: `mt-2 flex items-center gap-2 text-xs text-gray-400 ${message.role === "user" ? "justify-end" : "justify-start"}`, children: [
32517
+ /* @__PURE__ */ jsxs("div", { className: `mt-1.5 sm:mt-2 flex items-center gap-2 text-xs text-gray-400 ${message.role === "user" ? "justify-end" : "justify-start"}`, children: [
32029
32518
  /* @__PURE__ */ jsx("span", { children: formatTime3(message.created_at) }),
32030
32519
  message.role === "assistant" && message.id !== -1 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
32031
32520
  /* @__PURE__ */ jsx("div", { className: "w-1 h-1 bg-gray-300 rounded-full" }),
@@ -32060,15 +32549,15 @@ var AIAgentView = () => {
32060
32549
  )
32061
32550
  }
32062
32551
  ),
32063
- (displayMessages.length > 0 || isTransitioning) && /* @__PURE__ */ jsx("footer", { className: "fixed bottom-0 left-0 right-0 bg-gradient-to-t from-gray-50/50 to-transparent pointer-events-none", children: /* @__PURE__ */ jsx("div", { className: "max-w-4xl mx-auto p-4 sm:p-6 pointer-events-auto", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, children: [
32552
+ (displayMessages.length > 0 || isTransitioning) && /* @__PURE__ */ jsx("footer", { className: `fixed bottom-0 left-0 right-0 bg-gradient-to-t from-gray-50/50 to-transparent pointer-events-none ${isSidebarOpen ? "lg:right-80" : "right-0"}`, children: /* @__PURE__ */ jsx("div", { className: "max-w-4xl mx-auto p-3 sm:p-4 md:p-6 pointer-events-auto", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, children: [
32064
32553
  /* @__PURE__ */ jsx(
32065
32554
  "div",
32066
32555
  {
32067
- className: `relative bg-white rounded-3xl shadow-lg border border-gray-200 focus-within:border-gray-300 transition-all duration-200 ${isTransitioning ? "animate-slide-down" : ""}`,
32556
+ className: `relative bg-white rounded-2xl sm:rounded-3xl shadow-lg border border-gray-200 focus-within:border-gray-300 transition-all duration-200 ${isTransitioning ? "animate-slide-down" : ""}`,
32068
32557
  style: isTransitioning ? {
32069
32558
  animation: "slideDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards"
32070
32559
  } : {},
32071
- children: /* @__PURE__ */ jsx("div", { className: "flex items-end gap-2 p-3", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 relative", children: [
32560
+ children: /* @__PURE__ */ jsx("div", { className: "flex items-end gap-2 p-3 sm:p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 relative", children: [
32072
32561
  /* @__PURE__ */ jsx(
32073
32562
  "textarea",
32074
32563
  {
@@ -32099,33 +32588,33 @@ var AIAgentView = () => {
32099
32588
  });
32100
32589
  },
32101
32590
  placeholder: "Ask me anything about your shop-floor",
32102
- className: "w-full resize-none bg-transparent px-2 py-2 pr-12 focus:outline-none placeholder-gray-500 text-gray-900 text-sm leading-relaxed",
32591
+ className: "w-full resize-none bg-transparent px-3 sm:px-4 py-3 sm:py-2 pr-12 sm:pr-14 focus:outline-none placeholder-gray-500 text-gray-900 text-sm sm:text-base leading-relaxed",
32103
32592
  rows: 1,
32104
- style: { minHeight: "24px", maxHeight: "120px" }
32593
+ style: { minHeight: "40px", maxHeight: "120px" }
32105
32594
  }
32106
32595
  ),
32107
- /* @__PURE__ */ jsx("div", { className: "absolute right-2 bottom-2 flex items-center gap-2", children: /* @__PURE__ */ jsx(
32596
+ /* @__PURE__ */ jsx("div", { className: "absolute right-2 sm:right-3 bottom-2 sm:bottom-2 flex items-center gap-2", children: /* @__PURE__ */ jsx(
32108
32597
  "button",
32109
32598
  {
32110
32599
  type: "submit",
32111
32600
  disabled: !inputValue.trim() || isCurrentThreadLoading,
32112
- className: "inline-flex items-center justify-center w-8 h-8 bg-gray-900 text-white rounded-full hover:bg-gray-800 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-gray-500/20",
32601
+ className: "inline-flex items-center justify-center w-8 h-8 sm:w-9 sm:h-9 bg-gray-900 text-white rounded-full hover:bg-gray-800 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-gray-500/20",
32113
32602
  children: /* @__PURE__ */ jsx(Send, { className: "w-4 h-4" })
32114
32603
  }
32115
32604
  ) })
32116
32605
  ] }) })
32117
32606
  }
32118
32607
  ),
32119
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center mt-2 text-xs text-gray-400", children: [
32120
- /* @__PURE__ */ jsx("span", { children: isCurrentThreadLoading ? "You can type your next message while Axel responds" : "Press Enter to send \u2022 Shift+Enter for new line" }),
32121
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 ml-4", children: [
32608
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-center justify-center gap-2 sm:gap-4 mt-2 text-xs text-gray-400", children: [
32609
+ /* @__PURE__ */ jsx("span", { className: "text-center", children: isCurrentThreadLoading ? "You can type your next message while Axel responds" : "Press Enter to send \u2022 Shift+Enter for new line" }),
32610
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
32122
32611
  /* @__PURE__ */ jsx("div", { className: `w-1.5 h-1.5 rounded-full ${isCurrentThreadLoading ? "bg-orange-500" : "bg-green-500"}` }),
32123
32612
  /* @__PURE__ */ jsx("span", { children: isCurrentThreadLoading ? "Responding..." : "Connected" })
32124
32613
  ] })
32125
32614
  ] })
32126
32615
  ] }) }) })
32127
32616
  ] }),
32128
- /* @__PURE__ */ jsx("div", { className: `fixed right-0 top-0 z-20 h-screen transition-transform duration-300 ease-in-out ${isSidebarOpen ? "translate-x-0" : "translate-x-full"}`, children: /* @__PURE__ */ jsx("div", { className: "w-80 h-full bg-white border-l border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx(
32617
+ /* @__PURE__ */ jsx("div", { className: `fixed right-0 top-0 z-20 h-screen transition-transform duration-300 ease-in-out ${isSidebarOpen ? "translate-x-0" : "translate-x-full"}`, children: /* @__PURE__ */ jsx("div", { className: "w-full sm:w-96 lg:w-80 h-full bg-white border-l border-gray-200 shadow-lg", children: /* @__PURE__ */ jsx(
32129
32618
  ThreadSidebar,
32130
32619
  {
32131
32620
  activeThreadId,
@@ -32507,8 +32996,8 @@ var HelpView = ({
32507
32996
  animate: { opacity: 1 },
32508
32997
  transition: { duration: 0.3 },
32509
32998
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
32510
- /* @__PURE__ */ jsx("div", { className: "bg-white px-8 py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between relative", children: [
32511
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
32999
+ /* @__PURE__ */ jsx("div", { className: "bg-white px-4 sm:px-6 md:px-8 py-4 sm:py-5 md:py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 sm:gap-4 relative", children: [
33000
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsx(
32512
33001
  BackButtonMinimal,
32513
33002
  {
32514
33003
  onClick: handleBackClick,
@@ -32517,9 +33006,9 @@ var HelpView = ({
32517
33006
  "aria-label": "Navigate back to dashboard"
32518
33007
  }
32519
33008
  ) }),
32520
- /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
32521
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Help & Support" }),
32522
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Get immediate assistance from our engineering team. Submit a detailed support request below." })
33009
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto mt-2 sm:mt-0", children: [
33010
+ /* @__PURE__ */ jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "Help & Support" }),
33011
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 sm:mt-1 text-xs sm:text-sm text-gray-500 px-2 sm:px-0", children: "Get immediate assistance from our engineering team. Submit a detailed support request below." })
32523
33012
  ] })
32524
33013
  ] }) }),
32525
33014
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
@@ -32843,7 +33332,7 @@ function HomeView({
32843
33332
  return null;
32844
33333
  }
32845
33334
  return /* @__PURE__ */ jsxs(Select, { onValueChange: handleLineChange, defaultValue: selectedLineId, children: [
32846
- /* @__PURE__ */ jsx(SelectTrigger, { className: "w-full sm:w-[200px] bg-white border border-gray-200 shadow-sm rounded-md h-9 text-sm", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a line" }) }),
33335
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-full sm:w-[200px] bg-white border border-gray-200 shadow-sm rounded-md h-11 sm:h-9 text-sm", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a line" }) }),
32847
33336
  /* @__PURE__ */ jsx(SelectContent, { className: "z-50 bg-white shadow-lg border border-gray-200 rounded-md", children: availableLineIds.map((id3) => /* @__PURE__ */ jsx(SelectItem, { value: id3, children: lineNames[id3] || (id3 === factoryViewId ? "All Lines" : `Line ${id3.substring(0, 4)}`) }, id3)) })
32848
33337
  ] });
32849
33338
  }, [availableLineIds, handleLineChange, selectedLineId, lineNames, factoryViewId, allLineIds.length]);
@@ -32855,7 +33344,7 @@ function HomeView({
32855
33344
  if (errorMessage || displayNamesError) {
32856
33345
  return /* @__PURE__ */ jsx("div", { className: "flex h-screen items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg bg-white p-6 shadow-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3 text-red-500", children: [
32857
33346
  /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
32858
- /* @__PURE__ */ jsxs("span", { className: "text-lg font-medium", children: [
33347
+ /* @__PURE__ */ jsxs("span", { className: "text-base sm:text-lg font-medium", children: [
32859
33348
  "Error: ",
32860
33349
  errorMessage || displayNamesError?.message
32861
33350
  ] })
@@ -32869,7 +33358,7 @@ function HomeView({
32869
33358
  animate: { opacity: 1 },
32870
33359
  children: /* @__PURE__ */ jsxs("div", { className: "relative flex flex-1", children: [
32871
33360
  /* @__PURE__ */ jsxs("main", { className: "flex flex-1 flex-col", children: [
32872
- /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-30 sm:static bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between px-3 sm:px-6 lg:px-8 py-1.5 sm:py-2.5", children: /* @__PURE__ */ jsx(
33361
+ /* @__PURE__ */ jsx("div", { className: "relative sm:sticky sm:top-0 z-30 bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between px-4 sm:px-6 lg:px-8 py-3 sm:py-2.5", children: /* @__PURE__ */ jsx(
32873
33362
  DashboardHeader,
32874
33363
  {
32875
33364
  lineTitle,
@@ -32878,8 +33367,8 @@ function HomeView({
32878
33367
  }
32879
33368
  ) }) }),
32880
33369
  /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto sm:overflow-hidden relative", children: [
32881
- lineSelectorComponent && /* @__PURE__ */ jsx("div", { className: "absolute right-3 top-2 sm:right-6 sm:top-3 z-30", children: lineSelectorComponent }),
32882
- /* @__PURE__ */ jsx("div", { className: "h-full sm:h-full min-h-[calc(100vh-80px)] sm:min-h-0", children: memoizedWorkspaceMetrics.length > 0 ? /* @__PURE__ */ jsx(
33370
+ lineSelectorComponent && /* @__PURE__ */ jsx("div", { className: "absolute right-4 top-3 sm:right-6 sm:top-3 z-30", children: lineSelectorComponent }),
33371
+ /* @__PURE__ */ jsx("div", { className: "h-full sm:h-full min-h-[calc(100vh-120px)] sm:min-h-0", children: memoizedWorkspaceMetrics.length > 0 ? /* @__PURE__ */ jsx(
32883
33372
  motion.div,
32884
33373
  {
32885
33374
  initial: { opacity: 0, scale: 0.98 },
@@ -33096,11 +33585,11 @@ var MetricCards = memo(({ lineInfo }) => {
33096
33585
  variants: containerVariants,
33097
33586
  initial: "initial",
33098
33587
  animate: "animate",
33099
- className: "grid grid-cols-1 md:grid-cols-3 gap-4 mb-2 md:h-[35vh] h-auto",
33588
+ className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4 mb-2 md:h-[35vh] h-auto",
33100
33589
  children: [
33101
- /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-4 overflow-hidden h-[280px] md:h-auto", children: [
33102
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-gray-700 mb-2 text-center", children: "Line Output" }),
33103
- /* @__PURE__ */ jsx("div", { className: "h-[calc(100%-2.5rem)]", children: /* @__PURE__ */ jsx("div", { className: "w-full h-full", children: /* @__PURE__ */ jsx(
33590
+ /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-3 sm:p-4 overflow-hidden h-[240px] sm:h-[280px] md:h-auto lg:col-span-1 sm:col-span-2 lg:col-span-1", children: [
33591
+ /* @__PURE__ */ jsx("h2", { className: "text-sm sm:text-base font-semibold text-gray-700 mb-2 text-center", children: "Line Output" }),
33592
+ /* @__PURE__ */ jsx("div", { className: "h-[calc(100%-2rem)] sm:h-[calc(100%-2.5rem)]", children: /* @__PURE__ */ jsx("div", { className: "w-full h-full", children: /* @__PURE__ */ jsx(
33104
33593
  OutputProgressChart,
33105
33594
  {
33106
33595
  currentOutput: lineInfo?.metrics.current_output || 0,
@@ -33108,19 +33597,19 @@ var MetricCards = memo(({ lineInfo }) => {
33108
33597
  }
33109
33598
  ) }) })
33110
33599
  ] }),
33111
- /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-4 overflow-hidden h-[160px] md:h-auto", children: [
33112
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-gray-700 text-center mb-2", children: "Underperforming Workspaces" }),
33113
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center h-[calc(100%-2.5rem)]", children: [
33114
- /* @__PURE__ */ jsx("span", { className: "text-6xl md:text-7xl font-bold text-red-600", children: lineInfo?.metrics.underperforming_workspaces }),
33115
- /* @__PURE__ */ jsxs("span", { className: "text-2xl md:text-3xl text-gray-500 ml-2", children: [
33600
+ /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-3 sm:p-4 overflow-hidden h-[140px] sm:h-[160px] md:h-auto", children: [
33601
+ /* @__PURE__ */ jsx("h2", { className: "text-sm sm:text-base font-semibold text-gray-700 text-center mb-2", children: "Underperforming Workspaces" }),
33602
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center h-[calc(100%-2rem)] sm:h-[calc(100%-2.5rem)]", children: [
33603
+ /* @__PURE__ */ jsx("span", { className: "text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold text-red-600", children: lineInfo?.metrics.underperforming_workspaces }),
33604
+ /* @__PURE__ */ jsxs("span", { className: "text-xl sm:text-2xl md:text-2xl lg:text-3xl text-gray-500 ml-1 sm:ml-2", children: [
33116
33605
  "/ ",
33117
33606
  lineInfo?.metrics.total_workspaces
33118
33607
  ] })
33119
33608
  ] })
33120
33609
  ] }),
33121
- /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-4 overflow-hidden h-[160px] md:h-auto", children: [
33122
- /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-gray-700 text-center mb-2", children: "Average Efficiency" }),
33123
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-[calc(100%-2.5rem)]", children: /* @__PURE__ */ jsxs("span", { className: "text-6xl md:text-7xl font-bold text-gray-900", children: [
33610
+ /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-3 sm:p-4 overflow-hidden h-[140px] sm:h-[160px] md:h-auto", children: [
33611
+ /* @__PURE__ */ jsx("h2", { className: "text-sm sm:text-base font-semibold text-gray-700 text-center mb-2", children: "Average Efficiency" }),
33612
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-[calc(100%-2rem)] sm:h-[calc(100%-2.5rem)]", children: /* @__PURE__ */ jsxs("span", { className: `text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold ${(lineInfo?.metrics.avg_efficiency || 0) >= 90 ? "text-green-600" : (lineInfo?.metrics.avg_efficiency || 0) >= 70 ? "text-yellow-600" : "text-red-600"}`, children: [
33124
33613
  lineInfo?.metrics.avg_efficiency.toFixed(1),
33125
33614
  "%"
33126
33615
  ] }) })
@@ -33165,27 +33654,27 @@ var BottomSection = memo(({
33165
33654
  variants: containerVariants,
33166
33655
  initial: "initial",
33167
33656
  animate: "animate",
33168
- className: "grid grid-cols-1 md:grid-cols-5 gap-4 md:h-[calc(57vh-4rem)] h-auto md:mt-0 mt-4",
33657
+ className: "grid grid-cols-1 lg:grid-cols-5 gap-3 sm:gap-4 md:h-[calc(57vh-4rem)] h-auto md:mt-0 mt-4",
33169
33658
  children: [
33170
- /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "md:col-span-2 bg-white rounded-xl shadow-sm p-4 flex flex-col overflow-hidden h-[400px] md:h-auto", children: [
33659
+ /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "lg:col-span-2 bg-white rounded-xl shadow-sm p-3 sm:p-4 flex flex-col overflow-hidden h-[350px] sm:h-[400px] md:h-auto", children: [
33171
33660
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center mb-2", children: [
33172
- /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700 text-center flex-1", children: "Poorest Performing Workspaces" }),
33661
+ /* @__PURE__ */ jsx("h2", { className: "text-base sm:text-lg font-semibold text-gray-700 text-center flex-1", children: "Poorest Performing Workspaces" }),
33173
33662
  /* @__PURE__ */ jsx(
33174
33663
  "div",
33175
33664
  {
33176
33665
  className: "p-1.5 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",
33177
33666
  onClick: () => handleNavigate && handleNavigate(`/leaderboard`),
33178
- children: /* @__PURE__ */ jsx(ArrowRightIcon, { className: "w-5 h-5 text-gray-500" })
33667
+ children: /* @__PURE__ */ jsx(ArrowRightIcon, { className: "w-4 h-4 sm:w-5 sm:h-5 text-gray-500" })
33179
33668
  }
33180
33669
  )
33181
33670
  ] }),
33182
- /* @__PURE__ */ jsxs("div", { className: "divide-y overflow-auto flex-1 pr-2", children: [
33671
+ /* @__PURE__ */ jsxs("div", { className: "divide-y overflow-auto flex-1 pr-1 sm:pr-2", children: [
33183
33672
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pb-2", children: [
33184
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 md:gap-6", children: [
33185
- /* @__PURE__ */ jsx("div", { className: "font-medium text-gray-500 min-w-[100px] md:min-w-[120px] text-sm md:text-base", children: "Workspace" }),
33673
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-6", children: [
33674
+ /* @__PURE__ */ jsx("div", { className: "font-medium text-gray-500 min-w-[80px] sm:min-w-[100px] md:min-w-[120px] text-xs sm:text-sm md:text-base", children: "Workspace" }),
33186
33675
  /* @__PURE__ */ jsx("div", { className: "text-xs md:text-sm font-medium text-gray-500", children: "Current/Ideal" })
33187
33676
  ] }),
33188
- /* @__PURE__ */ jsx("div", { className: "text-xs md:text-sm font-medium text-gray-500 pr-2", children: "Efficiency" })
33677
+ /* @__PURE__ */ jsx("div", { className: "text-xs md:text-sm font-medium text-gray-500 pr-1 sm:pr-2", children: "Efficiency" })
33189
33678
  ] }),
33190
33679
  lineInfo.metrics.poorest_performing_workspaces && lineInfo.metrics.poorest_performing_workspaces.length > 0 ? lineInfo.metrics.poorest_performing_workspaces.map((ws, index) => {
33191
33680
  const wsMetrics = workspaceData.find((w) => w.workspace_name === ws.workspace_name);
@@ -33207,10 +33696,10 @@ var BottomSection = memo(({
33207
33696
  clickHandler();
33208
33697
  handleNavigate && handleNavigate(fullUrl);
33209
33698
  },
33210
- className: "block py-3 hover:bg-gray-50 transition-colors rounded-lg cursor-pointer",
33699
+ className: "block py-2 sm:py-3 hover:bg-gray-50 transition-colors rounded-lg cursor-pointer",
33211
33700
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
33212
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 md:gap-6", children: [
33213
- /* @__PURE__ */ jsx("div", { className: "min-w-[100px] md:min-w-[120px]", children: /* @__PURE__ */ jsx("div", { className: "font-medium text-gray-900 text-sm md:text-base", children: displayName }) }),
33701
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-6", children: [
33702
+ /* @__PURE__ */ jsx("div", { className: "min-w-[80px] sm:min-w-[100px] md:min-w-[120px]", children: /* @__PURE__ */ jsx("div", { className: "font-medium text-gray-900 text-xs sm:text-sm md:text-base truncate", children: displayName }) }),
33214
33703
  /* @__PURE__ */ jsxs("div", { className: "text-xs md:text-sm font-medium text-gray-900", children: [
33215
33704
  ws.action_count || 0,
33216
33705
  " / ",
@@ -33241,10 +33730,10 @@ var BottomSection = memo(({
33241
33730
  clickHandler();
33242
33731
  handleNavigate && handleNavigate(fullUrl);
33243
33732
  },
33244
- className: "block py-3 hover:bg-gray-50 transition-colors rounded-lg cursor-pointer",
33733
+ className: "block py-2 sm:py-3 hover:bg-gray-50 transition-colors rounded-lg cursor-pointer",
33245
33734
  children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
33246
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 md:gap-6", children: [
33247
- /* @__PURE__ */ jsx("div", { className: "min-w-[100px] md:min-w-[120px]", children: /* @__PURE__ */ jsx("div", { className: "font-medium text-gray-900 text-sm md:text-base", children: displayName }) }),
33735
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-6", children: [
33736
+ /* @__PURE__ */ jsx("div", { className: "min-w-[80px] sm:min-w-[100px] md:min-w-[120px]", children: /* @__PURE__ */ jsx("div", { className: "font-medium text-gray-900 text-xs sm:text-sm md:text-base truncate", children: displayName }) }),
33248
33737
  /* @__PURE__ */ jsxs("div", { className: "text-xs md:text-sm font-medium text-gray-900", children: [
33249
33738
  ws.action_count || 0,
33250
33739
  " / ",
@@ -33263,9 +33752,9 @@ var BottomSection = memo(({
33263
33752
  )
33264
33753
  ] })
33265
33754
  ] }),
33266
- /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "md:col-span-3 bg-white rounded-xl shadow-sm p-4 flex flex-col overflow-hidden h-[400px] md:h-auto", children: [
33267
- /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-700 mb-2 text-center", children: "Hourly Line Output" }),
33268
- /* @__PURE__ */ jsx("div", { className: "flex-1 min-h-[300px] md:min-h-[400px] pb-8 md:pb-16", children: lineInfo && /* @__PURE__ */ jsx(
33755
+ /* @__PURE__ */ jsxs(motion.div, { variants: itemVariants, className: "lg:col-span-3 bg-white rounded-xl shadow-sm p-3 sm:p-4 flex flex-col overflow-hidden h-[350px] sm:h-[400px] md:h-auto", children: [
33756
+ /* @__PURE__ */ jsx("h2", { className: "text-base sm:text-lg font-semibold text-gray-700 mb-2 text-center", children: "Hourly Line Output" }),
33757
+ /* @__PURE__ */ jsx("div", { className: "flex-1 min-h-[280px] sm:min-h-[300px] md:min-h-[400px] pb-6 sm:pb-8 md:pb-16", children: lineInfo && /* @__PURE__ */ jsx(
33269
33758
  HourlyOutputChart2,
33270
33759
  {
33271
33760
  data: hourlyOutputData,
@@ -33636,9 +34125,9 @@ var KPIDetailView = ({
33636
34125
  return /* @__PURE__ */ jsx(LoadingPage, { message: "Processing line data..." });
33637
34126
  }
33638
34127
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
33639
- /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "px-4 py-3", children: [
34128
+ /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3", children: [
33640
34129
  /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
33641
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
34130
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsx(
33642
34131
  BackButtonMinimal,
33643
34132
  {
33644
34133
  onClick: handleBackClick,
@@ -33647,37 +34136,37 @@ var KPIDetailView = ({
33647
34136
  "aria-label": "Navigate back to previous page"
33648
34137
  }
33649
34138
  ) }),
33650
- /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
33651
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: lineInfo?.line_name || "Line" }),
33652
- /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34139
+ /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center mt-2 sm:mt-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34140
+ /* @__PURE__ */ jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900 text-center truncate", children: lineInfo?.line_name || "Line" }),
34141
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1 flex-shrink-0" })
33653
34142
  ] }) })
33654
34143
  ] }),
33655
- (activeTab !== "monthly_history" || urlDate || urlShift) && metrics2 && /* @__PURE__ */ jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-4", children: [
34144
+ (activeTab !== "monthly_history" || urlDate || urlShift) && metrics2 && /* @__PURE__ */ jsx("div", { className: "mt-2 sm:mt-3 bg-blue-50 px-2 sm:px-3 py-1.5 sm:py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4", children: [
33656
34145
  !urlDate && !urlShift && /* @__PURE__ */ jsxs(Fragment, { children: [
33657
- /* @__PURE__ */ jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(ISTTimer_default, {}) }),
33658
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" })
34146
+ /* @__PURE__ */ jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(ISTTimer_default, {}) }),
34147
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
33659
34148
  ] }),
33660
- /* @__PURE__ */ jsx("span", { className: "text-base font-medium text-blue-600", children: metrics2 && formatLocalDate(new Date(metrics2.date)) }),
33661
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
34149
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: metrics2 && formatLocalDate(new Date(metrics2.date)) }),
34150
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
33662
34151
  urlDate && metrics2.date && /* @__PURE__ */ jsxs(Fragment, { children: [
33663
34152
  /* @__PURE__ */ jsx("span", { className: "px-2 py-1 text-xs font-medium bg-blue-200 text-blue-800 rounded-md", children: getDaysDifference2(metrics2.date) }),
33664
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" })
34153
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
33665
34154
  ] }),
33666
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
34155
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
33667
34156
  /* @__PURE__ */ jsx("div", { className: "text-blue-600", children: getShiftIcon(metrics2.shift_id ?? 0) }),
33668
- /* @__PURE__ */ jsxs("span", { className: "text-base font-medium text-blue-600", children: [
34157
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
33669
34158
  getShiftName(metrics2.shift_id ?? 0),
33670
34159
  " Shift"
33671
34160
  ] })
33672
34161
  ] })
33673
34162
  ] }) }),
33674
- /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center justify-between", children: [
33675
- !urlDate && !urlShift && /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
34163
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-0", children: [
34164
+ !urlDate && !urlShift && /* @__PURE__ */ jsxs("div", { className: "flex gap-1 sm:gap-2 w-full sm:w-auto", children: [
33676
34165
  /* @__PURE__ */ jsx(
33677
34166
  "button",
33678
34167
  {
33679
34168
  onClick: handleOverviewClick,
33680
- className: `px-3 py-1.5 font-medium rounded-lg transition-colors whitespace-nowrap ${activeTab === "overview" ? "bg-blue-50 text-blue-600" : "text-gray-600 hover:bg-gray-50"}`,
34169
+ className: `flex-1 sm:flex-none px-2 sm:px-3 py-1.5 text-xs sm:text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${activeTab === "overview" ? "bg-blue-50 text-blue-600" : "text-gray-600 hover:bg-gray-50"}`,
33681
34170
  children: "Efficiency Overview"
33682
34171
  }
33683
34172
  ),
@@ -33685,12 +34174,12 @@ var KPIDetailView = ({
33685
34174
  "button",
33686
34175
  {
33687
34176
  onClick: handleMonthlyHistoryClick,
33688
- className: `px-3 py-1.5 font-medium rounded-lg transition-colors whitespace-nowrap ${activeTab === "monthly_history" ? "bg-blue-50 text-blue-600" : "text-gray-600 hover:bg-gray-50"}`,
34177
+ className: `flex-1 sm:flex-none px-2 sm:px-3 py-1.5 text-xs sm:text-sm font-medium rounded-lg transition-colors whitespace-nowrap ${activeTab === "monthly_history" ? "bg-blue-50 text-blue-600" : "text-gray-600 hover:bg-gray-50"}`,
33689
34178
  children: "Monthly History"
33690
34179
  }
33691
34180
  )
33692
34181
  ] }),
33693
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-3 ml-auto", children: [
34182
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 sm:space-x-3 w-full sm:w-auto justify-end sm:ml-auto", children: [
33694
34183
  lineInfo && activeTab === "overview" && /* @__PURE__ */ jsx(LinePdfGenerator, { lineInfo, workspaceData: workspaces || [] }),
33695
34184
  activeTab === "monthly_history" && /* @__PURE__ */ jsx(
33696
34185
  LineMonthlyPdfGenerator,
@@ -33855,11 +34344,11 @@ var LineCard = ({ line, onClick }) => {
33855
34344
  animate: { opacity: 1, y: 0 },
33856
34345
  transition: { duration: 0.3 },
33857
34346
  onClick,
33858
- className: "relative bg-white border border-gray-200/80 shadow-sm hover:shadow-lg \n rounded-xl p-6 transition-all duration-200 cursor-pointer \n hover:scale-[1.01] active:scale-[0.99] group",
34347
+ className: "relative bg-white border border-gray-200/80 shadow-sm hover:shadow-lg \n rounded-xl p-4 sm:p-5 md:p-6 transition-all duration-200 cursor-pointer \n hover:scale-[1.01] active:scale-[0.99] group",
33859
34348
  children: [
33860
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-6", children: [
33861
- /* @__PURE__ */ jsx("h3", { className: "text-xl font-semibold text-gray-900", children: line.line_name }),
33862
- kpis && isOnTrack !== null && /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium ${isOnTrack ? "bg-emerald-100 text-emerald-700 border border-emerald-200" : "bg-red-100 text-red-700 border border-red-200"}`, children: [
34349
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 mb-4 sm:mb-5 md:mb-6", children: [
34350
+ /* @__PURE__ */ jsx("h3", { className: "text-lg sm:text-xl font-semibold text-gray-900 truncate", children: line.line_name }),
34351
+ kpis && isOnTrack !== null && /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-1.5 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full text-xs font-medium self-start sm:self-auto ${isOnTrack ? "bg-emerald-100 text-emerald-700 border border-emerald-200" : "bg-red-100 text-red-700 border border-red-200"}`, children: [
33863
34352
  /* @__PURE__ */ jsx("div", { className: `w-2 h-2 rounded-full ${isOnTrack ? "bg-emerald-500" : "bg-red-500"} animate-pulse` }),
33864
34353
  /* @__PURE__ */ jsx("span", { children: isOnTrack ? "On Track" : "Behind" })
33865
34354
  ] })
@@ -33879,15 +34368,15 @@ var LineCard = ({ line, onClick }) => {
33879
34368
  ] })
33880
34369
  ] }),
33881
34370
  error && !kpis && /* @__PURE__ */ jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500", children: "Unable to load metrics" }) }),
33882
- kpis && /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
34371
+ kpis && /* @__PURE__ */ jsxs("div", { className: "space-y-4 sm:space-y-5", children: [
33883
34372
  /* @__PURE__ */ jsxs("div", { children: [
33884
- /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-2", children: "Efficiency" }),
34373
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1.5 sm:mb-2", children: "Efficiency" }),
33885
34374
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between", children: [
33886
- /* @__PURE__ */ jsxs("span", { className: "text-3xl font-semibold text-gray-900", children: [
34375
+ /* @__PURE__ */ jsxs("span", { className: "text-2xl sm:text-3xl font-semibold text-gray-900", children: [
33887
34376
  kpis.efficiency.value.toFixed(1),
33888
34377
  "%"
33889
34378
  ] }),
33890
- kpis.efficiency.change !== 0 && /* @__PURE__ */ jsxs("span", { className: `text-sm font-medium ${kpis.efficiency.change > 0 ? "text-emerald-600" : "text-red-600"}`, children: [
34379
+ kpis.efficiency.change !== 0 && /* @__PURE__ */ jsxs("span", { className: `text-xs sm:text-sm font-medium ${kpis.efficiency.change > 0 ? "text-emerald-600" : "text-red-600"}`, children: [
33891
34380
  kpis.efficiency.change > 0 ? "+" : "",
33892
34381
  kpis.efficiency.change.toFixed(1),
33893
34382
  "%"
@@ -33895,19 +34384,19 @@ var LineCard = ({ line, onClick }) => {
33895
34384
  ] })
33896
34385
  ] }),
33897
34386
  /* @__PURE__ */ jsxs("div", { children: [
33898
- /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-2", children: "Output Progress" }),
33899
- /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between mb-3", children: [
33900
- /* @__PURE__ */ jsx("span", { className: "text-2xl font-semibold text-gray-900", children: kpis.outputProgress.current }),
33901
- /* @__PURE__ */ jsxs("span", { className: "text-sm text-gray-500 font-medium", children: [
34387
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1.5 sm:mb-2", children: "Output Progress" }),
34388
+ /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between mb-2 sm:mb-3", children: [
34389
+ /* @__PURE__ */ jsx("span", { className: "text-xl sm:text-2xl font-semibold text-gray-900", children: kpis.outputProgress.current }),
34390
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm text-gray-500 font-medium", children: [
33902
34391
  "/ ",
33903
34392
  kpis.outputProgress.target,
33904
34393
  " units"
33905
34394
  ] })
33906
34395
  ] }),
33907
- /* @__PURE__ */ jsx("div", { className: "w-full bg-gray-200 rounded-full h-2.5", children: /* @__PURE__ */ jsx(
34396
+ /* @__PURE__ */ jsx("div", { className: "w-full bg-gray-200 rounded-full h-2 sm:h-2.5", children: /* @__PURE__ */ jsx(
33908
34397
  "div",
33909
34398
  {
33910
- className: "bg-blue-600 h-2.5 rounded-full transition-all duration-500 ease-out",
34399
+ className: "bg-blue-600 h-2 sm:h-2.5 rounded-full transition-all duration-500 ease-out",
33911
34400
  style: {
33912
34401
  width: `${Math.min(
33913
34402
  kpis.outputProgress.current / kpis.outputProgress.target * 100,
@@ -33918,17 +34407,17 @@ var LineCard = ({ line, onClick }) => {
33918
34407
  ) })
33919
34408
  ] }),
33920
34409
  /* @__PURE__ */ jsxs("div", { children: [
33921
- /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-2", children: "Underperforming Workspaces" }),
34410
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1.5 sm:mb-2", children: "Underperforming Workspaces" }),
33922
34411
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
33923
- /* @__PURE__ */ jsx("span", { className: `text-2xl font-semibold ${kpis.underperformingWorkers.current === 0 ? "text-emerald-600" : kpis.underperformingWorkers.current <= 2 ? "text-yellow-600" : "text-red-600"}`, children: kpis.underperformingWorkers.current }),
33924
- /* @__PURE__ */ jsxs("span", { className: "text-sm text-gray-500 font-medium", children: [
34412
+ /* @__PURE__ */ jsx("span", { className: `text-xl sm:text-2xl font-semibold ${kpis.underperformingWorkers.current === 0 ? "text-emerald-600" : kpis.underperformingWorkers.current <= 2 ? "text-yellow-600" : "text-red-600"}`, children: kpis.underperformingWorkers.current }),
34413
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm text-gray-500 font-medium", children: [
33925
34414
  "of ",
33926
34415
  kpis.underperformingWorkers.total
33927
34416
  ] })
33928
34417
  ] })
33929
34418
  ] })
33930
34419
  ] }),
33931
- /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 right-4", children: /* @__PURE__ */ jsx("div", { className: "p-2.5 rounded-full bg-gray-50 group-hover:bg-blue-50 transition-colors shadow-sm", children: /* @__PURE__ */ jsx(ArrowRightIcon, { className: "w-5 h-5 text-gray-400 group-hover:text-blue-600 transition-colors" }) }) })
34420
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-3 right-3 sm:bottom-4 sm:right-4", children: /* @__PURE__ */ jsx("div", { className: "p-2 sm:p-2.5 rounded-full bg-gray-50 group-hover:bg-blue-50 transition-colors shadow-sm", children: /* @__PURE__ */ jsx(ArrowRightIcon, { className: "w-4 h-4 sm:w-5 sm:h-5 text-gray-400 group-hover:text-blue-600 transition-colors" }) }) })
33932
34421
  ]
33933
34422
  }
33934
34423
  );
@@ -34007,8 +34496,8 @@ var KPIsOverviewView = ({
34007
34496
  }
34008
34497
  if (error) {
34009
34498
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
34010
- /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
34011
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
34499
+ /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
34500
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsx(
34012
34501
  BackButtonMinimal,
34013
34502
  {
34014
34503
  onClick: handleBackClick,
@@ -34017,9 +34506,9 @@ var KPIsOverviewView = ({
34017
34506
  "aria-label": "Navigate back to previous page"
34018
34507
  }
34019
34508
  ) }),
34020
- /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
34021
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
34022
- /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34509
+ /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center mt-2 sm:mt-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34510
+ /* @__PURE__ */ jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900 text-center", children: "Shop-floor overview" }),
34511
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1 flex-shrink-0" })
34023
34512
  ] }) })
34024
34513
  ] }) }) }),
34025
34514
  /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("p", { className: "text-gray-500", children: error }) }) })
@@ -34027,8 +34516,8 @@ var KPIsOverviewView = ({
34027
34516
  }
34028
34517
  if (lines.length === 0) {
34029
34518
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
34030
- /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
34031
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
34519
+ /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
34520
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsx(
34032
34521
  BackButtonMinimal,
34033
34522
  {
34034
34523
  onClick: handleBackClick,
@@ -34037,9 +34526,9 @@ var KPIsOverviewView = ({
34037
34526
  "aria-label": "Navigate back to previous page"
34038
34527
  }
34039
34528
  ) }),
34040
- /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
34041
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
34042
- /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34529
+ /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center mt-2 sm:mt-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34530
+ /* @__PURE__ */ jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900 text-center", children: "Shop-floor overview" }),
34531
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1 flex-shrink-0" })
34043
34532
  ] }) })
34044
34533
  ] }) }) }),
34045
34534
  /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
@@ -34049,9 +34538,9 @@ var KPIsOverviewView = ({
34049
34538
  ] });
34050
34539
  }
34051
34540
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
34052
- /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "px-4 py-3", children: [
34541
+ /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3", children: [
34053
34542
  /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
34054
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
34543
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsx(
34055
34544
  BackButtonMinimal,
34056
34545
  {
34057
34546
  onClick: handleBackClick,
@@ -34060,27 +34549,27 @@ var KPIsOverviewView = ({
34060
34549
  "aria-label": "Navigate back to previous page"
34061
34550
  }
34062
34551
  ) }),
34063
- /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
34064
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
34065
- /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34552
+ /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center mt-2 sm:mt-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34553
+ /* @__PURE__ */ jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900 text-center", children: "Shop-floor overview" }),
34554
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1 flex-shrink-0" })
34066
34555
  ] }) })
34067
34556
  ] }),
34068
- /* @__PURE__ */ jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-4", children: [
34069
- /* @__PURE__ */ jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(ISTTimer_default, {}) }),
34070
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
34071
- /* @__PURE__ */ jsx("span", { className: "text-base font-medium text-blue-600", children: formatLocalDate2(/* @__PURE__ */ new Date()) }),
34072
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
34073
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
34557
+ /* @__PURE__ */ jsx("div", { className: "mt-2 sm:mt-3 bg-blue-50 px-2 sm:px-3 py-1.5 sm:py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4", children: [
34558
+ /* @__PURE__ */ jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(ISTTimer_default, {}) }),
34559
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
34560
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: formatLocalDate2(/* @__PURE__ */ new Date()) }),
34561
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
34562
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
34074
34563
  /* @__PURE__ */ jsx("div", { className: "text-blue-600", children: getShiftIcon(currentShiftDetails.shiftId) }),
34075
- /* @__PURE__ */ jsxs("span", { className: "text-base font-medium text-blue-600", children: [
34564
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
34076
34565
  shiftName,
34077
34566
  " Shift"
34078
34567
  ] })
34079
34568
  ] })
34080
34569
  ] }) }),
34081
- /* @__PURE__ */ jsx("p", { className: "text-gray-600 text-center mt-3", children: "Click on any line to view detailed performance metrics" })
34570
+ /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-gray-600 text-center mt-2 sm:mt-3 px-2 sm:px-0", children: "Click on any line to view detailed performance metrics" })
34082
34571
  ] }) }),
34083
- /* @__PURE__ */ jsx("main", { className: "flex-1 p-6 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6", children: lines.map((line) => /* @__PURE__ */ jsx(
34572
+ /* @__PURE__ */ jsx("main", { className: "flex-1 p-3 sm:p-4 md:p-6 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3 sm:gap-4 md:gap-6", children: lines.map((line) => /* @__PURE__ */ jsx(
34084
34573
  LineCard,
34085
34574
  {
34086
34575
  line,
@@ -34100,14 +34589,14 @@ var HeaderRibbon = memo(({
34100
34589
  shiftId,
34101
34590
  getShiftIcon,
34102
34591
  getShiftName
34103
- }) => /* @__PURE__ */ jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-4", children: [
34104
- /* @__PURE__ */ jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(IsolatedTimer, {}) }),
34105
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
34106
- /* @__PURE__ */ jsx("span", { className: "text-base font-medium text-blue-600", children: currentDate }),
34107
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
34108
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
34592
+ }) => /* @__PURE__ */ jsx("div", { className: "mt-2 sm:mt-3 bg-blue-50 px-2 sm:px-3 py-1.5 sm:py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-4", children: [
34593
+ /* @__PURE__ */ jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(IsolatedTimer, {}) }),
34594
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
34595
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: currentDate }),
34596
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
34597
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
34109
34598
  /* @__PURE__ */ jsx("div", { className: "text-blue-600", children: getShiftIcon(shiftId) }),
34110
- /* @__PURE__ */ jsxs("span", { className: "text-base font-medium text-blue-600", children: [
34599
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
34111
34600
  getShiftName(shiftId),
34112
34601
  " Shift"
34113
34602
  ] })
@@ -34341,9 +34830,50 @@ var LeaderboardDetailView = memo(({
34341
34830
  ] }) });
34342
34831
  }
34343
34832
  return /* @__PURE__ */ jsxs("div", { className: `min-h-screen bg-slate-50 flex flex-col ${className}`, children: [
34344
- /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-20 bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "px-3 sm:px-8 py-2 sm:py-2.5", children: [
34345
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
34346
- /* @__PURE__ */ jsx("div", { className: "w-auto sm:w-32", children: /* @__PURE__ */ jsx(
34833
+ /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-20 bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "px-3 sm:px-6 md:px-8 py-2 sm:py-2.5", children: [
34834
+ /* @__PURE__ */ jsxs("div", { className: "sm:hidden", children: [
34835
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
34836
+ /* @__PURE__ */ jsx(
34837
+ BackButtonMinimal,
34838
+ {
34839
+ onClick: handleBackClick,
34840
+ text: "Back",
34841
+ size: "sm",
34842
+ "aria-label": "Navigate back to previous page"
34843
+ }
34844
+ ),
34845
+ /* @__PURE__ */ jsxs(
34846
+ "button",
34847
+ {
34848
+ onClick: handleSortToggle,
34849
+ className: "flex items-center gap-1 px-2.5 py-1.5 bg-white rounded-lg border border-gray-200 shadow-sm hover:bg-gray-50 text-xs transition-colors",
34850
+ children: [
34851
+ /* @__PURE__ */ jsx("span", { children: "Sort" }),
34852
+ /* @__PURE__ */ jsx(
34853
+ "svg",
34854
+ {
34855
+ className: "w-3.5 h-3.5 text-gray-600",
34856
+ xmlns: "http://www.w3.org/2000/svg",
34857
+ viewBox: "0 0 24 24",
34858
+ fill: "none",
34859
+ stroke: "currentColor",
34860
+ strokeWidth: "2",
34861
+ strokeLinecap: "round",
34862
+ strokeLinejoin: "round",
34863
+ children: sortAscending ? /* @__PURE__ */ jsx("path", { d: "M5 15l7-7 7 7" }) : /* @__PURE__ */ jsx("path", { d: "M19 9l-7 7-7-7" })
34864
+ }
34865
+ )
34866
+ ]
34867
+ }
34868
+ )
34869
+ ] }),
34870
+ /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2", children: [
34871
+ /* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-gray-900", children: "Leaderboard" }),
34872
+ /* @__PURE__ */ jsx("div", { className: "h-1 w-1 rounded-full bg-green-500 animate-pulse ring-1 ring-green-500/30 ring-offset-1" })
34873
+ ] }) })
34874
+ ] }),
34875
+ /* @__PURE__ */ jsxs("div", { className: "hidden sm:flex items-center justify-between", children: [
34876
+ /* @__PURE__ */ jsx("div", { className: "w-32", children: /* @__PURE__ */ jsx(
34347
34877
  BackButtonMinimal,
34348
34878
  {
34349
34879
  onClick: handleBackClick,
@@ -34352,17 +34882,17 @@ var LeaderboardDetailView = memo(({
34352
34882
  "aria-label": "Navigate back to previous page"
34353
34883
  }
34354
34884
  ) }),
34355
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34356
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Leaderboard" }),
34357
- /* @__PURE__ */ jsx("div", { className: "h-1.5 w-1.5 sm:h-2 sm:w-2 rounded-full bg-green-500 animate-pulse ring-1 sm:ring-2 ring-green-500/30 ring-offset-1" })
34885
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
34886
+ /* @__PURE__ */ jsx("h1", { className: "text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "Leaderboard" }),
34887
+ /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34358
34888
  ] }),
34359
- /* @__PURE__ */ jsx("div", { className: "w-auto sm:w-32 flex justify-end", children: /* @__PURE__ */ jsxs(
34889
+ /* @__PURE__ */ jsx("div", { className: "w-32 flex justify-end", children: /* @__PURE__ */ jsxs(
34360
34890
  "button",
34361
34891
  {
34362
34892
  onClick: handleSortToggle,
34363
- className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-1.5 sm:py-2 bg-white rounded-lg border border-gray-200 shadow-sm hover:bg-gray-50 text-xs sm:text-sm transition-colors",
34893
+ className: "flex items-center gap-2 px-4 py-2 bg-white rounded-lg border border-gray-200 shadow-sm hover:bg-gray-50 text-sm transition-colors",
34364
34894
  children: [
34365
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "Sort by Efficiency" }),
34895
+ /* @__PURE__ */ jsx("span", { children: "Sort by Efficiency" }),
34366
34896
  /* @__PURE__ */ jsx(
34367
34897
  "svg",
34368
34898
  {
@@ -34871,48 +35401,113 @@ var BreakRow = memo(({
34871
35401
  onRemove,
34872
35402
  index
34873
35403
  }) => {
34874
- return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-2 sm:gap-4 items-center w-full bg-white hover:bg-gray-50 rounded-md transition-all duration-200 p-2", children: [
34875
- /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
34876
- TimePickerDropdown,
34877
- {
34878
- value: breakItem.startTime,
34879
- onChange: (value) => onUpdate(index, "startTime", value),
34880
- placeholder: "Start time",
34881
- className: "w-full"
34882
- }
34883
- ) }),
34884
- /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
34885
- TimePickerDropdown,
34886
- {
34887
- value: breakItem.endTime,
34888
- onChange: (value) => onUpdate(index, "endTime", value),
34889
- placeholder: "End time",
34890
- className: "w-full"
34891
- }
34892
- ) }),
34893
- /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-gray-700", children: [
34894
- breakItem.duration,
34895
- " min"
34896
- ] }) }),
34897
- /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
34898
- "input",
34899
- {
34900
- type: "text",
34901
- value: breakItem.remarks || "",
34902
- onChange: (e) => onUpdate(index, "remarks", e.target.value),
34903
- placeholder: "Break remarks",
34904
- className: "w-full px-2 sm:px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"
34905
- }
34906
- ) }),
34907
- /* @__PURE__ */ jsx("div", { className: "col-span-1 flex justify-center", children: /* @__PURE__ */ jsx(
34908
- "button",
34909
- {
34910
- onClick: () => onRemove(index),
34911
- className: "text-gray-400 hover:text-red-500 focus:outline-none transition-colors",
34912
- "aria-label": "Remove break",
34913
- children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
34914
- }
34915
- ) })
35404
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
35405
+ /* @__PURE__ */ jsxs("div", { className: "hidden sm:grid grid-cols-12 gap-2 md:gap-4 items-center w-full bg-white hover:bg-gray-50 rounded-md transition-all duration-200 p-2", children: [
35406
+ /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
35407
+ TimePickerDropdown,
35408
+ {
35409
+ value: breakItem.startTime,
35410
+ onChange: (value) => onUpdate(index, "startTime", value),
35411
+ placeholder: "Start time",
35412
+ className: "w-full"
35413
+ }
35414
+ ) }),
35415
+ /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
35416
+ TimePickerDropdown,
35417
+ {
35418
+ value: breakItem.endTime,
35419
+ onChange: (value) => onUpdate(index, "endTime", value),
35420
+ placeholder: "End time",
35421
+ className: "w-full"
35422
+ }
35423
+ ) }),
35424
+ /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-gray-700", children: [
35425
+ breakItem.duration,
35426
+ " min"
35427
+ ] }) }),
35428
+ /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
35429
+ "input",
35430
+ {
35431
+ type: "text",
35432
+ value: breakItem.remarks || "",
35433
+ onChange: (e) => onUpdate(index, "remarks", e.target.value),
35434
+ placeholder: "Break remarks",
35435
+ className: "w-full px-2 sm:px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"
35436
+ }
35437
+ ) }),
35438
+ /* @__PURE__ */ jsx("div", { className: "col-span-1 flex justify-center", children: /* @__PURE__ */ jsx(
35439
+ "button",
35440
+ {
35441
+ onClick: () => onRemove(index),
35442
+ className: "text-gray-400 hover:text-red-500 focus:outline-none transition-colors",
35443
+ "aria-label": "Remove break",
35444
+ children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
35445
+ }
35446
+ ) })
35447
+ ] }),
35448
+ /* @__PURE__ */ jsxs("div", { className: "sm:hidden bg-white border border-gray-200 rounded-lg p-3 mb-3 space-y-3", children: [
35449
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
35450
+ /* @__PURE__ */ jsxs("h5", { className: "text-sm font-medium text-gray-700", children: [
35451
+ "Break ",
35452
+ index + 1
35453
+ ] }),
35454
+ /* @__PURE__ */ jsx(
35455
+ "button",
35456
+ {
35457
+ onClick: () => onRemove(index),
35458
+ className: "text-gray-400 hover:text-red-500 focus:outline-none transition-colors p-1",
35459
+ "aria-label": "Remove break",
35460
+ children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
35461
+ }
35462
+ )
35463
+ ] }),
35464
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
35465
+ /* @__PURE__ */ jsxs("div", { children: [
35466
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-600 mb-1", children: "Start Time" }),
35467
+ /* @__PURE__ */ jsx(
35468
+ TimePickerDropdown,
35469
+ {
35470
+ value: breakItem.startTime,
35471
+ onChange: (value) => onUpdate(index, "startTime", value),
35472
+ placeholder: "Start time",
35473
+ className: "w-full"
35474
+ }
35475
+ )
35476
+ ] }),
35477
+ /* @__PURE__ */ jsxs("div", { children: [
35478
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-600 mb-1", children: "End Time" }),
35479
+ /* @__PURE__ */ jsx(
35480
+ TimePickerDropdown,
35481
+ {
35482
+ value: breakItem.endTime,
35483
+ onChange: (value) => onUpdate(index, "endTime", value),
35484
+ placeholder: "End time",
35485
+ className: "w-full"
35486
+ }
35487
+ )
35488
+ ] })
35489
+ ] }),
35490
+ /* @__PURE__ */ jsxs("div", { children: [
35491
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-600 mb-1", children: "Duration" }),
35492
+ /* @__PURE__ */ jsxs("div", { className: "text-sm text-gray-700 font-medium px-3 py-2 bg-gray-100 rounded-md text-center", children: [
35493
+ breakItem.duration,
35494
+ " minutes"
35495
+ ] })
35496
+ ] }),
35497
+ /* @__PURE__ */ jsxs("div", { children: [
35498
+ /* @__PURE__ */ jsx("label", { className: "block text-xs font-medium text-gray-600 mb-1", children: "Remarks (Optional)" }),
35499
+ /* @__PURE__ */ jsx(
35500
+ "input",
35501
+ {
35502
+ type: "text",
35503
+ value: breakItem.remarks || "",
35504
+ onChange: (e) => onUpdate(index, "remarks", e.target.value),
35505
+ placeholder: "Add optional remarks...",
35506
+ className: "w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
35507
+ }
35508
+ )
35509
+ ] })
35510
+ ] })
34916
35511
  ] });
34917
35512
  });
34918
35513
  BreakRow.displayName = "BreakRow";
@@ -34945,35 +35540,35 @@ var ShiftPanel = memo(({
34945
35540
  console.error("Error saving panel state to localStorage:", error);
34946
35541
  }
34947
35542
  };
34948
- return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-lg shadow-sm mb-6 transition-all duration-300 w-full border border-gray-200", children: [
35543
+ return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-lg shadow-sm mb-4 sm:mb-6 transition-all duration-300 w-full border border-gray-200", children: [
34949
35544
  /* @__PURE__ */ jsx(
34950
35545
  "div",
34951
35546
  {
34952
- className: "p-4 w-full cursor-pointer hover:bg-gray-50/50 transition-all duration-200",
35547
+ className: "p-3 sm:p-4 w-full cursor-pointer hover:bg-gray-50/50 transition-all duration-200",
34953
35548
  onClick: toggleMinimize,
34954
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
35549
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between w-full gap-2 sm:gap-0", children: [
34955
35550
  /* @__PURE__ */ jsxs(
34956
35551
  "button",
34957
35552
  {
34958
35553
  onClick: toggleMinimize,
34959
- className: "flex items-center gap-3 text-lg font-medium transition-colors duration-200 \n focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 rounded-lg \n hover:bg-blue-50 px-3 py-2 group",
35554
+ className: "flex items-center gap-2 sm:gap-3 text-base sm:text-lg font-medium transition-colors duration-200 \n focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 rounded-lg \n hover:bg-blue-50 px-2 sm:px-3 py-1.5 sm:py-2 group w-full sm:w-auto justify-start",
34960
35555
  "aria-expanded": !isMinimized,
34961
35556
  "aria-controls": panelId,
34962
35557
  children: [
34963
35558
  /* @__PURE__ */ jsx(
34964
35559
  ChevronDown,
34965
35560
  {
34966
- className: `w-5 h-5 text-blue-500 transform transition-transform duration-200 ${isMinimized ? "" : "rotate-180"}`
35561
+ className: `w-4 h-4 sm:w-5 sm:h-5 text-blue-500 transform transition-transform duration-200 ${isMinimized ? "" : "rotate-180"}`
34967
35562
  }
34968
35563
  ),
34969
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
34970
- icon,
34971
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-gray-900 group-hover:text-blue-600", children: title })
35564
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
35565
+ /* @__PURE__ */ jsx("div", { className: "w-4 h-4 sm:w-5 sm:h-5", children: icon }),
35566
+ /* @__PURE__ */ jsx("h3", { className: "text-base sm:text-lg font-semibold text-gray-900 group-hover:text-blue-600", children: title })
34972
35567
  ] })
34973
35568
  ]
34974
35569
  }
34975
35570
  ),
34976
- /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-gray-600 mr-2", children: [
35571
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm font-medium text-gray-600 text-center sm:text-right sm:mr-2", children: [
34977
35572
  "Total Shift Hours: ",
34978
35573
  shiftHours,
34979
35574
  " hours"
@@ -34981,10 +35576,10 @@ var ShiftPanel = memo(({
34981
35576
  ] })
34982
35577
  }
34983
35578
  ),
34984
- !isMinimized && /* @__PURE__ */ jsxs("div", { id: panelId, className: "p-4 sm:p-6 border-t border-gray-200 w-full bg-white", children: [
34985
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6 mb-6 w-full", children: [
35579
+ !isMinimized && /* @__PURE__ */ jsxs("div", { id: panelId, className: "p-3 sm:p-4 md:p-6 border-t border-gray-200 w-full bg-white", children: [
35580
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4 md:gap-6 mb-4 sm:mb-6 w-full", children: [
34986
35581
  /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
34987
- /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: "Shift Start Time" }),
35582
+ /* @__PURE__ */ jsx("label", { className: "block text-xs sm:text-sm font-medium text-gray-700 mb-1", children: "Shift Start Time" }),
34988
35583
  /* @__PURE__ */ jsx(
34989
35584
  TimePickerDropdown,
34990
35585
  {
@@ -34996,7 +35591,7 @@ var ShiftPanel = memo(({
34996
35591
  )
34997
35592
  ] }),
34998
35593
  /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
34999
- /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: "Shift End Time" }),
35594
+ /* @__PURE__ */ jsx("label", { className: "block text-xs sm:text-sm font-medium text-gray-700 mb-1", children: "Shift End Time" }),
35000
35595
  /* @__PURE__ */ jsx(
35001
35596
  TimePickerDropdown,
35002
35597
  {
@@ -35009,12 +35604,12 @@ var ShiftPanel = memo(({
35009
35604
  ] })
35010
35605
  ] }),
35011
35606
  /* @__PURE__ */ jsxs("div", { className: "mb-4 w-full", children: [
35012
- /* @__PURE__ */ jsx("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mb-3 w-full", children: /* @__PURE__ */ jsxs("h4", { className: "text-md font-medium text-gray-700 flex items-center gap-2 mb-2 sm:mb-0", children: [
35013
- /* @__PURE__ */ jsx(Coffee, { className: "w-4 h-4" }),
35607
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mb-3 w-full", children: /* @__PURE__ */ jsxs("h4", { className: "text-sm sm:text-base font-medium text-gray-700 flex items-center gap-1.5 sm:gap-2 mb-2 sm:mb-0", children: [
35608
+ /* @__PURE__ */ jsx(Coffee, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4" }),
35014
35609
  "Breaks"
35015
35610
  ] }) }),
35016
35611
  /* @__PURE__ */ jsx("div", { className: "space-y-2 mb-4 w-full", children: breaks.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
35017
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-2 sm:gap-4 text-xs font-medium text-gray-500 mb-1 w-full px-2", children: [
35612
+ /* @__PURE__ */ jsxs("div", { className: "hidden sm:grid grid-cols-12 gap-2 md:gap-4 text-xs font-medium text-gray-500 mb-1 w-full px-2", children: [
35018
35613
  /* @__PURE__ */ jsx("div", { className: "col-span-3", children: "Break Start" }),
35019
35614
  /* @__PURE__ */ jsx("div", { className: "col-span-3", children: "Break End" }),
35020
35615
  /* @__PURE__ */ jsx("div", { className: "col-span-2", children: "Duration" }),
@@ -35031,7 +35626,7 @@ var ShiftPanel = memo(({
35031
35626
  },
35032
35627
  index
35033
35628
  )) })
35034
- ] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-500 py-3 text-center bg-gray-50 rounded-md", children: "No breaks added yet" }) }),
35629
+ ] }) : /* @__PURE__ */ jsx("div", { className: "text-xs sm:text-sm text-gray-500 py-3 text-center bg-gray-50 rounded-md", children: "No breaks added yet" }) }),
35035
35630
  /* @__PURE__ */ jsxs(
35036
35631
  "button",
35037
35632
  {
@@ -35039,9 +35634,9 @@ var ShiftPanel = memo(({
35039
35634
  e.stopPropagation();
35040
35635
  onBreakAdd();
35041
35636
  },
35042
- className: "inline-flex items-center gap-1 text-sm font-medium text-blue-600 hover:text-blue-800 px-3 py-1.5 bg-blue-50 hover:bg-blue-100 rounded-md transition-colors",
35637
+ className: "w-full sm:w-auto inline-flex items-center justify-center gap-1 text-xs sm:text-sm font-medium text-blue-600 hover:text-blue-800 px-3 py-1.5 bg-blue-50 hover:bg-blue-100 rounded-md transition-colors",
35043
35638
  children: [
35044
- /* @__PURE__ */ jsx(Plus, { className: "w-4 h-4" }),
35639
+ /* @__PURE__ */ jsx(Plus, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4" }),
35045
35640
  "Add Break"
35046
35641
  ]
35047
35642
  }
@@ -35409,8 +36004,8 @@ var ShiftsView = ({
35409
36004
  }
35410
36005
  }, [lineConfigs, supabase, showToast]);
35411
36006
  return /* @__PURE__ */ jsxs("div", { className: `min-h-screen bg-slate-50 ${className}`, children: [
35412
- /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-8 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
35413
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
36007
+ /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "px-3 sm:px-4 md:px-6 lg:px-8 py-3 sm:py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
36008
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsx(
35414
36009
  BackButtonMinimal,
35415
36010
  {
35416
36011
  onClick: () => onBackClick ? onBackClick() : window.history.back(),
@@ -35419,14 +36014,14 @@ var ShiftsView = ({
35419
36014
  "aria-label": "Navigate back to previous page"
35420
36015
  }
35421
36016
  ) }),
35422
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col items-center", children: [
35423
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shift Management" }),
35424
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 mt-1", children: "Configure day and night shift timings and breaks for each production line" })
36017
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col items-center mt-2 sm:mt-0", children: [
36018
+ /* @__PURE__ */ jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900 text-center", children: "Shift Management" }),
36019
+ /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-gray-500 mt-0.5 sm:mt-1 text-center px-2 sm:px-0", children: "Configure day and night shift timings and breaks for each production line" })
35425
36020
  ] }),
35426
- /* @__PURE__ */ jsx("div", { className: "absolute right-0 w-24" })
36021
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block absolute right-0 w-24" })
35427
36022
  ] }) }) }),
35428
- /* @__PURE__ */ jsxs("div", { className: "p-4 sm:p-6 md:p-8", children: [
35429
- /* @__PURE__ */ jsx("div", { className: "mb-6 bg-gradient-to-r from-blue-50 to-blue-50/50 p-3 sm:p-4 rounded-xl border border-blue-100", children: /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-blue-700 font-medium", children: "Changes will affect production targets and output calculations." }) }),
36023
+ /* @__PURE__ */ jsxs("div", { className: "p-3 sm:p-4 md:p-6 lg:p-8", children: [
36024
+ /* @__PURE__ */ jsx("div", { className: "mb-4 sm:mb-6 bg-gradient-to-r from-blue-50 to-blue-50/50 p-3 sm:p-4 rounded-xl border border-blue-100", children: /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-blue-700 font-medium text-center sm:text-left", children: "Changes will affect production targets and output calculations." }) }),
35430
36025
  loading ? /* @__PURE__ */ jsx("div", { className: "bg-white rounded-xl p-8 shadow text-center", children: /* @__PURE__ */ jsxs("div", { className: "animate-pulse flex flex-col items-center", children: [
35431
36026
  /* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-full bg-blue-200 mb-4" }),
35432
36027
  /* @__PURE__ */ jsx("div", { className: "h-4 w-48 bg-gray-200 rounded mb-2" }),
@@ -35435,17 +36030,19 @@ var ShiftsView = ({
35435
36030
  /* @__PURE__ */ jsx("div", { className: "text-red-500 mb-2", children: "Error loading shift configurations" }),
35436
36031
  /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500", children: error })
35437
36032
  ] }) : /* @__PURE__ */ jsx("div", { className: "space-y-4 sm:space-y-6", children: lineConfigs.map((config) => /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-all duration-200 w-full", children: [
35438
- /* @__PURE__ */ jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3 sm:gap-0", children: [
35439
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
35440
- /* @__PURE__ */ jsx(Calendar, { className: "w-5 h-5 text-gray-600" }),
35441
- /* @__PURE__ */ jsxs("h2", { className: "text-lg font-semibold text-gray-800", children: [
36033
+ /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-5 md:px-6 py-3 sm:py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3 sm:gap-0", children: [
36034
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
36035
+ /* @__PURE__ */ jsx(Calendar, { className: "w-4 h-4 sm:w-5 sm:h-5 text-gray-600" }),
36036
+ /* @__PURE__ */ jsxs("h2", { className: "text-base sm:text-lg font-semibold text-gray-800", children: [
35442
36037
  config.name,
35443
36038
  " Shifts"
35444
36039
  ] })
35445
36040
  ] }),
35446
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-4", children: [
35447
- config.isSaving && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-blue-600", children: "Saving..." }),
35448
- config.saveSuccess && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-green-600", children: "Saved!" }),
36041
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4 w-full sm:w-auto", children: [
36042
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
36043
+ config.isSaving && /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium text-blue-600", children: "Saving..." }),
36044
+ config.saveSuccess && /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium text-green-600", children: "Saved!" })
36045
+ ] }),
35449
36046
  /* @__PURE__ */ jsxs(
35450
36047
  "button",
35451
36048
  {
@@ -35455,7 +36052,7 @@ var ShiftsView = ({
35455
36052
  e.stopPropagation();
35456
36053
  handleSaveShifts(config.id);
35457
36054
  },
35458
- className: "inline-flex items-center gap-1 sm:gap-2 py-1.5 sm:py-2 px-3 sm:px-4 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors duration-200 text-xs sm:text-sm font-medium shadow-sm cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 z-10",
36055
+ className: "w-full sm:w-auto inline-flex items-center justify-center gap-1 sm:gap-2 py-1.5 sm:py-2 px-3 sm:px-4 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors duration-200 text-xs sm:text-sm font-medium shadow-sm cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 z-10",
35459
36056
  disabled: config.isSaving,
35460
36057
  "aria-label": "Save shift configuration",
35461
36058
  children: [
@@ -35466,7 +36063,7 @@ var ShiftsView = ({
35466
36063
  )
35467
36064
  ] })
35468
36065
  ] }) }),
35469
- /* @__PURE__ */ jsxs("div", { id: `shift-panel-${config.id}`, className: "p-3 sm:p-6 border-t border-gray-200 w-full", children: [
36066
+ /* @__PURE__ */ jsxs("div", { id: `shift-panel-${config.id}`, className: "p-3 sm:p-4 md:p-6 border-t border-gray-200 w-full", children: [
35470
36067
  /* @__PURE__ */ jsx(
35471
36068
  ShiftPanel,
35472
36069
  {
@@ -36247,54 +36844,105 @@ var SKUList = ({
36247
36844
  /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Get started by creating a new SKU for production planning." })
36248
36845
  ] }) });
36249
36846
  }
36250
- return /* @__PURE__ */ jsx("div", { className: "bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "min-w-full divide-y divide-gray-200", children: [
36251
- /* @__PURE__ */ jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsxs("tr", { children: [
36252
- /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "SKU ID" }),
36253
- /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Production Target" }),
36254
- /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Attributes" }),
36255
- /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Status" }),
36256
- /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Created" }),
36257
- /* @__PURE__ */ jsx("th", { scope: "col", className: "relative px-6 py-3", children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Actions" }) })
36258
- ] }) }),
36259
- /* @__PURE__ */ jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: skus.map((sku) => /* @__PURE__ */ jsxs("tr", { className: "hover:bg-gray-50 transition-colors duration-150", children: [
36260
- /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-gray-900", children: sku.sku_id }) }),
36261
- /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxs("div", { className: "text-sm font-medium text-gray-700", children: [
36262
- sku.production_target.toLocaleString(),
36263
- " units/day"
36847
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
36848
+ /* @__PURE__ */ jsx("div", { className: "hidden lg:block bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "min-w-full divide-y divide-gray-200", children: [
36849
+ /* @__PURE__ */ jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsxs("tr", { children: [
36850
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "SKU ID" }),
36851
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Production Target" }),
36852
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Attributes" }),
36853
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Status" }),
36854
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Created" }),
36855
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "relative px-6 py-3", children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Actions" }) })
36264
36856
  ] }) }),
36265
- /* @__PURE__ */ jsx("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-500", children: Object.keys(sku.attributes || {}).length === 0 ? /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: "No attributes" }) : /* @__PURE__ */ jsx("div", { className: "max-w-xs truncate", children: Object.entries(sku.attributes).map(([key, value], index) => /* @__PURE__ */ jsxs("span", { children: [
36266
- index > 0 && ", ",
36267
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
36268
- key,
36269
- ":"
36857
+ /* @__PURE__ */ jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: skus.map((sku) => /* @__PURE__ */ jsxs("tr", { className: "hover:bg-gray-50 transition-colors duration-150", children: [
36858
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-gray-900", children: sku.sku_id }) }),
36859
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxs("div", { className: "text-sm font-medium text-gray-700", children: [
36860
+ sku.production_target.toLocaleString(),
36861
+ " units/day"
36862
+ ] }) }),
36863
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-500", children: Object.keys(sku.attributes || {}).length === 0 ? /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: "No attributes" }) : /* @__PURE__ */ jsx("div", { className: "max-w-xs truncate", children: Object.entries(sku.attributes).map(([key, value], index) => /* @__PURE__ */ jsxs("span", { children: [
36864
+ index > 0 && ", ",
36865
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
36866
+ key,
36867
+ ":"
36868
+ ] }),
36869
+ " ",
36870
+ String(value)
36871
+ ] }, key)) }) }) }),
36872
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx("span", { className: `inline-flex px-2 py-1 text-xs font-semibold rounded-full ${sku.is_active ? "bg-green-100 text-green-800" : "bg-gray-100 text-gray-800"}`, children: sku.is_active ? "Active" : "Inactive" }) }),
36873
+ /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-500", children: new Date(sku.created_at).toLocaleDateString() }),
36874
+ /* @__PURE__ */ jsxs("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium", children: [
36875
+ /* @__PURE__ */ jsx(
36876
+ "button",
36877
+ {
36878
+ onClick: () => onEdit(sku),
36879
+ className: "text-blue-600 hover:text-blue-800 mr-3 transition-colors duration-150 p-1 hover:bg-blue-50 rounded",
36880
+ title: "Edit SKU",
36881
+ children: /* @__PURE__ */ jsx(Edit2, { className: "w-4 h-4" })
36882
+ }
36883
+ ),
36884
+ /* @__PURE__ */ jsx(
36885
+ "button",
36886
+ {
36887
+ onClick: () => onDelete(sku),
36888
+ className: "text-red-600 hover:text-red-800 transition-colors duration-150 p-1 hover:bg-red-50 rounded",
36889
+ title: "Delete SKU",
36890
+ children: /* @__PURE__ */ jsx(Trash2, { className: "w-4 h-4" })
36891
+ }
36892
+ )
36893
+ ] })
36894
+ ] }, sku.id)) })
36895
+ ] }) }) }),
36896
+ /* @__PURE__ */ jsx("div", { className: "lg:hidden space-y-3 sm:space-y-4", children: skus.map((sku) => /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-gray-200 p-4 hover:shadow-md transition-all duration-200", children: [
36897
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between mb-3", children: [
36898
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
36899
+ /* @__PURE__ */ jsx("h3", { className: "text-base sm:text-lg font-semibold text-gray-900 truncate", children: sku.sku_id }),
36900
+ /* @__PURE__ */ jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsx("span", { className: `inline-flex px-2 py-1 text-xs font-semibold rounded-full ${sku.is_active ? "bg-green-100 text-green-800" : "bg-gray-100 text-gray-800"}`, children: sku.is_active ? "Active" : "Inactive" }) })
36270
36901
  ] }),
36271
- " ",
36272
- String(value)
36273
- ] }, key)) }) }) }),
36274
- /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx("span", { className: `inline-flex px-2 py-1 text-xs font-semibold rounded-full ${sku.is_active ? "bg-green-100 text-green-800" : "bg-gray-100 text-gray-800"}`, children: sku.is_active ? "Active" : "Inactive" }) }),
36275
- /* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-500", children: new Date(sku.created_at).toLocaleDateString() }),
36276
- /* @__PURE__ */ jsxs("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium", children: [
36277
- /* @__PURE__ */ jsx(
36278
- "button",
36279
- {
36280
- onClick: () => onEdit(sku),
36281
- className: "text-blue-600 hover:text-blue-800 mr-3 transition-colors duration-150 p-1 hover:bg-blue-50 rounded",
36282
- title: "Edit SKU",
36283
- children: /* @__PURE__ */ jsx(Edit2, { className: "w-4 h-4" })
36284
- }
36285
- ),
36286
- /* @__PURE__ */ jsx(
36287
- "button",
36288
- {
36289
- onClick: () => onDelete(sku),
36290
- className: "text-red-600 hover:text-red-800 transition-colors duration-150 p-1 hover:bg-red-50 rounded",
36291
- title: "Delete SKU",
36292
- children: /* @__PURE__ */ jsx(Trash2, { className: "w-4 h-4" })
36293
- }
36294
- )
36902
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 ml-3", children: [
36903
+ /* @__PURE__ */ jsx(
36904
+ "button",
36905
+ {
36906
+ onClick: () => onEdit(sku),
36907
+ className: "text-blue-600 hover:text-blue-800 transition-colors duration-150 p-2 hover:bg-blue-50 rounded-lg",
36908
+ title: "Edit SKU",
36909
+ children: /* @__PURE__ */ jsx(Edit2, { className: "w-4 h-4" })
36910
+ }
36911
+ ),
36912
+ /* @__PURE__ */ jsx(
36913
+ "button",
36914
+ {
36915
+ onClick: () => onDelete(sku),
36916
+ className: "text-red-600 hover:text-red-800 transition-colors duration-150 p-2 hover:bg-red-50 rounded-lg",
36917
+ title: "Delete SKU",
36918
+ children: /* @__PURE__ */ jsx(Trash2, { className: "w-4 h-4" })
36919
+ }
36920
+ )
36921
+ ] })
36922
+ ] }),
36923
+ /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
36924
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1", children: "Production Target" }),
36925
+ /* @__PURE__ */ jsxs("div", { className: "text-sm sm:text-base font-medium text-gray-700", children: [
36926
+ sku.production_target.toLocaleString(),
36927
+ " units/day"
36928
+ ] })
36929
+ ] }),
36930
+ /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
36931
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1", children: "Attributes" }),
36932
+ /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-500", children: Object.keys(sku.attributes || {}).length === 0 ? /* @__PURE__ */ jsx("span", { className: "text-gray-400 italic", children: "No attributes" }) : /* @__PURE__ */ jsx("div", { className: "space-y-1", children: Object.entries(sku.attributes).map(([key, value]) => /* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
36933
+ /* @__PURE__ */ jsxs("span", { className: "font-medium text-gray-600", children: [
36934
+ key,
36935
+ ":"
36936
+ ] }),
36937
+ /* @__PURE__ */ jsx("span", { className: "text-gray-900", children: String(value) })
36938
+ ] }, key)) }) })
36939
+ ] }),
36940
+ /* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-500", children: [
36941
+ "Created: ",
36942
+ new Date(sku.created_at).toLocaleDateString()
36295
36943
  ] })
36296
36944
  ] }, sku.id)) })
36297
- ] }) }) });
36945
+ ] });
36298
36946
  };
36299
36947
  var TargetsViewUI = ({
36300
36948
  isLoading,
@@ -36327,8 +36975,8 @@ var TargetsViewUI = ({
36327
36975
  return /* @__PURE__ */ jsx("div", { className: "flex h-screen bg-gray-50", children: /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "lg", message: "Loading targets..." }) }) });
36328
36976
  }
36329
36977
  return /* @__PURE__ */ jsxs("main", { className: "min-h-screen flex-1 bg-gray-50", children: [
36330
- /* @__PURE__ */ jsx("div", { className: "bg-white px-8 py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between relative", children: [
36331
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
36978
+ /* @__PURE__ */ jsx("div", { className: "bg-white px-4 sm:px-6 md:px-8 py-4 sm:py-5 md:py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 sm:gap-4 relative", children: [
36979
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsx(
36332
36980
  BackButtonMinimal,
36333
36981
  {
36334
36982
  onClick: onBack,
@@ -36337,30 +36985,30 @@ var TargetsViewUI = ({
36337
36985
  "aria-label": "Navigate back to previous page"
36338
36986
  }
36339
36987
  ) }),
36340
- /* @__PURE__ */ jsx("div", { className: "absolute right-0", children: /* @__PURE__ */ jsxs(
36988
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:right-0 w-full sm:w-auto", children: /* @__PURE__ */ jsxs(
36341
36989
  "button",
36342
36990
  {
36343
- className: "px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200",
36991
+ className: "w-full sm:w-auto px-3 sm:px-4 py-1.5 sm:py-2 text-xs sm:text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200",
36344
36992
  onClick: onToggleBulkConfigure,
36345
36993
  children: [
36346
- /* @__PURE__ */ jsx(Settings2, { className: "w-4 h-4 mr-2 inline-block" }),
36994
+ /* @__PURE__ */ jsx(Settings2, { className: "w-3 h-3 sm:w-4 sm:h-4 mr-1.5 sm:mr-2 inline-block" }),
36347
36995
  "Bulk Configure"
36348
36996
  ]
36349
36997
  }
36350
36998
  ) }),
36351
- /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
36352
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Production Targets" }),
36353
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Configure production targets and metrics for each line and workspace" })
36999
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto mt-2 sm:mt-0", children: [
37000
+ /* @__PURE__ */ jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "Production Targets" }),
37001
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 sm:mt-1 text-xs sm:text-sm text-gray-500", children: "Configure production targets and metrics for each line and workspace" })
36354
37002
  ] })
36355
37003
  ] }) }),
36356
- /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "px-8 py-6", children: [
36357
- /* @__PURE__ */ jsx("div", { className: "mb-6 bg-gradient-to-r from-blue-50 to-blue-50/50 p-4 rounded-xl border border-blue-100", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-blue-700 font-medium", children: "Click on a line to expand and configure individual workspace targets." }) }),
36358
- /* @__PURE__ */ jsx("div", { className: "mb-6 flex justify-center relative", children: /* @__PURE__ */ jsxs("div", { className: "inline-flex bg-gray-100 p-1 rounded-lg", children: [
37004
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "px-4 sm:px-6 md:px-8 py-4 sm:py-5 md:py-6", children: [
37005
+ /* @__PURE__ */ jsx("div", { className: "mb-4 sm:mb-6 bg-gradient-to-r from-blue-50 to-blue-50/50 p-3 sm:p-4 rounded-xl border border-blue-100", children: /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-blue-700 font-medium text-center sm:text-left", children: "Click on a line to expand and configure individual workspace targets." }) }),
37006
+ /* @__PURE__ */ jsx("div", { className: "mb-4 sm:mb-6 flex justify-center relative", children: /* @__PURE__ */ jsxs("div", { className: "inline-flex bg-gray-100 p-1 rounded-lg w-full max-w-xs sm:w-auto", children: [
36359
37007
  /* @__PURE__ */ jsx(
36360
37008
  "button",
36361
37009
  {
36362
37010
  onClick: () => onShiftChange(0),
36363
- className: `px-4 py-2 text-sm font-medium rounded-md transition-all ${selectedShift === 0 ? "bg-white text-blue-600 shadow-sm" : "text-gray-600 hover:text-gray-900"}`,
37011
+ className: `flex-1 sm:flex-none px-3 sm:px-4 py-2 text-xs sm:text-sm font-medium rounded-md transition-all ${selectedShift === 0 ? "bg-white text-blue-600 shadow-sm" : "text-gray-600 hover:text-gray-900"}`,
36364
37012
  children: "Day Shift"
36365
37013
  }
36366
37014
  ),
@@ -36368,7 +37016,7 @@ var TargetsViewUI = ({
36368
37016
  "button",
36369
37017
  {
36370
37018
  onClick: () => onShiftChange(1),
36371
- className: `px-4 py-2 text-sm font-medium rounded-md transition-all ${selectedShift === 1 ? "bg-white text-blue-600 shadow-sm" : "text-gray-600 hover:text-gray-900"}`,
37019
+ className: `flex-1 sm:flex-none px-3 sm:px-4 py-2 text-xs sm:text-sm font-medium rounded-md transition-all ${selectedShift === 1 ? "bg-white text-blue-600 shadow-sm" : "text-gray-600 hover:text-gray-900"}`,
36372
37020
  children: "Night Shift"
36373
37021
  }
36374
37022
  )
@@ -36378,35 +37026,37 @@ var TargetsViewUI = ({
36378
37026
  {
36379
37027
  className: "bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-all duration-200",
36380
37028
  children: [
36381
- /* @__PURE__ */ jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
36382
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-6", children: [
37029
+ /* @__PURE__ */ jsx("div", { className: "px-3 sm:px-4 md:px-6 py-3 sm:py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col lg:flex-row lg:items-center justify-between gap-3 lg:gap-4", children: [
37030
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4 lg:gap-6", children: [
36383
37031
  /* @__PURE__ */ jsxs(
36384
37032
  "button",
36385
37033
  {
36386
37034
  onClick: () => onToggleLineDropdown(lineId),
36387
- className: "flex items-center gap-3 text-lg font-medium transition-colors duration-200 \n focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 rounded-lg \n hover:bg-blue-50 px-3 py-2 group",
37035
+ className: "flex items-center gap-2 sm:gap-3 text-base sm:text-lg font-medium transition-colors duration-200 \n focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 rounded-lg \n hover:bg-blue-50 px-2 sm:px-3 py-2 group self-start",
36388
37036
  "aria-expanded": dropdownStates[lineId],
36389
37037
  "aria-controls": `line-${lineId}-content`,
36390
37038
  children: [
36391
37039
  /* @__PURE__ */ jsx(
36392
37040
  ChevronDown,
36393
37041
  {
36394
- className: `w-5 h-5 text-blue-500 transform transition-transform duration-200 ${dropdownStates[lineId] ? "rotate-180" : ""}`
37042
+ className: `w-4 h-4 sm:w-5 sm:h-5 text-blue-500 transform transition-transform duration-200 ${dropdownStates[lineId] ? "rotate-180" : ""}`
36395
37043
  }
36396
37044
  ),
36397
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
36398
- /* @__PURE__ */ jsx("span", { className: "text-lg text-gray-900 group-hover:text-blue-600", children: lineNames[lineId] || lineId }),
36399
- /* @__PURE__ */ jsx("span", { className: "text-sm font-normal text-gray-400", children: "\u2022" }),
36400
- /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-gray-500", children: [
36401
- line.workspaces.length,
36402
- " workspaces"
37045
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2.5", children: [
37046
+ /* @__PURE__ */ jsx("span", { className: "text-base sm:text-lg text-gray-900 group-hover:text-blue-600", children: lineNames[lineId] || lineId }),
37047
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
37048
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline text-sm font-normal text-gray-400", children: "\u2022" }),
37049
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm font-medium text-gray-500", children: [
37050
+ line.workspaces.length,
37051
+ " workspaces"
37052
+ ] })
36403
37053
  ] })
36404
37054
  ] })
36405
37055
  ]
36406
37056
  }
36407
37057
  ),
36408
- /* @__PURE__ */ jsx("div", { className: "h-8 w-px bg-gray-200/80" }),
36409
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs("div", { className: "ml-4 text-sm font-medium text-gray-600", children: [
37058
+ /* @__PURE__ */ jsx("div", { className: "hidden lg:block h-8 w-px bg-gray-200/80" }),
37059
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3 ml-0 sm:ml-2 lg:ml-4", children: /* @__PURE__ */ jsxs("div", { className: "text-xs sm:text-sm font-medium text-gray-600", children: [
36410
37060
  line.shiftStartTime,
36411
37061
  " \u2013 ",
36412
37062
  line.shiftEndTime,
@@ -36415,9 +37065,9 @@ var TargetsViewUI = ({
36415
37065
  " hours"
36416
37066
  ] }) })
36417
37067
  ] }),
36418
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
36419
- saveSuccess[lineId] && /* @__PURE__ */ jsxs("span", { className: "text-sm text-green-600 font-medium flex items-center gap-1.5", children: [
36420
- /* @__PURE__ */ jsx(CheckCircle2, { className: "w-4 h-4" }),
37068
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4", children: [
37069
+ saveSuccess[lineId] && /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm text-green-600 font-medium flex items-center gap-1.5", children: [
37070
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "w-3 h-3 sm:w-4 sm:h-4" }),
36421
37071
  "Saved successfully"
36422
37072
  ] }),
36423
37073
  /* @__PURE__ */ jsx(
@@ -36425,13 +37075,13 @@ var TargetsViewUI = ({
36425
37075
  {
36426
37076
  onClick: () => onSaveLine(lineId),
36427
37077
  disabled: savingLines[lineId],
36428
- className: `ml-6 inline-flex items-center px-4 py-2 text-sm font-medium rounded-lg transition-all duration-200
37078
+ className: `inline-flex items-center px-3 sm:px-4 py-1.5 sm:py-2 text-xs sm:text-sm font-medium rounded-lg transition-all duration-200
36429
37079
  ${savingLines[lineId] ? "bg-gray-100 text-gray-400 cursor-not-allowed" : "bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"}`,
36430
37080
  children: savingLines[lineId] ? /* @__PURE__ */ jsxs(Fragment, { children: [
36431
- /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm", className: "mr-2" }),
37081
+ /* @__PURE__ */ jsx(OptifyeLogoLoader_default, { size: "sm", className: "mr-1.5 sm:mr-2" }),
36432
37082
  "Saving..."
36433
37083
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
36434
- /* @__PURE__ */ jsx(Save, { className: "w-4 h-4 mr-2" }),
37084
+ /* @__PURE__ */ jsx(Save, { className: "w-3 h-3 sm:w-4 sm:h-4 mr-1.5 sm:mr-2" }),
36435
37085
  "Save Changes"
36436
37086
  ] })
36437
37087
  }
@@ -36439,9 +37089,9 @@ var TargetsViewUI = ({
36439
37089
  ] })
36440
37090
  ] }) }),
36441
37091
  dropdownStates[lineId] && /* @__PURE__ */ jsxs("div", { id: `line-${lineId}-content`, className: "border-t border-gray-200", children: [
36442
- skuEnabled && /* @__PURE__ */ jsx("div", { className: "px-6 py-4 border-b border-gray-200 bg-gray-50/50", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
36443
- /* @__PURE__ */ jsx("label", { htmlFor: `sku-${lineId}`, className: "text-sm font-medium text-gray-700", children: "Select SKU:" }),
36444
- /* @__PURE__ */ jsx("div", { className: "flex-1 max-w-md", children: /* @__PURE__ */ jsx(
37092
+ skuEnabled && /* @__PURE__ */ jsx("div", { className: "px-3 sm:px-4 lg:px-6 py-3 sm:py-4 border-b border-gray-200 bg-gray-50/50", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4", children: [
37093
+ /* @__PURE__ */ jsx("label", { htmlFor: `sku-${lineId}`, className: "text-sm font-medium text-gray-700 flex-shrink-0", children: "Select SKU:" }),
37094
+ /* @__PURE__ */ jsx("div", { className: "flex-1 max-w-full sm:max-w-md", children: /* @__PURE__ */ jsx(
36445
37095
  SKUSelector,
36446
37096
  {
36447
37097
  onSelect: (sku) => onUpdateSelectedSKU?.(lineId, sku),
@@ -36452,14 +37102,14 @@ var TargetsViewUI = ({
36452
37102
  className: "w-full"
36453
37103
  }
36454
37104
  ) }),
36455
- line.selectedSKU && /* @__PURE__ */ jsxs("div", { className: "text-sm text-gray-600", children: [
37105
+ line.selectedSKU && /* @__PURE__ */ jsxs("div", { className: "text-xs sm:text-sm text-gray-600 mt-2 sm:mt-0", children: [
36456
37106
  /* @__PURE__ */ jsx("span", { className: "font-medium", children: "Production Target:" }),
36457
37107
  " ",
36458
37108
  line.selectedSKU.production_target.toLocaleString(),
36459
37109
  " units/day"
36460
37110
  ] })
36461
37111
  ] }) }),
36462
- /* @__PURE__ */ jsx("div", { className: "px-6 py-3 bg-gray-50 border-b border-gray-200", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-6 text-sm font-medium text-gray-600", children: [
37112
+ /* @__PURE__ */ jsx("div", { className: "hidden lg:block px-6 py-3 bg-gray-50 border-b border-gray-200", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-6 text-sm font-medium text-gray-600", children: [
36463
37113
  /* @__PURE__ */ jsx("div", { className: "col-span-2", children: "Workspace" }),
36464
37114
  /* @__PURE__ */ jsx("div", { className: "col-span-2", children: "Action Type" }),
36465
37115
  /* @__PURE__ */ jsxs("div", { className: "col-span-3", children: [
@@ -36477,76 +37127,170 @@ var TargetsViewUI = ({
36477
37127
  ] }) }),
36478
37128
  /* @__PURE__ */ jsx("div", { className: "divide-y divide-gray-100", children: line.workspaces.map((workspace) => {
36479
37129
  const formattedName = formatWorkspaceName(workspace.name, lineId);
36480
- return /* @__PURE__ */ jsx(
37130
+ return /* @__PURE__ */ jsxs(
36481
37131
  "div",
36482
37132
  {
36483
- className: "px-6 py-4 hover:bg-gray-50 transition-all duration-200",
36484
- children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-12 gap-6 items-center", children: [
36485
- /* @__PURE__ */ jsx("div", { className: "col-span-2", children: onUpdateWorkspaceDisplayName ? /* @__PURE__ */ jsx(
36486
- InlineEditableText,
36487
- {
36488
- value: formattedName,
36489
- onSave: async (newName) => {
36490
- await onUpdateWorkspaceDisplayName(workspace.id, newName);
36491
- },
36492
- placeholder: "Workspace name",
36493
- className: "font-medium text-gray-900",
36494
- inputClassName: "min-w-[120px]"
36495
- }
36496
- ) : /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900", children: formattedName }) }),
36497
- /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxs(
36498
- "select",
36499
- {
36500
- value: workspace.actionType,
36501
- onChange: (e) => {
36502
- const newActionType = e.target.value;
36503
- onActionTypeChange(lineId, workspace.id, newActionType);
36504
- },
36505
- className: "w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",
36506
- "aria-label": `Action type for ${formattedName}`,
36507
- children: [
36508
- /* @__PURE__ */ jsx("option", { value: "assembly", className: "py-2", children: "Assembly" }),
36509
- /* @__PURE__ */ jsx("option", { value: "packaging", className: "py-2", children: "Packaging" })
36510
- ]
36511
- }
36512
- ) }),
36513
- /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
36514
- "input",
36515
- {
36516
- type: "number",
36517
- value: workspace.targetCycleTime === 0 ? "" : workspace.targetCycleTime,
36518
- onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetCycleTime", Number(e.target.value) || ""),
36519
- className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400",
36520
- min: "0",
36521
- step: "0.01",
36522
- placeholder: "Enter cycle time"
36523
- }
36524
- ) }),
36525
- /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
36526
- "input",
36527
- {
36528
- type: "number",
36529
- value: workspace.targetPPH === 0 ? "" : workspace.targetPPH,
36530
- onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetPPH", Number(e.target.value) || ""),
36531
- className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400 \n placeholder:text-gray-400",
36532
- min: "0",
36533
- step: "0.1",
36534
- placeholder: "Enter PPH"
36535
- }
36536
- ) }),
36537
- /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(
36538
- "input",
36539
- {
36540
- type: "number",
36541
- value: workspace.targetDayOutput === 0 ? "" : workspace.targetDayOutput,
36542
- onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetDayOutput", Number(e.target.value) || ""),
36543
- className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400 \n placeholder:text-gray-400",
36544
- min: "0",
36545
- step: "1",
36546
- placeholder: "Enter day output"
36547
- }
36548
- ) })
36549
- ] })
37133
+ className: "px-3 sm:px-4 lg:px-6 py-3 sm:py-4 hover:bg-gray-50 transition-all duration-200",
37134
+ children: [
37135
+ /* @__PURE__ */ jsxs("div", { className: "hidden lg:grid lg:grid-cols-12 lg:gap-6 lg:items-center", children: [
37136
+ /* @__PURE__ */ jsx("div", { className: "col-span-2", children: onUpdateWorkspaceDisplayName ? /* @__PURE__ */ jsx(
37137
+ InlineEditableText,
37138
+ {
37139
+ value: formattedName,
37140
+ onSave: async (newName) => {
37141
+ await onUpdateWorkspaceDisplayName(workspace.id, newName);
37142
+ },
37143
+ placeholder: "Workspace name",
37144
+ className: "font-medium text-gray-900",
37145
+ inputClassName: "min-w-[120px]"
37146
+ }
37147
+ ) : /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900", children: formattedName }) }),
37148
+ /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxs(
37149
+ "select",
37150
+ {
37151
+ value: workspace.actionType,
37152
+ onChange: (e) => {
37153
+ const newActionType = e.target.value;
37154
+ onActionTypeChange(lineId, workspace.id, newActionType);
37155
+ },
37156
+ className: "w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",
37157
+ "aria-label": `Action type for ${formattedName}`,
37158
+ children: [
37159
+ /* @__PURE__ */ jsx("option", { value: "assembly", className: "py-2", children: "Assembly" }),
37160
+ /* @__PURE__ */ jsx("option", { value: "packaging", className: "py-2", children: "Packaging" })
37161
+ ]
37162
+ }
37163
+ ) }),
37164
+ /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
37165
+ "input",
37166
+ {
37167
+ type: "number",
37168
+ value: workspace.targetCycleTime === 0 ? "" : workspace.targetCycleTime,
37169
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetCycleTime", Number(e.target.value) || ""),
37170
+ className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400",
37171
+ min: "0",
37172
+ step: "0.01",
37173
+ placeholder: "Enter cycle time"
37174
+ }
37175
+ ) }),
37176
+ /* @__PURE__ */ jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsx(
37177
+ "input",
37178
+ {
37179
+ type: "number",
37180
+ value: workspace.targetPPH === 0 ? "" : workspace.targetPPH,
37181
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetPPH", Number(e.target.value) || ""),
37182
+ className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400 \n placeholder:text-gray-400",
37183
+ min: "0",
37184
+ step: "0.1",
37185
+ placeholder: "Enter PPH"
37186
+ }
37187
+ ) }),
37188
+ /* @__PURE__ */ jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsx(
37189
+ "input",
37190
+ {
37191
+ type: "number",
37192
+ value: workspace.targetDayOutput === 0 ? "" : workspace.targetDayOutput,
37193
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetDayOutput", Number(e.target.value) || ""),
37194
+ className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400 \n placeholder:text-gray-400",
37195
+ min: "0",
37196
+ step: "1",
37197
+ placeholder: "Enter day output"
37198
+ }
37199
+ ) })
37200
+ ] }),
37201
+ /* @__PURE__ */ jsxs("div", { className: "lg:hidden space-y-4", children: [
37202
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
37203
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-gray-700", children: "Workspace" }),
37204
+ onUpdateWorkspaceDisplayName ? /* @__PURE__ */ jsx(
37205
+ InlineEditableText,
37206
+ {
37207
+ value: formattedName,
37208
+ onSave: async (newName) => {
37209
+ await onUpdateWorkspaceDisplayName(workspace.id, newName);
37210
+ },
37211
+ placeholder: "Workspace name",
37212
+ className: "font-medium text-gray-900 text-base",
37213
+ inputClassName: "min-w-full"
37214
+ }
37215
+ ) : /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900 text-base", children: formattedName })
37216
+ ] }),
37217
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
37218
+ /* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-gray-700", children: "Action Type" }),
37219
+ /* @__PURE__ */ jsxs(
37220
+ "select",
37221
+ {
37222
+ value: workspace.actionType,
37223
+ onChange: (e) => {
37224
+ const newActionType = e.target.value;
37225
+ onActionTypeChange(lineId, workspace.id, newActionType);
37226
+ },
37227
+ className: "w-full p-3 border border-gray-300 rounded-lg shadow-sm focus:ring-blue-500 focus:border-blue-500 text-sm",
37228
+ "aria-label": `Action type for ${formattedName}`,
37229
+ children: [
37230
+ /* @__PURE__ */ jsx("option", { value: "assembly", children: "Assembly" }),
37231
+ /* @__PURE__ */ jsx("option", { value: "packaging", children: "Packaging" })
37232
+ ]
37233
+ }
37234
+ )
37235
+ ] }),
37236
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
37237
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
37238
+ /* @__PURE__ */ jsxs("label", { className: "text-sm font-medium text-gray-700", children: [
37239
+ "Target Cycle Time",
37240
+ /* @__PURE__ */ jsx("span", { className: "block text-xs text-gray-400", children: "seconds per piece" })
37241
+ ] }),
37242
+ /* @__PURE__ */ jsx(
37243
+ "input",
37244
+ {
37245
+ type: "number",
37246
+ value: workspace.targetCycleTime === 0 ? "" : workspace.targetCycleTime,
37247
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetCycleTime", Number(e.target.value) || ""),
37248
+ className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-3 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400",
37249
+ min: "0",
37250
+ step: "0.01",
37251
+ placeholder: "Enter cycle time"
37252
+ }
37253
+ )
37254
+ ] }),
37255
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
37256
+ /* @__PURE__ */ jsxs("label", { className: "text-sm font-medium text-gray-700", children: [
37257
+ "Target PPH",
37258
+ /* @__PURE__ */ jsx("span", { className: "block text-xs text-gray-400", children: "pieces per hour" })
37259
+ ] }),
37260
+ /* @__PURE__ */ jsx(
37261
+ "input",
37262
+ {
37263
+ type: "number",
37264
+ value: workspace.targetPPH === 0 ? "" : workspace.targetPPH,
37265
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetPPH", Number(e.target.value) || ""),
37266
+ className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-3 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400 \n placeholder:text-gray-400",
37267
+ min: "0",
37268
+ step: "0.1",
37269
+ placeholder: "Enter PPH"
37270
+ }
37271
+ )
37272
+ ] })
37273
+ ] }),
37274
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
37275
+ /* @__PURE__ */ jsxs("label", { className: "text-sm font-medium text-gray-700", children: [
37276
+ "Total Day Output",
37277
+ /* @__PURE__ */ jsx("span", { className: "block text-xs text-gray-400", children: "pieces per day" })
37278
+ ] }),
37279
+ /* @__PURE__ */ jsx(
37280
+ "input",
37281
+ {
37282
+ type: "number",
37283
+ value: workspace.targetDayOutput === 0 ? "" : workspace.targetDayOutput,
37284
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetDayOutput", Number(e.target.value) || ""),
37285
+ className: "block w-full rounded-lg border border-gray-300 bg-white px-3 py-3 text-sm\n shadow-sm focus:border-blue-500 focus:ring-blue-500 \n transition-all duration-200 hover:border-gray-400 \n placeholder:text-gray-400",
37286
+ min: "0",
37287
+ step: "1",
37288
+ placeholder: "Enter day output"
37289
+ }
37290
+ )
37291
+ ] })
37292
+ ] })
37293
+ ]
36550
37294
  },
36551
37295
  workspace.id
36552
37296
  );
@@ -37652,9 +38396,9 @@ var WorkspaceDetailView = ({
37652
38396
  animate: { opacity: 1 },
37653
38397
  transition: { duration: 0.3 },
37654
38398
  children: /* @__PURE__ */ jsxs("div", { className: "min-h-screen w-full flex flex-col bg-slate-50", children: [
37655
- /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 px-2 sm:px-2.5 lg:px-3 py-1.5 sm:py-2 lg:py-3 flex flex-col shadow-sm bg-white", children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
37656
- /* @__PURE__ */ jsx("div", { className: "absolute left-0 animate-pulse", children: /* @__PURE__ */ jsx("div", { className: "h-8 w-20 bg-gray-200 rounded" }) }),
37657
- /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 animate-pulse", children: /* @__PURE__ */ jsx("div", { className: "h-6 w-40 bg-gray-200 rounded" }) }),
38399
+ /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 px-3 sm:px-4 md:px-5 lg:px-6 py-2 sm:py-2.5 lg:py-3 flex flex-col shadow-sm bg-white", children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
38400
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0 animate-pulse", children: /* @__PURE__ */ jsx("div", { className: "h-6 sm:h-7 md:h-8 w-16 sm:w-20 bg-gray-200 rounded" }) }),
38401
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 animate-pulse max-w-[calc(100%-160px)] sm:max-w-[calc(100%-200px)]", children: /* @__PURE__ */ jsx("div", { className: "h-5 sm:h-6 md:h-7 w-28 sm:w-36 md:w-40 bg-gray-200 rounded" }) }),
37658
38402
  /* @__PURE__ */ jsx("div", { className: "w-full h-8" })
37659
38403
  ] }) }),
37660
38404
  /* @__PURE__ */ jsxs("div", { className: "flex-1 p-4 sm:p-6 lg:p-8", children: [
@@ -37715,7 +38459,7 @@ var WorkspaceDetailView = ({
37715
38459
  animate: { opacity: 1 },
37716
38460
  children: [
37717
38461
  /* @__PURE__ */ jsxs("div", { className: "min-h-screen w-full flex flex-col bg-slate-50", children: [
37718
- /* @__PURE__ */ jsxs("header", { className: "sticky top-0 z-10 px-2 sm:px-2.5 lg:px-3 py-1.5 sm:py-2 lg:py-3 flex flex-col shadow-sm bg-white", children: [
38462
+ /* @__PURE__ */ jsxs("header", { className: "sticky top-0 z-10 px-3 sm:px-4 md:px-5 lg:px-6 py-2 sm:py-2.5 lg:py-3 flex flex-col shadow-sm bg-white", children: [
37719
38463
  /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
37720
38464
  /* @__PURE__ */ jsx("div", { className: "absolute left-0 z-10", children: /* @__PURE__ */ jsx(
37721
38465
  BackButtonMinimal,
@@ -37726,8 +38470,8 @@ var WorkspaceDetailView = ({
37726
38470
  "aria-label": "Navigate back to previous page"
37727
38471
  }
37728
38472
  ) }),
37729
- /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
37730
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: formattedWorkspaceName }),
38473
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 max-w-[calc(100%-160px)] sm:max-w-[calc(100%-200px)]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
38474
+ /* @__PURE__ */ jsx("h1", { className: "text-base sm:text-lg md:text-xl lg:text-2xl xl:text-3xl font-semibold text-gray-900 truncate", children: formattedWorkspaceName }),
37731
38475
  workspaceHealth && /* @__PURE__ */ jsxs("div", { className: "relative flex h-2.5 w-2.5", children: [
37732
38476
  /* @__PURE__ */ jsx("span", { className: clsx(
37733
38477
  "animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
@@ -37739,18 +38483,18 @@ var WorkspaceDetailView = ({
37739
38483
  ) })
37740
38484
  ] })
37741
38485
  ] }) }),
37742
- workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsx("div", { className: "absolute right-0 top-0 flex items-center h-8", children: /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500", children: [
38486
+ workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsx("div", { className: "absolute right-0 top-0 flex items-center h-8", children: /* @__PURE__ */ jsxs("span", { className: "text-[10px] sm:text-xs text-gray-500 hidden sm:block", children: [
37743
38487
  "Last update: ",
37744
38488
  workspaceHealth.timeSinceLastUpdate
37745
38489
  ] }) }),
37746
38490
  /* @__PURE__ */ jsx("div", { className: "w-full h-8" })
37747
38491
  ] }),
37748
- activeTab !== "monthly_history" && /* @__PURE__ */ jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-4", children: [
38492
+ activeTab !== "monthly_history" && /* @__PURE__ */ jsx("div", { className: "mt-2 sm:mt-3 bg-blue-50 px-2 sm:px-3 py-1.5 sm:py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4", children: [
37749
38493
  !date && !shift && !usingFallbackData && /* @__PURE__ */ jsxs(Fragment, { children: [
37750
- /* @__PURE__ */ jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(LiveTimer, {}) }),
38494
+ /* @__PURE__ */ jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(LiveTimer, {}) }),
37751
38495
  /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" })
37752
38496
  ] }),
37753
- /* @__PURE__ */ jsx("span", { className: "text-base font-medium text-blue-600", children: formatISTDate2(new Date(workspace.date)) }),
38497
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: formatISTDate2(new Date(workspace.date)) }),
37754
38498
  /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
37755
38499
  date && /* @__PURE__ */ jsxs(Fragment, { children: [
37756
38500
  /* @__PURE__ */ jsx("span", { className: "px-2 py-1 text-xs font-medium bg-blue-200 text-blue-800 rounded-md", children: getDaysDifference(workspace.date) }),
@@ -38245,8 +38989,8 @@ var SKUManagementView = () => {
38245
38989
  ] }) });
38246
38990
  }
38247
38991
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-slate-50", children: [
38248
- /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-8 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
38249
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
38992
+ /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "px-3 sm:px-4 md:px-6 lg:px-8 py-3 sm:py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 sm:gap-4 relative", children: [
38993
+ /* @__PURE__ */ jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsx(
38250
38994
  BackButtonMinimal,
38251
38995
  {
38252
38996
  onClick: handleBack,
@@ -38255,24 +38999,24 @@ var SKUManagementView = () => {
38255
38999
  "aria-label": "Navigate back to previous page"
38256
39000
  }
38257
39001
  ) }),
38258
- /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
38259
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "SKU Management" }),
38260
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Manage Stock Keeping Units (SKUs) for production planning" })
39002
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto mt-2 sm:mt-0", children: [
39003
+ /* @__PURE__ */ jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "SKU Management" }),
39004
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 sm:mt-1 text-xs sm:text-sm text-gray-500 px-2 sm:px-0", children: "Manage Stock Keeping Units (SKUs) for production planning" })
38261
39005
  ] }),
38262
39006
  /* @__PURE__ */ jsxs(
38263
39007
  "button",
38264
39008
  {
38265
39009
  onClick: handleAddNew,
38266
- className: "absolute right-0 inline-flex items-center px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200 shadow-sm",
39010
+ className: "sm:absolute sm:right-0 w-full sm:w-auto inline-flex items-center justify-center px-3 sm:px-4 py-2 bg-blue-600 text-white text-xs sm:text-sm font-medium rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200 shadow-sm",
38267
39011
  children: [
38268
- /* @__PURE__ */ jsx(Plus, { className: "w-4 h-4 mr-2" }),
39012
+ /* @__PURE__ */ jsx(Plus, { className: "w-3 h-3 sm:w-4 sm:h-4 mr-1.5 sm:mr-2" }),
38269
39013
  "Add SKU"
38270
39014
  ]
38271
39015
  }
38272
39016
  )
38273
39017
  ] }) }) }),
38274
- /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "px-4 sm:px-8 py-6", children: [
38275
- /* @__PURE__ */ jsx("div", { className: "mb-6 bg-gradient-to-r from-blue-50 to-blue-50/50 p-4 rounded-xl border border-blue-100", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-blue-700 font-medium", children: "Create and manage SKUs with production targets. These will be available for selection in the production targets page." }) }),
39018
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "px-3 sm:px-4 md:px-6 lg:px-8 py-4 sm:py-6", children: [
39019
+ /* @__PURE__ */ jsx("div", { className: "mb-4 sm:mb-6 bg-gradient-to-r from-blue-50 to-blue-50/50 p-3 sm:p-4 rounded-xl border border-blue-100", children: /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-blue-700 font-medium text-center sm:text-left", children: "Create and manage SKUs with production targets. These will be available for selection in the production targets page." }) }),
38276
39020
  error ? /* @__PURE__ */ jsxs("div", { className: "bg-red-50 border border-red-200 text-red-700 p-4 rounded-lg", children: [
38277
39021
  /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Error loading SKUs" }),
38278
39022
  /* @__PURE__ */ jsx("p", { className: "text-sm mt-1", children: error.message })
@@ -38389,8 +39133,8 @@ var WorkspaceHealthView = ({
38389
39133
  }
38390
39134
  };
38391
39135
  const getUptimeColor = (percentage) => {
38392
- if (percentage >= 99) return "text-green-600 dark:text-green-400";
38393
- if (percentage >= 95) return "text-yellow-600 dark:text-yellow-400";
39136
+ if (percentage >= 97) return "text-green-600 dark:text-green-400";
39137
+ if (percentage >= 90) return "text-yellow-600 dark:text-yellow-400";
38394
39138
  return "text-red-600 dark:text-red-400";
38395
39139
  };
38396
39140
  if (loading && !summary) {
@@ -38412,8 +39156,50 @@ var WorkspaceHealthView = ({
38412
39156
  ] }) }) }) });
38413
39157
  }
38414
39158
  return /* @__PURE__ */ jsxs("div", { className: clsx("min-h-screen bg-slate-50", className), children: [
38415
- /* @__PURE__ */ jsxs("header", { className: "sticky top-0 z-10 px-2 sm:px-2.5 lg:px-3 py-1.5 sm:py-2 lg:py-3 flex flex-col shadow-sm bg-white", children: [
38416
- /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
39159
+ /* @__PURE__ */ jsxs("header", { className: "sticky top-0 z-10 px-3 sm:px-4 md:px-5 lg:px-6 py-2 sm:py-2.5 lg:py-3 flex flex-col shadow-sm bg-white", children: [
39160
+ /* @__PURE__ */ jsxs("div", { className: "sm:hidden", children: [
39161
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
39162
+ /* @__PURE__ */ jsx(
39163
+ BackButtonMinimal,
39164
+ {
39165
+ onClick: () => router.push("/"),
39166
+ text: "Back",
39167
+ size: "sm",
39168
+ "aria-label": "Navigate back to dashboard"
39169
+ }
39170
+ ),
39171
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
39172
+ /* @__PURE__ */ jsx(
39173
+ "button",
39174
+ {
39175
+ onClick: () => {
39176
+ refetch();
39177
+ },
39178
+ className: "p-1.5 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",
39179
+ "aria-label": "Refresh",
39180
+ children: /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" })
39181
+ }
39182
+ ),
39183
+ /* @__PURE__ */ jsx(
39184
+ "button",
39185
+ {
39186
+ onClick: handleExport,
39187
+ className: "p-1.5 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",
39188
+ "aria-label": "Export CSV",
39189
+ children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" })
39190
+ }
39191
+ )
39192
+ ] })
39193
+ ] }),
39194
+ /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2", children: [
39195
+ /* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-gray-900", children: "System Health" }),
39196
+ /* @__PURE__ */ jsxs("div", { className: "relative flex h-2 w-2", children: [
39197
+ /* @__PURE__ */ jsx("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75" }),
39198
+ /* @__PURE__ */ jsx("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-emerald-500" })
39199
+ ] })
39200
+ ] }) })
39201
+ ] }),
39202
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
38417
39203
  /* @__PURE__ */ jsx("div", { className: "absolute left-0 z-10", children: /* @__PURE__ */ jsx(
38418
39204
  BackButtonMinimal,
38419
39205
  {
@@ -38423,8 +39209,8 @@ var WorkspaceHealthView = ({
38423
39209
  "aria-label": "Navigate back to dashboard"
38424
39210
  }
38425
39211
  ) }),
38426
- /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
38427
- /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "System Health" }),
39212
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 max-w-[calc(100%-200px)]", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
39213
+ /* @__PURE__ */ jsx("h1", { className: "text-lg md:text-xl lg:text-2xl xl:text-3xl font-semibold text-gray-900 truncate", children: "System Health" }),
38428
39214
  /* @__PURE__ */ jsxs("div", { className: "relative flex h-2.5 w-2.5", children: [
38429
39215
  /* @__PURE__ */ jsx("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75" }),
38430
39216
  /* @__PURE__ */ jsx("span", { className: "relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500" })
@@ -38453,15 +39239,15 @@ var WorkspaceHealthView = ({
38453
39239
  )
38454
39240
  ] }),
38455
39241
  /* @__PURE__ */ jsx("div", { className: "w-full h-8" })
38456
- ] }),
38457
- /* @__PURE__ */ jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-4", children: [
38458
- /* @__PURE__ */ jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(LiveTimer, {}) }),
38459
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
38460
- /* @__PURE__ */ jsx("span", { className: "text-base font-medium text-blue-600", children: formatDate(operationalDate) }),
38461
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-blue-300" }),
38462
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
39242
+ ] }) }),
39243
+ /* @__PURE__ */ jsx("div", { className: "mt-2 sm:mt-3 bg-blue-50 px-2 sm:px-3 py-1.5 sm:py-2 rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-4", children: [
39244
+ /* @__PURE__ */ jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsx(LiveTimer, {}) }),
39245
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
39246
+ /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: formatDate(operationalDate) }),
39247
+ /* @__PURE__ */ jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
39248
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
38463
39249
  /* @__PURE__ */ jsx("div", { className: "text-blue-600", children: getShiftIcon(shiftType) }),
38464
- /* @__PURE__ */ jsxs("span", { className: "text-base font-medium text-blue-600", children: [
39250
+ /* @__PURE__ */ jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
38465
39251
  shiftType,
38466
39252
  " Shift"
38467
39253
  ] })
@@ -38478,20 +39264,21 @@ var WorkspaceHealthView = ({
38478
39264
  className: "grid grid-cols-2 sm:grid-cols-2 md:grid-cols-5 gap-2 sm:gap-3 lg:gap-4",
38479
39265
  children: [
38480
39266
  /* @__PURE__ */ jsxs(Card2, { className: "col-span-2 sm:col-span-2 md:col-span-2 bg-white", children: [
38481
- /* @__PURE__ */ jsx(CardHeader2, { className: "pb-3", children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: "Overall System Status" }) }),
39267
+ /* @__PURE__ */ jsx(CardHeader2, { className: "pb-3", children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: "Overall System Uptime Today" }) }),
38482
39268
  /* @__PURE__ */ jsxs(CardContent2, { children: [
38483
39269
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
38484
39270
  /* @__PURE__ */ jsxs("span", { className: clsx("text-3xl font-bold", getUptimeColor(summary.uptimePercentage)), children: [
38485
39271
  summary.uptimePercentage.toFixed(1),
38486
39272
  "%"
38487
39273
  ] }),
38488
- summary.uptimePercentage >= 99 ? /* @__PURE__ */ jsx(TrendingUp, { className: "h-5 w-5 text-green-500" }) : /* @__PURE__ */ jsx(TrendingDown, { className: "h-5 w-5 text-red-500" })
39274
+ summary.uptimePercentage >= 97 ? /* @__PURE__ */ jsx(TrendingUp, { className: "h-5 w-5 text-green-500" }) : summary.uptimePercentage >= 90 ? /* @__PURE__ */ jsx(Activity, { className: "h-5 w-5 text-yellow-500" }) : /* @__PURE__ */ jsx(TrendingDown, { className: "h-5 w-5 text-red-500" })
38489
39275
  ] }),
38490
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: [
39276
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: "Average uptime across all workspaces" }),
39277
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
38491
39278
  summary.healthyWorkspaces,
38492
39279
  " of ",
38493
39280
  summary.totalWorkspaces,
38494
- " workspaces healthy"
39281
+ " workspaces online"
38495
39282
  ] })
38496
39283
  ] })
38497
39284
  ] }),