@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.js CHANGED
@@ -1905,7 +1905,29 @@ var WorkspaceHealthService = class _WorkspaceHealthService {
1905
1905
  throw error;
1906
1906
  }
1907
1907
  const processedData = (data || []).map((item) => this.processHealthStatus(item));
1908
- let filteredData = processedData;
1908
+ let uptimeMap = /* @__PURE__ */ new Map();
1909
+ if (options.companyId || data && data.length > 0) {
1910
+ const companyId = options.companyId || data[0]?.company_id;
1911
+ if (companyId) {
1912
+ try {
1913
+ uptimeMap = await this.calculateWorkspaceUptime(companyId);
1914
+ } catch (error2) {
1915
+ console.error("Error calculating uptime:", error2);
1916
+ }
1917
+ }
1918
+ }
1919
+ const dataWithUptime = processedData.map((workspace) => {
1920
+ const uptimeDetails = uptimeMap.get(workspace.workspace_id);
1921
+ if (uptimeDetails) {
1922
+ return {
1923
+ ...workspace,
1924
+ uptimePercentage: uptimeDetails.percentage,
1925
+ uptimeDetails
1926
+ };
1927
+ }
1928
+ return workspace;
1929
+ });
1930
+ let filteredData = dataWithUptime;
1909
1931
  try {
1910
1932
  const { data: enabledWorkspaces, error: workspaceError } = await supabase.from("workspaces").select("workspace_id, display_name").eq("enable", true);
1911
1933
  if (!workspaceError && enabledWorkspaces && enabledWorkspaces.length > 0) {
@@ -1981,13 +2003,31 @@ var WorkspaceHealthService = class _WorkspaceHealthService {
1981
2003
  const healthyWorkspaces = workspaces.filter((w) => w.status === "healthy").length;
1982
2004
  const unhealthyWorkspaces = workspaces.filter((w) => w.status === "unhealthy").length;
1983
2005
  const warningWorkspaces = workspaces.filter((w) => w.status === "warning").length;
1984
- const uptimePercentage = totalWorkspaces > 0 ? healthyWorkspaces / totalWorkspaces * 100 : 0;
2006
+ let uptimePercentage = 0;
2007
+ let totalDowntimeMinutes = 0;
2008
+ if (totalWorkspaces > 0) {
2009
+ const workspacesWithUptime = workspaces.filter((w) => w.uptimePercentage !== void 0 && w.uptimeDetails !== void 0);
2010
+ if (workspacesWithUptime.length > 0) {
2011
+ const totalUptime = workspacesWithUptime.reduce((sum, w) => sum + (w.uptimePercentage || 0), 0);
2012
+ uptimePercentage = totalUptime / workspacesWithUptime.length;
2013
+ totalDowntimeMinutes = workspacesWithUptime.reduce((sum, w) => {
2014
+ if (w.uptimeDetails) {
2015
+ const downtime = Math.max(0, w.uptimeDetails.expectedMinutes - w.uptimeDetails.actualMinutes);
2016
+ return sum + downtime;
2017
+ }
2018
+ return sum;
2019
+ }, 0);
2020
+ } else {
2021
+ uptimePercentage = healthyWorkspaces / totalWorkspaces * 100;
2022
+ }
2023
+ }
1985
2024
  return {
1986
2025
  totalWorkspaces,
1987
2026
  healthyWorkspaces,
1988
2027
  unhealthyWorkspaces,
1989
2028
  warningWorkspaces,
1990
2029
  uptimePercentage,
2030
+ totalDowntimeMinutes,
1991
2031
  lastUpdated: (/* @__PURE__ */ new Date()).toISOString()
1992
2032
  };
1993
2033
  }
@@ -2067,6 +2107,155 @@ var WorkspaceHealthService = class _WorkspaceHealthService {
2067
2107
  clearCache() {
2068
2108
  this.cache.clear();
2069
2109
  }
2110
+ async calculateWorkspaceUptime(companyId) {
2111
+ const supabase = _getSupabaseInstance();
2112
+ if (!supabase) throw new Error("Supabase client not initialized");
2113
+ const dashboardConfig = _getDashboardConfigInstance();
2114
+ const timezone = dashboardConfig?.dateTimeConfig?.defaultTimezone || "UTC";
2115
+ const shiftConfig = dashboardConfig?.shiftConfig;
2116
+ const currentShiftInfo = getCurrentShift(timezone, shiftConfig);
2117
+ const currentDate = currentShiftInfo.date;
2118
+ const currentShiftId = currentShiftInfo.shiftId;
2119
+ const now2 = /* @__PURE__ */ new Date();
2120
+ const currentHour = now2.getHours();
2121
+ const currentMinute = now2.getMinutes();
2122
+ let shiftStartHour;
2123
+ let shiftEndHour;
2124
+ if (currentShiftId === 0) {
2125
+ shiftStartHour = 9;
2126
+ shiftEndHour = 18;
2127
+ } else {
2128
+ shiftStartHour = 20;
2129
+ shiftEndHour = 3;
2130
+ }
2131
+ let elapsedMinutes = 0;
2132
+ if (currentShiftId === 0) {
2133
+ if (currentHour >= shiftStartHour && currentHour < shiftEndHour) {
2134
+ elapsedMinutes = (currentHour - shiftStartHour) * 60 + currentMinute;
2135
+ } else if (currentHour >= shiftEndHour) {
2136
+ elapsedMinutes = (shiftEndHour - shiftStartHour) * 60;
2137
+ }
2138
+ } else {
2139
+ if (currentHour >= shiftStartHour) {
2140
+ elapsedMinutes = (currentHour - shiftStartHour) * 60 + currentMinute;
2141
+ } else if (currentHour < shiftEndHour) {
2142
+ elapsedMinutes = (24 - shiftStartHour + currentHour) * 60 + currentMinute;
2143
+ }
2144
+ }
2145
+ const tableName = `performance_metrics_${companyId.replace(/-/g, "_")}`;
2146
+ const query = `
2147
+ WITH workspace_uptime AS (
2148
+ SELECT
2149
+ workspace_id,
2150
+ workspace_display_name,
2151
+ idle_time_hourly,
2152
+ output_hourly,
2153
+ shift_start,
2154
+ shift_end
2155
+ FROM ${tableName}
2156
+ WHERE date = $1::date
2157
+ AND shift_id = $2
2158
+ ),
2159
+ calculated_uptime AS (
2160
+ SELECT
2161
+ workspace_id,
2162
+ workspace_display_name,
2163
+ -- Calculate actual minutes from hourly data
2164
+ (
2165
+ SELECT COALESCE(SUM(
2166
+ CASE
2167
+ WHEN jsonb_array_length(idle_time_hourly->key::text) >= 58 THEN 60
2168
+ WHEN jsonb_array_length(idle_time_hourly->key::text) > 0 THEN jsonb_array_length(idle_time_hourly->key::text)
2169
+ ELSE 0
2170
+ END
2171
+ ), 0)
2172
+ FROM jsonb_object_keys(idle_time_hourly) AS key
2173
+ WHERE key::int >= $3 AND key::int < $4
2174
+ ) +
2175
+ -- Add current hour's data if applicable
2176
+ CASE
2177
+ WHEN $4::int >= $3 AND $4::int < $5 THEN
2178
+ LEAST($6::int,
2179
+ COALESCE(jsonb_array_length(idle_time_hourly->$4::text), 0))
2180
+ ELSE 0
2181
+ END as actual_minutes
2182
+ FROM workspace_uptime
2183
+ )
2184
+ SELECT
2185
+ workspace_id,
2186
+ workspace_display_name,
2187
+ actual_minutes,
2188
+ $7::int as expected_minutes,
2189
+ ROUND(
2190
+ CASE
2191
+ WHEN $7::int > 0 THEN (actual_minutes::numeric / $7::numeric) * 100
2192
+ ELSE 100
2193
+ END, 1
2194
+ ) as uptime_percentage
2195
+ FROM calculated_uptime
2196
+ `;
2197
+ try {
2198
+ const { data, error } = await supabase.rpc("sql_query", {
2199
+ query_text: query,
2200
+ params: [
2201
+ currentDate,
2202
+ currentShiftId,
2203
+ shiftStartHour,
2204
+ currentHour,
2205
+ shiftEndHour,
2206
+ currentMinute,
2207
+ elapsedMinutes
2208
+ ]
2209
+ }).single();
2210
+ if (error) {
2211
+ 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);
2212
+ if (queryError) {
2213
+ console.error("Error fetching performance metrics:", queryError);
2214
+ return /* @__PURE__ */ new Map();
2215
+ }
2216
+ const uptimeMap2 = /* @__PURE__ */ new Map();
2217
+ for (const record of queryData || []) {
2218
+ let actualMinutes = 0;
2219
+ const idleTimeHourly = record.idle_time_hourly || {};
2220
+ if (idleTimeHourly && typeof idleTimeHourly === "object") {
2221
+ for (const [hour, dataArray] of Object.entries(idleTimeHourly)) {
2222
+ const hourNum = parseInt(hour);
2223
+ if (hourNum >= shiftStartHour && hourNum < currentHour) {
2224
+ const arrayLength = Array.isArray(dataArray) ? dataArray.length : 0;
2225
+ actualMinutes += arrayLength >= 58 ? 60 : arrayLength;
2226
+ } else if (hourNum === currentHour && currentHour >= shiftStartHour) {
2227
+ const arrayLength = Array.isArray(dataArray) ? dataArray.length : 0;
2228
+ actualMinutes += Math.min(currentMinute, arrayLength);
2229
+ }
2230
+ }
2231
+ }
2232
+ const percentage = elapsedMinutes > 0 ? Math.round(actualMinutes / elapsedMinutes * 1e3) / 10 : 100;
2233
+ uptimeMap2.set(record.workspace_id, {
2234
+ expectedMinutes: elapsedMinutes,
2235
+ actualMinutes,
2236
+ percentage,
2237
+ lastCalculated: (/* @__PURE__ */ new Date()).toISOString()
2238
+ });
2239
+ }
2240
+ return uptimeMap2;
2241
+ }
2242
+ const uptimeMap = /* @__PURE__ */ new Map();
2243
+ if (Array.isArray(data)) {
2244
+ for (const record of data) {
2245
+ uptimeMap.set(record.workspace_id, {
2246
+ expectedMinutes: record.expected_minutes,
2247
+ actualMinutes: record.actual_minutes,
2248
+ percentage: record.uptime_percentage,
2249
+ lastCalculated: (/* @__PURE__ */ new Date()).toISOString()
2250
+ });
2251
+ }
2252
+ }
2253
+ return uptimeMap;
2254
+ } catch (error) {
2255
+ console.error("Error calculating workspace uptime:", error);
2256
+ return /* @__PURE__ */ new Map();
2257
+ }
2258
+ }
2070
2259
  };
2071
2260
  var workspaceHealthService = WorkspaceHealthService.getInstance();
2072
2261
 
@@ -19725,7 +19914,7 @@ var OptifyeLogoLoader = ({
19725
19914
  className: `${sizeClasses[size]} h-auto animate-pulse select-none pointer-events-none`
19726
19915
  }
19727
19916
  ),
19728
- message && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 text-gray-600 text-sm font-medium text-center", children: message })
19917
+ message && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 text-gray-600 text-base sm:text-sm font-medium text-center", children: message })
19729
19918
  ]
19730
19919
  }
19731
19920
  );
@@ -21614,11 +21803,13 @@ var VideoCard = React19__namespace.default.memo(({
21614
21803
  return /* @__PURE__ */ jsxRuntime.jsxs(
21615
21804
  "div",
21616
21805
  {
21617
- 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}`,
21806
+ 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}`,
21618
21807
  style: { width: "100%", height: "100%" },
21619
21808
  onClick: handleClick,
21620
21809
  onMouseEnter,
21621
21810
  onMouseLeave,
21811
+ onTouchStart: (e) => e.currentTarget.classList.add("touch-active"),
21812
+ onTouchEnd: (e) => e.currentTarget.classList.remove("touch-active"),
21622
21813
  title: displayName,
21623
21814
  tabIndex: 0,
21624
21815
  "aria-label": `Open workspace ${displayName}`,
@@ -21636,8 +21827,8 @@ var VideoCard = React19__namespace.default.memo(({
21636
21827
  ] }) }),
21637
21828
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-full h-full overflow-hidden bg-black", children: [
21638
21829
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black z-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "animate-pulse flex flex-col items-center", children: [
21639
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { className: `${compact ? "w-4 h-4" : "w-6 h-6"} text-gray-500` }),
21640
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${compact ? "text-[10px]" : "text-xs"} text-gray-500 mt-1`, children: "Loading..." })
21830
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { className: `w-5 h-5 sm:${compact ? "w-4 h-4" : "w-6 h-6"} text-gray-500` }),
21831
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[11px] sm:${compact ? "text-[10px]" : "text-xs"} text-gray-500 mt-1`, children: "Loading..." })
21641
21832
  ] }) }),
21642
21833
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 z-10", children: [
21643
21834
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -21672,10 +21863,10 @@ var VideoCard = React19__namespace.default.memo(({
21672
21863
  }
21673
21864
  ) })
21674
21865
  ] }),
21675
- /* @__PURE__ */ jsxRuntime.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: [
21866
+ /* @__PURE__ */ jsxRuntime.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: [
21676
21867
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
21677
21868
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { size: compact ? 10 : 12, className: "text-white" }),
21678
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-white ${compact ? "text-[10px]" : "text-xs"} font-medium tracking-wide`, children: displayName })
21869
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-white text-[11px] sm:${compact ? "text-[10px]" : "text-xs"} font-medium tracking-wide`, children: displayName })
21679
21870
  ] }),
21680
21871
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center ${compact ? "gap-1" : "gap-1.5"}`, children: [
21681
21872
  trendInfo && /* @__PURE__ */ jsxRuntime.jsx(
@@ -21687,7 +21878,7 @@ var VideoCard = React19__namespace.default.memo(({
21687
21878
  }
21688
21879
  ),
21689
21880
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${compact ? "w-1 h-1" : "w-1.5 h-1.5"} rounded-full bg-green-500` }),
21690
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-white ${compact ? "text-[10px]" : "text-xs"}`, children: "Live" })
21881
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-white text-[11px] sm:${compact ? "text-[10px]" : "text-xs"}`, children: "Live" })
21691
21882
  ] })
21692
21883
  ] })
21693
21884
  ]
@@ -21897,10 +22088,10 @@ var VideoGridView = React19__namespace.default.memo(({
21897
22088
  view_type: "video_grid"
21898
22089
  });
21899
22090
  }, []);
21900
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `relative overflow-hidden h-full w-full ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, className: "h-full w-full p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
22091
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `relative overflow-hidden h-full w-full ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, className: "h-full w-full p-3 sm:p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
21901
22092
  "div",
21902
22093
  {
21903
- className: "grid h-full w-full gap-2",
22094
+ className: "grid h-full w-full gap-3 sm:gap-2",
21904
22095
  style: {
21905
22096
  gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
21906
22097
  gridTemplateRows: `repeat(${gridRows}, 1fr)`,
@@ -22685,15 +22876,15 @@ var BreakNotificationPopup = ({
22685
22876
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-2 h-2 bg-amber-500 rounded-full animate-pulse flex-shrink-0 mt-2" }),
22686
22877
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
22687
22878
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1", children: [
22688
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-sm text-gray-900", children: breakItem.remarks || "Break" }),
22689
- (activeBreaks.length > 1 || lineNames[breakItem.lineId]) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-gray-500 mt-0.5", children: lineNames[breakItem.lineId] || `Line ${breakItem.lineId.substring(0, 8)}` })
22879
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-base sm:text-sm text-gray-900", children: breakItem.remarks || "Break" }),
22880
+ (activeBreaks.length > 1 || lineNames[breakItem.lineId]) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm sm:text-xs text-gray-500 mt-0.5", children: lineNames[breakItem.lineId] || `Line ${breakItem.lineId.substring(0, 8)}` })
22690
22881
  ] }),
22691
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-gray-600 font-medium", children: [
22882
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm sm:text-xs text-gray-600 font-medium", children: [
22692
22883
  breakItem.startTime,
22693
22884
  " - ",
22694
22885
  breakItem.endTime
22695
22886
  ] }) }),
22696
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-gray-500", children: [
22887
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm sm:text-xs text-gray-500", children: [
22697
22888
  formatTime3(breakItem.elapsedMinutes),
22698
22889
  " / ",
22699
22890
  formatTime3(breakItem.duration)
@@ -22713,9 +22904,11 @@ var BreakNotificationPopup = ({
22713
22904
  "button",
22714
22905
  {
22715
22906
  onClick: handleDismiss,
22716
- className: "ml-2 text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-full hover:bg-gray-100",
22907
+ onTouchStart: () => {
22908
+ },
22909
+ 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",
22717
22910
  "aria-label": "Dismiss notification",
22718
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
22911
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4 sm:w-3 sm:h-3" })
22719
22912
  }
22720
22913
  )
22721
22914
  ] })
@@ -23411,7 +23604,7 @@ var TimeDisplay = ({ className, variant = "default" }) => {
23411
23604
  className: `flex items-center space-x-1.5 bg-white/60 backdrop-blur-sm px-2 py-0.5 rounded-md shadow-xs ${className || ""}`,
23412
23605
  children: [
23413
23606
  /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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" }) }),
23414
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[11px] font-medium text-gray-800 tabular-nums tracking-tight", children: [
23607
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-[11px] font-medium text-gray-800 tabular-nums tracking-tight", children: [
23415
23608
  time2,
23416
23609
  " ",
23417
23610
  timeSuffix
@@ -25970,7 +26163,7 @@ var SelectTrigger = React19__namespace.forwardRef(({ className, children, ...pro
25970
26163
  {
25971
26164
  ref,
25972
26165
  className: cn(
25973
- "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",
26166
+ "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",
25974
26167
  className
25975
26168
  ),
25976
26169
  ...props,
@@ -28087,23 +28280,23 @@ var WorkspaceGridItem = React19__namespace.default.memo(({
28087
28280
  isVeryLowEfficiency && !isInactive && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -top-10 left-1/2 -translate-x-1/2 z-30", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
28088
28281
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -inset-1 bg-red-400/50 rounded-full blur-sm animate-pulse" }),
28089
28282
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -inset-0.5 bg-red-500/30 rounded-full blur-md animate-ping [animation-duration:1.5s]" }),
28090
- /* @__PURE__ */ jsxRuntime.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: "!" })
28283
+ /* @__PURE__ */ jsxRuntime.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: "!" })
28091
28284
  ] }) }),
