{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "support-dashboard",
  "title": "Support Dashboard",
  "author": "AlgorizeTech",
  "description": "Ask the user to pick one of 4 support dashboard variants: https://avaraui.com/view/support-dashboard. This item holds 4 of them as looks of one component (ticket-workspace, table-view, glass, liquid-glass). Skip the question if the user already named one. A full help-desk dashboard with tickets, SLA tracking, contact details and chat or table layouts. Use it as the agent-facing side of a support product.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://avaraui.com/r/select.json",
    "https://avaraui.com/r/ui-liquid-glass.json",
    "utils"
  ],
  "files": [
    {
      "path": "src/components/custom/blocks/Support-dashboard.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { SelectBlock } from \"./SelectBlock\";\nimport {\n  AlertCircle,\n  ArrowLeft,\n  Check,\n  ChevronDown,\n  Clock,\n  Image as ImageIcon,\n  Inbox,\n  LayoutGrid,\n  LifeBuoy,\n  List,\n  MessageSquare,\n  MoreVertical,\n  Paperclip,\n  Plus,\n  Send,\n  Smile,\n  User,\n  X,\n} from \"lucide-react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\n\nconst SORT_OPTIONS = [\"Newest\", \"Oldest\"];\nconst FALLBACK_STATUSES = [\"Open\", \"Pending\", \"Resolved\", \"Closed\"];\n\n// ==========================================\n// VARIANT & COLOR CONFIGURATION\n// ==========================================\nexport type SupportVariant = \"default\" | \"minimal\" | \"glass\" | \"liquid-glass\";\nexport type SupportColor = \"primary\" | \"indigo\" | \"rose\" | \"emerald\" | \"zinc\";\nexport type SupportLayout = \"chat\" | \"table\";\n\nimport {\n  LiquidGlassSvgFilter,\n  LiquidGlassWrapper,\n  formatRadius,\n} from \"@/components/custom/ui/liquid-glass\";\nexport { LiquidGlassSvgFilter };\n\nconst supportVariants: Record<SupportVariant, Record<string, string>> = {\n  default: {\n    wrapper:\n      \"bg-background text-foreground border border-border shadow-xl\",\n    header:\n      \"bg-muted border-b border-border\",\n    sidebar:\n      \"bg-card text-card-foreground border-r border-border\",\n    filterBar:\n      \"bg-muted/50 border-b border-border\",\n    main: \"bg-background text-foreground\",\n    chatHeader:\n      \"bg-muted/50 backdrop-blur-md border-b border-border\",\n    chatFooter:\n      \"bg-muted/50 border-t border-border\",\n    detailsPane:\n      \"bg-muted/50 border-l border-border\",\n    card: \"bg-card text-card-foreground border border-border shadow-sm rounded-xl\",\n    cardHeader:\n      \"bg-muted border-b border-border rounded-t-[inherit]\",\n    input:\n      \"bg-muted border border-border\",\n    chatBubbleReceived:\n      \"bg-muted text-foreground border border-border/50\",\n    tableRow:\n      \"hover:bg-muted border-b border-border transition-colors cursor-pointer\",\n    tableHead:\n      \"bg-muted border-b border-border text-muted-foreground\",\n  },\n  minimal: {\n    wrapper: \"bg-transparent border-none shadow-none rounded-none\",\n    header:\n      \"bg-transparent border-b border-border mb-4 pb-2\",\n    sidebar:\n      \"bg-muted/50 rounded-2xl border border-border lg:mr-4 overflow-hidden\",\n    filterBar:\n      \"bg-transparent border-b border-border\",\n    main: \"bg-transparent\",\n    chatHeader:\n      \"bg-transparent border-b border-border mb-2\",\n    chatFooter:\n      \"bg-transparent border-t border-border mt-2\",\n    detailsPane:\n      \"bg-transparent border-l border-border pl-4\",\n    card: \"bg-muted/50 border border-border rounded-xl\",\n    cardHeader:\n      \"bg-transparent border-b border-border rounded-t-[inherit]\",\n    input:\n      \"bg-muted border border-border\",\n    chatBubbleReceived:\n      \"bg-muted text-foreground\",\n    tableRow:\n      \"hover:bg-muted/50 border-b border-border transition-colors cursor-pointer\",\n    tableHead:\n      \"bg-transparent border-b border-border text-muted-foreground\",\n  },\n  glass: {\n    wrapper:\n      \"bg-transparent text-foreground border-0 shadow-none\",\n    header:\n      \"bg-white/10 dark:bg-black/10 border-b border-white/20 dark:border-white/10 backdrop-blur-md\",\n    sidebar:\n      \"bg-white/10 dark:bg-black/10 border-r border-white/20 dark:border-white/10\",\n    filterBar:\n      \"bg-white/5 dark:bg-black/5 border-b border-white/10 dark:border-white/5\",\n    main: \"bg-transparent\",\n    chatHeader:\n      \"bg-white/5 dark:bg-black/5 border-b border-white/10 dark:border-white/5 backdrop-blur-md\",\n    chatFooter:\n      \"bg-white/5 dark:bg-black/5 border-t border-white/10 dark:border-white/5 backdrop-blur-md\",\n    detailsPane:\n      \"bg-white/5 dark:bg-black/5 border-l border-white/20 dark:border-white/10\",\n    card: \"bg-white/20 dark:bg-black/20 border border-white/20 dark:border-white/10 shadow-lg rounded-xl\",\n    cardHeader:\n      \"bg-white/10 dark:bg-black/10 border-b border-white/10 dark:border-white/5 rounded-t-[inherit]\",\n    input:\n      \"bg-white/30 dark:bg-black/30 border border-white/30 dark:border-white/10\",\n    chatBubbleReceived:\n      \"bg-white/50 dark:bg-black/50 backdrop-blur-md text-foreground border border-white/30 dark:border-white/10\",\n    tableRow:\n      \"hover:bg-white/10 dark:hover:bg-white/5 border-b border-white/10 dark:border-white/5 transition-colors cursor-pointer\",\n    tableHead:\n      \"bg-white/5 dark:bg-white/5 border-b border-white/20 dark:border-white/10 text-foreground\",\n  },\n  \"liquid-glass\": {\n    wrapper:\n      \"bg-transparent text-white border-0 shadow-none\",\n    header:\n      \"bg-white/10 border-b border-white/20 text-white\",\n    sidebar:\n      \"bg-white/10 border-r border-white/20 text-white\",\n    filterBar:\n      \"bg-white/10 border-b border-white/15 text-white\",\n    main: \"bg-transparent text-white\",\n    chatHeader:\n      \"bg-white/10 border-b border-white/20 text-white\",\n    chatFooter:\n      \"bg-white/10 border-t border-white/20 text-white\",\n    detailsPane:\n      \"bg-white/10 border-l border-white/20 text-white\",\n    card: \"bg-white/10 border border-white/20 shadow-lg rounded-xl text-white\",\n    cardHeader:\n      \"bg-white/10 border-b border-white/15 text-white/90 rounded-t-[inherit]\",\n    input:\n      \"bg-white/10 border border-white/20 text-white placeholder:text-white/60 focus:bg-white/20 focus:border-white/40\",\n    chatBubbleReceived:\n      \"bg-white/15 text-white border border-white/20 shadow-md\",\n    tableRow:\n      \"hover:bg-white/10 border-b border-white/15 text-white transition-colors cursor-pointer\",\n    tableHead:\n      \"bg-white/10 border-b border-white/20 text-white font-semibold\",\n  },\n};\n\nconst PRIORITY_OPTIONS = [\"Low\", \"Medium\", \"High\", \"Urgent\"].map((p) => ({\n  label: p,\n  value: p,\n}));\n\nconst colorThemes: Record<SupportColor, Record<string, string>> = {\n  primary: {\n    text: \"text-primary\",\n    bg: \"bg-primary hover:bg-primary/90 text-primary-foreground shadow-primary/20\",\n    lightBg: \"bg-primary/10 text-primary\",\n    border: \"border-primary/30\",\n    activeBorder: \"border-b-2 border-primary/30\",\n    focusRing: \"focus:ring-primary/20 focus:border-primary/30\",\n    iconBg: \"bg-primary/10 text-primary\",\n  },\n  indigo: {\n    text: \"text-indigo-600 dark:text-indigo-400\",\n    bg: \"bg-indigo-500 hover:bg-indigo-600 text-white shadow-indigo-500/20\",\n    lightBg: \"bg-indigo-50/50 dark:bg-indigo-500/10\",\n    border: \"border-indigo-500\",\n    activeBorder: \"border-b-2 border-indigo-500\",\n    focusRing: \"focus:ring-indigo-500/20 focus:border-indigo-500\",\n    iconBg: \"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400\",\n  },\n  rose: {\n    text: \"text-rose-600 dark:text-rose-400\",\n    bg: \"bg-rose-500 hover:bg-rose-600 text-white shadow-rose-500/20\",\n    lightBg: \"bg-rose-50/50 dark:bg-rose-500/10\",\n    border: \"border-rose-500\",\n    activeBorder: \"border-b-2 border-rose-500\",\n    focusRing: \"focus:ring-rose-500/20 focus:border-rose-500\",\n    iconBg: \"bg-rose-500/10 text-rose-600 dark:text-rose-400\",\n  },\n  emerald: {\n    text: \"text-emerald-600 dark:text-emerald-400\",\n    bg: \"bg-emerald-500 hover:bg-emerald-600 text-white shadow-emerald-500/20\",\n    lightBg: \"bg-emerald-50/50 dark:bg-emerald-500/10\",\n    border: \"border-emerald-500\",\n    activeBorder: \"border-b-2 border-emerald-500\",\n    focusRing: \"focus:ring-emerald-500/20 focus:border-emerald-500\",\n    iconBg: \"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400\",\n  },\n  zinc: {\n    text: \"text-zinc-900 dark:text-zinc-100\",\n    bg: \"bg-zinc-900 hover:bg-zinc-800 dark:bg-zinc-100 dark:hover:bg-zinc-200 text-white dark:text-zinc-900 shadow-zinc-900/10\",\n    lightBg: \"bg-zinc-100 dark:bg-zinc-800/50\",\n    border: \"border-zinc-900 dark:border-white\",\n    activeBorder: \"border-b-2 border-zinc-900 dark:border-zinc-100\",\n    focusRing: \"focus:ring-zinc-500/20 focus:border-zinc-500\",\n    iconBg: \"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100\",\n  },\n};\n\nconst liquidGlassStyles = {\n  btn: \"bg-white/20 hover:bg-white/30 text-white border border-white/35 transition-all active:scale-95 cursor-pointer\",\n  bubbleSent:\n    \"rounded-2xl rounded-tl-sm bg-white/20 text-white border border-white/30 shadow-[0_4px_16px_rgba(0,0,0,0.25),inset_0_1px_1px_rgba(255,255,255,0.35)]\",\n  bubbleReceived:\n    \"rounded-2xl rounded-tr-sm bg-black/35 text-white/95 border border-white/15 shadow-md\",\n  activeItem:\n    \"bg-white/10 border-l-2 border-white text-white font-semibold\",\n  activeTab:\n    \"bg-white/10 text-white border-b-2 border-white font-semibold\",\n  iconBg:\n    \"bg-white/15 border border-white/25 text-white shadow-inner\",\n  badge:\n    \"bg-white/20 text-white border border-white/30 font-semibold\",\n  input:\n    \"bg-white/10 border border-white/25 text-white placeholder:text-white/50 focus:bg-white/20 focus:border-white/50 shadow-inner\",\n  dropdown:\n    \"bg-black/70 text-white border border-white/30 shadow-[0_20px_50px_rgba(0,0,0,0.6),inset_0_1px_1px_rgba(255,255,255,0.3)]\",\n};\n\n// ==========================================\n// TYPESCRIPT DEFINITIONS\n// ==========================================\nexport type TicketContact = {\n  name: string;\n  email: string;\n  phone: string;\n  identifier: string;\n};\nexport type TicketSLA = { firstResponse: string; resolution: string };\nexport type TicketMessage = {\n  id: string | number;\n  type: \"received\" | \"sent\";\n  sender: string;\n  initials: string;\n  color?: string;\n  message: string;\n  time: string;\n  showAvatar: boolean;\n};\nexport type Ticket = {\n  id: string;\n  title: string;\n  author: string;\n  company: string;\n  initials: string;\n  color: string;\n  status: string;\n  time: string;\n  contact: TicketContact;\n  sla: TicketSLA;\n  properties: Record<string, string>;\n  chatHistory: TicketMessage[];\n};\n\nexport type SupportData = {\n  header: { title: string; subtitle: string };\n  filters: { id: string; label: string; count: number | null; icon: string }[];\n  emptyState: { greetingPrefix: string; userName: string; message: string };\n  replySection: { tabs: string[]; placeholder: string; buttonText: string };\n  detailsSection: { tabs: string[]; dropdownOptions: Record<string, string[]> };\n  tickets: Ticket[];\n};\n\nconst ICON_MAP: Record<string, React.ElementType> = {\n  Inbox: Inbox,\n  Clock: Clock,\n};\n\nconst BulletproofAvatar = ({\n  initials,\n  color,\n  size = 40,\n}: {\n  initials: string;\n  color: string;\n  size?: number;\n}) => (\n  <div\n    className={`relative shrink-0 flex-none rounded-full shadow-sm flex items-center justify-center font-semibold text-white tracking-wider ${color}`}\n    style={{ width: size, height: size, minWidth: size, minHeight: size }}\n  >\n    {initials}\n  </div>\n);\n\nexport interface SupportDashboardProps {\n  data?: SupportData;\n  variant?: SupportVariant;\n  color?: SupportColor;\n  layout?: SupportLayout;\n  bgImage?: string;\n  /** Optional dynamic corner rounding radius value or Tailwind class */\n  rounded?: string | number;\n  className?: string;\n  style?: React.CSSProperties;\n}\n\nexport default function SupportDashboard({\n  data,\n  variant = \"default\",\n  color = \"primary\",\n  layout = \"chat\",\n  bgImage,\n  rounded,\n  className,\n  style: customStyle,\n}: SupportDashboardProps) {\n  const formattedRadius = formatRadius(rounded);\n  const dynamicRadiusStyle: React.CSSProperties =\n    formattedRadius !== undefined\n      ? { borderRadius: formattedRadius }\n      : typeof rounded === \"string\" && !formatRadius(rounded)\n        ? {}\n        : { borderRadius: \"var(--radius-2xl, 1rem)\" };\n  // === STATE MANAGEMENT ===\n  const [tickets, setTickets] = useState<Ticket[]>(data?.tickets || []);\n  const [selectedTicketId, setSelectedTicketId] = useState<string | null>(null);\n  const [activeReplyTab, setActiveReplyTab] = useState(\"Reply\");\n  const [activeDetailsTab, setActiveDetailsTab] = useState(\n    () => data?.detailsSection?.tabs?.[0] ?? \"User\",\n  );\n\n  useEffect(() => {\n    if (data?.detailsSection?.tabs?.length) {\n      setActiveDetailsTab(data.detailsSection.tabs[0]);\n    }\n  }, [data?.detailsSection?.tabs]);\n\n  // Create Ticket State\n  const [isCreatingTicket, setIsCreatingTicket] = useState(false);\n  const [newTicketForm, setNewTicketForm] = useState({\n    title: \"\",\n    author: \"\",\n    priority: \"Medium\",\n    message: \"\",\n  });\n\n  // Reply State\n  const [replyText, setReplyText] = useState(\"\");\n\n  // Sidebar filter bar. Both buttons already drew a chevron but did nothing —\n  // these back them with real dropdowns. Defaults come from the data's own\n  // labels so the bar reads exactly as before on first paint.\n  const [statusFilter, setStatusFilter] = useState(\n    () => data?.filters?.find((f) => f.id === \"status\")?.label ?? \"All\",\n  );\n  const [sortOrder, setSortOrder] = useState(\n    () => data?.filters?.find((f) => f.id === \"sort\")?.label ?? \"Newest\",\n  );\n  const [openFilterId, setOpenFilterId] = useState<string | null>(null);\n  const filterBarRef = useRef<HTMLDivElement>(null);\n\n  // Table view: which ticket is open in the email modal, plus its own composer\n  // state so typing there never bleeds into the chat view's reply box.\n  const [modalTicketId, setModalTicketId] = useState<string | null>(null);\n  const [modalReplyText, setModalReplyText] = useState(\"\");\n  const [modalReplyTab, setModalReplyTab] = useState(\"Reply\");\n\n  useEffect(() => {\n    if (!openFilterId) return;\n    const onPointerDown = (e: MouseEvent) => {\n      if (!filterBarRef.current?.contains(e.target as Node)) {\n        setOpenFilterId(null);\n      }\n    };\n    document.addEventListener(\"mousedown\", onPointerDown);\n    return () => document.removeEventListener(\"mousedown\", onPointerDown);\n  }, [openFilterId]);\n\n  const statusOptions = useMemo(\n    () => [\n      \"All\",\n      ...(data?.detailsSection?.dropdownOptions?.status ?? FALLBACK_STATUSES),\n    ],\n    [data],\n  );\n\n  const visibleTickets = useMemo(() => {\n    const byStatus =\n      statusFilter === \"All\"\n        ? tickets\n        : tickets.filter(\n            (t) => t.status.toLowerCase() === statusFilter.toLowerCase(),\n          );\n    // `time` is a display string (\"10m ago\"), not a timestamp, so the incoming\n    // order is the only reliable chronology — authored newest-first.\n    return sortOrder === \"Oldest\" ? [...byStatus].reverse() : byStatus;\n  }, [tickets, statusFilter, sortOrder]);\n\n  if (!data || !data.tickets)\n    return (\n      <div className=\"w-full h-[500px] flex items-center justify-center bg-muted border border-border rounded-xl text-muted-foreground\">\n        Please pass the data prop to SupportDashboard\n      </div>\n    );\n\n  const theme = colorThemes[color] || colorThemes.indigo;\n  const styles = supportVariants[variant] || supportVariants.default;\n  const isLiquidGlass = variant === \"liquid-glass\";\n  const isGlassLike = variant === \"glass\" || isLiquidGlass;\n  const liquidBg =\n    bgImage ||\n    \"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1600,c_limit/v1790146209/photo-1470071459604-3b5ec3a7fe05-1790146212205.jpg\";\n\n  // Derive active ticket and metrics from STATE, not static data\n  const selectedTicket = tickets.find((t) => t.id === selectedTicketId);\n  const modalTicket = tickets.find((t) => t.id === modalTicketId);\n  const totalTickets = tickets.length;\n  const openTickets = tickets.filter(\n    (t) => t.status.toLowerCase() === \"open\",\n  ).length;\n  const highPriority = tickets.filter(\n    (t) =>\n      t.properties.priority === \"High\" || t.properties.priority === \"Urgent\",\n  ).length;\n\n  // === HANDLERS ===\n  const handleCreateTicket = (e: React.FormEvent) => {\n    e.preventDefault();\n    if (!newTicketForm.title || !newTicketForm.author) return;\n\n    const newTicket: Ticket = {\n      id: `#${Math.floor(1000 + Math.random() * 9000)}`,\n      title: newTicketForm.title,\n      author: newTicketForm.author,\n      company: \"New Customer\",\n      initials: newTicketForm.author.substring(0, 2).toUpperCase(),\n      color: \"bg-purple-500\", // Default new ticket color\n      status: \"open\",\n      time: \"Just now\",\n      contact: {\n        name: newTicketForm.author,\n        email: `${newTicketForm.author.toLowerCase().replace(\" \", \".\")}@example.com`,\n        phone: \"Pending\",\n        identifier: \"new_user\",\n      },\n      sla: {\n        firstResponse: \"Pending\",\n        resolution: \"Pending\",\n      },\n      properties: {\n        status: \"Open\",\n        group: \"Support\",\n        assignedTo: \"Unassigned\",\n        priority: newTicketForm.priority,\n        type: \"Question\",\n      },\n      chatHistory: [\n        {\n          id: Date.now(),\n          type: \"received\",\n          sender: newTicketForm.author,\n          initials: newTicketForm.author.substring(0, 2).toUpperCase(),\n          color: \"bg-purple-500\",\n          message: newTicketForm.message || \"No description provided.\",\n          time: \"Just now\",\n          showAvatar: true,\n        } as TicketMessage,\n      ],\n    };\n\n    setTickets([newTicket, ...tickets]);\n    setIsCreatingTicket(false);\n    setNewTicketForm({\n      title: \"\",\n      author: \"\",\n      priority: \"Medium\",\n      message: \"\",\n    });\n  };\n\n  // Shared by the chat view's composer and the table view's modal composer, so\n  // a reply sent from either place lands in the same conversation.\n  const appendReply = (ticketId: string, text: string) => {\n    setTickets((prev) =>\n      prev.map((ticket) =>\n        ticket.id === ticketId\n          ? {\n              ...ticket,\n              chatHistory: [\n                ...ticket.chatHistory,\n                {\n                  id: Date.now(),\n                  type: \"sent\",\n                  sender: data.emptyState.userName || \"Agent\",\n                  initials: \"ME\",\n                  color: \"bg-indigo-500\",\n                  message: text,\n                  time: \"Just now\",\n                  showAvatar: false, // Hide avatar for consecutive agent messages for clean UI\n                } as TicketMessage,\n              ],\n            }\n          : ticket,\n      ),\n    );\n  };\n\n  const handleSendReply = () => {\n    if (!replyText.trim() || !selectedTicketId) return;\n    appendReply(selectedTicketId, replyText);\n    setReplyText(\"\");\n  };\n\n  const handleSendModalReply = () => {\n    if (!modalReplyText.trim() || !modalTicketId) return;\n    appendReply(modalTicketId, modalReplyText);\n    setModalReplyText(\"\");\n  };\n\n  const closeTicketModal = () => {\n    setModalTicketId(null);\n    setModalReplyText(\"\");\n  };\n\n  const dashboardCard = (\n    <div\n      className={cn(\n        \"relative not-prose w-full max-w-full h-[700px] flex flex-col overflow-hidden font-sans box-border text-base m-0 p-0 leading-normal transition-colors duration-300 rounded-[inherit]\",\n        variant === \"default\" && \"rounded-xl\",\n        variant === \"minimal\" && \"rounded-none\",\n        (variant === \"glass\" || isLiquidGlass) && \"rounded-2xl\",\n        styles.wrapper,\n        className,\n      )}\n      style={!isLiquidGlass && variant !== \"glass\" ? customStyle : undefined}\n    >\n      {/* === TABLE VIEW: EMAIL / CONVERSATION MODAL === */}\n      {modalTicket && (\n        <div\n          onClick={closeTicketModal}\n          className=\"absolute inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-black/60 animate-in fade-in duration-200\"\n        >\n          {isLiquidGlass ? (\n            <LiquidGlassWrapper\n              radius=\"1.5rem\"\n              bgImage={liquidBg}\n              filterId=\"glass-blur-support\"\n              contrastOverlayClassName=\"bg-black/55 backdrop-blur-md\"\n              className=\"relative w-full max-w-2xl max-h-full text-white shadow-[0_30px_70px_rgba(0,0,0,0.6)] flex flex-col overflow-hidden animate-in zoom-in-95 duration-200\"\n              onClick={(e) => e.stopPropagation()}\n            >\n              <div className=\"relative z-10 flex flex-col h-full max-h-full overflow-hidden\">\n                <div className=\"flex items-start justify-between gap-3 px-5 py-4 border-b border-white/15 bg-white/10 shrink-0\">\n                  <div className=\"flex items-center gap-3 min-w-0\">\n                    <BulletproofAvatar\n                      initials={modalTicket.initials}\n                      color={modalTicket.color}\n                      size={40}\n                    />\n                    <div className=\"min-w-0\">\n                      <div className=\"text-sm font-semibold truncate text-white\">\n                        {modalTicket.title}\n                      </div>\n                      <div className=\"text-xs font-medium truncate text-white/70\">\n                        {modalTicket.author} ({modalTicket.company}) •{\" \"}\n                        <span className=\"text-white font-semibold\">{modalTicket.id}</span>\n                      </div>\n                    </div>\n                  </div>\n                  <button\n                    onClick={closeTicketModal}\n                    className=\"p-1.5 rounded-lg shrink-0 transition-colors cursor-pointer text-white/70 hover:text-white hover:bg-white/15\"\n                  >\n                    <X className=\"w-5 h-5\" />\n                  </button>\n                </div>\n\n                {/* Same bubble treatment as the chat view */}\n                <div className=\"flex-1 min-h-0 overflow-y-auto p-5\">\n                  <div className=\"flex flex-col gap-6\">\n                    {modalTicket.chatHistory.map((msg) => {\n                      const isAgent = msg.type === \"sent\";\n                      return (\n                        <div\n                          key={msg.id}\n                          className={`flex gap-3 w-full ${isAgent ? \"flex-row-reverse\" : \"flex-row\"}`}\n                        >\n                          <div\n                            className={`shrink-0 ${!msg.showAvatar && \"invisible\"}`}\n                          >\n                            <BulletproofAvatar\n                              initials={msg.initials}\n                              color={msg.color || \"bg-zinc-600 dark:bg-zinc-700\"}\n                              size={32}\n                            />\n                          </div>\n                          <div\n                            className={`flex flex-col gap-1 min-w-0 max-w-[85%] ${isAgent ? \"items-end\" : \"items-start\"}`}\n                          >\n                            <div className=\"flex items-baseline gap-2 px-1\">\n                              <span className=\"text-[11px] font-semibold text-white/90\">\n                                {msg.sender}\n                              </span>\n                              <span className=\"text-[10px] font-medium text-white/60\">\n                                {msg.time}\n                              </span>\n                            </div>\n                            <div\n                              className={cn(\n                                \"px-4 sm:px-5 py-3 shadow-sm text-sm whitespace-pre-wrap break-words leading-relaxed\",\n                                isAgent\n                                  ? liquidGlassStyles.bubbleSent\n                                  : liquidGlassStyles.bubbleReceived,\n                              )}\n                            >\n                              {msg.message}\n                            </div>\n                          </div>\n                        </div>\n                      );\n                    })}\n                  </div>\n                </div>\n\n                {/* Composer */}\n                <div className=\"p-4 shrink-0 flex-none border-t border-white/15 bg-white/5\">\n                  <div className=\"border border-white/20 rounded-2xl flex flex-col overflow-hidden transition-all m-0 p-0 bg-white/10 text-white\">\n                    <div className=\"flex border-b border-white/15 bg-white/10 m-0 p-0\">\n                      {data.replySection.tabs.map((tab) => (\n                        <button\n                          key={tab}\n                          onClick={() => setModalReplyTab(tab)}\n                          className={cn(\n                            \"px-5 py-2.5 text-[13px] font-semibold transition-colors m-0 cursor-pointer\",\n                            modalReplyTab === tab\n                              ? liquidGlassStyles.activeTab\n                              : \"text-white/60 hover:text-white border-b-2 border-transparent\",\n                          )}\n                        >\n                          {tab}\n                        </button>\n                      ))}\n                    </div>\n                    <textarea\n                      value={modalReplyText}\n                      onChange={(e) => setModalReplyText(e.target.value)}\n                      rows={3}\n                      placeholder={\n                        modalReplyTab === \"Reply\"\n                          ? data.replySection.placeholder\n                          : \"Type an internal note...\"\n                      }\n                      className={cn(\n                        \"w-full p-4 text-sm resize-none outline-none bg-transparent text-white placeholder:text-white/50 focus:ring-0\",\n                        modalReplyTab !== \"Reply\" && \"bg-amber-500/10 text-amber-200\",\n                      )}\n                    />\n                    <div className=\"flex items-center justify-between px-3 py-2 border-t border-white/15 bg-white/5\">\n                      <div className=\"flex items-center gap-1\">\n                        <button className=\"p-2 rounded-lg transition-colors cursor-pointer text-white/70 hover:text-white hover:bg-white/10\">\n                          <Smile className=\"w-4 h-4\" />\n                        </button>\n                        <button className=\"p-2 rounded-lg transition-colors cursor-pointer text-white/70 hover:text-white hover:bg-white/10\">\n                          <Paperclip className=\"w-4 h-4\" />\n                        </button>\n                      </div>\n                      <div className=\"flex items-center gap-2\">\n                        <button\n                          onClick={closeTicketModal}\n                          className=\"px-4 py-2 rounded-lg text-xs font-semibold transition-colors cursor-pointer text-white/70 hover:bg-white/10 hover:text-white\"\n                        >\n                          Close\n                        </button>\n                        <button\n                          onClick={handleSendModalReply}\n                          disabled={!modalReplyText.trim()}\n                          className={cn(\n                            \"flex items-center gap-2 px-5 py-2 text-xs font-semibold rounded-lg transition-all active:scale-95 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed text-white\",\n                            modalReplyTab === \"Reply\"\n                              ? liquidGlassStyles.btn\n                              : \"bg-amber-500/30 hover:bg-amber-500/40 border border-amber-400/40 text-amber-100\",\n                          )}\n                        >\n                          {modalReplyTab === \"Reply\"\n                            ? data.replySection.buttonText\n                            : \"Add Note\"}{\" \"}\n                          <Send className=\"w-3.5 h-3.5\" />\n                        </button>\n                      </div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </LiquidGlassWrapper>\n          ) : (\n            <div\n              onClick={(e) => e.stopPropagation()}\n              className={cn(\n                \"relative w-full max-w-2xl max-h-full rounded-2xl sm:rounded-3xl shadow-2xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200\",\n                isGlassLike\n                  ? \"bg-white/40 dark:bg-black/40 border border-white/20 dark:border-white/10 backdrop-blur-2xl\"\n                  : \"bg-background border border-border\",\n              )}\n            >\n              <div className=\"relative z-10 flex flex-col h-full max-h-full overflow-hidden\">\n                <div\n                  className={cn(\n                    \"flex items-start justify-between gap-3 px-5 py-4 border-b shrink-0\",\n                    \"border-border\",\n                  )}\n                >\n                  <div className=\"flex items-center gap-3 min-w-0\">\n                    <BulletproofAvatar\n                      initials={modalTicket.initials}\n                      color={modalTicket.color}\n                      size={40}\n                    />\n                    <div className=\"min-w-0\">\n                      <div className=\"text-sm font-semibold truncate text-foreground\">\n                        {modalTicket.title}\n                      </div>\n                      <div className=\"text-xs font-medium truncate text-muted-foreground\">\n                        {modalTicket.author} ({modalTicket.company}) •{\" \"}\n                        <span className={theme.text}>{modalTicket.id}</span>\n                      </div>\n                    </div>\n                  </div>\n                  <button\n                    onClick={closeTicketModal}\n                    className=\"p-1.5 rounded-lg shrink-0 transition-colors cursor-pointer text-muted-foreground hover:text-foreground\"\n                  >\n                    <X className=\"w-5 h-5\" />\n                  </button>\n                </div>\n\n                {/* Same bubble treatment as the chat view */}\n                <div className=\"flex-1 min-h-0 overflow-y-auto p-5\">\n                  <div className=\"flex flex-col gap-6\">\n                    {modalTicket.chatHistory.map((msg) => {\n                      const isAgent = msg.type === \"sent\";\n                      return (\n                        <div\n                          key={msg.id}\n                          className={`flex gap-3 w-full ${isAgent ? \"flex-row-reverse\" : \"flex-row\"}`}\n                        >\n                          <div\n                            className={`shrink-0 ${!msg.showAvatar && \"invisible\"}`}\n                          >\n                            <BulletproofAvatar\n                              initials={msg.initials}\n                              color={msg.color || \"bg-zinc-600 dark:bg-zinc-700\"}\n                              size={32}\n                            />\n                          </div>\n                          <div\n                            className={`flex flex-col gap-1 min-w-0 max-w-[85%] ${isAgent ? \"items-end\" : \"items-start\"}`}\n                          >\n                            <div className=\"flex items-baseline gap-2 px-1\">\n                              <span className=\"text-[11px] font-semibold text-foreground/70\">\n                                {msg.sender}\n                              </span>\n                              <span className=\"text-[10px] font-medium text-muted-foreground\">\n                                {msg.time}\n                              </span>\n                            </div>\n                            <div\n                              className={cn(\n                                \"px-4 sm:px-5 py-3 shadow-sm text-sm whitespace-pre-wrap break-words leading-relaxed\",\n                                isAgent\n                                  ? cn(\n                                      \"rounded-2xl rounded-tl-sm text-white font-medium shadow-md\",\n                                      theme.bg,\n                                    )\n                                  : cn(styles.chatBubbleReceived),\n                              )}\n                            >\n                              {msg.message}\n                            </div>\n                          </div>\n                        </div>\n                      );\n                    })}\n                  </div>\n                </div>\n\n                {/* Composer */}\n                <div className={cn(\"p-4 shrink-0 flex-none\", styles.chatFooter)}>\n                  <div\n                    className={cn(\n                      \"border rounded-2xl flex flex-col overflow-hidden shadow-sm transition-all m-0 p-0\",\n                      variant === \"glass\"\n                        ? \"bg-white/40 dark:bg-black/40 backdrop-blur-md border-white/20 dark:border-white/10\"\n                        : \"bg-card border-border\",\n                    )}\n                  >\n                    <div\n                      className={cn(\n                        \"flex border-b m-0 p-0\",\n                        variant === \"glass\"\n                          ? \"border-white/10 dark:border-white/10 bg-white/20 dark:bg-black/20\"\n                          : \"border-border bg-muted/50\",\n                      )}\n                    >\n                      {data.replySection.tabs.map((tab) => (\n                        <button\n                          key={tab}\n                          onClick={() => setModalReplyTab(tab)}\n                          className={cn(\n                            \"px-5 py-2.5 text-[13px] font-semibold transition-colors m-0 cursor-pointer\",\n                            modalReplyTab === tab\n                              ? cn(\n                                  variant === \"glass\"\n                                    ? \"bg-white/40 dark:bg-black/40\"\n                                    : \"bg-card\",\n                                  theme.text,\n                                  theme.activeBorder,\n                                )\n                              : \"text-muted-foreground hover:text-foreground border-b-2 border-transparent\",\n                          )}\n                        >\n                          {tab}\n                        </button>\n                      ))}\n                    </div>\n                    <textarea\n                      value={modalReplyText}\n                      onChange={(e) => setModalReplyText(e.target.value)}\n                      rows={3}\n                      placeholder={\n                        modalReplyTab === \"Reply\"\n                          ? data.replySection.placeholder\n                          : \"Type an internal note...\"\n                      }\n                      className={cn(\n                        \"w-full p-4 text-sm resize-none outline-none bg-transparent text-foreground placeholder:text-muted-foreground focus:ring-0\",\n                        modalReplyTab !== \"Reply\" && \"bg-amber-50/30 dark:bg-amber-900/5\",\n                      )}\n                    />\n                    <div className={cn(\"flex items-center justify-between px-3 py-2 border-t\", \"border-border\")}>\n                      <div className=\"flex items-center gap-1\">\n                        <button className={cn(\"p-2 rounded-lg transition-colors cursor-pointer\", \"text-muted-foreground hover:bg-muted\")}>\n                          <Smile className=\"w-4 h-4\" />\n                        </button>\n                        <button className={cn(\"p-2 rounded-lg transition-colors cursor-pointer\", \"text-muted-foreground hover:bg-muted\")}>\n                          <Paperclip className=\"w-4 h-4\" />\n                        </button>\n                      </div>\n                      <div className=\"flex items-center gap-2\">\n                        <button onClick={closeTicketModal} className=\"px-4 py-2 rounded-lg text-xs font-semibold transition-colors cursor-pointer text-muted-foreground hover:bg-muted\">\n                          Close\n                        </button>\n                        <button\n                          onClick={handleSendModalReply}\n                          disabled={!modalReplyText.trim()}\n                          className={cn(\n                            \"flex items-center gap-2 px-5 py-2 text-xs font-semibold rounded-lg transition-all active:scale-95 cursor-pointer shadow-sm disabled:opacity-50 disabled:cursor-not-allowed text-white\",\n                            modalReplyTab === \"Reply\" ? theme.bg : \"bg-amber-500 hover:bg-amber-600 shadow-amber-500/20 text-white\",\n                          )}\n                        >\n                          {modalReplyTab === \"Reply\" ? data.replySection.buttonText : \"Add Note\"} <Send className=\"w-3.5 h-3.5\" />\n                        </button>\n                      </div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n          )}\n        </div>\n      )}\n\n      {/* === CREATE TICKET MODAL OVERLAY === */}\n      {isCreatingTicket && (\n        <div className=\"absolute inset-0 z-50 flex items-center justify-center p-3 sm:p-4 bg-black/60 animate-in fade-in duration-200\">\n          {isLiquidGlass ? (\n            <LiquidGlassWrapper\n              radius=\"1.5rem\"\n              bgImage={liquidBg}\n              filterId=\"glass-blur-support\"\n              contrastOverlayClassName=\"bg-black/55 backdrop-blur-md\"\n              className=\"relative w-full max-w-md p-6 sm:p-7 text-white shadow-[0_30px_70px_rgba(0,0,0,0.6)] flex flex-col gap-4 animate-in zoom-in-95 duration-200\"\n            >\n              <div className=\"relative z-10 flex flex-col gap-4\">\n                <div className=\"flex justify-between items-center pb-2 border-b border-white/15\">\n                  <div className=\"flex items-center gap-2.5\">\n                    <div className={cn(\n                      \"w-7 h-7 rounded-lg flex items-center justify-center text-white\",\n                      liquidGlassStyles.iconBg,\n                    )}>\n                      <Plus className=\"w-4 h-4\" />\n                    </div>\n                    <h3 className=\"text-base sm:text-lg font-bold tracking-tight text-white\">\n                      Create New Ticket\n                    </h3>\n                  </div>\n                  <button\n                    onClick={() => setIsCreatingTicket(false)}\n                    className=\"p-1.5 rounded-lg transition-colors cursor-pointer text-white/70 hover:text-white hover:bg-white/15\"\n                  >\n                    <X className=\"w-5 h-5\" />\n                  </button>\n                </div>\n                <form onSubmit={handleCreateTicket} className=\"flex flex-col gap-4\">\n                  <div className=\"flex flex-col gap-1.5\">\n                    <label className=\"text-[11px] font-bold uppercase tracking-wider text-white/80\">\n                      Subject\n                    </label>\n                    <input\n                      required\n                      value={newTicketForm.title}\n                      onChange={(e) =>\n                        setNewTicketForm({\n                          ...newTicketForm,\n                          title: e.target.value,\n                        })\n                      }\n                      className=\"p-3 text-sm rounded-xl outline-none transition-all bg-white/10 border border-white/25 text-white placeholder:text-white/50 focus:bg-white/20 focus:border-white/50 shadow-inner\"\n                      placeholder=\"E.g. Cannot access account\"\n                    />\n                  </div>\n                  <div className=\"flex flex-col sm:flex-row gap-3 sm:gap-4\">\n                    <div className=\"flex flex-col gap-1.5 flex-1 min-w-0\">\n                      <label className=\"text-[11px] font-bold uppercase tracking-wider text-white/80\">\n                        Customer Name\n                      </label>\n                      <input\n                        required\n                        value={newTicketForm.author}\n                        onChange={(e) =>\n                          setNewTicketForm({\n                            ...newTicketForm,\n                            author: e.target.value,\n                          })\n                        }\n                        className=\"p-3 text-sm rounded-xl outline-none transition-all bg-white/10 border border-white/25 text-white placeholder:text-white/50 focus:bg-white/20 focus:border-white/50 shadow-inner\"\n                        placeholder=\"John Doe\"\n                      />\n                    </div>\n                    <div className=\"flex flex-col gap-1.5 flex-1 min-w-0\">\n                      <label className=\"text-[11px] font-bold uppercase tracking-wider text-white/80\">\n                        Priority\n                      </label>\n                      <SelectBlock\n                        options={PRIORITY_OPTIONS}\n                        value={newTicketForm.priority}\n                        onChange={(v) =>\n                          setNewTicketForm({\n                            ...newTicketForm,\n                            priority: Array.isArray(v) ? (v[0] ?? \"\") : v,\n                          })\n                        }\n                        color={color}\n                        variant=\"liquid-glass\"\n                        placeholder=\"Select priority\"\n                      />\n                    </div>\n                  </div>\n                  <div className=\"flex flex-col gap-1.5\">\n                    <label className=\"text-[11px] font-bold uppercase tracking-wider text-white/80\">\n                      Initial Message\n                    </label>\n                    <textarea\n                      rows={3}\n                      value={newTicketForm.message}\n                      onChange={(e) =>\n                        setNewTicketForm({\n                          ...newTicketForm,\n                          message: e.target.value,\n                        })\n                      }\n                      className=\"p-3 text-sm rounded-xl outline-none resize-none transition-all bg-white/10 border border-white/25 text-white placeholder:text-white/50 focus:bg-white/20 focus:border-white/50 shadow-inner\"\n                      placeholder=\"Describe the issue...\"\n                    />\n                  </div>\n                  <button\n                    type=\"submit\"\n                    className={cn(\n                      \"mt-2 py-3 px-4 rounded-xl font-bold text-white transition-all duration-200 active:scale-[0.98] cursor-pointer flex items-center justify-center gap-2\",\n                      liquidGlassStyles.btn,\n                    )}\n                  >\n                    <Plus className=\"w-4 h-4\" /> Create Ticket\n                  </button>\n                </form>\n              </div>\n            </LiquidGlassWrapper>\n          ) : (\n            <div\n              className={cn(\n                \"relative w-full max-w-md p-6 sm:p-7 rounded-2xl sm:rounded-3xl shadow-2xl flex flex-col gap-4 animate-in zoom-in-95 duration-200 overflow-hidden\",\n                isGlassLike\n                  ? \"bg-white/40 dark:bg-black/40 border border-white/20 dark:border-white/10 backdrop-blur-2xl\"\n                  : \"bg-background border border-border\",\n              )}\n            >\n              <div className=\"relative z-10 flex flex-col gap-4\">\n                <div className=\"flex justify-between items-center pb-2 border-b border-border\">\n                  <div className=\"flex items-center gap-2.5\">\n                    <div className={cn(\"w-7 h-7 rounded-lg flex items-center justify-center text-white\", theme.bg)}>\n                      <Plus className=\"w-4 h-4\" />\n                    </div>\n                    <h3 className=\"text-base sm:text-lg font-bold tracking-tight text-foreground\">\n                      Create New Ticket\n                    </h3>\n                  </div>\n                  <button\n                    onClick={() => setIsCreatingTicket(false)}\n                    className=\"p-1.5 rounded-lg transition-colors cursor-pointer text-muted-foreground hover:text-foreground\"\n                  >\n                    <X className=\"w-5 h-5\" />\n                  </button>\n                </div>\n                <form onSubmit={handleCreateTicket} className=\"flex flex-col gap-4\">\n                  <div className=\"flex flex-col gap-1.5\">\n                    <label className=\"text-[11px] font-bold uppercase tracking-wider text-muted-foreground\">\n                      Subject\n                    </label>\n                    <input\n                      required\n                      value={newTicketForm.title}\n                      onChange={(e) =>\n                        setNewTicketForm({\n                          ...newTicketForm,\n                          title: e.target.value,\n                        })\n                      }\n                      className={cn(\"p-3 text-sm rounded-xl outline-none transition-all\", styles.input, theme.focusRing)}\n                      placeholder=\"E.g. Cannot access account\"\n                    />\n                  </div>\n                  <div className=\"flex flex-col sm:flex-row gap-3 sm:gap-4\">\n                    <div className=\"flex flex-col gap-1.5 flex-1 min-w-0\">\n                      <label className=\"text-[11px] font-bold uppercase tracking-wider text-muted-foreground\">\n                        Customer Name\n                      </label>\n                      <input\n                        required\n                        value={newTicketForm.author}\n                        onChange={(e) =>\n                          setNewTicketForm({\n                            ...newTicketForm,\n                            author: e.target.value,\n                          })\n                        }\n                        className={cn(\"p-3 text-sm rounded-xl outline-none transition-all\", styles.input, theme.focusRing)}\n                        placeholder=\"John Doe\"\n                      />\n                    </div>\n                    <div className=\"flex flex-col gap-1.5 flex-1 min-w-0\">\n                      <label className=\"text-[11px] font-bold uppercase tracking-wider text-muted-foreground\">\n                        Priority\n                      </label>\n                      <SelectBlock\n                        options={PRIORITY_OPTIONS}\n                        value={newTicketForm.priority}\n                        onChange={(v) =>\n                          setNewTicketForm({\n                            ...newTicketForm,\n                            priority: Array.isArray(v) ? (v[0] ?? \"\") : v,\n                          })\n                        }\n                        color={color}\n                        variant={variant === \"glass\" ? \"glass\" : \"default\"}\n                        placeholder=\"Select priority\"\n                      />\n                    </div>\n                  </div>\n                  <div className=\"flex flex-col gap-1.5\">\n                    <label className=\"text-[11px] font-bold uppercase tracking-wider text-muted-foreground\">\n                      Initial Message\n                    </label>\n                    <textarea\n                      rows={3}\n                      value={newTicketForm.message}\n                      onChange={(e) =>\n                        setNewTicketForm({\n                          ...newTicketForm,\n                          message: e.target.value,\n                        })\n                      }\n                      className={cn(\"p-3 text-sm rounded-xl outline-none resize-none transition-all\", styles.input, theme.focusRing)}\n                      placeholder=\"Describe the issue...\"\n                    />\n                  </div>\n                  <button\n                    type=\"submit\"\n                    className={cn(\n                      \"mt-2 py-3 px-4 rounded-xl font-bold text-white transition-all duration-200 active:scale-[0.98] shadow-lg cursor-pointer flex items-center justify-center gap-2\",\n                      theme.bg,\n                    )}\n                  >\n                    <Plus className=\"w-4 h-4\" /> Create Ticket\n                  </button>\n                </form>\n              </div>\n            </div>\n          )}\n        </div>\n      )}\n\n      {/* === GLOBAL HEADER === */}\n      <header\n        className={cn(\n          \"h-[56px] sm:h-[60px] flex items-center justify-between px-3.5 sm:px-5 shrink-0 flex-none z-10 transition-colors duration-300 gap-2 rounded-t-[inherit]\",\n          styles.header,\n        )}\n      >\n        <div className=\"flex items-center gap-2.5 sm:gap-3 min-w-0 flex-1 overflow-hidden m-0 p-0\">\n          <div\n            className={cn(\n              \"w-7 h-7 sm:w-8 sm:h-8 rounded-lg flex items-center justify-center shrink-0 m-0\",\n              isLiquidGlass ? liquidGlassStyles.iconBg : theme.iconBg,\n            )}\n          >\n            {layout === \"table\" ? (\n              <LayoutGrid className=\"w-3.5 h-3.5 sm:w-4 sm:h-4\" />\n            ) : (\n              <MessageSquare className=\"w-3.5 h-3.5 sm:w-4 sm:h-4\" />\n            )}\n          </div>\n          <div className={cn(\n            \"min-w-0 flex items-center gap-1.5 sm:gap-2 overflow-hidden m-0 p-0\",\n            isLiquidGlass ? \"text-white\" : \"text-foreground\",\n          )}>\n            <span className=\"text-xs sm:text-sm font-bold sm:font-semibold truncate\">\n              {data.header.title}\n            </span>\n            <span className={cn(\n              \"hidden sm:inline-flex items-center font-medium border-l pl-2 text-xs truncate shrink-0\",\n              isLiquidGlass\n                ? \"text-white/70 border-white/20\"\n                : \"text-muted-foreground border-border\",\n            )}>\n              {layout === \"table\" ? \"System Overview\" : data.header.subtitle}\n            </span>\n          </div>\n        </div>\n        <div className=\"flex items-center gap-2 shrink-0\">\n          <button\n            onClick={() => setIsCreatingTicket(true)}\n            className={cn(\n              \"flex items-center gap-1 sm:gap-1.5 px-3 py-1.5 sm:px-3.5 rounded-xl text-xs font-semibold whitespace-nowrap shrink-0 transition-all active:scale-95 shadow-sm text-white cursor-pointer\",\n              isLiquidGlass ? liquidGlassStyles.btn : theme.bg,\n            )}\n          >\n            <Plus className=\"w-3.5 h-3.5 shrink-0\" />\n            <span className=\"whitespace-nowrap\">New Ticket</span>\n          </button>\n        </div>\n      </header>\n\n      {/* === CONDITIONAL LAYOUT === */}\n      {layout === \"table\" ? (\n        /* ---------------------------------------------------------\n           TICKET SYSTEM TABLE LAYOUT\n           --------------------------------------------------------- */\n        <div\n          className={cn(\n            \"flex flex-1 flex-col overflow-y-auto p-4 sm:p-6 lg:p-8 gap-6 m-0 rounded-b-[inherit] [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]\",\n            isGlassLike ? \"bg-transparent\" : \"bg-muted\",\n          )}\n        >\n          {/* Metrics Row */}\n          <div className=\"grid grid-cols-1 sm:grid-cols-3 gap-4\">\n            <div\n              className={cn(\n                \"p-5 flex flex-col gap-2 transition-all\",\n                styles.card,\n              )}\n            >\n              <div className={cn(\n                \"flex items-center gap-2 text-sm font-semibold uppercase tracking-wider\",\n                isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\"\n              )}>\n                <Inbox className=\"w-4 h-4\" /> Total Tickets\n              </div>\n              <div className={cn(\n                \"text-3xl font-bold\",\n                isLiquidGlass ? \"text-white\" : \"text-foreground\"\n              )}>\n                {totalTickets}\n              </div>\n            </div>\n            <div\n              className={cn(\n                \"p-5 flex flex-col gap-2 transition-all\",\n                styles.card,\n              )}\n            >\n              <div className={cn(\n                \"flex items-center gap-2 text-sm font-semibold uppercase tracking-wider\",\n                isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\"\n              )}>\n                <Clock className=\"w-4 h-4\" /> Open Tickets\n              </div>\n              <div className={cn(\"text-3xl font-bold\", theme.text)}>\n                {openTickets}\n              </div>\n            </div>\n            <div\n              className={cn(\n                \"p-5 flex flex-col gap-2 transition-all\",\n                styles.card,\n              )}\n            >\n              <div className={cn(\n                \"flex items-center gap-2 text-sm font-semibold uppercase tracking-wider\",\n                isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\"\n              )}>\n                <AlertCircle className=\"w-4 h-4\" /> High Priority\n              </div>\n              <div className={cn(\n                \"text-3xl font-bold\",\n                isLiquidGlass ? \"text-rose-300\" : \"text-red-500 dark:text-red-400\"\n              )}>\n                {highPriority}\n              </div>\n            </div>\n          </div>\n\n          {/* Table Container */}\n          <div\n            className={cn(\n              \"flex-1 overflow-hidden flex flex-col transition-all\",\n              styles.card,\n            )}\n          >\n            <div className=\"overflow-x-auto min-w-full\">\n              <table className=\"w-full text-left border-collapse\">\n                <thead>\n                  <tr className={styles.tableHead}>\n                    <th className=\"px-6 py-4 text-xs font-semibold uppercase tracking-wider\">\n                      Ticket ID\n                    </th>\n                    <th className=\"px-6 py-4 text-xs font-semibold uppercase tracking-wider\">\n                      Subject & Requester\n                    </th>\n                    <th className=\"px-6 py-4 text-xs font-semibold uppercase tracking-wider\">\n                      Priority\n                    </th>\n                    <th className=\"px-6 py-4 text-xs font-semibold uppercase tracking-wider\">\n                      Status\n                    </th>\n                    <th className=\"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-right\">\n                      Last Updated\n                    </th>\n                  </tr>\n                </thead>\n                <tbody\n                  className={cn(\n                    \"divide-y\",\n                    isLiquidGlass\n                      ? \"divide-white/10\"\n                      : isGlassLike\n                        ? \"divide-white/5\"\n                        : \"divide-border\",\n                  )}\n                >\n                  {tickets.map((ticket) => (\n                    <tr\n                      key={ticket.id}\n                      onClick={() => setModalTicketId(ticket.id)}\n                      className={styles.tableRow}\n                    >\n                      <td\n                        className={cn(\n                          \"px-6 py-4 text-sm font-semibold whitespace-nowrap\",\n                          isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\",\n                        )}\n                      >\n                        {ticket.id}\n                      </td>\n                      <td className=\"px-6 py-4 min-w-[300px]\">\n                        <div className=\"flex flex-col gap-1\">\n                          <span className={cn(\n                            \"text-sm font-semibold truncate\",\n                            isLiquidGlass ? \"text-white\" : \"text-foreground\"\n                          )}>\n                            {ticket.title}\n                          </span>\n                          <div className=\"flex items-center gap-2 mt-1\">\n                            <div\n                              className={`w-5 h-5 rounded-full flex items-center justify-center text-[8px] font-semibold text-white ${ticket.color}`}\n                            >\n                              {ticket.initials}\n                            </div>\n                            <span className={cn(\n                              \"text-xs font-medium\",\n                              isLiquidGlass ? \"text-white/70\" : \"text-muted-foreground\"\n                            )}>\n                              {ticket.author} ({ticket.company})\n                            </span>\n                          </div>\n                        </div>\n                      </td>\n                      <td className=\"px-6 py-4 whitespace-nowrap\">\n                        {ticket.properties.priority === \"High\" ||\n                        ticket.properties.priority === \"Urgent\" ? (\n                          <span className={cn(\n                            \"inline-flex px-2.5 py-1 rounded-md text-xs font-semibold\",\n                            isLiquidGlass\n                              ? \"bg-rose-500/20 text-rose-200 border border-rose-400/30\"\n                              : \"bg-red-50 dark:bg-red-500/10 text-red-600 dark:text-red-400\"\n                          )}>\n                            {ticket.properties.priority}\n                          </span>\n                        ) : (\n                          <span className={cn(\n                            \"inline-flex px-2.5 py-1 rounded-md text-xs font-semibold\",\n                            isLiquidGlass\n                              ? \"bg-white/15 text-white/90 border border-white/20\"\n                              : \"bg-muted text-muted-foreground\"\n                          )}>\n                            {ticket.properties.priority}\n                          </span>\n                        )}\n                      </td>\n                      <td className=\"px-6 py-4 whitespace-nowrap\">\n                        {ticket.status.toLowerCase() === \"open\" ? (\n                          <span\n                            className={cn(\n                              \"inline-flex px-2.5 py-1 rounded-md text-xs font-semibold\",\n                              isLiquidGlass\n                                ? liquidGlassStyles.badge\n                                : cn(theme.lightBg, theme.text),\n                            )}\n                          >\n                            Open\n                          </span>\n                        ) : (\n                          <span className={cn(\n                            \"inline-flex px-2.5 py-1 rounded-md text-xs font-semibold\",\n                            isLiquidGlass\n                              ? \"bg-emerald-500/20 text-emerald-200 border border-emerald-400/30 backdrop-blur-md\"\n                              : \"bg-emerald-50 dark:bg-emerald-500/10 text-emerald-600 dark:text-emerald-400\"\n                          )}>\n                            Resolved\n                          </span>\n                        )}\n                      </td>\n                      <td className={cn(\n                        \"px-6 py-4 whitespace-nowrap text-right text-xs font-semibold\",\n                        isLiquidGlass ? \"text-white/70\" : \"text-muted-foreground\"\n                      )}>\n                        {ticket.time}\n                      </td>\n                    </tr>\n                  ))}\n                </tbody>\n              </table>\n            </div>\n          </div>\n        </div>\n      ) : (\n        /* ---------------------------------------------------------\n           3-PANE CHAT LAYOUT\n           --------------------------------------------------------- */\n        <div\n          className={cn(\n            \"flex flex-1 overflow-hidden min-h-0 m-0 p-0 rounded-b-[inherit]\",\n            isGlassLike ? \"bg-transparent\" : \"bg-muted\",\n          )}\n        >\n          <aside\n            className={cn(\n              `w-full md:w-[320px] shrink-0 flex-none flex flex-col transition-all m-0 p-0 rounded-bl-[inherit] overflow-hidden ${selectedTicket ? \"hidden md:flex\" : \"flex\"}`,\n              styles.sidebar,\n            )}\n          >\n            <div\n              ref={filterBarRef}\n              className={cn(\n                \"flex items-center shrink-0 flex-none m-0 p-0\",\n                styles.filterBar,\n              )}\n            >\n              {data.filters.map((filter, idx) => {\n                const Icon = ICON_MAP[filter.icon] || List;\n                const isStatus = filter.id === \"status\";\n                const isSort = filter.id === \"sort\";\n                // Anything the component doesn't know how to drive keeps its\n                // original inert-label behaviour rather than opening an empty menu.\n                const options = isStatus\n                  ? statusOptions\n                  : isSort\n                    ? SORT_OPTIONS\n                    : null;\n                const selected = isStatus\n                  ? statusFilter\n                  : isSort\n                    ? sortOrder\n                    : filter.label;\n                const isOpen = openFilterId === filter.id;\n\n                return (\n                  <div\n                    key={filter.id}\n                    className={cn(\n                      \"relative flex-1 m-0 p-0\",\n                      idx !== 0 &&\n                        (isLiquidGlass\n                          ? \"border-l border-white/15\"\n                          : isGlassLike\n                            ? \"border-l border-white/10\"\n                            : \"border-l border-border\"),\n                    )}\n                  >\n                    <button\n                      type=\"button\"\n                      onClick={() =>\n                        options && setOpenFilterId(isOpen ? null : filter.id)\n                      }\n                      className={cn(\n                        \"w-full flex items-center justify-center gap-2 py-3 text-xs font-semibold transition-colors m-0 cursor-pointer\",\n                        isLiquidGlass\n                          ? \"text-white/80 hover:text-white hover:bg-white/10\"\n                          : \"text-muted-foreground hover:text-foreground hover:bg-muted\"\n                      )}\n                    >\n                      <Icon className=\"w-3.5 h-3.5 shrink-0\" />\n                      <span className=\"truncate\">\n                        {selected} {filter.count && `(${filter.count})`}\n                      </span>\n                      <ChevronDown\n                        className={cn(\n                          \"w-3 h-3 opacity-50 shrink-0 transition-transform\",\n                          isOpen && \"rotate-180\",\n                        )}\n                      />\n                    </button>\n\n                    {options && isOpen && (\n                      <div\n                        className={cn(\n                          \"absolute left-1 right-1 top-full z-30 mt-1 p-1 rounded-xl border shadow-2xl flex flex-col gap-0.5 animate-in fade-in zoom-in-95 duration-150\",\n                          isLiquidGlass\n                            ? \"bg-black/60 text-white border-white/30 backdrop-blur-3xl shadow-[0_20px_50px_rgba(0,0,0,0.6),inset_0_1px_1px_rgba(255,255,255,0.3)]\"\n                            : isGlassLike\n                              ? \"bg-white/80 dark:bg-zinc-900/90 text-foreground border-white/40 dark:border-white/20 backdrop-blur-2xl shadow-xl\"\n                              : \"bg-background border-border\",\n                        )}\n                      >\n                        {options.map((opt) => {\n                          const active = opt === selected;\n                          return (\n                            <button\n                              key={opt}\n                              type=\"button\"\n                              onClick={() => {\n                                if (isStatus) setStatusFilter(opt);\n                                else setSortOrder(opt);\n                                setOpenFilterId(null);\n                              }}\n                              className={cn(\n                                \"w-full flex items-center justify-between gap-2 px-3 py-2 rounded-lg text-xs font-semibold text-left transition-colors cursor-pointer\",\n                                active\n                                  ? isLiquidGlass\n                                    ? \"bg-white/25 text-white font-bold border border-white/30 shadow-xs\"\n                                    : cn(theme.lightBg, theme.text, \"font-semibold\")\n                                  : isLiquidGlass\n                                    ? \"text-white/70 hover:bg-white/10 hover:text-white\"\n                                    : isGlassLike\n                                      ? \"text-foreground hover:bg-black/10 dark:hover:bg-white/10\"\n                                      : \"text-muted-foreground hover:bg-muted\",\n                              )}\n                            >\n                              {opt}\n                              {active && (\n                                <Check className=\"w-3.5 h-3.5 shrink-0\" />\n                              )}\n                            </button>\n                          );\n                        })}\n                      </div>\n                    )}\n                  </div>\n                );\n              })}\n            </div>\n\n            <div className=\"flex-1 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] m-0 p-0\">\n              <div\n                className={cn(\n                  \"divide-y m-0 p-0\",\n                  isLiquidGlass\n                    ? \"divide-white/10\"\n                    : isGlassLike\n                      ? \"divide-white/10\"\n                      : \"divide-border\",\n                )}\n              >\n                {visibleTickets.length === 0 && (\n                  <div className={cn(\n                    \"px-4 py-10 text-center text-xs font-medium\",\n                    isLiquidGlass ? \"text-white/60\" : \"text-muted-foreground\"\n                  )}>\n                    No tickets match this filter.\n                  </div>\n                )}\n                {visibleTickets.map((ticket) => {\n                  const isActive = selectedTicketId === ticket.id;\n                  return (\n                    <div\n                      key={ticket.id}\n                      onClick={() => setSelectedTicketId(ticket.id)}\n                      className={cn(\n                        \"flex items-start gap-3 p-4 cursor-pointer transition-all border-l-2 m-0\",\n                        isActive\n                          ? isLiquidGlass\n                            ? liquidGlassStyles.activeItem\n                            : isGlassLike\n                              ? \"bg-white/20 dark:bg-white/10 border-white/60 dark:border-white/40\"\n                              : cn(theme.lightBg, theme.border)\n                          : isLiquidGlass\n                            ? \"border-transparent text-white/90 hover:bg-white/10\"\n                            : cn(\n                                \"border-transparent hover:bg-muted\",\n                                isGlassLike &&\n                                  \"hover:bg-white/10 dark:hover:bg-white/5\",\n                              ),\n                      )}\n                    >\n                      <BulletproofAvatar\n                        initials={ticket.initials}\n                        color={ticket.color}\n                        size={36}\n                      />\n                      <div className=\"flex-1 min-w-0 m-0 p-0\">\n                        <div className=\"flex justify-between items-start mb-1 m-0 p-0\">\n                          <div\n                            className={cn(\n                              \"text-sm truncate pr-2 m-0 p-0\",\n                              isActive\n                                ? isLiquidGlass\n                                  ? \"font-bold text-white\"\n                                  : cn(\"font-semibold\", theme.text)\n                                : isLiquidGlass\n                                  ? \"font-semibold text-white\"\n                                  : \"font-semibold text-foreground\",\n                            )}\n                          >\n                            {ticket.title}\n                          </div>\n                        </div>\n                        <div className=\"flex justify-between items-center mt-1 m-0 p-0\">\n                          <div className={cn(\n                            \"text-xs font-medium truncate m-0 p-0\",\n                            isLiquidGlass ? \"text-white/70\" : \"text-muted-foreground\"\n                          )}>\n                            {ticket.author} •{\" \"}\n                            <span className={isLiquidGlass ? \"text-white/60 font-medium\" : \"text-muted-foreground font-medium\"}>{ticket.id}</span>\n                          </div>\n                          <span className={cn(\n                            \"text-[10px] font-medium shrink-0 ml-2 m-0 p-0\",\n                            isLiquidGlass ? \"text-white/60\" : \"text-muted-foreground\"\n                          )}>\n                            {ticket.time}\n                          </span>\n                        </div>\n                      </div>\n                    </div>\n                  );\n                })}\n              </div>\n            </div>\n          </aside>\n\n          <div\n            className={cn(\n              `flex-1 flex overflow-hidden m-0 p-0 ${!selectedTicket ? \"hidden md:flex\" : \"flex\"}`,\n              styles.main,\n            )}\n          >\n            {!selectedTicket ? (\n              <div className=\"flex-1 flex flex-col items-center justify-center p-8 text-center animate-in fade-in duration-500 m-0\">\n                <div className={cn(\n                  \"w-24 h-24 rounded-full flex items-center justify-center shadow-md mb-6 border m-0\",\n                  isLiquidGlass\n                    ? \"bg-white/15 border-white/25 text-white backdrop-blur-md\"\n                    : \"bg-card border-border\",\n                )}>\n                  <LifeBuoy\n                    className={cn(\"w-10 h-10\", theme.text)}\n                    strokeWidth={1.5}\n                  />\n                </div>\n                <div className={cn(\n                  \"text-2xl font-semibold mb-2 m-0 p-0\",\n                  isLiquidGlass ? \"text-white\" : \"text-foreground\"\n                )}>\n                  {data.emptyState.greetingPrefix} {data.emptyState.userName}!\n                </div>\n                <div className={cn(\n                  \"text-sm max-w-sm m-0 p-0\",\n                  isLiquidGlass ? \"text-white/70\" : \"text-muted-foreground\"\n                )}>\n                  {data.emptyState.message}\n                </div>\n              </div>\n            ) : (\n              <>\n                <div\n                  className={cn(\n                    \"flex-1 flex flex-col min-w-0 animate-in fade-in slide-in-from-right-4 duration-300 m-0 p-0 rounded-b-[inherit] overflow-hidden\",\n                    isGlassLike ? \"bg-transparent\" : \"bg-background\",\n                  )}\n                >\n                  <div\n                    className={cn(\n                      \"flex items-center justify-between p-4 shrink-0 flex-none m-0\",\n                      styles.chatHeader,\n                    )}\n                  >\n                    <div className=\"flex items-center gap-3 min-w-0 m-0 p-0\">\n                      <button\n                        className={cn(\n                          \"md:hidden p-1.5 -ml-1.5 transition-colors shrink-0 flex-none cursor-pointer\",\n                          isLiquidGlass ? \"text-white/70 hover:text-white\" : \"text-muted-foreground hover:text-foreground\"\n                        )}\n                        onClick={() => setSelectedTicketId(null)}\n                      >\n                        <ArrowLeft className=\"w-5 h-5\" />\n                      </button>\n                      <BulletproofAvatar\n                        initials={selectedTicket.initials}\n                        color={selectedTicket.color}\n                        size={32}\n                      />\n                      <div className=\"min-w-0 flex-1 m-0 p-0\">\n                        <div className={cn(\n                          \"text-sm font-semibold truncate m-0 p-0\",\n                          isLiquidGlass ? \"text-white\" : \"text-foreground\"\n                        )}>\n                          {selectedTicket.author}\n                        </div>\n                        <div className={cn(\n                          \"text-xs font-medium truncate m-0 p-0\",\n                          isLiquidGlass ? \"text-white/70\" : \"text-muted-foreground\"\n                        )}>\n                          {selectedTicket.company}\n                        </div>\n                      </div>\n                    </div>\n                    <div className=\"flex items-center gap-2 shrink-0 flex-none ml-2 m-0 p-0\">\n                      <button className={cn(\n                        \"p-2 rounded-lg transition-colors cursor-pointer\",\n                        isLiquidGlass ? \"text-white/70 hover:text-white hover:bg-white/10\" : \"text-muted-foreground hover:text-foreground hover:bg-muted\"\n                      )}>\n                        <MoreVertical className=\"w-4 h-4\" />\n                      </button>\n                    </div>\n                  </div>\n\n                  <div className=\"flex-1 p-4 sm:p-6 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] m-0\">\n                    <div className=\"flex flex-col gap-6 max-w-3xl mx-auto w-full m-0 p-0\">\n                      {selectedTicket.chatHistory.map((msg) => {\n                        const isAgent = msg.type === \"sent\";\n                        return (\n                          <div\n                            key={msg.id}\n                            className={`flex gap-3 sm:gap-4 w-full m-0 p-0 ${isAgent ? \"flex-row-reverse\" : \"flex-row\"}`}\n                          >\n                            <div\n                              className={`shrink-0 flex-none m-0 p-0 ${!msg.showAvatar && \"invisible\"}`}\n                            >\n                              <BulletproofAvatar\n                                initials={msg.initials}\n                                color={\n                                  msg.color || \"bg-zinc-600 dark:bg-zinc-700\"\n                                }\n                                size={32}\n                              />\n                            </div>\n                            <div\n                              className={`flex flex-col gap-1 min-w-0 max-w-[85%] sm:max-w-[80%] m-0 p-0 ${isAgent ? \"items-end\" : \"items-start\"}`}\n                            >\n                              <div className=\"flex items-baseline gap-2 px-1 m-0 p-0\">\n                                <span className={cn(\n                                  \"text-[11px] font-semibold m-0 p-0\",\n                                  isLiquidGlass ? \"text-white/90\" : \"text-foreground/70\"\n                                )}>\n                                  {msg.sender}\n                                </span>\n                                <span className={cn(\n                                  \"text-[10px] font-medium m-0 p-0\",\n                                  isLiquidGlass ? \"text-white/60\" : \"text-muted-foreground\"\n                                )}>\n                                  {msg.time}\n                                </span>\n                              </div>\n                              <div\n                                className={cn(\n                                  \"px-4 sm:px-5 py-3 shadow-sm text-sm whitespace-pre-wrap break-words leading-relaxed m-0\",\n                                  isAgent\n                                    ? isLiquidGlass\n                                      ? liquidGlassStyles.bubbleSent\n                                      : cn(\n                                          \"rounded-2xl rounded-tl-sm border border-transparent\",\n                                          theme.bg,\n                                        )\n                                    : isLiquidGlass\n                                      ? liquidGlassStyles.bubbleReceived\n                                      : cn(styles.chatBubbleReceived),\n                                )}\n                              >\n                                {msg.message}\n                              </div>\n                            </div>\n                          </div>\n                        );\n                      })}\n                    </div>\n                  </div>\n\n                  <div\n                    className={cn(\n                      \"p-4 shrink-0 flex-none z-10 m-0 rounded-b-[inherit]\",\n                      styles.chatFooter,\n                    )}\n                  >\n                    {isLiquidGlass ? (\n                      <div className=\"max-w-3xl mx-auto rounded-xl flex flex-col overflow-hidden transition-all m-0 p-0 border border-white/20 bg-white/10 text-white\">\n                        <div className=\"flex border-b border-white/15 bg-white/10 m-0 p-0\">\n                          {data.replySection.tabs.map((tab) => (\n                            <button\n                              key={tab}\n                              onClick={() => setActiveReplyTab(tab)}\n                              className={cn(\n                                \"px-5 py-2.5 text-[13px] font-semibold transition-colors m-0 cursor-pointer\",\n                                activeReplyTab === tab\n                                  ? liquidGlassStyles.activeTab\n                                  : \"text-white/60 hover:text-white border-b-2 border-transparent\",\n                              )}\n                            >\n                              {tab}\n                            </button>\n                          ))}\n                        </div>\n                        <textarea\n                          value={replyText}\n                          onChange={(e) => setReplyText(e.target.value)}\n                          rows={3}\n                          placeholder={\n                            activeReplyTab === \"Reply\"\n                              ? data.replySection.placeholder\n                              : \"Type an internal note...\"\n                          }\n                          className={cn(\n                            \"w-full p-4 text-sm resize-none outline-none bg-transparent text-white placeholder:text-white/50 m-0 focus:ring-0\",\n                            activeReplyTab !== \"Reply\" && \"bg-amber-500/10 text-amber-200\",\n                          )}\n                        />\n                        <div className=\"flex items-center justify-between p-3 border-t border-white/15 bg-white/5 m-0\">\n                          <div className=\"flex gap-1 m-0 p-0\">\n                            <button className=\"p-2 rounded-md transition-colors cursor-pointer text-white/70 hover:text-white hover:bg-white/10\">\n                              <Smile className=\"w-4 h-4\" />\n                            </button>\n                            <button className=\"p-2 rounded-md transition-colors cursor-pointer text-white/70 hover:text-white hover:bg-white/10\">\n                              <ImageIcon className=\"w-4 h-4\" />\n                            </button>\n                            <button className=\"p-2 rounded-md transition-colors cursor-pointer text-white/70 hover:text-white hover:bg-white/10\">\n                              <Paperclip className=\"w-4 h-4\" />\n                            </button>\n                          </div>\n                          <button\n                            onClick={handleSendReply}\n                            disabled={!replyText.trim()}\n                            className={cn(\n                              \"flex items-center gap-2 px-5 py-2 text-xs font-semibold rounded-lg transition-all active:scale-95 m-0 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed text-white\",\n                              activeReplyTab === \"Reply\"\n                                ? liquidGlassStyles.btn\n                                : \"bg-amber-500/30 hover:bg-amber-500/40 border border-amber-400/40 text-amber-100\",\n                            )}\n                          >\n                            {activeReplyTab === \"Reply\"\n                              ? data.replySection.buttonText\n                              : \"Add Note\"}{\" \"}\n                            <Send className=\"w-3.5 h-3.5\" />\n                          </button>\n                        </div>\n                      </div>\n                    ) : (\n                      <div\n                        className={cn(\n                          \"max-w-3xl mx-auto rounded-xl flex flex-col overflow-hidden shadow-sm transition-all m-0 p-0 border\",\n                          variant === \"glass\"\n                            ? \"bg-white/40 dark:bg-black/40 backdrop-blur-md border-white/20 dark:border-white/10\"\n                            : \"bg-card border-border\",\n                        )}\n                      >\n                        <div className={cn(\"flex border-b m-0 p-0\", variant === \"glass\" ? \"border-white/10 dark:border-white/10 bg-white/20 dark:bg-black/20\" : \"border-border bg-muted/50\")}>\n                          {data.replySection.tabs.map((tab) => (\n                            <button\n                              key={tab}\n                              onClick={() => setActiveReplyTab(tab)}\n                              className={cn(\n                                \"px-5 py-2.5 text-[13px] font-semibold transition-colors m-0 cursor-pointer\",\n                                activeReplyTab === tab\n                                  ? cn(variant === \"glass\" ? \"bg-white/40 dark:bg-black/40\" : \"bg-card\", theme.text, theme.activeBorder)\n                                  : \"text-muted-foreground hover:text-foreground border-b-2 border-transparent\",\n                              )}\n                            >\n                              {tab}\n                            </button>\n                          ))}\n                        </div>\n                        <textarea\n                          value={replyText}\n                          onChange={(e) => setReplyText(e.target.value)}\n                          rows={3}\n                          placeholder={activeReplyTab === \"Reply\" ? data.replySection.placeholder : \"Type an internal note...\"}\n                          className={cn(\"w-full p-4 text-sm resize-none outline-none bg-transparent text-foreground placeholder:text-muted-foreground m-0 focus:ring-0\", activeReplyTab !== \"Reply\" && \"bg-amber-50/30 dark:bg-amber-900/5\")}\n                        />\n                        <div className={cn(\"flex items-center justify-between p-3 border-t m-0\", \"border-border\")}>\n                          <div className=\"flex gap-1 m-0 p-0\">\n                            <button className={cn(\"p-2 rounded-md transition-colors cursor-pointer\", theme.focusRing, `hover:${theme.text}`, isGlassLike ? \"hover:bg-white/10\" : \"hover:bg-muted\")}>\n                              <Smile className=\"w-4 h-4\" />\n                            </button>\n                            <button className={cn(\"p-2 rounded-md transition-colors cursor-pointer\", theme.focusRing, `hover:${theme.text}`, isGlassLike ? \"hover:bg-white/10\" : \"hover:bg-muted\")}>\n                              <ImageIcon className=\"w-4 h-4\" />\n                            </button>\n                            <button className={cn(\"p-2 rounded-md transition-colors cursor-pointer\", theme.focusRing, `hover:${theme.text}`, isGlassLike ? \"hover:bg-white/10\" : \"hover:bg-muted\")}>\n                              <Paperclip className=\"w-4 h-4\" />\n                            </button>\n                          </div>\n                          <button\n                            onClick={handleSendReply}\n                            disabled={!replyText.trim()}\n                            className={cn(\n                              \"flex items-center gap-2 px-5 py-2 text-xs font-semibold rounded-lg transition-all active:scale-95 m-0 cursor-pointer shadow-sm disabled:opacity-50 disabled:cursor-not-allowed text-white\",\n                              activeReplyTab === \"Reply\" ? theme.bg : \"bg-amber-500 hover:bg-amber-600 shadow-amber-500/20 text-white\",\n                            )}\n                          >\n                            {activeReplyTab === \"Reply\" ? data.replySection.buttonText : \"Add Note\"} <Send className=\"w-3.5 h-3.5\" />\n                          </button>\n                        </div>\n                      </div>\n                    )}\n                  </div>\n                </div>\n\n                <div\n                  className={cn(\n                    \"hidden xl:flex w-[280px] shrink-0 flex-none flex-col h-full m-0 p-0 rounded-br-[inherit] overflow-hidden\",\n                    styles.detailsPane,\n                  )}\n                >\n                  <div className={cn(\n                    \"flex px-2 pt-2 border-b shrink-0 flex-none m-0 p-0\",\n                    isLiquidGlass ? \"border-white/15\" : \"border-border\"\n                  )}>\n                    {data.detailsSection.tabs.map((tab) => (\n                      <button\n                        key={tab}\n                        onClick={() => setActiveDetailsTab(tab)}\n                        className={cn(\n                          \"px-4 py-3 text-[12px] font-semibold transition-colors m-0 cursor-pointer\",\n                          activeDetailsTab === tab\n                            ? isLiquidGlass\n                              ? liquidGlassStyles.activeTab\n                              : cn(theme.text, \"border-b-2 font-semibold\", theme.activeBorder)\n                            : isLiquidGlass\n                              ? \"text-white/60 hover:text-white border-b-2 border-transparent\"\n                              : \"text-muted-foreground hover:text-foreground border-b-2 border-transparent\",\n                        )}\n                      >\n                        {tab}\n                      </button>\n                    ))}\n                  </div>\n                  <div className=\"flex-1 overflow-y-auto p-4 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] flex flex-col gap-4 m-0\">\n                    {activeDetailsTab.toLowerCase() === \"company\" ? (\n                      <>\n                        {/* Company Info Card */}\n                        <div className={cn(\"m-0 p-0\", styles.card)}>\n                          <div\n                            className={cn(\n                              \"px-4 py-3 text-[11px] font-semibold uppercase tracking-wider flex justify-between items-center m-0\",\n                              styles.cardHeader,\n                              isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\",\n                            )}\n                          >\n                            Company Info{\" \"}\n                            <User className=\"w-3.5 h-3.5 text-muted-foreground\" />\n                          </div>\n                          <div className=\"p-4 flex flex-col gap-3 m-0\">\n                            {[\n                              { label: \"Company\", val: selectedTicket.company },\n                              { label: \"Domain\", val: `${selectedTicket.company.toLowerCase().replace(/\\s+/g, \"\")}.com` },\n                              { label: \"Account Tier\", val: \"Enterprise Plan\" },\n                              { label: \"Total Tickets\", val: `${tickets.filter((t) => t.company === selectedTicket.company).length} Active` },\n                            ].map((field) => (\n                              <div key={field.label} className=\"m-0 p-0\">\n                                <div className={cn(\n                                  \"text-[10px] font-semibold uppercase tracking-wider mb-0.5 m-0 p-0\",\n                                  isLiquidGlass ? \"text-white/60\" : \"text-muted-foreground\"\n                                )}>\n                                  {field.label}\n                                </div>\n                                <div className={cn(\n                                  \"text-xs font-semibold truncate m-0 p-0\",\n                                  isLiquidGlass ? \"text-white\" : \"text-foreground\"\n                                )}>\n                                  {field.val}\n                                </div>\n                              </div>\n                            ))}\n                          </div>\n                        </div>\n\n                        {/* Team Assignment Card */}\n                        <div className={cn(\"m-0 p-0\", styles.card)}>\n                          <div\n                            className={cn(\n                              \"px-4 py-3 text-[11px] font-semibold uppercase tracking-wider flex justify-between items-center m-0\",\n                              styles.cardHeader,\n                              isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\",\n                            )}\n                          >\n                            Team Assignment{\" \"}\n                            <List className=\"w-3.5 h-3.5 text-muted-foreground\" />\n                          </div>\n                          <div className=\"p-4 flex flex-col gap-3 m-0\">\n                            {[\n                              { label: \"Department\", val: selectedTicket.properties.group || \"Support\" },\n                              { label: \"Assigned Lead\", val: selectedTicket.properties.assignedTo || \"Unassigned\" },\n                              { label: \"Priority Level\", val: selectedTicket.properties.priority || \"Medium\" },\n                              { label: \"Ticket Category\", val: selectedTicket.properties.type || \"Question\" },\n                            ].map((field) => (\n                              <div key={field.label} className=\"m-0 p-0\">\n                                <div className={cn(\n                                  \"text-[10px] font-semibold uppercase tracking-wider mb-0.5 m-0 p-0\",\n                                  isLiquidGlass ? \"text-white/60\" : \"text-muted-foreground\"\n                                )}>\n                                  {field.label}\n                                </div>\n                                <div className={cn(\n                                  \"text-xs font-semibold truncate m-0 p-0\",\n                                  isLiquidGlass ? \"text-white\" : \"text-foreground\"\n                                )}>\n                                  {field.val}\n                                </div>\n                              </div>\n                            ))}\n                          </div>\n                        </div>\n                      </>\n                    ) : (\n                      <>\n                        {/* Contact Info Card */}\n                        <div className={cn(\"m-0 p-0\", styles.card)}>\n                          <div\n                            className={cn(\n                              \"px-4 py-3 text-[11px] font-semibold uppercase tracking-wider flex justify-between items-center m-0\",\n                              styles.cardHeader,\n                              isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\",\n                            )}\n                          >\n                            Contact Info{\" \"}\n                            <User className=\"w-3.5 h-3.5 text-muted-foreground\" />\n                          </div>\n                          <div className=\"p-4 flex flex-col gap-3 m-0\">\n                            {[\n                              { label: \"Name\", val: selectedTicket.contact.name },\n                              { label: \"Email\", val: selectedTicket.contact.email },\n                              { label: \"Phone\", val: selectedTicket.contact.phone },\n                              {\n                                label: \"Identifier\",\n                                val: selectedTicket.contact.identifier,\n                              },\n                            ].map((field) => (\n                              <div key={field.label} className=\"m-0 p-0\">\n                                <div className={cn(\n                                  \"text-[10px] font-semibold uppercase tracking-wider mb-0.5 m-0 p-0\",\n                                  isLiquidGlass ? \"text-white/60\" : \"text-muted-foreground\"\n                                )}>\n                                  {field.label}\n                                </div>\n                                <div className={cn(\n                                  \"text-xs font-semibold truncate m-0 p-0\",\n                                  isLiquidGlass ? \"text-white\" : \"text-foreground\"\n                                )}>\n                                  {field.val}\n                                </div>\n                              </div>\n                            ))}\n                          </div>\n                        </div>\n\n\n\n                        {/* Ticket Details Info Card */}\n                        <div className={cn(\"m-0 p-0\", styles.card)}>\n                          <div\n                            className={cn(\n                              \"px-4 py-3 text-[11px] font-semibold uppercase tracking-wider flex justify-between items-center m-0\",\n                              styles.cardHeader,\n                              isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\",\n                            )}\n                          >\n                            Ticket Details{\" \"}\n                            <List className=\"w-3.5 h-3.5 text-muted-foreground\" />\n                          </div>\n                          <div className=\"p-4 flex flex-col gap-3 m-0\">\n                            {[\n                              { label: \"Status\", val: selectedTicket.status.toUpperCase() },\n                              { label: \"Group\", val: selectedTicket.properties.group || \"Support\" },\n                              { label: \"Assigned Agent\", val: selectedTicket.properties.assignedTo || \"Unassigned\" },\n                              { label: \"Priority\", val: selectedTicket.properties.priority || \"Medium\" },\n                            ].map((field) => (\n                              <div key={field.label} className=\"m-0 p-0\">\n                                <div className={cn(\n                                  \"text-[10px] font-semibold uppercase tracking-wider mb-0.5 m-0 p-0\",\n                                  isLiquidGlass ? \"text-white/60\" : \"text-muted-foreground\"\n                                )}>\n                                  {field.label}\n                                </div>\n                                <div className={cn(\n                                  \"text-xs font-semibold truncate m-0 p-0\",\n                                  isLiquidGlass ? \"text-white\" : \"text-foreground\"\n                                )}>\n                                  {field.val}\n                                </div>\n                              </div>\n                            ))}\n                          </div>\n                        </div>\n\n                        {/* Quick Activity Summary Card (2 lines) */}\n                        <div className={cn(\"m-0 p-0\", styles.card)}>\n                          <div\n                            className={cn(\n                              \"px-4 py-2.5 text-[11px] font-semibold uppercase tracking-wider flex justify-between items-center m-0\",\n                              styles.cardHeader,\n                              isLiquidGlass ? \"text-white/80\" : \"text-muted-foreground\",\n                            )}\n                          >\n                            Activity{\" \"}\n                            <Clock className=\"w-3.5 h-3.5 text-muted-foreground\" />\n                          </div>\n                          <div className=\"p-3.5 flex flex-col gap-2.5 m-0\">\n                            {[\n                              { label: \"Created\", val: selectedTicket.time || \"2 days ago\" },\n                              { label: \"Last Response\", val: \"5 minutes ago\" },\n                            ].map((field) => (\n                              <div key={field.label} className=\"m-0 p-0\">\n                                <div className={cn(\n                                  \"text-[10px] font-semibold uppercase tracking-wider mb-0.5 m-0 p-0\",\n                                  isLiquidGlass ? \"text-white/60\" : \"text-muted-foreground\"\n                                )}>\n                                  {field.label}\n                                </div>\n                                <div className={cn(\n                                  \"text-xs font-semibold truncate m-0 p-0\",\n                                  isLiquidGlass ? \"text-white\" : \"text-foreground\"\n                                )}>\n                                  {field.val}\n                                </div>\n                              </div>\n                            ))}\n                          </div>\n                        </div>\n                      </>\n                    )}\n                  </div>\n                </div>\n              </>\n            )}\n          </div>\n        </div>\n      )}\n    </div>\n  );\n\n  if (isLiquidGlass) {\n    const liquidBg =\n      bgImage ||\n      \"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1600,c_limit/v1790146209/photo-1470071459604-3b5ec3a7fe05-1790146212205.jpg\";\n\n    return (\n      <div\n        className={cn(\n          \"relative w-full min-h-[720px] flex items-center justify-center overflow-hidden rounded-3xl p-2 sm:p-6 md:p-8 isolate [contain:paint] [transform:translateZ(0)]\",\n          className,\n        )}\n        style={customStyle}\n      >\n        <LiquidGlassSvgFilter id=\"glass-blur-support\" bgImage={liquidBg} />\n\n        {/* Full-bleed background image covering the entire container */}\n        <img\n          src={liquidBg}\n          alt=\"Liquid glass backdrop\"\n          className=\"absolute inset-0 w-full h-full object-cover select-none pointer-events-none\"\n        />\n\n        {/* Floating Liquid Glass Card */}\n        <LiquidGlassWrapper\n          radius={formattedRadius ?? \"var(--radius-2xl, 1rem)\"}\n          bgImage={liquidBg}\n          filterId=\"glass-blur-support\"\n          contrastOverlayClassName=\"bg-black/30 dark:bg-black/45\"\n          className={cn(\n            \"relative z-10 w-full h-[700px] text-white transition-all duration-300 overflow-hidden flex flex-col\",\n            typeof rounded === \"string\" && !formatRadius(rounded) ? rounded : \"rounded-2xl\",\n            \"shadow-[0_25px_60px_rgba(0,0,0,0.5)] [--foreground:#ffffff] [--muted-foreground:rgba(255,255,255,0.75)] [--color-foreground:#ffffff] [--color-muted-foreground:rgba(255,255,255,0.75)] [--border:rgba(255,255,255,0.2)] [--background:rgba(255,255,255,0.12)] [--card:rgba(255,255,255,0.12)]\",\n          )}\n          style={dynamicRadiusStyle}\n        >\n          {dashboardCard}\n        </LiquidGlassWrapper>\n      </div>\n    );\n  }\n\n  if (variant === \"glass\") {\n    const glassBg =\n      bgImage ||\n      \"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1600,c_limit/v1790146210/photo-1506744038136-46273834b3fb-1790146212208.jpg\";\n\n    return (\n      <div\n        className=\"relative w-full min-h-[720px] flex items-center justify-center overflow-hidden rounded-3xl p-2 sm:p-6 md:p-8\"\n        style={customStyle}\n      >\n        {/* Full-bleed glass backdrop */}\n        <img\n          src={glassBg}\n          alt=\"Glass landscape backdrop\"\n          className=\"absolute inset-0 w-full h-full object-cover select-none pointer-events-none\"\n        />\n        <div className=\"absolute inset-0 bg-black/45 backdrop-blur-[1px] pointer-events-none\" />\n\n        {/* Floating Glass Card */}\n        <div className=\"relative z-10 w-full h-[700px] bg-background/65 backdrop-blur-xl rounded-2xl shadow-2xl border border-foreground/10 overflow-hidden flex flex-col transition-colors duration-300\">\n          {dashboardCard}\n        </div>\n      </div>\n    );\n  }\n\n  return dashboardCard;\n}\n",
      "type": "registry:component",
      "target": "components/custom/blocks/Support-dashboard.tsx"
    }
  ],
  "docs": "Named exports: SupportDashboard, plus Ticket, TicketContact, TicketSLA, TicketMessage and SupportData types. `layout` switches between chat and table views over the same ticket data. Depends on `select`. The most feature-complete block in the registry — expect to replace its demo data wholesale.",
  "categories": [
    "communication",
    "data-display"
  ],
  "type": "registry:component"
}