28092
28285
  /* @__PURE__ */ jsxRuntime.jsx(
28093
28286
  "button",
28094
28287
  {
28095
28288
  onClick: handleClick,
28096
- className: `${styles2} ${colorClass} ${isBottleneck ? "ring-2 ring-red-500/70" : ""} ${isVeryLowEfficiency ? "ring-2 ring-red-500/50" : ""} ${isInactive ? "bg-gray-200" : ""} shadow-lg`,
28289
+ 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`,
28097
28290
  "aria-label": isInactive ? `Inactive workspace ${workspaceNumber}` : `View details for workspace ${workspaceNumber}`,
28098
28291
  title: isInactive ? `Inactive: ${getWorkspaceDisplayName(data.workspace_name, data.line_id)}` : getWorkspaceDisplayName(data.workspace_name, data.line_id),
28099
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `font-semibold tracking-wide text-[min(4vw,2rem)] uppercase ${isInactive ? "text-gray-400" : "text-white"} drop-shadow-sm`, children: workspaceNumber })
28292
+ children: /* @__PURE__ */ jsxRuntime.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 })
28100
28293
  }
28101
28294
  ),
28102
28295
  arrow && !isInactive && /* @__PURE__ */ jsxRuntime.jsx(
28103
28296
  "div",
28104
28297
  {
28105
28298
  className: `absolute left-1/2 -translate-x-1/2 ${arrowPosition}
28106
- text-[min(3.5vw,2.25rem)] font-bold tracking-tight ${arrowColor} drop-shadow-sm`,
28299
+ text-base sm:text-lg md:text-[min(3.5vw,2.25rem)] font-bold tracking-tight ${arrowColor} drop-shadow-sm`,
28107
28300
  style: { bottom: "-2.5rem", lineHeight: 1, display: "flex", alignItems: "center", justifyContent: "center" },
28108
28301
  children: arrow
28109
28302
  }
@@ -28133,11 +28326,11 @@ var WorkspaceGrid = React19__namespace.default.memo(({
28133
28326
  }, [workspaces.length]);
28134
28327
  const { VideoGridView: VideoGridViewComponent } = useRegistry();
28135
28328
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative w-full h-full overflow-hidden ${className}`, children: [
28136
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 left-2 sm:left-4 right-2 sm:right-8 z-20", children: [
28137
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center justify-between py-1 sm:py-1.5 gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsxRuntime.jsx(Legend6, {}) }) }),
28138
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:hidden mt-1", children: /* @__PURE__ */ jsxRuntime.jsx(Legend6, {}) })
28329
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 left-4 sm:left-4 right-4 sm:right-8 z-20", children: [
28330
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center justify-between py-2 sm:py-1.5 gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsxRuntime.jsx(Legend6, {}) }) }),
28331
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:hidden mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(Legend6, {}) })
28139
28332
  ] }),
28140
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-10 sm:top-16 left-0 right-0 bottom-0", children: /* @__PURE__ */ jsxRuntime.jsx(
28333
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-12 sm:top-16 left-0 right-0 bottom-0", children: /* @__PURE__ */ jsxRuntime.jsx(
28141
28334
  VideoGridViewComponent,
28142
28335
  {
28143
28336
  workspaces,
@@ -28352,8 +28545,8 @@ var KPICard = ({
28352
28545
  const cardClasses = clsx(
28353
28546
  // Base classes
28354
28547
  "rounded-lg transition-all duration-200",
28355
- // Sizing based on compact mode - extra compact on mobile
28356
- "p-1.5 sm:p-3 md:p-4",
28548
+ // Sizing based on compact mode - better padding on mobile
28549
+ "p-2.5 sm:p-3 md:p-4",
28357
28550
  // Variant-specific styling
28358
28551
  {
28359
28552
  "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",
@@ -28361,10 +28554,10 @@ var KPICard = ({
28361
28554
  "bg-blue-50 border border-blue-200 dark:bg-blue-900/20 dark:border-blue-800/30": style.variant === "filled",
28362
28555
  "bg-gray-50/50 dark:bg-gray-800/30": style.variant === "subtle"
28363
28556
  },
28364
- // Width for src matching - compact on mobile, flexible on small screens
28365
- !className?.includes("w-") && "w-[120px] sm:w-[180px] md:w-[220px]",
28366
- // Interactive styling if onClick is provided
28367
- onClick && "cursor-pointer hover:scale-[1.01] active:scale-[0.99]",
28557
+ // Width for src matching - better mobile width, flexible on small screens
28558
+ !className?.includes("w-") && "w-[110px] sm:w-[180px] md:w-[220px]",
28559
+ // Interactive styling if onClick is provided - better touch targets
28560
+ onClick && "cursor-pointer hover:scale-[1.01] active:scale-[0.99] touch-manipulation min-h-[44px] min-w-[44px]",
28368
28561
  // Loading state
28369
28562
  isLoading && "animate-pulse",
28370
28563
  // User-provided classes
@@ -28375,20 +28568,22 @@ var KPICard = ({
28375
28568
  {
28376
28569
  className: cardClasses,
28377
28570
  onClick,
28571
+ onTouchStart: onClick ? () => {
28572
+ } : void 0,
28378
28573
  role: onClick ? "button" : void 0,
28379
28574
  tabIndex: onClick ? 0 : void 0,
28380
28575
  onKeyDown: onClick ? (e) => e.key === "Enter" && onClick() : void 0,
28381
28576
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
28382
28577
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx(
28383
28578
  "font-medium text-gray-500 dark:text-gray-400",
28384
- "text-[9px] sm:text-xs md:text-sm",
28385
- "mb-0.5 sm:mb-1 md:mb-2",
28386
- "uppercase tracking-wider"
28579
+ "text-[10px] sm:text-xs md:text-sm",
28580
+ "mb-1 sm:mb-1 md:mb-2",
28581
+ "uppercase tracking-wide sm:tracking-wider"
28387
28582
  ), children: title }),
28388
28583
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-0.5 sm:gap-2 flex-wrap", children: [
28389
28584
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx(
28390
28585
  "font-bold text-gray-900 dark:text-gray-50",
28391
- "text-sm sm:text-xl md:text-2xl"
28586
+ "text-base sm:text-xl md:text-2xl"
28392
28587
  ), children: isLoading ? "\u2014" : formattedValue }),
28393
28588
  suffix && !isLoading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx(
28394
28589
  "font-medium text-gray-600 dark:text-gray-300",
@@ -28563,35 +28758,46 @@ var KPISection = React19.memo(({
28563
28758
  const outputDifference = kpis.outputProgress.current - kpis.outputProgress.idealOutput;
28564
28759
  const outputIsOnTarget = outputDifference >= 0;
28565
28760
  if (useSrcLayout) {
28566
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-1 sm:gap-3 overflow-x-auto sm:overflow-visible pb-1 sm:pb-0 ${className || ""}`, children: [
28567
- /* @__PURE__ */ jsxRuntime.jsx(
28568
- KPICard,
28569
- {
28570
- title: "Underperforming",
28571
- value: "2/3",
28572
- change: 0
28573
- }
28574
- ),
28575
- /* @__PURE__ */ jsxRuntime.jsx(
28576
- KPICard,
28577
- {
28578
- title: "Efficiency",
28579
- value: kpis.efficiency.value,
28580
- change: kpis.efficiency.change,
28581
- suffix: "%"
28582
- }
28583
- ),
28584
- /* @__PURE__ */ jsxRuntime.jsx(
28585
- KPICard,
28586
- {
28587
- title: "Output Progress",
28588
- value: `${kpis.outputProgress.current}/${kpis.outputProgress.target}`,
28589
- change: kpis.outputProgress.change,
28590
- outputDifference,
28591
- showOutputDetails: true
28592
- }
28593
- )
28594
- ] });
28761
+ return /* @__PURE__ */ jsxRuntime.jsxs(
28762
+ "div",
28763
+ {
28764
+ className: `flex gap-2 sm:gap-3 overflow-x-auto sm:overflow-visible pb-2 sm:pb-0 ${className || ""}`,
28765
+ style: {
28766
+ scrollbarWidth: "none",
28767
+ msOverflowStyle: "none",
28768
+ WebkitScrollbar: { display: "none" }
28769
+ },
28770
+ children: [
28771
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
28772
+ KPICard,
28773
+ {
28774
+ title: "Underperforming",
28775
+ value: "2/3",
28776
+ change: 0
28777
+ }
28778
+ ) }),
28779
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
28780
+ KPICard,
28781
+ {
28782
+ title: "Efficiency",
28783
+ value: kpis.efficiency.value,
28784
+ change: kpis.efficiency.change,
28785
+ suffix: "%"
28786
+ }
28787
+ ) }),
28788
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
28789
+ KPICard,
28790
+ {
28791
+ title: "Output Progress",
28792
+ value: `${kpis.outputProgress.current}/${kpis.outputProgress.target}`,
28793
+ change: kpis.outputProgress.change,
28794
+ outputDifference,
28795
+ showOutputDetails: true
28796
+ }
28797
+ ) })
28798
+ ]
28799
+ }
28800
+ );
28595
28801
  }
28596
28802
  const kpiCardData = [
28597
28803
  {
@@ -28724,6 +28930,19 @@ var WorkspaceHealthCard = ({
28724
28930
  const formatTimeAgo = (timeString) => {
28725
28931
  return timeString.replace("about ", "").replace(" ago", "");
28726
28932
  };
28933
+ const formatDowntime = (uptimeDetails) => {
28934
+ if (!uptimeDetails) return "";
28935
+ const downtimeMinutes = Math.max(0, uptimeDetails.expectedMinutes - uptimeDetails.actualMinutes);
28936
+ if (downtimeMinutes === 0) return "No downtime";
28937
+ if (downtimeMinutes < 1) return "< 1 min downtime";
28938
+ if (downtimeMinutes < 60) return `${downtimeMinutes} min downtime`;
28939
+ const hours = Math.floor(downtimeMinutes / 60);
28940
+ const minutes = downtimeMinutes % 60;
28941
+ if (minutes === 0) {
28942
+ return `${hours} hr downtime`;
28943
+ }
28944
+ return `${hours} hr ${minutes} min downtime`;
28945
+ };
28727
28946
  return /* @__PURE__ */ jsxRuntime.jsx(
28728
28947
  Card2,
28729
28948
  {
@@ -28757,13 +28976,32 @@ var WorkspaceHealthCard = ({
28757
28976
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: config.statusText })
28758
28977
  ] })
28759
28978
  ] }),
28760
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
28761
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-3.5 w-3.5 text-gray-400" }),
28762
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 whitespace-nowrap", children: [
28763
- "Last seen: ",
28764
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatTimeAgo(workspace.timeSinceLastUpdate) })
28765
- ] })
28766
- ] }) }) })
28979
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
28980
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
28981
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-3.5 w-3.5 text-gray-400" }),
28982
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 whitespace-nowrap", children: [
28983
+ "Last seen: ",
28984
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatTimeAgo(workspace.timeSinceLastUpdate) })
28985
+ ] })
28986
+ ] }),
28987
+ workspace.uptimePercentage !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
28988
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "h-3.5 w-3.5 text-gray-400" }),
28989
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-gray-600 dark:text-gray-400 whitespace-nowrap", children: [
28990
+ "Uptime today: ",
28991
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx(
28992
+ "font-medium",
28993
+ 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"
28994
+ ), children: [
28995
+ workspace.uptimePercentage.toFixed(1),
28996
+ "%"
28997
+ ] })
28998
+ ] })
28999
+ ] }),
29000
+ workspace.uptimeDetails && workspace.uptimeDetails.expectedMinutes > workspace.uptimeDetails.actualMinutes && workspace.uptimePercentage !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx(
29001
+ "inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",
29002
+ 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"
29003
+ ), children: formatDowntime(workspace.uptimeDetails) }) })
29004
+ ] })
28767
29005
  ] })
28768
29006
  }
28769
29007
  );
@@ -28834,6 +29072,20 @@ var CompactWorkspaceHealthCard = ({
28834
29072
  ] })
28835
29073
  ] }),
28836
29074
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
29075
+ workspace.uptimePercentage !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
29076
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: clsx(
29077
+ "text-xs font-medium",
29078
+ 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"
29079
+ ), children: [
29080
+ workspace.uptimePercentage.toFixed(1),
29081
+ "%"
29082
+ ] }),
29083
+ workspace.uptimeDetails && workspace.uptimeDetails.expectedMinutes > workspace.uptimeDetails.actualMinutes && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-400 dark:text-gray-400", children: "\u2022" }),
29084
+ workspace.uptimeDetails && workspace.uptimeDetails.expectedMinutes > workspace.uptimeDetails.actualMinutes && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
29085
+ Math.max(0, workspace.uptimeDetails.expectedMinutes - workspace.uptimeDetails.actualMinutes),
29086
+ "m down"
29087
+ ] })
29088
+ ] }),
28837
29089
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: workspace.timeSinceLastUpdate }),
28838
29090
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx("h-2 w-2 rounded-full", config.dot) })
28839
29091
  ] })
@@ -29055,33 +29307,33 @@ var DashboardHeader = React19.memo(({ lineTitle, className = "", headerControls
29055
29307
  return /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.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" }) });
29056
29308
  }
29057
29309
  };
29058
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-row items-center justify-between w-full ${className}`, children: [
29310
+ return /* @__PURE__ */ jsxRuntime.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: [
29059
29311
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
29060
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 sm:gap-2 md:gap-3", children: [
29061
- /* @__PURE__ */ jsxRuntime.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 }),
29062
- /* @__PURE__ */ jsxRuntime.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" })
29312
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2 md:gap-3", children: [
29313
+ /* @__PURE__ */ jsxRuntime.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 }),
29314
+ /* @__PURE__ */ jsxRuntime.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" })
29063
29315
  ] }),
29064
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 inline-flex items-center gap-3", children: [
29065
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm font-medium text-gray-600", children: [
29316
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1 sm:mt-2 inline-flex flex-wrap items-center gap-2 sm:gap-3", children: [
29317
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[10px] sm:text-xs md:text-sm font-medium text-gray-600 whitespace-nowrap", children: [
29066
29318
  /* @__PURE__ */ jsxRuntime.jsx(ISTTimer2, {}),
29067
29319
  " IST"
29068
29320
  ] }),
29069
29321
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1", children: [
29070
29322
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-600", children: getShiftIcon() }),
29071
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-gray-600", children: [
29323
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] sm:text-xs md:text-sm font-medium text-gray-600 whitespace-nowrap", children: [
29072
29324
  getShiftName(),
29073
29325
  " Shift"
29074
29326
  ] })
29075
29327
  ] })
29076
29328
  ] })
29077
29329
  ] }),
29078
- headerControls && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4", children: headerControls })
29330
+ headerControls && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-4 w-full sm:w-auto justify-end", children: headerControls })
29079
29331
  ] });
29080
29332
  });
29081
29333
  DashboardHeader.displayName = "DashboardHeader";
29082
- var NoWorkspaceData = React19.memo(({ message = "No workspace data available", className = "" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-full items-center justify-center ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-white p-4 shadow-md", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2 text-gray-500", children: [
29083
- /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.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" }) }),
29084
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: message })
29334
+ var NoWorkspaceData = React19.memo(({ message = "No workspace data available", className = "" }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-full items-center justify-center ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-white p-5 sm:p-4 shadow-md", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3 sm:space-x-2 text-gray-500", children: [
29335
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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" }) }),
29336
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base sm:text-sm", children: message })
29085
29337
  ] }) }) }));
29086
29338
  NoWorkspaceData.displayName = "NoWorkspaceData";
29087
29339
  var WorkspaceMonthlyDataFetcher = ({
@@ -29206,10 +29458,10 @@ var HamburgerButton = ({
29206
29458
  "button",
29207
29459
  {
29208
29460
  type: "button",
29209
- 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}`,
29461
+ 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}`,
29210
29462
  onClick,
29211
29463
  "aria-label": ariaLabel,
29212
- children: /* @__PURE__ */ jsxRuntime.jsx(outline.Bars3Icon, { className: "w-6 h-6" })
29464
+ children: /* @__PURE__ */ jsxRuntime.jsx(outline.Bars3Icon, { className: "w-7 h-7" })
29213
29465
  }
29214
29466
  );
29215
29467
  };
@@ -29387,27 +29639,27 @@ var PageHeader = ({
29387
29639
  className
29388
29640
  ),
29389
29641
  children: [
29390
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-16 mx-auto px-4 sm:px-6 lg:px-8 flex items-center justify-between", children: [
29391
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
29642
+ /* @__PURE__ */ jsxRuntime.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: [
29643
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0 flex-1", children: [
29392
29644
  onMobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsx(HamburgerButton, { onClick: onMobileMenuOpen }),
29393
- headerLogo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 mr-2 md:hidden", children: headerLogo }),
29645
+ headerLogo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 mr-1 sm:mr-2 md:hidden", children: headerLogo }),
29394
29646
  " ",
29395
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-w-0", children: [
29647
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-w-0 flex-1", children: [
29396
29648
  breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Breadcrumbs, { items: breadcrumbs }),
29397
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg md:text-xl font-semibold text-gray-900 dark:text-white truncate", title, children: title })
29649
+ /* @__PURE__ */ jsxRuntime.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 })
29398
29650
  ] })
29399
29651
  ] }),
29400
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 md:gap-4", children: [
29401
- actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:flex items-center gap-2", children: actions }),
29402
- /* @__PURE__ */ jsxRuntime.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: [
29403
- darkMode ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { className: "h-5 w-5" }),
29652
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-4 flex-shrink-0", children: [
29653
+ actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:flex items-center gap-2", children: actions }),
29654
+ /* @__PURE__ */ jsxRuntime.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: [
29655
+ darkMode ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { className: "h-4 w-4 sm:h-5 sm:w-5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { className: "h-4 w-4 sm:h-5 sm:w-5" }),
29404
29656
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle dark mode" })
29405
29657
  ] }),
29406
- showDateTime && /* @__PURE__ */ jsxRuntime.jsx(DateTimeDisplay, { className: "hidden lg:flex" }),
29658
+ showDateTime && /* @__PURE__ */ jsxRuntime.jsx(DateTimeDisplay, { className: "hidden sm:flex text-xs sm:text-sm" }),
29407
29659
  userProfileConfig && /* @__PURE__ */ jsxRuntime.jsx(UserProfileDropdown, { config: userProfileConfig })
29408
29660
  ] })
29409
29661
  ] }),
29410
- actions && /* @__PURE__ */ jsxRuntime.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 })
29662
+ actions && /* @__PURE__ */ jsxRuntime.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 })
29411
29663
  ]
29412
29664
  }
29413
29665
  );
@@ -29431,9 +29683,9 @@ var SideNavBar = React19.memo(({
29431
29683
  const pathname = propPathname || router$1.pathname;
29432
29684
  const getButtonClasses = React19.useCallback((path) => {
29433
29685
  const isActive = pathname === path || pathname.startsWith(path + "/");
29434
- return `w-full flex flex-col items-center justify-center py-3 px-1 rounded-lg relative group
29435
- ${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"}
29436
- transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2`;
29686
+ 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
29687
+ ${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"}
29688
+ 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]`;
29437
29689
  }, [pathname]);
29438
29690
  const handleHomeClick = React19.useCallback(() => {
29439
29691
  navigate("/", {
@@ -29597,7 +29849,7 @@ var SideNavBar = React19.memo(({
29597
29849
  "aria-selected": pathname === "/" || pathname.startsWith("//"),
29598
29850
  children: [
29599
29851
  /* @__PURE__ */ jsxRuntime.jsx(outline.HomeIcon, { className: "w-5 h-5 mb-1" }),
29600
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Home" })
29852
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Home" })
29601
29853
  ]
29602
29854
  }
29603
29855
  ) }),
@@ -29613,7 +29865,7 @@ var SideNavBar = React19.memo(({
29613
29865
  "aria-selected": pathname === "/leaderboard" || pathname.startsWith("/leaderboard/"),
29614
29866
  children: [
29615
29867
  /* @__PURE__ */ jsxRuntime.jsx(outline.TrophyIcon, { className: "w-5 h-5 mb-1" }),
29616
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Leaders" })
29868
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Leaders" })
29617
29869
  ]
29618
29870
  }
29619
29871
  ),
@@ -29628,7 +29880,7 @@ var SideNavBar = React19.memo(({
29628
29880
  "aria-selected": pathname === "/kpis" || pathname.startsWith("/kpis/"),
29629
29881
  children: [
29630
29882
  /* @__PURE__ */ jsxRuntime.jsx(outline.ChartBarIcon, { className: "w-5 h-5 mb-1" }),
29631
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Lines" })
29883
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Lines" })
29632
29884
  ]
29633
29885
  }
29634
29886
  ),
@@ -29643,7 +29895,7 @@ var SideNavBar = React19.memo(({
29643
29895
  "aria-selected": pathname === "/targets" || pathname.startsWith("/targets/"),
29644
29896
  children: [
29645
29897
  /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "w-5 h-5 mb-1" }),
29646
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Targets" })
29898
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Targets" })
29647
29899
  ]
29648
29900
  }
29649
29901
  ),
@@ -29658,7 +29910,7 @@ var SideNavBar = React19.memo(({
29658
29910
  "aria-selected": pathname === "/shifts" || pathname.startsWith("/shifts/"),
29659
29911
  children: [
29660
29912
  /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "w-5 h-5 mb-1" }),
29661
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Shifts" })
29913
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Shifts" })
29662
29914
  ]
29663
29915
  }
29664
29916
  ),
@@ -29673,7 +29925,7 @@ var SideNavBar = React19.memo(({
29673
29925
  "aria-selected": pathname === "/skus" || pathname.startsWith("/skus/"),
29674
29926
  children: [
29675
29927
  /* @__PURE__ */ jsxRuntime.jsx(outline.CubeIcon, { className: "w-5 h-5 mb-1" }),
29676
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "SKUs" })
29928
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "SKUs" })
29677
29929
  ]
29678
29930
  }
29679
29931
  ),
@@ -29688,7 +29940,7 @@ var SideNavBar = React19.memo(({
29688
29940
  "aria-selected": pathname === "/ai-agent" || pathname.startsWith("/ai-agent/"),
29689
29941
  children: [
29690
29942
  /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, { className: "w-5 h-5 mb-1" }),
29691
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Axel" })
29943
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Axel" })
29692
29944
  ]
29693
29945
  }
29694
29946
  ),
@@ -29703,7 +29955,7 @@ var SideNavBar = React19.memo(({
29703
29955
  "aria-selected": pathname === "/help" || pathname.startsWith("/help/"),
29704
29956
  children: [
29705
29957
  /* @__PURE__ */ jsxRuntime.jsx(outline.QuestionMarkCircleIcon, { className: "w-5 h-5 mb-1" }),
29706
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Help" })
29958
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Help" })
29707
29959
  ]
29708
29960
  }
29709
29961
  ),
@@ -29718,7 +29970,7 @@ var SideNavBar = React19.memo(({
29718
29970
  "aria-selected": pathname === "/health" || pathname.startsWith("/health/"),
29719
29971
  children: [
29720
29972
  /* @__PURE__ */ jsxRuntime.jsx(outline.HeartIcon, { className: "w-5 h-5 mb-1" }),
29721
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Health" })
29973
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Health" })
29722
29974
  ]
29723
29975
  }
29724
29976
  )
@@ -29735,33 +29987,194 @@ var SideNavBar = React19.memo(({
29735
29987
  "aria-selected": pathname === "/profile" || pathname.startsWith("/profile/"),
29736
29988
  children: [
29737
29989
  /* @__PURE__ */ jsxRuntime.jsx(outline.UserCircleIcon, { className: "w-5 h-5 mb-1" }),
29738
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-tight", children: "Profile" })
29990
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-[10px] font-medium leading-tight", children: "Profile" })
29739
29991
  ]
29740
29992
  }
29741
29993
  ) })
29742
29994
  ] });
29995
+ const MobileNavigationContent = () => {
29996
+ const isActive = (path) => {
29997
+ if (path === "/" && pathname === "/") return true;
29998
+ if (path !== "/" && pathname.startsWith(path)) return true;
29999
+ return false;
30000
+ };
30001
+ const getMobileButtonClass = (path) => {
30002
+ const active = isActive(path);
30003
+ 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"}`;
30004
+ };
30005
+ const getIconClass = (path) => {
30006
+ const active = isActive(path);
30007
+ return `w-7 h-7 ${active ? "text-blue-600" : "text-gray-600"}`;
30008
+ };
30009
+ const handleMobileNavClick = (handler) => {
30010
+ return () => {
30011
+ handler();
30012
+ onMobileMenuClose?.();
30013
+ };
30014
+ };
30015
+ return /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "px-5 py-6", children: [
30016
+ /* @__PURE__ */ jsxRuntime.jsxs(
30017
+ "button",
30018
+ {
30019
+ onClick: handleMobileNavClick(handleHomeClick),
30020
+ className: getMobileButtonClass("/"),
30021
+ "aria-label": "Home",
30022
+ children: [
30023
+ /* @__PURE__ */ jsxRuntime.jsx(outline.HomeIcon, { className: getIconClass("/") }),
30024
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Home" })
30025
+ ]
30026
+ }
30027
+ ),
30028
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 space-y-2", children: [
30029
+ /* @__PURE__ */ jsxRuntime.jsxs(
30030
+ "button",
30031
+ {
30032
+ onClick: handleMobileNavClick(handleLeaderboardClick),
30033
+ className: getMobileButtonClass("/leaderboard"),
30034
+ "aria-label": "Leaderboard",
30035
+ children: [
30036
+ /* @__PURE__ */ jsxRuntime.jsx(outline.TrophyIcon, { className: getIconClass("/leaderboard") }),
30037
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Leaderboard" })
30038
+ ]
30039
+ }
30040
+ ),
30041
+ /* @__PURE__ */ jsxRuntime.jsxs(
30042
+ "button",
30043
+ {
30044
+ onClick: handleMobileNavClick(handleKPIsClick),
30045
+ className: getMobileButtonClass("/kpis"),
30046
+ "aria-label": "Lines",
30047
+ children: [
30048
+ /* @__PURE__ */ jsxRuntime.jsx(outline.ChartBarIcon, { className: getIconClass("/kpis") }),
30049
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Lines" })
30050
+ ]
30051
+ }
30052
+ ),
30053
+ /* @__PURE__ */ jsxRuntime.jsxs(
30054
+ "button",
30055
+ {
30056
+ onClick: handleMobileNavClick(handleTargetsClick),
30057
+ className: getMobileButtonClass("/targets"),
30058
+ "aria-label": "Targets",
30059
+ children: [
30060
+ /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: getIconClass("/targets") }),
30061
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Targets" })
30062
+ ]
30063
+ }
30064
+ ),
30065
+ /* @__PURE__ */ jsxRuntime.jsxs(
30066
+ "button",
30067
+ {
30068
+ onClick: handleMobileNavClick(handleShiftsClick),
30069
+ className: getMobileButtonClass("/shifts"),
30070
+ "aria-label": "Shift Management",
30071
+ children: [
30072
+ /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: getIconClass("/shifts") }),
30073
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Shifts" })
30074
+ ]
30075
+ }
30076
+ ),
30077
+ skuEnabled && /* @__PURE__ */ jsxRuntime.jsxs(
30078
+ "button",
30079
+ {
30080
+ onClick: handleMobileNavClick(handleSKUsClick),
30081
+ className: getMobileButtonClass("/skus"),
30082
+ "aria-label": "SKU Management",
30083
+ children: [
30084
+ /* @__PURE__ */ jsxRuntime.jsx(outline.CubeIcon, { className: getIconClass("/skus") }),
30085
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "SKUs" })
30086
+ ]
30087
+ }
30088
+ ),
30089
+ /* @__PURE__ */ jsxRuntime.jsxs(
30090
+ "button",
30091
+ {
30092
+ onClick: handleMobileNavClick(handleAIAgentClick),
30093
+ className: getMobileButtonClass("/ai-agent"),
30094
+ "aria-label": "AI Manufacturing Expert",
30095
+ children: [
30096
+ /* @__PURE__ */ jsxRuntime.jsx(outline.SparklesIcon, { className: getIconClass("/ai-agent") }),
30097
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Axel AI" })
30098
+ ]
30099
+ }
30100
+ ),
30101
+ /* @__PURE__ */ jsxRuntime.jsxs(
30102
+ "button",
30103
+ {
30104
+ onClick: handleMobileNavClick(handleHelpClick),
30105
+ className: getMobileButtonClass("/help"),
30106
+ "aria-label": "Help & Support",
30107
+ children: [
30108
+ /* @__PURE__ */ jsxRuntime.jsx(outline.QuestionMarkCircleIcon, { className: getIconClass("/help") }),
30109
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Help" })
30110
+ ]
30111
+ }
30112
+ ),
30113
+ /* @__PURE__ */ jsxRuntime.jsxs(
30114
+ "button",
30115
+ {
30116
+ onClick: handleMobileNavClick(handleHealthClick),
30117
+ className: getMobileButtonClass("/health"),
30118
+ "aria-label": "System Health",
30119
+ children: [
30120
+ /* @__PURE__ */ jsxRuntime.jsx(outline.HeartIcon, { className: getIconClass("/health") }),
30121
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "System Health" })
30122
+ ]
30123
+ }
30124
+ )
30125
+ ] }),
30126
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-8 pt-6 border-t border-gray-200", children: /* @__PURE__ */ jsxRuntime.jsxs(
30127
+ "button",
30128
+ {
30129
+ onClick: handleMobileNavClick(handleProfileClick),
30130
+ className: getMobileButtonClass("/profile"),
30131
+ "aria-label": "Profile & Settings",
30132
+ children: [
30133
+ /* @__PURE__ */ jsxRuntime.jsx(outline.UserCircleIcon, { className: getIconClass("/profile") }),
30134
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium", children: "Profile" })
30135
+ ]
30136
+ }
30137
+ ) })
30138
+ ] });
30139
+ };
29743
30140
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
29744
30141
  /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(NavigationContent, {}) }),
29745
- isMobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
30142
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
29746
30143
  /* @__PURE__ */ jsxRuntime.jsx(
29747
30144
  "div",
29748
30145
  {
29749
- className: "md:hidden fixed inset-0 bg-black bg-opacity-50 z-40",
30146
+ 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"}`,
29750
30147
  onClick: onMobileMenuClose,
29751
30148
  "aria-hidden": "true"
29752
30149
  }
29753
30150
  ),
29754
- /* @__PURE__ */ jsxRuntime.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: [
29755
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-4 right-4", children: /* @__PURE__ */ jsxRuntime.jsx(
29756
- "button",
29757
- {
29758
- onClick: onMobileMenuClose,
29759
- 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",
29760
- "aria-label": "Close menu",
29761
- children: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "w-5 h-5" })
29762
- }
29763
- ) }),
29764
- /* @__PURE__ */ jsxRuntime.jsx(NavigationContent, {})
30151
+ /* @__PURE__ */ jsxRuntime.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: [
30152
+ /* @__PURE__ */ jsxRuntime.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: [
30153
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
30154
+ "img",
30155
+ {
30156
+ src: "/optifye-logo.png",
30157
+ alt: "Optifye",
30158
+ className: "w-11 h-11 object-contain",
30159
+ onError: (e) => {
30160
+ e.currentTarget.style.display = "none";
30161
+ if (e.currentTarget.parentElement) {
30162
+ e.currentTarget.parentElement.innerHTML = '<span class="text-blue-600 font-bold text-xl">Optifye</span>';
30163
+ }
30164
+ }
30165
+ }
30166
+ ) }),
30167
+ /* @__PURE__ */ jsxRuntime.jsx(
30168
+ "button",
30169
+ {
30170
+ onClick: onMobileMenuClose,
30171
+ 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",
30172
+ "aria-label": "Close menu",
30173
+ children: /* @__PURE__ */ jsxRuntime.jsx(outline.XMarkIcon, { className: "w-7 h-7" })
30174
+ }
30175
+ )
30176
+ ] }),
30177
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(MobileNavigationContent, {}) })
29765
30178
  ] })
29766
30179
  ] })
29767
30180
  ] });
@@ -29853,17 +30266,39 @@ var MainLayout = ({
29853
30266
  logo
29854
30267
  }) => {
29855
30268
  const router$1 = router.useRouter();
30269
+ const [isMobileMenuOpen, setIsMobileMenuOpen] = React19.useState(false);
30270
+ const handleMobileMenuOpen = () => setIsMobileMenuOpen(true);
30271
+ const handleMobileMenuClose = () => setIsMobileMenuOpen(false);
29856
30272
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `min-h-screen ${className}`, children: [
30273
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
30274
+ /* @__PURE__ */ jsxRuntime.jsx(HamburgerButton, { onClick: handleMobileMenuOpen }),
30275
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(
30276
+ "img",
30277
+ {
30278
+ src: "/optifye-logo.png",
30279
+ alt: "Optifye",
30280
+ className: "h-9 w-9 object-contain",
30281
+ onError: (e) => {
30282
+ e.currentTarget.style.display = "none";
30283
+ if (e.currentTarget.parentElement) {
30284
+ e.currentTarget.parentElement.innerHTML = '<span class="text-blue-600 font-bold text-lg">Optifye</span>';
30285
+ }
30286
+ }
30287
+ }
30288
+ ) })
30289
+ ] }) }),
29857
30290
  /* @__PURE__ */ jsxRuntime.jsx(
29858
30291
  SideNavBar,
29859
30292
  {
29860
30293
  navItems,
29861
30294
  currentPathname: router$1.pathname,
29862
30295
  currentQuery: router$1.query,
29863
- logo
30296
+ logo,
30297
+ isMobileMenuOpen,
30298
+ onMobileMenuClose: handleMobileMenuClose
29864
30299
  }
29865
30300
  ),
29866
- /* @__PURE__ */ jsxRuntime.jsx("main", { className: "ml-20 bg-gray-50 min-h-screen", children })
30301
+ /* @__PURE__ */ jsxRuntime.jsx("main", { className: "md:ml-20 bg-gray-50 min-h-screen transition-all duration-300", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full", children }) })
29867
30302
  ] });
29868
30303
  };
29869
30304
  var Header = ({
@@ -29882,29 +30317,32 @@ var Header = ({
29882
30317
  const handleLogout = async () => {
29883
30318
  await signOut();
29884
30319
  };
29885
- return /* @__PURE__ */ jsxRuntime.jsx("header", { className: `fixed top-0 left-0 right-0 h-16 bg-white border-b border-gray-200 z-50 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full max-w-[1920px] mx-auto px-6 flex items-center justify-between", children: [
29886
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-6", children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-semibold text-gray-900", children: getPageTitle() }) }),
29887
- user && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
30320
+ return /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "h-full max-w-[1920px] mx-auto px-3 sm:px-4 md:px-6 flex items-center justify-between", children: [
30321
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 sm:gap-4 md:gap-6 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-sm sm:text-base md:text-lg lg:text-xl font-semibold text-gray-900 truncate", children: getPageTitle() }) }),
30322
+ user && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
29888
30323
  /* @__PURE__ */ jsxRuntime.jsxs(
29889
30324
  "button",
29890
30325
  {
29891
30326
  onClick: () => setShowDropdown(!showDropdown),
29892
- className: "flex items-center gap-2 px-3 py-2 rounded-md hover:bg-gray-100 transition-colors",
30327
+ 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",
29893
30328
  children: [
29894
- /* @__PURE__ */ jsxRuntime.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" }),
29895
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-gray-700", children: user.email }),
29896
- /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-4 h-4 text-gray-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })
30329
+ /* @__PURE__ */ jsxRuntime.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" }),
30330
+ /* @__PURE__ */ jsxRuntime.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 }),
30331
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })
29897
30332
  ]
29898
30333
  }
29899
30334
  ),
29900
- showDropdown && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50", children: /* @__PURE__ */ jsxRuntime.jsx(
29901
- "button",
29902
- {
29903
- onClick: handleLogout,
29904
- className: "block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",
29905
- children: "Sign out"
29906
- }
29907
- ) })
30335
+ showDropdown && /* @__PURE__ */ jsxRuntime.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: [
30336
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "block sm:hidden px-4 py-2 text-xs text-gray-500 border-b border-gray-100", children: user.email }),
30337
+ /* @__PURE__ */ jsxRuntime.jsx(
30338
+ "button",
30339
+ {
30340
+ onClick: handleLogout,
30341
+ className: "block w-full text-left px-4 py-2 text-xs sm:text-sm text-gray-700 hover:bg-gray-100",
30342
+ children: "Sign out"
30343
+ }
30344
+ )
30345
+ ] })
29908
30346
  ] })
29909
30347
  ] }) });
29910
30348
  };
@@ -30255,7 +30693,7 @@ var ThreadSidebar = ({
30255
30693
  ] });
30256
30694
  };
30257
30695
  var axelProfilePng = "/axel-profile.png";
30258
- var ProfilePicture = React19__namespace.default.memo(({ alt = "Axel", className = "w-12 h-12" }) => {
30696
+ var ProfilePicture = React19__namespace.default.memo(({ alt = "Axel", className = "w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12" }) => {
30259
30697
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${className} rounded-xl overflow-hidden shadow-sm`, children: /* @__PURE__ */ jsxRuntime.jsx(
30260
30698
  "img",
30261
30699
  {
@@ -31861,54 +32299,105 @@ var AIAgentView = () => {
31861
32299
  }
31862
32300
  `
31863
32301
  } }),
31864
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 flex flex-col h-screen transition-all duration-300 ${isSidebarOpen ? "mr-80" : "mr-0"}`, children: [
31865
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between relative", children: [
31866
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
31867
- BackButtonMinimal,
31868
- {
31869
- onClick: () => navigate("/"),
31870
- text: "Back",
31871
- size: "default",
31872
- "aria-label": "Navigate back to dashboard"
31873
- }
31874
- ) }),
31875
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-center mx-auto", children: [
31876
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-3 mb-1", children: [
31877
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Chat with Axel" }),
31878
- /* @__PURE__ */ jsxRuntime.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" })
32302
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 flex flex-col h-screen transition-all duration-300 ${isSidebarOpen ? "lg:mr-80 mr-0" : "mr-0"}`, children: [
32303
+ /* @__PURE__ */ jsxRuntime.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: [
32304
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:hidden", children: [
32305
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
32306
+ /* @__PURE__ */ jsxRuntime.jsx(
32307
+ BackButtonMinimal,
32308
+ {
32309
+ onClick: () => navigate("/"),
32310
+ text: "Back",
32311
+ size: "sm",
32312
+ "aria-label": "Navigate back to dashboard"
32313
+ }
32314
+ ),
32315
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
32316
+ /* @__PURE__ */ jsxRuntime.jsxs(
32317
+ "button",
32318
+ {
32319
+ onClick: handleNewThread,
32320
+ 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",
32321
+ children: [
32322
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "w-3.5 h-3.5" }),
32323
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "New" })
32324
+ ]
32325
+ }
32326
+ ),
32327
+ /* @__PURE__ */ jsxRuntime.jsx(
32328
+ "button",
32329
+ {
32330
+ onClick: () => setIsSidebarOpen(!isSidebarOpen),
32331
+ 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",
32332
+ "aria-label": "Toggle chat history",
32333
+ children: isSidebarOpen ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32334
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3.5 h-3.5" }),
32335
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Hide" })
32336
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32337
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "w-3.5 h-3.5" }),
32338
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "History" }),
32339
+ newChatCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 bg-red-500 text-white text-xs rounded-full px-1.5 py-0.5 font-medium", children: newChatCount })
32340
+ ] })
32341
+ }
32342
+ )
32343
+ ] })
31879
32344
  ] }),
31880
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-gray-500", children: /* @__PURE__ */ jsxRuntime.jsx(ISTTimer_default, {}) }) })
32345
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
32346
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 mb-0.5", children: [
32347
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-base font-semibold text-gray-900", children: "Chat with Axel" }),
32348
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1 w-1 rounded-full bg-green-500 animate-pulse ring-1 ring-green-500/30 ring-offset-1" })
32349
+ ] }),
32350
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-gray-500", children: /* @__PURE__ */ jsxRuntime.jsx(ISTTimer_default, {}) }) })
32351
+ ] })
31881
32352
  ] }),
31882
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-0 flex items-center gap-2", children: [
31883
- /* @__PURE__ */ jsxRuntime.jsxs(
31884
- "button",
31885
- {
31886
- onClick: handleNewThread,
31887
- 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",
31888
- children: [
31889
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "w-4 h-4" }),
31890
- "New Chat"
31891
- ]
31892
- }
31893
- ),
31894
- /* @__PURE__ */ jsxRuntime.jsx(
31895
- "button",
32353
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:flex items-center justify-between relative", children: [
32354
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
32355
+ BackButtonMinimal,
31896
32356
  {
31897
- onClick: () => setIsSidebarOpen(!isSidebarOpen),
31898
- 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",
31899
- "aria-label": "Toggle chat history",
31900
- children: isSidebarOpen ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
31901
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" }),
31902
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Hide History" })
31903
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
31904
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "w-4 h-4" }),
31905
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Chat History" }),
31906
- newChatCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 bg-red-500 text-white text-xs rounded-full px-2 py-0.5 font-medium", children: newChatCount })
31907
- ] })
32357
+ onClick: () => navigate("/"),
32358
+ text: "Back",
32359
+ size: "default",
32360
+ "aria-label": "Navigate back to dashboard"
31908
32361
  }
31909
- )
32362
+ ) }),
32363
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-center mx-auto", children: [
32364
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-3 mb-1", children: [
32365
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "Chat with Axel" }),
32366
+ /* @__PURE__ */ jsxRuntime.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" })
32367
+ ] }),
32368
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-gray-500", children: /* @__PURE__ */ jsxRuntime.jsx(ISTTimer_default, {}) }) })
32369
+ ] }),
32370
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-0 flex items-center gap-2", children: [
32371
+ /* @__PURE__ */ jsxRuntime.jsxs(
32372
+ "button",
32373
+ {
32374
+ onClick: handleNewThread,
32375
+ 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",
32376
+ children: [
32377
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "w-4 h-4" }),
32378
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "New Chat" })
32379
+ ]
32380
+ }
32381
+ ),
32382
+ /* @__PURE__ */ jsxRuntime.jsx(
32383
+ "button",
32384
+ {
32385
+ onClick: () => setIsSidebarOpen(!isSidebarOpen),
32386
+ 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",
32387
+ "aria-label": "Toggle chat history",
32388
+ children: isSidebarOpen ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32389
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" }),
32390
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Hide History" })
32391
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32392
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "w-4 h-4" }),
32393
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Chat History" }),
32394
+ newChatCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 bg-red-500 text-white text-xs rounded-full px-2 py-0.5 font-medium", children: newChatCount })
32395
+ ] })
32396
+ }
32397
+ )
32398
+ ] })
31910
32399
  ] })
31911
- ] }) }),
32400
+ ] }),
31912
32401
  /* @__PURE__ */ jsxRuntime.jsx(
31913
32402
  "main",
31914
32403
  {
@@ -31916,16 +32405,16 @@ var AIAgentView = () => {
31916
32405
  className: `flex-1 bg-gray-50/50 min-h-0 ${displayMessages.length === 0 && !isTransitioning ? "flex items-center justify-center" : "overflow-y-auto"}`,
31917
32406
  children: !activeThreadId && displayMessages.length === 0 && !isTransitioning ? (
31918
32407
  /* Centered welcome and input for new chat */
31919
- /* @__PURE__ */ jsxRuntime.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: [
32408
+ /* @__PURE__ */ jsxRuntime.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: [
31920
32409
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
31921
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center mb-8", children: /* @__PURE__ */ jsxRuntime.jsx(ProfilePicture, { alt: "Axel - AI Manufacturing Expert", className: "w-24 h-24" }) }),
31922
- /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-3xl font-semibold text-gray-900", children: [
32410
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center mb-4 sm:mb-6 md:mb-8", children: /* @__PURE__ */ jsxRuntime.jsx(ProfilePicture, { alt: "Axel - AI Manufacturing Expert", className: "w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24" }) }),
32411
+ /* @__PURE__ */ jsxRuntime.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: [
31923
32412
  typedText,
31924
32413
  typedText.length < "Hi, I'm Axel - Your AI Supervisor".length && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-pulse", children: "|" })
31925
32414
  ] })
31926
32415
  ] }),
31927
32416
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [
31928
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "flex items-end gap-2 p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 relative", children: [
32417
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "flex items-end gap-2 p-3 sm:p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 relative", children: [
31929
32418
  /* @__PURE__ */ jsxRuntime.jsx(
31930
32419
  "textarea",
31931
32420
  {
@@ -31956,24 +32445,24 @@ var AIAgentView = () => {
31956
32445
  });
31957
32446
  },
31958
32447
  placeholder: "Ask me anything about your shop-floor",
31959
- 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",
32448
+ 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",
31960
32449
  rows: 1,
31961
- style: { minHeight: "24px", maxHeight: "120px" }
32450
+ style: { minHeight: "40px", maxHeight: "120px" }
31962
32451
  }
31963
32452
  ),
31964
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-2 bottom-2 flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
32453
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-2 sm:right-3 bottom-2 sm:bottom-2 flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
31965
32454
  "button",
31966
32455
  {
31967
32456
  type: "submit",
31968
32457
  disabled: !inputValue.trim() || isCurrentThreadLoading,
31969
- 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",
32458
+ 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",
31970
32459
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "w-4 h-4" })
31971
32460
  }
31972
32461
  ) })
31973
32462
  ] }) }) }),
31974
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center mt-2 text-xs text-gray-400", children: [
31975
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: isCurrentThreadLoading ? "You can type your next message while Axel responds" : "Press Enter to send \u2022 Shift+Enter for new line" }),
31976
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 ml-4", children: [
32463
+ /* @__PURE__ */ jsxRuntime.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: [
32464
+ /* @__PURE__ */ jsxRuntime.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" }),
32465
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
31977
32466
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-1.5 h-1.5 rounded-full ${isCurrentThreadLoading ? "bg-orange-500" : "bg-green-500"}` }),
31978
32467
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: isCurrentThreadLoading ? "Responding..." : "Connected" })
31979
32468
  ] })
@@ -31982,17 +32471,17 @@ var AIAgentView = () => {
31982
32471
  ] })
31983
32472
  ) : isTransitioning ? (
31984
32473
  /* Transition state - show user message first, then thinking */
31985
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 py-6 pb-32", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
32474
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "space-y-4 sm:space-y-6", children: [
31986
32475
  displayMessages.map((message, index) => /* @__PURE__ */ jsxRuntime.jsxs(
31987
32476
  "div",
31988
32477
  {
31989
- className: `flex gap-4 ${message.role === "user" ? "justify-end" : "justify-start"}`,
32478
+ className: `flex gap-2 sm:gap-3 md:gap-4 ${message.role === "user" ? "justify-end" : "justify-start"}`,
31990
32479
  children: [
31991
32480
  message.role === "assistant" && /* @__PURE__ */ jsxRuntime.jsx(ProfilePicture, {}),
31992
32481
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `max-w-none w-full group ${message.role === "user" ? "order-1" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(
31993
32482
  "div",
31994
32483
  {
31995
- 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"}`,
32484
+ 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"}`,
31996
32485
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${message.role === "user" ? "text-white" : "text-gray-800"}`, children: [
31997
32486
  message.role === "assistant" ? message.id === -1 ? /* @__PURE__ */ jsxRuntime.jsx(
31998
32487
  "div",
@@ -32016,18 +32505,18 @@ var AIAgentView = () => {
32016
32505
  ] }) })
32017
32506
  ) : (
32018
32507
  /* Regular chat view with messages */
32019
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 py-6 pb-32", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
32508
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "space-y-4 sm:space-y-6", children: [
32020
32509
  displayMessages.map((message, index) => /* @__PURE__ */ jsxRuntime.jsxs(
32021
32510
  "div",
32022
32511
  {
32023
- className: `flex gap-4 ${message.role === "user" ? "justify-end" : "justify-start"}`,
32512
+ className: `flex gap-2 sm:gap-3 md:gap-4 ${message.role === "user" ? "justify-end" : "justify-start"}`,
32024
32513
  children: [
32025
32514
  message.role === "assistant" && /* @__PURE__ */ jsxRuntime.jsx(ProfilePicture, {}),
32026
32515
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-none w-full group ${message.role === "user" ? "order-1" : ""}`, children: [
32027
32516
  /* @__PURE__ */ jsxRuntime.jsxs(
32028
32517
  "div",
32029
32518
  {
32030
- 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"}`,
32519
+ 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"}`,
32031
32520
  children: [
32032
32521
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${message.role === "user" ? "text-white" : "text-gray-800"}`, children: [
32033
32522
  message.role === "assistant" ? message.id === -1 ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -32043,9 +32532,9 @@ var AIAgentView = () => {
32043
32532
  "button",
32044
32533
  {
32045
32534
  onClick: () => copyToClipboard(message.content, message.id.toString()),
32046
- 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",
32535
+ 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",
32047
32536
  title: "Copy message",
32048
- children: copiedMessageId === message.id.toString() ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-4 h-4 text-green-600" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-4 h-4 text-gray-500" })
32537
+ children: copiedMessageId === message.id.toString() ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-green-600" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4 text-gray-500" })
32049
32538
  }
32050
32539
  ),
32051
32540
  message.reasoning && /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "mt-3 pt-3 border-t border-gray-200", children: [
@@ -32055,7 +32544,7 @@ var AIAgentView = () => {
32055
32544
  ]
32056
32545
  }
32057
32546
  ),
32058
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `mt-2 flex items-center gap-2 text-xs text-gray-400 ${message.role === "user" ? "justify-end" : "justify-start"}`, children: [
32547
+ /* @__PURE__ */ jsxRuntime.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: [
32059
32548
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatTime3(message.created_at) }),
32060
32549
  message.role === "assistant" && message.id !== -1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
32061
32550
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-1 h-1 bg-gray-300 rounded-full" }),
@@ -32090,15 +32579,15 @@ var AIAgentView = () => {
32090
32579
  )
32091
32580
  }
32092
32581
  ),
32093
- (displayMessages.length > 0 || isTransitioning) && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "max-w-4xl mx-auto p-4 sm:p-6 pointer-events-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [
32582
+ (displayMessages.length > 0 || isTransitioning) && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "max-w-4xl mx-auto p-3 sm:p-4 md:p-6 pointer-events-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [
32094
32583
  /* @__PURE__ */ jsxRuntime.jsx(
32095
32584
  "div",
32096
32585
  {
32097
- 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" : ""}`,
32586
+ 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" : ""}`,
32098
32587
  style: isTransitioning ? {
32099
32588
  animation: "slideDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards"
32100
32589
  } : {},
32101
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-end gap-2 p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 relative", children: [
32590
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-end gap-2 p-3 sm:p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 relative", children: [
32102
32591
  /* @__PURE__ */ jsxRuntime.jsx(
32103
32592
  "textarea",
32104
32593
  {
@@ -32129,33 +32618,33 @@ var AIAgentView = () => {
32129
32618
  });
32130
32619
  },
32131
32620
  placeholder: "Ask me anything about your shop-floor",
32132
- 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",
32621
+ 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",
32133
32622
  rows: 1,
32134
- style: { minHeight: "24px", maxHeight: "120px" }
32623
+ style: { minHeight: "40px", maxHeight: "120px" }
32135
32624
  }
32136
32625
  ),
32137
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-2 bottom-2 flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
32626
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-2 sm:right-3 bottom-2 sm:bottom-2 flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
32138
32627
  "button",
32139
32628
  {
32140
32629
  type: "submit",
32141
32630
  disabled: !inputValue.trim() || isCurrentThreadLoading,
32142
- 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",
32631
+ 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",
32143
32632
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "w-4 h-4" })
32144
32633
  }
32145
32634
  ) })
32146
32635
  ] }) })
32147
32636
  }
32148
32637
  ),
32149
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center mt-2 text-xs text-gray-400", children: [
32150
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: isCurrentThreadLoading ? "You can type your next message while Axel responds" : "Press Enter to send \u2022 Shift+Enter for new line" }),
32151
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 ml-4", children: [
32638
+ /* @__PURE__ */ jsxRuntime.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: [
32639
+ /* @__PURE__ */ jsxRuntime.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" }),
32640
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
32152
32641
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-1.5 h-1.5 rounded-full ${isCurrentThreadLoading ? "bg-orange-500" : "bg-green-500"}` }),
32153
32642
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: isCurrentThreadLoading ? "Responding..." : "Connected" })
32154
32643
  ] })
32155
32644
  ] })
32156
32645
  ] }) }) })
32157
32646
  ] }),
32158
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "w-80 h-full bg-white border-l border-gray-200 shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(
32647
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "w-full sm:w-96 lg:w-80 h-full bg-white border-l border-gray-200 shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(
32159
32648
  ThreadSidebar,
32160
32649
  {
32161
32650
  activeThreadId,
@@ -32537,8 +33026,8 @@ var HelpView = ({
32537
33026
  animate: { opacity: 1 },
32538
33027
  transition: { duration: 0.3 },
32539
33028
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
32540
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white px-8 py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between relative", children: [
32541
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
33029
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 sm:gap-4 relative", children: [
33030
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
32542
33031
  BackButtonMinimal,
32543
33032
  {
32544
33033
  onClick: handleBackClick,
@@ -32547,9 +33036,9 @@ var HelpView = ({
32547
33036
  "aria-label": "Navigate back to dashboard"
32548
33037
  }
32549
33038
  ) }),
32550
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-center mx-auto", children: [
32551
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Help & Support" }),
32552
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Get immediate assistance from our engineering team. Submit a detailed support request below." })
33039
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-center mx-auto mt-2 sm:mt-0", children: [
33040
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "Help & Support" }),
33041
+ /* @__PURE__ */ jsxRuntime.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." })
32553
33042
  ] })
32554
33043
  ] }) }),
32555
33044
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
@@ -32873,7 +33362,7 @@ function HomeView({
32873
33362
  return null;
32874
33363
  }
32875
33364
  return /* @__PURE__ */ jsxRuntime.jsxs(Select, { onValueChange: handleLineChange, defaultValue: selectedLineId, children: [
32876
- /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-full sm:w-[200px] bg-white border border-gray-200 shadow-sm rounded-md h-9 text-sm", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select a line" }) }),
33365
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select a line" }) }),
32877
33366
  /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "z-50 bg-white shadow-lg border border-gray-200 rounded-md", children: availableLineIds.map((id3) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: id3, children: lineNames[id3] || (id3 === factoryViewId ? "All Lines" : `Line ${id3.substring(0, 4)}`) }, id3)) })
32878
33367
  ] });
32879
33368
  }, [availableLineIds, handleLineChange, selectedLineId, lineNames, factoryViewId, allLineIds.length]);
@@ -32885,7 +33374,7 @@ function HomeView({
32885
33374
  if (errorMessage || displayNamesError) {
32886
33375
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-white p-6 shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3 text-red-500", children: [
32887
33376
  /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
32888
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-lg font-medium", children: [
33377
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-base sm:text-lg font-medium", children: [
32889
33378
  "Error: ",
32890
33379
  errorMessage || displayNamesError?.message
32891
33380
  ] })
@@ -32899,7 +33388,7 @@ function HomeView({
32899
33388
  animate: { opacity: 1 },
32900
33389
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-1", children: [
32901
33390
  /* @__PURE__ */ jsxRuntime.jsxs("main", { className: "flex flex-1 flex-col", children: [
32902
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-30 sm:static bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
33391
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative sm:sticky sm:top-0 z-30 bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
32903
33392
  DashboardHeader,
32904
33393
  {
32905
33394
  lineTitle,
@@ -32908,8 +33397,8 @@ function HomeView({
32908
33397
  }
32909
33398
  ) }) }),
32910
33399
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto sm:overflow-hidden relative", children: [
32911
- lineSelectorComponent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-3 top-2 sm:right-6 sm:top-3 z-30", children: lineSelectorComponent }),
32912
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full sm:h-full min-h-[calc(100vh-80px)] sm:min-h-0", children: memoizedWorkspaceMetrics.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
33400
+ lineSelectorComponent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-4 top-3 sm:right-6 sm:top-3 z-30", children: lineSelectorComponent }),
33401
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full sm:h-full min-h-[calc(100vh-120px)] sm:min-h-0", children: memoizedWorkspaceMetrics.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
32913
33402
  motion.div,
32914
33403
  {
32915
33404
  initial: { opacity: 0, scale: 0.98 },
@@ -33126,11 +33615,11 @@ var MetricCards = React19.memo(({ lineInfo }) => {
33126
33615
  variants: containerVariants,
33127
33616
  initial: "initial",
33128
33617
  animate: "animate",
33129
- className: "grid grid-cols-1 md:grid-cols-3 gap-4 mb-2 md:h-[35vh] h-auto",
33618
+ 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",
33130
33619
  children: [
33131
- /* @__PURE__ */ jsxRuntime.jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-4 overflow-hidden h-[280px] md:h-auto", children: [
33132
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold text-gray-700 mb-2 text-center", children: "Line Output" }),
33133
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[calc(100%-2.5rem)]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntime.jsx(
33620
+ /* @__PURE__ */ jsxRuntime.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: [
33621
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm sm:text-base font-semibold text-gray-700 mb-2 text-center", children: "Line Output" }),
33622
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[calc(100%-2rem)] sm:h-[calc(100%-2.5rem)]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full", children: /* @__PURE__ */ jsxRuntime.jsx(
33134
33623
  OutputProgressChart,
33135
33624
  {
33136
33625
  currentOutput: lineInfo?.metrics.current_output || 0,
@@ -33138,19 +33627,19 @@ var MetricCards = React19.memo(({ lineInfo }) => {
33138
33627
  }
33139
33628
  ) }) })
33140
33629
  ] }),
33141
- /* @__PURE__ */ jsxRuntime.jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-4 overflow-hidden h-[160px] md:h-auto", children: [
33142
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold text-gray-700 text-center mb-2", children: "Underperforming Workspaces" }),
33143
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center h-[calc(100%-2.5rem)]", children: [
33144
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-6xl md:text-7xl font-bold text-red-600", children: lineInfo?.metrics.underperforming_workspaces }),
33145
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-2xl md:text-3xl text-gray-500 ml-2", children: [
33630
+ /* @__PURE__ */ jsxRuntime.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: [
33631
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm sm:text-base font-semibold text-gray-700 text-center mb-2", children: "Underperforming Workspaces" }),
33632
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center h-[calc(100%-2rem)] sm:h-[calc(100%-2.5rem)]", children: [
33633
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold text-red-600", children: lineInfo?.metrics.underperforming_workspaces }),
33634
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xl sm:text-2xl md:text-2xl lg:text-3xl text-gray-500 ml-1 sm:ml-2", children: [
33146
33635
  "/ ",
33147
33636
  lineInfo?.metrics.total_workspaces
33148
33637
  ] })
33149
33638
  ] })
33150
33639
  ] }),
33151
- /* @__PURE__ */ jsxRuntime.jsxs(motion.div, { variants: itemVariants, className: "bg-white rounded-xl shadow-sm p-4 overflow-hidden h-[160px] md:h-auto", children: [
33152
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base font-semibold text-gray-700 text-center mb-2", children: "Average Efficiency" }),
33153
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-[calc(100%-2.5rem)]", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-6xl md:text-7xl font-bold text-gray-900", children: [
33640
+ /* @__PURE__ */ jsxRuntime.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: [
33641
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm sm:text-base font-semibold text-gray-700 text-center mb-2", children: "Average Efficiency" }),
33642
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-[calc(100%-2rem)] sm:h-[calc(100%-2.5rem)]", children: /* @__PURE__ */ jsxRuntime.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: [
33154
33643
  lineInfo?.metrics.avg_efficiency.toFixed(1),
33155
33644
  "%"
33156
33645
  ] }) })
@@ -33195,27 +33684,27 @@ var BottomSection = React19.memo(({
33195
33684
  variants: containerVariants,
33196
33685
  initial: "initial",
33197
33686
  animate: "animate",
33198
- className: "grid grid-cols-1 md:grid-cols-5 gap-4 md:h-[calc(57vh-4rem)] h-auto md:mt-0 mt-4",
33687
+ 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",
33199
33688
  children: [
33200
- /* @__PURE__ */ jsxRuntime.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: [
33689
+ /* @__PURE__ */ jsxRuntime.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: [
33201
33690
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center mb-2", children: [
33202
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700 text-center flex-1", children: "Poorest Performing Workspaces" }),
33691
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base sm:text-lg font-semibold text-gray-700 text-center flex-1", children: "Poorest Performing Workspaces" }),
33203
33692
  /* @__PURE__ */ jsxRuntime.jsx(
33204
33693
  "div",
33205
33694
  {
33206
33695
  className: "p-1.5 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",
33207
33696
  onClick: () => handleNavigate && handleNavigate(`/leaderboard`),
33208
- children: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowRightIcon, { className: "w-5 h-5 text-gray-500" })
33697
+ children: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowRightIcon, { className: "w-4 h-4 sm:w-5 sm:h-5 text-gray-500" })
33209
33698
  }
33210
33699
  )
33211
33700
  ] }),
33212
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "divide-y overflow-auto flex-1 pr-2", children: [
33701
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "divide-y overflow-auto flex-1 pr-1 sm:pr-2", children: [
33213
33702
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pb-2", children: [
33214
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 md:gap-6", children: [
33215
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-gray-500 min-w-[100px] md:min-w-[120px] text-sm md:text-base", children: "Workspace" }),
33703
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-6", children: [
33704
+ /* @__PURE__ */ jsxRuntime.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" }),
33216
33705
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs md:text-sm font-medium text-gray-500", children: "Current/Ideal" })
33217
33706
  ] }),
33218
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs md:text-sm font-medium text-gray-500 pr-2", children: "Efficiency" })
33707
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs md:text-sm font-medium text-gray-500 pr-1 sm:pr-2", children: "Efficiency" })
33219
33708
  ] }),
33220
33709
  lineInfo.metrics.poorest_performing_workspaces && lineInfo.metrics.poorest_performing_workspaces.length > 0 ? lineInfo.metrics.poorest_performing_workspaces.map((ws, index) => {
33221
33710
  const wsMetrics = workspaceData.find((w) => w.workspace_name === ws.workspace_name);
@@ -33237,10 +33726,10 @@ var BottomSection = React19.memo(({
33237
33726
  clickHandler();
33238
33727
  handleNavigate && handleNavigate(fullUrl);
33239
33728
  },
33240
- className: "block py-3 hover:bg-gray-50 transition-colors rounded-lg cursor-pointer",
33729
+ className: "block py-2 sm:py-3 hover:bg-gray-50 transition-colors rounded-lg cursor-pointer",
33241
33730
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
33242
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 md:gap-6", children: [
33243
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-[100px] md:min-w-[120px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-gray-900 text-sm md:text-base", children: displayName }) }),
33731
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-6", children: [
33732
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-[80px] sm:min-w-[100px] md:min-w-[120px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-gray-900 text-xs sm:text-sm md:text-base truncate", children: displayName }) }),
33244
33733
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs md:text-sm font-medium text-gray-900", children: [
33245
33734
  ws.action_count || 0,
33246
33735
  " / ",
@@ -33271,10 +33760,10 @@ var BottomSection = React19.memo(({
33271
33760
  clickHandler();
33272
33761
  handleNavigate && handleNavigate(fullUrl);
33273
33762
  },
33274
- className: "block py-3 hover:bg-gray-50 transition-colors rounded-lg cursor-pointer",
33763
+ className: "block py-2 sm:py-3 hover:bg-gray-50 transition-colors rounded-lg cursor-pointer",
33275
33764
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
33276
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 md:gap-6", children: [
33277
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-[100px] md:min-w-[120px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-gray-900 text-sm md:text-base", children: displayName }) }),
33765
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3 md:gap-6", children: [
33766
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-[80px] sm:min-w-[100px] md:min-w-[120px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium text-gray-900 text-xs sm:text-sm md:text-base truncate", children: displayName }) }),
33278
33767
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs md:text-sm font-medium text-gray-900", children: [
33279
33768
  ws.action_count || 0,
33280
33769
  " / ",
@@ -33293,9 +33782,9 @@ var BottomSection = React19.memo(({
33293
33782
  )
33294
33783
  ] })
33295
33784
  ] }),
33296
- /* @__PURE__ */ jsxRuntime.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: [
33297
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-gray-700 mb-2 text-center", children: "Hourly Line Output" }),
33298
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-[300px] md:min-h-[400px] pb-8 md:pb-16", children: lineInfo && /* @__PURE__ */ jsxRuntime.jsx(
33785
+ /* @__PURE__ */ jsxRuntime.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: [
33786
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-base sm:text-lg font-semibold text-gray-700 mb-2 text-center", children: "Hourly Line Output" }),
33787
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
33299
33788
  HourlyOutputChart2,
33300
33789
  {
33301
33790
  data: hourlyOutputData,
@@ -33666,9 +34155,9 @@ var KPIDetailView = ({
33666
34155
  return /* @__PURE__ */ jsxRuntime.jsx(LoadingPage, { message: "Processing line data..." });
33667
34156
  }
33668
34157
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
33669
- /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-3", children: [
34158
+ /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3", children: [
33670
34159
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
33671
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
34160
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
33672
34161
  BackButtonMinimal,
33673
34162
  {
33674
34163
  onClick: handleBackClick,
@@ -33677,37 +34166,37 @@ var KPIDetailView = ({
33677
34166
  "aria-label": "Navigate back to previous page"
33678
34167
  }
33679
34168
  ) }),
33680
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
33681
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: lineInfo?.line_name || "Line" }),
33682
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34169
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-center mt-2 sm:mt-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34170
+ /* @__PURE__ */ jsxRuntime.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" }),
34171
+ /* @__PURE__ */ jsxRuntime.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" })
33683
34172
  ] }) })
33684
34173
  ] }),
33685
- (activeTab !== "monthly_history" || urlDate || urlShift) && metrics2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-4", children: [
34174
+ (activeTab !== "monthly_history" || urlDate || urlShift) && metrics2 && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4", children: [
33686
34175
  !urlDate && !urlShift && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
33687
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(ISTTimer_default, {}) }),
33688
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" })
34176
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(ISTTimer_default, {}) }),
34177
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
33689
34178
  ] }),
33690
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium text-blue-600", children: metrics2 && formatLocalDate(new Date(metrics2.date)) }),
33691
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
34179
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: metrics2 && formatLocalDate(new Date(metrics2.date)) }),
34180
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
33692
34181
  urlDate && metrics2.date && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
33693
34182
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-2 py-1 text-xs font-medium bg-blue-200 text-blue-800 rounded-md", children: getDaysDifference2(metrics2.date) }),
33694
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" })
34183
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" })
33695
34184
  ] }),
33696
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
34185
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
33697
34186
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-blue-600", children: getShiftIcon(metrics2.shift_id ?? 0) }),
33698
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-base font-medium text-blue-600", children: [
34187
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
33699
34188
  getShiftName(metrics2.shift_id ?? 0),
33700
34189
  " Shift"
33701
34190
  ] })
33702
34191
  ] })
33703
34192
  ] }) }),
33704
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center justify-between", children: [
33705
- !urlDate && !urlShift && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
34193
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-0", children: [
34194
+ !urlDate && !urlShift && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1 sm:gap-2 w-full sm:w-auto", children: [
33706
34195
  /* @__PURE__ */ jsxRuntime.jsx(
33707
34196
  "button",
33708
34197
  {
33709
34198
  onClick: handleOverviewClick,
33710
- 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"}`,
34199
+ 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"}`,
33711
34200
  children: "Efficiency Overview"
33712
34201
  }
33713
34202
  ),
@@ -33715,12 +34204,12 @@ var KPIDetailView = ({
33715
34204
  "button",
33716
34205
  {
33717
34206
  onClick: handleMonthlyHistoryClick,
33718
- 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"}`,
34207
+ 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"}`,
33719
34208
  children: "Monthly History"
33720
34209
  }
33721
34210
  )
33722
34211
  ] }),
33723
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3 ml-auto", children: [
34212
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2 sm:space-x-3 w-full sm:w-auto justify-end sm:ml-auto", children: [
33724
34213
  lineInfo && activeTab === "overview" && /* @__PURE__ */ jsxRuntime.jsx(LinePdfGenerator, { lineInfo, workspaceData: workspaces || [] }),
33725
34214
  activeTab === "monthly_history" && /* @__PURE__ */ jsxRuntime.jsx(
33726
34215
  LineMonthlyPdfGenerator,
@@ -33885,11 +34374,11 @@ var LineCard = ({ line, onClick }) => {
33885
34374
  animate: { opacity: 1, y: 0 },
33886
34375
  transition: { duration: 0.3 },
33887
34376
  onClick,
33888
- 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",
34377
+ 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",
33889
34378
  children: [
33890
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mb-6", children: [
33891
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-semibold text-gray-900", children: line.line_name }),
33892
- kpis && isOnTrack !== null && /* @__PURE__ */ jsxRuntime.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: [
34379
+ /* @__PURE__ */ jsxRuntime.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: [
34380
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg sm:text-xl font-semibold text-gray-900 truncate", children: line.line_name }),
34381
+ kpis && isOnTrack !== null && /* @__PURE__ */ jsxRuntime.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: [
33893
34382
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-2 h-2 rounded-full ${isOnTrack ? "bg-emerald-500" : "bg-red-500"} animate-pulse` }),
33894
34383
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: isOnTrack ? "On Track" : "Behind" })
33895
34384
  ] })
@@ -33909,15 +34398,15 @@ var LineCard = ({ line, onClick }) => {
33909
34398
  ] })
33910
34399
  ] }),
33911
34400
  error && !kpis && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500", children: "Unable to load metrics" }) }),
33912
- kpis && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
34401
+ kpis && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 sm:space-y-5", children: [
33913
34402
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
33914
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-2", children: "Efficiency" }),
34403
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1.5 sm:mb-2", children: "Efficiency" }),
33915
34404
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between", children: [
33916
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-3xl font-semibold text-gray-900", children: [
34405
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-2xl sm:text-3xl font-semibold text-gray-900", children: [
33917
34406
  kpis.efficiency.value.toFixed(1),
33918
34407
  "%"
33919
34408
  ] }),
33920
- kpis.efficiency.change !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `text-sm font-medium ${kpis.efficiency.change > 0 ? "text-emerald-600" : "text-red-600"}`, children: [
34409
+ kpis.efficiency.change !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `text-xs sm:text-sm font-medium ${kpis.efficiency.change > 0 ? "text-emerald-600" : "text-red-600"}`, children: [
33921
34410
  kpis.efficiency.change > 0 ? "+" : "",
33922
34411
  kpis.efficiency.change.toFixed(1),
33923
34412
  "%"
@@ -33925,19 +34414,19 @@ var LineCard = ({ line, onClick }) => {
33925
34414
  ] })
33926
34415
  ] }),
33927
34416
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
33928
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-2", children: "Output Progress" }),
33929
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between mb-3", children: [
33930
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl font-semibold text-gray-900", children: kpis.outputProgress.current }),
33931
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-gray-500 font-medium", children: [
34417
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1.5 sm:mb-2", children: "Output Progress" }),
34418
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between mb-2 sm:mb-3", children: [
34419
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl sm:text-2xl font-semibold text-gray-900", children: kpis.outputProgress.current }),
34420
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm text-gray-500 font-medium", children: [
33932
34421
  "/ ",
33933
34422
  kpis.outputProgress.target,
33934
34423
  " units"
33935
34424
  ] })
33936
34425
  ] }),
33937
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-gray-200 rounded-full h-2.5", children: /* @__PURE__ */ jsxRuntime.jsx(
34426
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-gray-200 rounded-full h-2 sm:h-2.5", children: /* @__PURE__ */ jsxRuntime.jsx(
33938
34427
  "div",
33939
34428
  {
33940
- className: "bg-blue-600 h-2.5 rounded-full transition-all duration-500 ease-out",
34429
+ className: "bg-blue-600 h-2 sm:h-2.5 rounded-full transition-all duration-500 ease-out",
33941
34430
  style: {
33942
34431
  width: `${Math.min(
33943
34432
  kpis.outputProgress.current / kpis.outputProgress.target * 100,
@@ -33948,17 +34437,17 @@ var LineCard = ({ line, onClick }) => {
33948
34437
  ) })
33949
34438
  ] }),
33950
34439
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
33951
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-2", children: "Underperforming Workspaces" }),
34440
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1.5 sm:mb-2", children: "Underperforming Workspaces" }),
33952
34441
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
33953
- /* @__PURE__ */ jsxRuntime.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 }),
33954
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-gray-500 font-medium", children: [
34442
+ /* @__PURE__ */ jsxRuntime.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 }),
34443
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm text-gray-500 font-medium", children: [
33955
34444
  "of ",
33956
34445
  kpis.underperformingWorkers.total
33957
34446
  ] })
33958
34447
  ] })
33959
34448
  ] })
33960
34449
  ] }),
33961
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-4 right-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2.5 rounded-full bg-gray-50 group-hover:bg-blue-50 transition-colors shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowRightIcon, { className: "w-5 h-5 text-gray-400 group-hover:text-blue-600 transition-colors" }) }) })
34450
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-3 right-3 sm:bottom-4 sm:right-4", children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(outline.ArrowRightIcon, { className: "w-4 h-4 sm:w-5 sm:h-5 text-gray-400 group-hover:text-blue-600 transition-colors" }) }) })
33962
34451
  ]
33963
34452
  }
33964
34453
  );
@@ -34037,8 +34526,8 @@ var KPIsOverviewView = ({
34037
34526
  }
34038
34527
  if (error) {
34039
34528
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
34040
- /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
34041
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
34529
+ /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
34530
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
34042
34531
  BackButtonMinimal,
34043
34532
  {
34044
34533
  onClick: handleBackClick,
@@ -34047,9 +34536,9 @@ var KPIsOverviewView = ({
34047
34536
  "aria-label": "Navigate back to previous page"
34048
34537
  }
34049
34538
  ) }),
34050
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
34051
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
34052
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34539
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-center mt-2 sm:mt-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34540
+ /* @__PURE__ */ jsxRuntime.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" }),
34541
+ /* @__PURE__ */ jsxRuntime.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" })
34053
34542
  ] }) })
34054
34543
  ] }) }) }),
34055
34544
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-500", children: error }) }) })
@@ -34057,8 +34546,8 @@ var KPIsOverviewView = ({
34057
34546
  }
34058
34547
  if (lines.length === 0) {
34059
34548
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
34060
- /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
34061
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
34549
+ /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
34550
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
34062
34551
  BackButtonMinimal,
34063
34552
  {
34064
34553
  onClick: handleBackClick,
@@ -34067,9 +34556,9 @@ var KPIsOverviewView = ({
34067
34556
  "aria-label": "Navigate back to previous page"
34068
34557
  }
34069
34558
  ) }),
34070
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
34071
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
34072
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34559
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-center mt-2 sm:mt-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34560
+ /* @__PURE__ */ jsxRuntime.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" }),
34561
+ /* @__PURE__ */ jsxRuntime.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" })
34073
34562
  ] }) })
34074
34563
  ] }) }) }),
34075
34564
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
@@ -34079,9 +34568,9 @@ var KPIsOverviewView = ({
34079
34568
  ] });
34080
34569
  }
34081
34570
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
34082
- /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-3", children: [
34571
+ /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 sm:px-4 md:px-6 py-2 sm:py-3", children: [
34083
34572
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
34084
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
34573
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
34085
34574
  BackButtonMinimal,
34086
34575
  {
34087
34576
  onClick: handleBackClick,
@@ -34090,27 +34579,27 @@ var KPIsOverviewView = ({
34090
34579
  "aria-label": "Navigate back to previous page"
34091
34580
  }
34092
34581
  ) }),
34093
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
34094
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
34095
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34582
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-center mt-2 sm:mt-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34583
+ /* @__PURE__ */ jsxRuntime.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" }),
34584
+ /* @__PURE__ */ jsxRuntime.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" })
34096
34585
  ] }) })
34097
34586
  ] }),
34098
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-4", children: [
34099
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(ISTTimer_default, {}) }),
34100
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
34101
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium text-blue-600", children: formatLocalDate2(/* @__PURE__ */ new Date()) }),
34102
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
34103
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
34587
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4", children: [
34588
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(ISTTimer_default, {}) }),
34589
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
34590
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: formatLocalDate2(/* @__PURE__ */ new Date()) }),
34591
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
34592
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
34104
34593
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-blue-600", children: getShiftIcon(currentShiftDetails.shiftId) }),
34105
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-base font-medium text-blue-600", children: [
34594
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
34106
34595
  shiftName,
34107
34596
  " Shift"
34108
34597
  ] })
34109
34598
  ] })
34110
34599
  ] }) }),
34111
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-600 text-center mt-3", children: "Click on any line to view detailed performance metrics" })
34600
+ /* @__PURE__ */ jsxRuntime.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" })
34112
34601
  ] }) }),
34113
- /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 p-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
34602
+ /* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 p-3 sm:p-4 md:p-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
34114
34603
  LineCard,
34115
34604
  {
34116
34605
  line,
@@ -34130,14 +34619,14 @@ var HeaderRibbon = React19.memo(({
34130
34619
  shiftId,
34131
34620
  getShiftIcon,
34132
34621
  getShiftName
34133
- }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-4", children: [
34134
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(IsolatedTimer, {}) }),
34135
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
34136
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium text-blue-600", children: currentDate }),
34137
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
34138
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
34622
+ }) => /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-4", children: [
34623
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(IsolatedTimer, {}) }),
34624
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
34625
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: currentDate }),
34626
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
34627
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
34139
34628
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-blue-600", children: getShiftIcon(shiftId) }),
34140
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-base font-medium text-blue-600", children: [
34629
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
34141
34630
  getShiftName(shiftId),
34142
34631
  " Shift"
34143
34632
  ] })
@@ -34371,9 +34860,50 @@ var LeaderboardDetailView = React19.memo(({
34371
34860
  ] }) });
34372
34861
  }
34373
34862
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `min-h-screen bg-slate-50 flex flex-col ${className}`, children: [
34374
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-20 bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 sm:px-8 py-2 sm:py-2.5", children: [
34375
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
34376
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-auto sm:w-32", children: /* @__PURE__ */ jsxRuntime.jsx(
34863
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-20 bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 sm:px-6 md:px-8 py-2 sm:py-2.5", children: [
34864
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:hidden", children: [
34865
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
34866
+ /* @__PURE__ */ jsxRuntime.jsx(
34867
+ BackButtonMinimal,
34868
+ {
34869
+ onClick: handleBackClick,
34870
+ text: "Back",
34871
+ size: "sm",
34872
+ "aria-label": "Navigate back to previous page"
34873
+ }
34874
+ ),
34875
+ /* @__PURE__ */ jsxRuntime.jsxs(
34876
+ "button",
34877
+ {
34878
+ onClick: handleSortToggle,
34879
+ 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",
34880
+ children: [
34881
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Sort" }),
34882
+ /* @__PURE__ */ jsxRuntime.jsx(
34883
+ "svg",
34884
+ {
34885
+ className: "w-3.5 h-3.5 text-gray-600",
34886
+ xmlns: "http://www.w3.org/2000/svg",
34887
+ viewBox: "0 0 24 24",
34888
+ fill: "none",
34889
+ stroke: "currentColor",
34890
+ strokeWidth: "2",
34891
+ strokeLinecap: "round",
34892
+ strokeLinejoin: "round",
34893
+ children: sortAscending ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15l7-7 7 7" }) : /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 9l-7 7-7-7" })
34894
+ }
34895
+ )
34896
+ ]
34897
+ }
34898
+ )
34899
+ ] }),
34900
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
34901
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-base font-semibold text-gray-900", children: "Leaderboard" }),
34902
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1 w-1 rounded-full bg-green-500 animate-pulse ring-1 ring-green-500/30 ring-offset-1" })
34903
+ ] }) })
34904
+ ] }),
34905
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:flex items-center justify-between", children: [
34906
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-32", children: /* @__PURE__ */ jsxRuntime.jsx(
34377
34907
  BackButtonMinimal,
34378
34908
  {
34379
34909
  onClick: handleBackClick,
@@ -34382,17 +34912,17 @@ var LeaderboardDetailView = React19.memo(({
34382
34912
  "aria-label": "Navigate back to previous page"
34383
34913
  }
34384
34914
  ) }),
34385
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
34386
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Leaderboard" }),
34387
- /* @__PURE__ */ jsxRuntime.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" })
34915
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
34916
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "Leaderboard" }),
34917
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
34388
34918
  ] }),
34389
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-auto sm:w-32 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsxs(
34919
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-32 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsxs(
34390
34920
  "button",
34391
34921
  {
34392
34922
  onClick: handleSortToggle,
34393
- 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",
34923
+ 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",
34394
34924
  children: [
34395
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Sort by Efficiency" }),
34925
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Sort by Efficiency" }),
34396
34926
  /* @__PURE__ */ jsxRuntime.jsx(
34397
34927
  "svg",
34398
34928
  {
@@ -34901,48 +35431,113 @@ var BreakRow = React19.memo(({
34901
35431
  onRemove,
34902
35432
  index
34903
35433
  }) => {
34904
- return /* @__PURE__ */ jsxRuntime.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: [
34905
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
34906
- TimePickerDropdown,
34907
- {
34908
- value: breakItem.startTime,
34909
- onChange: (value) => onUpdate(index, "startTime", value),
34910
- placeholder: "Start time",
34911
- className: "w-full"
34912
- }
34913
- ) }),
34914
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
34915
- TimePickerDropdown,
34916
- {
34917
- value: breakItem.endTime,
34918
- onChange: (value) => onUpdate(index, "endTime", value),
34919
- placeholder: "End time",
34920
- className: "w-full"
34921
- }
34922
- ) }),
34923
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-gray-700", children: [
34924
- breakItem.duration,
34925
- " min"
34926
- ] }) }),
34927
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
34928
- "input",
34929
- {
34930
- type: "text",
34931
- value: breakItem.remarks || "",
34932
- onChange: (e) => onUpdate(index, "remarks", e.target.value),
34933
- placeholder: "Break remarks",
34934
- 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"
34935
- }
34936
- ) }),
34937
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
34938
- "button",
34939
- {
34940
- onClick: () => onRemove(index),
34941
- className: "text-gray-400 hover:text-red-500 focus:outline-none transition-colors",
34942
- "aria-label": "Remove break",
34943
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" })
34944
- }
34945
- ) })
35434
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
35435
+ /* @__PURE__ */ jsxRuntime.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: [
35436
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
35437
+ TimePickerDropdown,
35438
+ {
35439
+ value: breakItem.startTime,
35440
+ onChange: (value) => onUpdate(index, "startTime", value),
35441
+ placeholder: "Start time",
35442
+ className: "w-full"
35443
+ }
35444
+ ) }),
35445
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
35446
+ TimePickerDropdown,
35447
+ {
35448
+ value: breakItem.endTime,
35449
+ onChange: (value) => onUpdate(index, "endTime", value),
35450
+ placeholder: "End time",
35451
+ className: "w-full"
35452
+ }
35453
+ ) }),
35454
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-gray-700", children: [
35455
+ breakItem.duration,
35456
+ " min"
35457
+ ] }) }),
35458
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
35459
+ "input",
35460
+ {
35461
+ type: "text",
35462
+ value: breakItem.remarks || "",
35463
+ onChange: (e) => onUpdate(index, "remarks", e.target.value),
35464
+ placeholder: "Break remarks",
35465
+ 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"
35466
+ }
35467
+ ) }),
35468
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
35469
+ "button",
35470
+ {
35471
+ onClick: () => onRemove(index),
35472
+ className: "text-gray-400 hover:text-red-500 focus:outline-none transition-colors",
35473
+ "aria-label": "Remove break",
35474
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" })
35475
+ }
35476
+ ) })
35477
+ ] }),
35478
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:hidden bg-white border border-gray-200 rounded-lg p-3 mb-3 space-y-3", children: [
35479
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
35480
+ /* @__PURE__ */ jsxRuntime.jsxs("h5", { className: "text-sm font-medium text-gray-700", children: [
35481
+ "Break ",
35482
+ index + 1
35483
+ ] }),
35484
+ /* @__PURE__ */ jsxRuntime.jsx(
35485
+ "button",
35486
+ {
35487
+ onClick: () => onRemove(index),
35488
+ className: "text-gray-400 hover:text-red-500 focus:outline-none transition-colors p-1",
35489
+ "aria-label": "Remove break",
35490
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" })
35491
+ }
35492
+ )
35493
+ ] }),
35494
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
35495
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
35496
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-gray-600 mb-1", children: "Start Time" }),
35497
+ /* @__PURE__ */ jsxRuntime.jsx(
35498
+ TimePickerDropdown,
35499
+ {
35500
+ value: breakItem.startTime,
35501
+ onChange: (value) => onUpdate(index, "startTime", value),
35502
+ placeholder: "Start time",
35503
+ className: "w-full"
35504
+ }
35505
+ )
35506
+ ] }),
35507
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
35508
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-gray-600 mb-1", children: "End Time" }),
35509
+ /* @__PURE__ */ jsxRuntime.jsx(
35510
+ TimePickerDropdown,
35511
+ {
35512
+ value: breakItem.endTime,
35513
+ onChange: (value) => onUpdate(index, "endTime", value),
35514
+ placeholder: "End time",
35515
+ className: "w-full"
35516
+ }
35517
+ )
35518
+ ] })
35519
+ ] }),
35520
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
35521
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-gray-600 mb-1", children: "Duration" }),
35522
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-gray-700 font-medium px-3 py-2 bg-gray-100 rounded-md text-center", children: [
35523
+ breakItem.duration,
35524
+ " minutes"
35525
+ ] })
35526
+ ] }),
35527
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
35528
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-gray-600 mb-1", children: "Remarks (Optional)" }),
35529
+ /* @__PURE__ */ jsxRuntime.jsx(
35530
+ "input",
35531
+ {
35532
+ type: "text",
35533
+ value: breakItem.remarks || "",
35534
+ onChange: (e) => onUpdate(index, "remarks", e.target.value),
35535
+ placeholder: "Add optional remarks...",
35536
+ 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"
35537
+ }
35538
+ )
35539
+ ] })
35540
+ ] })
34946
35541
  ] });
34947
35542
  });
34948
35543
  BreakRow.displayName = "BreakRow";
@@ -34975,35 +35570,35 @@ var ShiftPanel = React19.memo(({
34975
35570
  console.error("Error saving panel state to localStorage:", error);
34976
35571
  }
34977
35572
  };
34978
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-lg shadow-sm mb-6 transition-all duration-300 w-full border border-gray-200", children: [
35573
+ return /* @__PURE__ */ jsxRuntime.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: [
34979
35574
  /* @__PURE__ */ jsxRuntime.jsx(
34980
35575
  "div",
34981
35576
  {
34982
- className: "p-4 w-full cursor-pointer hover:bg-gray-50/50 transition-all duration-200",
35577
+ className: "p-3 sm:p-4 w-full cursor-pointer hover:bg-gray-50/50 transition-all duration-200",
34983
35578
  onClick: toggleMinimize,
34984
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full", children: [
35579
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between w-full gap-2 sm:gap-0", children: [
34985
35580
  /* @__PURE__ */ jsxRuntime.jsxs(
34986
35581
  "button",
34987
35582
  {
34988
35583
  onClick: toggleMinimize,
34989
- 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",
35584
+ 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",
34990
35585
  "aria-expanded": !isMinimized,
34991
35586
  "aria-controls": panelId,
34992
35587
  children: [
34993
35588
  /* @__PURE__ */ jsxRuntime.jsx(
34994
35589
  lucideReact.ChevronDown,
34995
35590
  {
34996
- className: `w-5 h-5 text-blue-500 transform transition-transform duration-200 ${isMinimized ? "" : "rotate-180"}`
35591
+ className: `w-4 h-4 sm:w-5 sm:h-5 text-blue-500 transform transition-transform duration-200 ${isMinimized ? "" : "rotate-180"}`
34997
35592
  }
34998
35593
  ),
34999
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
35000
- icon,
35001
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-gray-900 group-hover:text-blue-600", children: title })
35594
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
35595
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-4 h-4 sm:w-5 sm:h-5", children: icon }),
35596
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base sm:text-lg font-semibold text-gray-900 group-hover:text-blue-600", children: title })
35002
35597
  ] })
35003
35598
  ]
35004
35599
  }
35005
35600
  ),
35006
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-gray-600 mr-2", children: [
35601
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm font-medium text-gray-600 text-center sm:text-right sm:mr-2", children: [
35007
35602
  "Total Shift Hours: ",
35008
35603
  shiftHours,
35009
35604
  " hours"
@@ -35011,10 +35606,10 @@ var ShiftPanel = React19.memo(({
35011
35606
  ] })
35012
35607
  }
35013
35608
  ),
35014
- !isMinimized && /* @__PURE__ */ jsxRuntime.jsxs("div", { id: panelId, className: "p-4 sm:p-6 border-t border-gray-200 w-full bg-white", children: [
35015
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6 mb-6 w-full", children: [
35609
+ !isMinimized && /* @__PURE__ */ jsxRuntime.jsxs("div", { id: panelId, className: "p-3 sm:p-4 md:p-6 border-t border-gray-200 w-full bg-white", children: [
35610
+ /* @__PURE__ */ jsxRuntime.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: [
35016
35611
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
35017
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: "Shift Start Time" }),
35612
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs sm:text-sm font-medium text-gray-700 mb-1", children: "Shift Start Time" }),
35018
35613
  /* @__PURE__ */ jsxRuntime.jsx(
35019
35614
  TimePickerDropdown,
35020
35615
  {
@@ -35026,7 +35621,7 @@ var ShiftPanel = React19.memo(({
35026
35621
  )
35027
35622
  ] }),
35028
35623
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
35029
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: "Shift End Time" }),
35624
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs sm:text-sm font-medium text-gray-700 mb-1", children: "Shift End Time" }),
35030
35625
  /* @__PURE__ */ jsxRuntime.jsx(
35031
35626
  TimePickerDropdown,
35032
35627
  {
@@ -35039,12 +35634,12 @@ var ShiftPanel = React19.memo(({
35039
35634
  ] })
35040
35635
  ] }),
35041
35636
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 w-full", children: [
35042
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mb-3 w-full", children: /* @__PURE__ */ jsxRuntime.jsxs("h4", { className: "text-md font-medium text-gray-700 flex items-center gap-2 mb-2 sm:mb-0", children: [
35043
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Coffee, { className: "w-4 h-4" }),
35637
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mb-3 w-full", children: /* @__PURE__ */ jsxRuntime.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: [
35638
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Coffee, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4" }),
35044
35639
  "Breaks"
35045
35640
  ] }) }),
35046
35641
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2 mb-4 w-full", children: breaks.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
35047
- /* @__PURE__ */ jsxRuntime.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: [
35642
+ /* @__PURE__ */ jsxRuntime.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: [
35048
35643
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: "Break Start" }),
35049
35644
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: "Break End" }),
35050
35645
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: "Duration" }),
@@ -35061,7 +35656,7 @@ var ShiftPanel = React19.memo(({
35061
35656
  },
35062
35657
  index
35063
35658
  )) })
35064
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-500 py-3 text-center bg-gray-50 rounded-md", children: "No breaks added yet" }) }),
35659
+ ] }) : /* @__PURE__ */ jsxRuntime.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" }) }),
35065
35660
  /* @__PURE__ */ jsxRuntime.jsxs(
35066
35661
  "button",
35067
35662
  {
@@ -35069,9 +35664,9 @@ var ShiftPanel = React19.memo(({
35069
35664
  e.stopPropagation();
35070
35665
  onBreakAdd();
35071
35666
  },
35072
- 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",
35667
+ 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",
35073
35668
  children: [
35074
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "w-4 h-4" }),
35669
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "w-3.5 h-3.5 sm:w-4 sm:h-4" }),
35075
35670
  "Add Break"
35076
35671
  ]
35077
35672
  }
@@ -35439,8 +36034,8 @@ var ShiftsView = ({
35439
36034
  }
35440
36035
  }, [lineConfigs, supabase, showToast]);
35441
36036
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `min-h-screen bg-slate-50 ${className}`, children: [
35442
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 sm:px-8 py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
35443
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
36037
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 sm:px-4 md:px-6 lg:px-8 py-3 sm:py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
36038
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
35444
36039
  BackButtonMinimal,
35445
36040
  {
35446
36041
  onClick: () => onBackClick ? onBackClick() : window.history.back(),
@@ -35449,14 +36044,14 @@ var ShiftsView = ({
35449
36044
  "aria-label": "Navigate back to previous page"
35450
36045
  }
35451
36046
  ) }),
35452
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col items-center", children: [
35453
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shift Management" }),
35454
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 mt-1", children: "Configure day and night shift timings and breaks for each production line" })
36047
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col items-center mt-2 sm:mt-0", children: [
36048
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900 text-center", children: "Shift Management" }),
36049
+ /* @__PURE__ */ jsxRuntime.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" })
35455
36050
  ] }),
35456
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0 w-24" })
36051
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block absolute right-0 w-24" })
35457
36052
  ] }) }) }),
35458
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 sm:p-6 md:p-8", children: [
35459
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("p", { className: "text-xs sm:text-sm text-blue-700 font-medium", children: "Changes will affect production targets and output calculations." }) }),
36053
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 sm:p-4 md:p-6 lg:p-8", children: [
36054
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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." }) }),
35460
36055
  loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-xl p-8 shadow text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "animate-pulse flex flex-col items-center", children: [
35461
36056
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 rounded-full bg-blue-200 mb-4" }),
35462
36057
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-48 bg-gray-200 rounded mb-2" }),
@@ -35465,17 +36060,19 @@ var ShiftsView = ({
35465
36060
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-red-500 mb-2", children: "Error loading shift configurations" }),
35466
36061
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500", children: error })
35467
36062
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4 sm:space-y-6", children: lineConfigs.map((config) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-all duration-200 w-full", children: [
35468
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3 sm:gap-0", children: [
35469
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
35470
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "w-5 h-5 text-gray-600" }),
35471
- /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-lg font-semibold text-gray-800", children: [
36063
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 sm:px-5 md:px-6 py-3 sm:py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3 sm:gap-0", children: [
36064
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
36065
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "w-4 h-4 sm:w-5 sm:h-5 text-gray-600" }),
36066
+ /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-base sm:text-lg font-semibold text-gray-800", children: [
35472
36067
  config.name,
35473
36068
  " Shifts"
35474
36069
  ] })
35475
36070
  ] }),
35476
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-4", children: [
35477
- config.isSaving && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-blue-600", children: "Saving..." }),
35478
- config.saveSuccess && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-green-600", children: "Saved!" }),
36071
+ /* @__PURE__ */ jsxRuntime.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: [
36072
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
36073
+ config.isSaving && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm font-medium text-blue-600", children: "Saving..." }),
36074
+ config.saveSuccess && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm font-medium text-green-600", children: "Saved!" })
36075
+ ] }),
35479
36076
  /* @__PURE__ */ jsxRuntime.jsxs(
35480
36077
  "button",
35481
36078
  {
@@ -35485,7 +36082,7 @@ var ShiftsView = ({
35485
36082
  e.stopPropagation();
35486
36083
  handleSaveShifts(config.id);
35487
36084
  },
35488
- 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",
36085
+ 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",
35489
36086
  disabled: config.isSaving,
35490
36087
  "aria-label": "Save shift configuration",
35491
36088
  children: [
@@ -35496,7 +36093,7 @@ var ShiftsView = ({
35496
36093
  )
35497
36094
  ] })
35498
36095
  ] }) }),
35499
- /* @__PURE__ */ jsxRuntime.jsxs("div", { id: `shift-panel-${config.id}`, className: "p-3 sm:p-6 border-t border-gray-200 w-full", children: [
36096
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { id: `shift-panel-${config.id}`, className: "p-3 sm:p-4 md:p-6 border-t border-gray-200 w-full", children: [
35500
36097
  /* @__PURE__ */ jsxRuntime.jsx(
35501
36098
  ShiftPanel,
35502
36099
  {
@@ -36277,54 +36874,105 @@ var SKUList = ({
36277
36874
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Get started by creating a new SKU for production planning." })
36278
36875
  ] }) });
36279
36876
  }
36280
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-gray-200", children: [
36281
- /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
36282
- /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "SKU ID" }),
36283
- /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Production Target" }),
36284
- /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Attributes" }),
36285
- /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Status" }),
36286
- /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Created" }),
36287
- /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "relative px-6 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Actions" }) })
36288
- ] }) }),
36289
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: skus.map((sku) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "hover:bg-gray-50 transition-colors duration-150", children: [
36290
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-gray-900", children: sku.sku_id }) }),
36291
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm font-medium text-gray-700", children: [
36292
- sku.production_target.toLocaleString(),
36293
- " units/day"
36877
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
36878
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden lg:block bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-gray-200", children: [
36879
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
36880
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "SKU ID" }),
36881
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Production Target" }),
36882
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Attributes" }),
36883
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Status" }),
36884
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", children: "Created" }),
36885
+ /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: "relative px-6 py-3", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Actions" }) })
36294
36886
  ] }) }),
36295
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-500", children: Object.keys(sku.attributes || {}).length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: "No attributes" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-xs truncate", children: Object.entries(sku.attributes).map(([key, value], index) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
36296
- index > 0 && ", ",
36297
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium", children: [
36298
- key,
36299
- ":"
36887
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: skus.map((sku) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "hover:bg-gray-50 transition-colors duration-150", children: [
36888
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-gray-900", children: sku.sku_id }) }),
36889
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm font-medium text-gray-700", children: [
36890
+ sku.production_target.toLocaleString(),
36891
+ " units/day"
36892
+ ] }) }),
36893
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-500", children: Object.keys(sku.attributes || {}).length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400", children: "No attributes" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-xs truncate", children: Object.entries(sku.attributes).map(([key, value], index) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
36894
+ index > 0 && ", ",
36895
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium", children: [
36896
+ key,
36897
+ ":"
36898
+ ] }),
36899
+ " ",
36900
+ String(value)
36901
+ ] }, key)) }) }) }),
36902
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.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" }) }),
36903
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-500", children: new Date(sku.created_at).toLocaleDateString() }),
36904
+ /* @__PURE__ */ jsxRuntime.jsxs("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium", children: [
36905
+ /* @__PURE__ */ jsxRuntime.jsx(
36906
+ "button",
36907
+ {
36908
+ onClick: () => onEdit(sku),
36909
+ className: "text-blue-600 hover:text-blue-800 mr-3 transition-colors duration-150 p-1 hover:bg-blue-50 rounded",
36910
+ title: "Edit SKU",
36911
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit2, { className: "w-4 h-4" })
36912
+ }
36913
+ ),
36914
+ /* @__PURE__ */ jsxRuntime.jsx(
36915
+ "button",
36916
+ {
36917
+ onClick: () => onDelete(sku),
36918
+ className: "text-red-600 hover:text-red-800 transition-colors duration-150 p-1 hover:bg-red-50 rounded",
36919
+ title: "Delete SKU",
36920
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-4 h-4" })
36921
+ }
36922
+ )
36923
+ ] })
36924
+ ] }, sku.id)) })
36925
+ ] }) }) }),
36926
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:hidden space-y-3 sm:space-y-4", children: skus.map((sku) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-xl shadow-sm border border-gray-200 p-4 hover:shadow-md transition-all duration-200", children: [
36927
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-3", children: [
36928
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
36929
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base sm:text-lg font-semibold text-gray-900 truncate", children: sku.sku_id }),
36930
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsxRuntime.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" }) })
36300
36931
  ] }),
36301
- " ",
36302
- String(value)
36303
- ] }, key)) }) }) }),
36304
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.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" }) }),
36305
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-500", children: new Date(sku.created_at).toLocaleDateString() }),
36306
- /* @__PURE__ */ jsxRuntime.jsxs("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium", children: [
36307
- /* @__PURE__ */ jsxRuntime.jsx(
36308
- "button",
36309
- {
36310
- onClick: () => onEdit(sku),
36311
- className: "text-blue-600 hover:text-blue-800 mr-3 transition-colors duration-150 p-1 hover:bg-blue-50 rounded",
36312
- title: "Edit SKU",
36313
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit2, { className: "w-4 h-4" })
36314
- }
36315
- ),
36316
- /* @__PURE__ */ jsxRuntime.jsx(
36317
- "button",
36318
- {
36319
- onClick: () => onDelete(sku),
36320
- className: "text-red-600 hover:text-red-800 transition-colors duration-150 p-1 hover:bg-red-50 rounded",
36321
- title: "Delete SKU",
36322
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-4 h-4" })
36323
- }
36324
- )
36932
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 ml-3", children: [
36933
+ /* @__PURE__ */ jsxRuntime.jsx(
36934
+ "button",
36935
+ {
36936
+ onClick: () => onEdit(sku),
36937
+ className: "text-blue-600 hover:text-blue-800 transition-colors duration-150 p-2 hover:bg-blue-50 rounded-lg",
36938
+ title: "Edit SKU",
36939
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit2, { className: "w-4 h-4" })
36940
+ }
36941
+ ),
36942
+ /* @__PURE__ */ jsxRuntime.jsx(
36943
+ "button",
36944
+ {
36945
+ onClick: () => onDelete(sku),
36946
+ className: "text-red-600 hover:text-red-800 transition-colors duration-150 p-2 hover:bg-red-50 rounded-lg",
36947
+ title: "Delete SKU",
36948
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "w-4 h-4" })
36949
+ }
36950
+ )
36951
+ ] })
36952
+ ] }),
36953
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
36954
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1", children: "Production Target" }),
36955
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm sm:text-base font-medium text-gray-700", children: [
36956
+ sku.production_target.toLocaleString(),
36957
+ " units/day"
36958
+ ] })
36959
+ ] }),
36960
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3", children: [
36961
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider mb-1", children: "Attributes" }),
36962
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-gray-500", children: Object.keys(sku.attributes || {}).length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400 italic", children: "No attributes" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: Object.entries(sku.attributes).map(([key, value]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
36963
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium text-gray-600", children: [
36964
+ key,
36965
+ ":"
36966
+ ] }),
36967
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-900", children: String(value) })
36968
+ ] }, key)) }) })
36969
+ ] }),
36970
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-gray-500", children: [
36971
+ "Created: ",
36972
+ new Date(sku.created_at).toLocaleDateString()
36325
36973
  ] })
36326
36974
  ] }, sku.id)) })
36327
- ] }) }) });
36975
+ ] });
36328
36976
  };
36329
36977
  var TargetsViewUI = ({
36330
36978
  isLoading,
@@ -36357,8 +37005,8 @@ var TargetsViewUI = ({
36357
37005
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-screen bg-gray-50", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "lg", message: "Loading targets..." }) }) });
36358
37006
  }
36359
37007
  return /* @__PURE__ */ jsxRuntime.jsxs("main", { className: "min-h-screen flex-1 bg-gray-50", children: [
36360
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white px-8 py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between relative", children: [
36361
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
37008
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 sm:gap-4 relative", children: [
37009
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
36362
37010
  BackButtonMinimal,
36363
37011
  {
36364
37012
  onClick: onBack,
@@ -36367,30 +37015,30 @@ var TargetsViewUI = ({
36367
37015
  "aria-label": "Navigate back to previous page"
36368
37016
  }
36369
37017
  ) }),
36370
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
37018
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:right-0 w-full sm:w-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(
36371
37019
  "button",
36372
37020
  {
36373
- 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",
37021
+ 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",
36374
37022
  onClick: onToggleBulkConfigure,
36375
37023
  children: [
36376
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { className: "w-4 h-4 mr-2 inline-block" }),
37024
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { className: "w-3 h-3 sm:w-4 sm:h-4 mr-1.5 sm:mr-2 inline-block" }),
36377
37025
  "Bulk Configure"
36378
37026
  ]
36379
37027
  }
36380
37028
  ) }),
36381
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-center mx-auto", children: [
36382
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Production Targets" }),
36383
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Configure production targets and metrics for each line and workspace" })
37029
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-center mx-auto mt-2 sm:mt-0", children: [
37030
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "Production Targets" }),
37031
+ /* @__PURE__ */ jsxRuntime.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" })
36384
37032
  ] })
36385
37033
  ] }) }),
36386
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-8 py-6", children: [
36387
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("p", { className: "text-sm text-blue-700 font-medium", children: "Click on a line to expand and configure individual workspace targets." }) }),
36388
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-6 flex justify-center relative", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex bg-gray-100 p-1 rounded-lg", children: [
37034
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 sm:px-6 md:px-8 py-4 sm:py-5 md:py-6", children: [
37035
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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." }) }),
37036
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4 sm:mb-6 flex justify-center relative", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex bg-gray-100 p-1 rounded-lg w-full max-w-xs sm:w-auto", children: [
36389
37037
  /* @__PURE__ */ jsxRuntime.jsx(
36390
37038
  "button",
36391
37039
  {
36392
37040
  onClick: () => onShiftChange(0),
36393
- 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"}`,
37041
+ 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"}`,
36394
37042
  children: "Day Shift"
36395
37043
  }
36396
37044
  ),
@@ -36398,7 +37046,7 @@ var TargetsViewUI = ({
36398
37046
  "button",
36399
37047
  {
36400
37048
  onClick: () => onShiftChange(1),
36401
- 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"}`,
37049
+ 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"}`,
36402
37050
  children: "Night Shift"
36403
37051
  }
36404
37052
  )
@@ -36408,35 +37056,37 @@ var TargetsViewUI = ({
36408
37056
  {
36409
37057
  className: "bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-all duration-200",
36410
37058
  children: [
36411
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
36412
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-6", children: [
37059
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 sm:px-4 md:px-6 py-3 sm:py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row lg:items-center justify-between gap-3 lg:gap-4", children: [
37060
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4 lg:gap-6", children: [
36413
37061
  /* @__PURE__ */ jsxRuntime.jsxs(
36414
37062
  "button",
36415
37063
  {
36416
37064
  onClick: () => onToggleLineDropdown(lineId),
36417
- 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",
37065
+ 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",
36418
37066
  "aria-expanded": dropdownStates[lineId],
36419
37067
  "aria-controls": `line-${lineId}-content`,
36420
37068
  children: [
36421
37069
  /* @__PURE__ */ jsxRuntime.jsx(
36422
37070
  lucideReact.ChevronDown,
36423
37071
  {
36424
- className: `w-5 h-5 text-blue-500 transform transition-transform duration-200 ${dropdownStates[lineId] ? "rotate-180" : ""}`
37072
+ className: `w-4 h-4 sm:w-5 sm:h-5 text-blue-500 transform transition-transform duration-200 ${dropdownStates[lineId] ? "rotate-180" : ""}`
36425
37073
  }
36426
37074
  ),
36427
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5", children: [
36428
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg text-gray-900 group-hover:text-blue-600", children: lineNames[lineId] || lineId }),
36429
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-normal text-gray-400", children: "\u2022" }),
36430
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-gray-500", children: [
36431
- line.workspaces.length,
36432
- " workspaces"
37075
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2.5", children: [
37076
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base sm:text-lg text-gray-900 group-hover:text-blue-600", children: lineNames[lineId] || lineId }),
37077
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
37078
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline text-sm font-normal text-gray-400", children: "\u2022" }),
37079
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm font-medium text-gray-500", children: [
37080
+ line.workspaces.length,
37081
+ " workspaces"
37082
+ ] })
36433
37083
  ] })
36434
37084
  ] })
36435
37085
  ]
36436
37086
  }
36437
37087
  ),
36438
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-px bg-gray-200/80" }),
36439
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 text-sm font-medium text-gray-600", children: [
37088
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden lg:block h-8 w-px bg-gray-200/80" }),
37089
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3 ml-0 sm:ml-2 lg:ml-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs sm:text-sm font-medium text-gray-600", children: [
36440
37090
  line.shiftStartTime,
36441
37091
  " \u2013 ",
36442
37092
  line.shiftEndTime,
@@ -36445,9 +37095,9 @@ var TargetsViewUI = ({
36445
37095
  " hours"
36446
37096
  ] }) })
36447
37097
  ] }),
36448
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
36449
- saveSuccess[lineId] && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-green-600 font-medium flex items-center gap-1.5", children: [
36450
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "w-4 h-4" }),
37098
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 sm:gap-4", children: [
37099
+ saveSuccess[lineId] && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm text-green-600 font-medium flex items-center gap-1.5", children: [
37100
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "w-3 h-3 sm:w-4 sm:h-4" }),
36451
37101
  "Saved successfully"
36452
37102
  ] }),
36453
37103
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -36455,13 +37105,13 @@ var TargetsViewUI = ({
36455
37105
  {
36456
37106
  onClick: () => onSaveLine(lineId),
36457
37107
  disabled: savingLines[lineId],
36458
- className: `ml-6 inline-flex items-center px-4 py-2 text-sm font-medium rounded-lg transition-all duration-200
37108
+ 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
36459
37109
  ${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"}`,
36460
37110
  children: savingLines[lineId] ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
36461
- /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "sm", className: "mr-2" }),
37111
+ /* @__PURE__ */ jsxRuntime.jsx(OptifyeLogoLoader_default, { size: "sm", className: "mr-1.5 sm:mr-2" }),
36462
37112
  "Saving..."
36463
37113
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
36464
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Save, { className: "w-4 h-4 mr-2" }),
37114
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Save, { className: "w-3 h-3 sm:w-4 sm:h-4 mr-1.5 sm:mr-2" }),
36465
37115
  "Save Changes"
36466
37116
  ] })
36467
37117
  }
@@ -36469,9 +37119,9 @@ var TargetsViewUI = ({
36469
37119
  ] })
36470
37120
  ] }) }),
36471
37121
  dropdownStates[lineId] && /* @__PURE__ */ jsxRuntime.jsxs("div", { id: `line-${lineId}-content`, className: "border-t border-gray-200", children: [
36472
- skuEnabled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-4 border-b border-gray-200 bg-gray-50/50", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
36473
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: `sku-${lineId}`, className: "text-sm font-medium text-gray-700", children: "Select SKU:" }),
36474
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 max-w-md", children: /* @__PURE__ */ jsxRuntime.jsx(
37122
+ skuEnabled && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4", children: [
37123
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: `sku-${lineId}`, className: "text-sm font-medium text-gray-700 flex-shrink-0", children: "Select SKU:" }),
37124
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 max-w-full sm:max-w-md", children: /* @__PURE__ */ jsxRuntime.jsx(
36475
37125
  SKUSelector,
36476
37126
  {
36477
37127
  onSelect: (sku) => onUpdateSelectedSKU?.(lineId, sku),
@@ -36482,14 +37132,14 @@ var TargetsViewUI = ({
36482
37132
  className: "w-full"
36483
37133
  }
36484
37134
  ) }),
36485
- line.selectedSKU && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-gray-600", children: [
37135
+ line.selectedSKU && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs sm:text-sm text-gray-600 mt-2 sm:mt-0", children: [
36486
37136
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Production Target:" }),
36487
37137
  " ",
36488
37138
  line.selectedSKU.production_target.toLocaleString(),
36489
37139
  " units/day"
36490
37140
  ] })
36491
37141
  ] }) }),
36492
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-3 bg-gray-50 border-b border-gray-200", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-6 text-sm font-medium text-gray-600", children: [
37142
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden lg:block px-6 py-3 bg-gray-50 border-b border-gray-200", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-6 text-sm font-medium text-gray-600", children: [
36493
37143
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: "Workspace" }),
36494
37144
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: "Action Type" }),
36495
37145
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-3", children: [
@@ -36507,76 +37157,170 @@ var TargetsViewUI = ({
36507
37157
  ] }) }),
36508
37158
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-100", children: line.workspaces.map((workspace) => {
36509
37159
  const formattedName = formatWorkspaceName(workspace.name, lineId);
36510
- return /* @__PURE__ */ jsxRuntime.jsx(
37160
+ return /* @__PURE__ */ jsxRuntime.jsxs(
36511
37161
  "div",
36512
37162
  {
36513
- className: "px-6 py-4 hover:bg-gray-50 transition-all duration-200",
36514
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-6 items-center", children: [
36515
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: onUpdateWorkspaceDisplayName ? /* @__PURE__ */ jsxRuntime.jsx(
36516
- InlineEditableText,
36517
- {
36518
- value: formattedName,
36519
- onSave: async (newName) => {
36520
- await onUpdateWorkspaceDisplayName(workspace.id, newName);
36521
- },
36522
- placeholder: "Workspace name",
36523
- className: "font-medium text-gray-900",
36524
- inputClassName: "min-w-[120px]"
36525
- }
36526
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-gray-900", children: formattedName }) }),
36527
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
36528
- "select",
36529
- {
36530
- value: workspace.actionType,
36531
- onChange: (e) => {
36532
- const newActionType = e.target.value;
36533
- onActionTypeChange(lineId, workspace.id, newActionType);
36534
- },
36535
- className: "w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",
36536
- "aria-label": `Action type for ${formattedName}`,
36537
- children: [
36538
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "assembly", className: "py-2", children: "Assembly" }),
36539
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "packaging", className: "py-2", children: "Packaging" })
36540
- ]
36541
- }
36542
- ) }),
36543
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
36544
- "input",
36545
- {
36546
- type: "number",
36547
- value: workspace.targetCycleTime === 0 ? "" : workspace.targetCycleTime,
36548
- onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetCycleTime", Number(e.target.value) || ""),
36549
- 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",
36550
- min: "0",
36551
- step: "0.01",
36552
- placeholder: "Enter cycle time"
36553
- }
36554
- ) }),
36555
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
36556
- "input",
36557
- {
36558
- type: "number",
36559
- value: workspace.targetPPH === 0 ? "" : workspace.targetPPH,
36560
- onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetPPH", Number(e.target.value) || ""),
36561
- 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",
36562
- min: "0",
36563
- step: "0.1",
36564
- placeholder: "Enter PPH"
36565
- }
36566
- ) }),
36567
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsx(
36568
- "input",
36569
- {
36570
- type: "number",
36571
- value: workspace.targetDayOutput === 0 ? "" : workspace.targetDayOutput,
36572
- onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetDayOutput", Number(e.target.value) || ""),
36573
- 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",
36574
- min: "0",
36575
- step: "1",
36576
- placeholder: "Enter day output"
36577
- }
36578
- ) })
36579
- ] })
37163
+ className: "px-3 sm:px-4 lg:px-6 py-3 sm:py-4 hover:bg-gray-50 transition-all duration-200",
37164
+ children: [
37165
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden lg:grid lg:grid-cols-12 lg:gap-6 lg:items-center", children: [
37166
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: onUpdateWorkspaceDisplayName ? /* @__PURE__ */ jsxRuntime.jsx(
37167
+ InlineEditableText,
37168
+ {
37169
+ value: formattedName,
37170
+ onSave: async (newName) => {
37171
+ await onUpdateWorkspaceDisplayName(workspace.id, newName);
37172
+ },
37173
+ placeholder: "Workspace name",
37174
+ className: "font-medium text-gray-900",
37175
+ inputClassName: "min-w-[120px]"
37176
+ }
37177
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-gray-900", children: formattedName }) }),
37178
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
37179
+ "select",
37180
+ {
37181
+ value: workspace.actionType,
37182
+ onChange: (e) => {
37183
+ const newActionType = e.target.value;
37184
+ onActionTypeChange(lineId, workspace.id, newActionType);
37185
+ },
37186
+ className: "w-full p-2 border border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",
37187
+ "aria-label": `Action type for ${formattedName}`,
37188
+ children: [
37189
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "assembly", className: "py-2", children: "Assembly" }),
37190
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "packaging", className: "py-2", children: "Packaging" })
37191
+ ]
37192
+ }
37193
+ ) }),
37194
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
37195
+ "input",
37196
+ {
37197
+ type: "number",
37198
+ value: workspace.targetCycleTime === 0 ? "" : workspace.targetCycleTime,
37199
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetCycleTime", Number(e.target.value) || ""),
37200
+ 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",
37201
+ min: "0",
37202
+ step: "0.01",
37203
+ placeholder: "Enter cycle time"
37204
+ }
37205
+ ) }),
37206
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: /* @__PURE__ */ jsxRuntime.jsx(
37207
+ "input",
37208
+ {
37209
+ type: "number",
37210
+ value: workspace.targetPPH === 0 ? "" : workspace.targetPPH,
37211
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetPPH", Number(e.target.value) || ""),
37212
+ 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",
37213
+ min: "0",
37214
+ step: "0.1",
37215
+ placeholder: "Enter PPH"
37216
+ }
37217
+ ) }),
37218
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: /* @__PURE__ */ jsxRuntime.jsx(
37219
+ "input",
37220
+ {
37221
+ type: "number",
37222
+ value: workspace.targetDayOutput === 0 ? "" : workspace.targetDayOutput,
37223
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetDayOutput", Number(e.target.value) || ""),
37224
+ 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",
37225
+ min: "0",
37226
+ step: "1",
37227
+ placeholder: "Enter day output"
37228
+ }
37229
+ ) })
37230
+ ] }),
37231
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:hidden space-y-4", children: [
37232
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
37233
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-700", children: "Workspace" }),
37234
+ onUpdateWorkspaceDisplayName ? /* @__PURE__ */ jsxRuntime.jsx(
37235
+ InlineEditableText,
37236
+ {
37237
+ value: formattedName,
37238
+ onSave: async (newName) => {
37239
+ await onUpdateWorkspaceDisplayName(workspace.id, newName);
37240
+ },
37241
+ placeholder: "Workspace name",
37242
+ className: "font-medium text-gray-900 text-base",
37243
+ inputClassName: "min-w-full"
37244
+ }
37245
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-gray-900 text-base", children: formattedName })
37246
+ ] }),
37247
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
37248
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-700", children: "Action Type" }),
37249
+ /* @__PURE__ */ jsxRuntime.jsxs(
37250
+ "select",
37251
+ {
37252
+ value: workspace.actionType,
37253
+ onChange: (e) => {
37254
+ const newActionType = e.target.value;
37255
+ onActionTypeChange(lineId, workspace.id, newActionType);
37256
+ },
37257
+ className: "w-full p-3 border border-gray-300 rounded-lg shadow-sm focus:ring-blue-500 focus:border-blue-500 text-sm",
37258
+ "aria-label": `Action type for ${formattedName}`,
37259
+ children: [
37260
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "assembly", children: "Assembly" }),
37261
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "packaging", children: "Packaging" })
37262
+ ]
37263
+ }
37264
+ )
37265
+ ] }),
37266
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
37267
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
37268
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "text-sm font-medium text-gray-700", children: [
37269
+ "Target Cycle Time",
37270
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs text-gray-400", children: "seconds per piece" })
37271
+ ] }),
37272
+ /* @__PURE__ */ jsxRuntime.jsx(
37273
+ "input",
37274
+ {
37275
+ type: "number",
37276
+ value: workspace.targetCycleTime === 0 ? "" : workspace.targetCycleTime,
37277
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetCycleTime", Number(e.target.value) || ""),
37278
+ 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",
37279
+ min: "0",
37280
+ step: "0.01",
37281
+ placeholder: "Enter cycle time"
37282
+ }
37283
+ )
37284
+ ] }),
37285
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
37286
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "text-sm font-medium text-gray-700", children: [
37287
+ "Target PPH",
37288
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs text-gray-400", children: "pieces per hour" })
37289
+ ] }),
37290
+ /* @__PURE__ */ jsxRuntime.jsx(
37291
+ "input",
37292
+ {
37293
+ type: "number",
37294
+ value: workspace.targetPPH === 0 ? "" : workspace.targetPPH,
37295
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetPPH", Number(e.target.value) || ""),
37296
+ 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",
37297
+ min: "0",
37298
+ step: "0.1",
37299
+ placeholder: "Enter PPH"
37300
+ }
37301
+ )
37302
+ ] })
37303
+ ] }),
37304
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
37305
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "text-sm font-medium text-gray-700", children: [
37306
+ "Total Day Output",
37307
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs text-gray-400", children: "pieces per day" })
37308
+ ] }),
37309
+ /* @__PURE__ */ jsxRuntime.jsx(
37310
+ "input",
37311
+ {
37312
+ type: "number",
37313
+ value: workspace.targetDayOutput === 0 ? "" : workspace.targetDayOutput,
37314
+ onChange: (e) => onUpdateWorkspaceTarget(lineId, workspace.id, "targetDayOutput", Number(e.target.value) || ""),
37315
+ 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",
37316
+ min: "0",
37317
+ step: "1",
37318
+ placeholder: "Enter day output"
37319
+ }
37320
+ )
37321
+ ] })
37322
+ ] })
37323
+ ]
36580
37324
  },
36581
37325
  workspace.id
36582
37326
  );
@@ -37682,9 +38426,9 @@ var WorkspaceDetailView = ({
37682
38426
  animate: { opacity: 1 },
37683
38427
  transition: { duration: 0.3 },
37684
38428
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen w-full flex flex-col bg-slate-50", children: [
37685
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
37686
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 animate-pulse", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-20 bg-gray-200 rounded" }) }),
37687
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 animate-pulse", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 w-40 bg-gray-200 rounded" }) }),
38429
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
38430
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 animate-pulse", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-6 sm:h-7 md:h-8 w-16 sm:w-20 bg-gray-200 rounded" }) }),
38431
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "h-5 sm:h-6 md:h-7 w-28 sm:w-36 md:w-40 bg-gray-200 rounded" }) }),
37688
38432
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-8" })
37689
38433
  ] }) }),
37690
38434
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 p-4 sm:p-6 lg:p-8", children: [
@@ -37745,7 +38489,7 @@ var WorkspaceDetailView = ({
37745
38489
  animate: { opacity: 1 },
37746
38490
  children: [
37747
38491
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen w-full flex flex-col bg-slate-50", children: [
37748
- /* @__PURE__ */ jsxRuntime.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: [
38492
+ /* @__PURE__ */ jsxRuntime.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: [
37749
38493
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
37750
38494
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 z-10", children: /* @__PURE__ */ jsxRuntime.jsx(
37751
38495
  BackButtonMinimal,
@@ -37756,8 +38500,8 @@ var WorkspaceDetailView = ({
37756
38500
  "aria-label": "Navigate back to previous page"
37757
38501
  }
37758
38502
  ) }),
37759
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
37760
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: formattedWorkspaceName }),
38503
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
38504
+ /* @__PURE__ */ jsxRuntime.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 }),
37761
38505
  workspaceHealth && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-2.5 w-2.5", children: [
37762
38506
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx(
37763
38507
  "animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
@@ -37769,18 +38513,18 @@ var WorkspaceDetailView = ({
37769
38513
  ) })
37770
38514
  ] })
37771
38515
  ] }) }),
37772
- workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0 top-0 flex items-center h-8", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-gray-500", children: [
38516
+ workspaceHealth && activeTab !== "monthly_history" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-0 top-0 flex items-center h-8", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] sm:text-xs text-gray-500 hidden sm:block", children: [
37773
38517
  "Last update: ",
37774
38518
  workspaceHealth.timeSinceLastUpdate
37775
38519
  ] }) }),
37776
38520
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-8" })
37777
38521
  ] }),
37778
- activeTab !== "monthly_history" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-4", children: [
38522
+ activeTab !== "monthly_history" && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4", children: [
37779
38523
  !date && !shift && !usingFallbackData && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
37780
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(LiveTimer, {}) }),
38524
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(LiveTimer, {}) }),
37781
38525
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" })
37782
38526
  ] }),
37783
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium text-blue-600", children: formatISTDate2(new Date(workspace.date)) }),
38527
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: formatISTDate2(new Date(workspace.date)) }),
37784
38528
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
37785
38529
  date && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
37786
38530
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-2 py-1 text-xs font-medium bg-blue-200 text-blue-800 rounded-md", children: getDaysDifference(workspace.date) }),
@@ -38275,8 +39019,8 @@ var SKUManagementView = () => {
38275
39019
  ] }) });
38276
39020
  }
38277
39021
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-slate-50", children: [
38278
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 sm:px-8 py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center relative", children: [
38279
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
39022
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 sm:px-4 md:px-6 lg:px-8 py-3 sm:py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 sm:gap-4 relative", children: [
39023
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sm:absolute sm:left-0", children: /* @__PURE__ */ jsxRuntime.jsx(
38280
39024
  BackButtonMinimal,
38281
39025
  {
38282
39026
  onClick: handleBack,
@@ -38285,24 +39029,24 @@ var SKUManagementView = () => {
38285
39029
  "aria-label": "Navigate back to previous page"
38286
39030
  }
38287
39031
  ) }),
38288
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-center mx-auto", children: [
38289
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "SKU Management" }),
38290
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Manage Stock Keeping Units (SKUs) for production planning" })
39032
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-center mx-auto mt-2 sm:mt-0", children: [
39033
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg sm:text-xl md:text-2xl lg:text-3xl font-semibold text-gray-900", children: "SKU Management" }),
39034
+ /* @__PURE__ */ jsxRuntime.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" })
38291
39035
  ] }),
38292
39036
  /* @__PURE__ */ jsxRuntime.jsxs(
38293
39037
  "button",
38294
39038
  {
38295
39039
  onClick: handleAddNew,
38296
- 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",
39040
+ 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",
38297
39041
  children: [
38298
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "w-4 h-4 mr-2" }),
39042
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "w-3 h-3 sm:w-4 sm:h-4 mr-1.5 sm:mr-2" }),
38299
39043
  "Add SKU"
38300
39044
  ]
38301
39045
  }
38302
39046
  )
38303
39047
  ] }) }) }),
38304
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 sm:px-8 py-6", children: [
38305
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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." }) }),
39048
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 sm:px-4 md:px-6 lg:px-8 py-4 sm:py-6", children: [
39049
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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." }) }),
38306
39050
  error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-red-50 border border-red-200 text-red-700 p-4 rounded-lg", children: [
38307
39051
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: "Error loading SKUs" }),
38308
39052
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm mt-1", children: error.message })
@@ -38419,8 +39163,8 @@ var WorkspaceHealthView = ({
38419
39163
  }
38420
39164
  };
38421
39165
  const getUptimeColor = (percentage) => {
38422
- if (percentage >= 99) return "text-green-600 dark:text-green-400";
38423
- if (percentage >= 95) return "text-yellow-600 dark:text-yellow-400";
39166
+ if (percentage >= 97) return "text-green-600 dark:text-green-400";
39167
+ if (percentage >= 90) return "text-yellow-600 dark:text-yellow-400";
38424
39168
  return "text-red-600 dark:text-red-400";
38425
39169
  };
38426
39170
  if (loading && !summary) {
@@ -38442,8 +39186,50 @@ var WorkspaceHealthView = ({
38442
39186
  ] }) }) }) });
38443
39187
  }
38444
39188
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx("min-h-screen bg-slate-50", className), children: [
38445
- /* @__PURE__ */ jsxRuntime.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: [
38446
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
39189
+ /* @__PURE__ */ jsxRuntime.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: [
39190
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:hidden", children: [
39191
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
39192
+ /* @__PURE__ */ jsxRuntime.jsx(
39193
+ BackButtonMinimal,
39194
+ {
39195
+ onClick: () => router$1.push("/"),
39196
+ text: "Back",
39197
+ size: "sm",
39198
+ "aria-label": "Navigate back to dashboard"
39199
+ }
39200
+ ),
39201
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
39202
+ /* @__PURE__ */ jsxRuntime.jsx(
39203
+ "button",
39204
+ {
39205
+ onClick: () => {
39206
+ refetch();
39207
+ },
39208
+ className: "p-1.5 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",
39209
+ "aria-label": "Refresh",
39210
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4" })
39211
+ }
39212
+ ),
39213
+ /* @__PURE__ */ jsxRuntime.jsx(
39214
+ "button",
39215
+ {
39216
+ onClick: handleExport,
39217
+ className: "p-1.5 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors",
39218
+ "aria-label": "Export CSV",
39219
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "h-4 w-4" })
39220
+ }
39221
+ )
39222
+ ] })
39223
+ ] }),
39224
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
39225
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-base font-semibold text-gray-900", children: "System Health" }),
39226
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-2 w-2", children: [
39227
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75" }),
39228
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-emerald-500" })
39229
+ ] })
39230
+ ] }) })
39231
+ ] }),
39232
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center", children: [
38447
39233
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 z-10", children: /* @__PURE__ */ jsxRuntime.jsx(
38448
39234
  BackButtonMinimal,
38449
39235
  {
@@ -38453,8 +39239,8 @@ var WorkspaceHealthView = ({
38453
39239
  "aria-label": "Navigate back to dashboard"
38454
39240
  }
38455
39241
  ) }),
38456
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
38457
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "System Health" }),
39242
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-1/2 transform -translate-x-1/2 max-w-[calc(100%-200px)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
39243
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-lg md:text-xl lg:text-2xl xl:text-3xl font-semibold text-gray-900 truncate", children: "System Health" }),
38458
39244
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-2.5 w-2.5", children: [
38459
39245
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75" }),
38460
39246
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500" })
@@ -38483,15 +39269,15 @@ var WorkspaceHealthView = ({
38483
39269
  )
38484
39270
  ] }),
38485
39271
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-8" })
38486
- ] }),
38487
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 bg-blue-50 px-3 py-2 rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-4", children: [
38488
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(LiveTimer, {}) }),
38489
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
38490
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium text-blue-600", children: formatDate(operationalDate) }),
38491
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-blue-300" }),
38492
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
39272
+ ] }) }),
39273
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-center gap-2 sm:gap-4", children: [
39274
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm sm:text-base md:text-lg font-medium text-blue-600", children: /* @__PURE__ */ jsxRuntime.jsx(LiveTimer, {}) }),
39275
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
39276
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: formatDate(operationalDate) }),
39277
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block w-px h-4 bg-blue-300" }),
39278
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 sm:gap-2", children: [
38493
39279
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-blue-600", children: getShiftIcon(shiftType) }),
38494
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-base font-medium text-blue-600", children: [
39280
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs sm:text-sm md:text-base font-medium text-blue-600", children: [
38495
39281
  shiftType,
38496
39282
  " Shift"
38497
39283
  ] })
@@ -38508,20 +39294,21 @@ var WorkspaceHealthView = ({
38508
39294
  className: "grid grid-cols-2 sm:grid-cols-2 md:grid-cols-5 gap-2 sm:gap-3 lg:gap-4",
38509
39295
  children: [
38510
39296
  /* @__PURE__ */ jsxRuntime.jsxs(Card2, { className: "col-span-2 sm:col-span-2 md:col-span-2 bg-white", children: [
38511
- /* @__PURE__ */ jsxRuntime.jsx(CardHeader2, { className: "pb-3", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle2, { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: "Overall System Status" }) }),
39297
+ /* @__PURE__ */ jsxRuntime.jsx(CardHeader2, { className: "pb-3", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle2, { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: "Overall System Uptime Today" }) }),
38512
39298
  /* @__PURE__ */ jsxRuntime.jsxs(CardContent2, { children: [
38513
39299
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
38514
39300
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx("text-3xl font-bold", getUptimeColor(summary.uptimePercentage)), children: [
38515
39301
  summary.uptimePercentage.toFixed(1),
38516
39302
  "%"
38517
39303
  ] }),
38518
- summary.uptimePercentage >= 99 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-5 w-5 text-green-500" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-5 w-5 text-red-500" })
39304
+ summary.uptimePercentage >= 97 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-5 w-5 text-green-500" }) : summary.uptimePercentage >= 90 ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "h-5 w-5 text-yellow-500" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-5 w-5 text-red-500" })
38519
39305
  ] }),
38520
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: [
39306
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: "Average uptime across all workspaces" }),
39307
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
38521
39308
  summary.healthyWorkspaces,
38522
39309
  " of ",
38523
39310
  summary.totalWorkspaces,
38524
- " workspaces healthy"
39311
+ " workspaces online"
38525
39312
  ] })
38526
39313
  ] })
38527
39314
  ] }),