{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "calendar",
  "title": "Calendar",
  "author": "AlgorizeTech",
  "description": "Ask the user to pick one of 4 calendar variants: https://avaraui.com/view/calendar. This item holds 4 of them as looks of one component (default, minimal, glass, liquid-glass). Skip the question if the user already named one. A full month calendar with event dots, range selection and a dashboard layout. Reach for it when dates need to be seen in context rather than just entered.",
  "dependencies": [
    "class-variance-authority",
    "lucide-react",
    "react-day-picker"
  ],
  "registryDependencies": [
    "https://avaraui.com/r/select.json",
    "https://avaraui.com/r/ui-button.json",
    "utils"
  ],
  "files": [
    {
      "path": "src/components/custom/blocks/Calendar.tsx",
      "content": "\"use client\";\n\nimport {\n  Calendar as CalendarIcon,\n  Calendar1,\n  CheckSquare,\n  ChevronDown,\n  ChevronDownIcon,\n  ChevronLeft,\n  ChevronLeftIcon,\n  ChevronRight,\n  ChevronRightIcon,\n  Clock,\n  Download,\n  Edit2,\n  Hash,\n  Menu,\n  MessageSquare,\n  Plus,\n  Square,\n  Trash2,\n  Video,\n  X,\n} from \"lucide-react\";\nimport * as React from \"react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport { DayButton, DayPicker, getDefaultClassNames } from \"react-day-picker\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"../ui/button\";\nimport { buttonVariants } from \"../ui/button-variants\";\nimport { SelectBlock } from \"./SelectBlock\";\n\nconst EVENT_TYPE_OPTIONS = [\n  { label: \"Pentest\", value: \"pentest\" },\n  { label: \"Kick-Off\", value: \"kickoff\" },\n];\n\nconst EVENT_PLATFORM_OPTIONS = [\n  { label: \"Google Meet\", value: \"meet\" },\n  { label: \"Slack\", value: \"slack\" },\n  { label: \"Discord\", value: \"discord\" },\n];\n\n// ==========================================\n// VARIANT & COLOR CONFIGURATION\n// ==========================================\nexport type CalendarVariant = \"default\" | \"minimal\" | \"glass\" | \"liquid-glass\";\n\nexport function LiquidGlassSvgFilter() {\n  return (\n    <>\n      <img\n        src=\"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1200,c_limit/v1790146209/photo-1470071459604-3b5ec3a7fe05-1790146212205.jpg\"\n        alt=\"\"\n        aria-hidden=\"true\"\n        style={{\n          position: \"fixed\",\n          top: \"-9999px\",\n          left: \"-9999px\",\n          width: \"1px\",\n          height: \"1px\",\n          opacity: 0,\n          pointerEvents: \"none\",\n        }}\n      />\n      <svg\n        style={{\n          position: \"fixed\",\n          top: \"-9999px\",\n          left: \"-9999px\",\n          width: 0,\n          height: 0,\n          pointerEvents: \"none\",\n        }}\n        aria-hidden=\"true\"\n      >\n        <defs>\n          <filter\n            id=\"glass-blur\"\n            x=\"0\"\n            y=\"0\"\n            width=\"100%\"\n            height=\"100%\"\n            filterUnits=\"objectBoundingBox\"\n          >\n            <feTurbulence\n              type=\"fractalNoise\"\n              baseFrequency=\"0.003 0.007\"\n              numOctaves=\"1\"\n              result=\"turbulence\"\n            />\n            <feDisplacementMap\n              in=\"SourceGraphic\"\n              in2=\"turbulence\"\n              scale=\"200\"\n              xChannelSelector=\"R\"\n              yChannelSelector=\"G\"\n            />\n          </filter>\n        </defs>\n      </svg>\n    </>\n  );\n}\n\nconst TIME_SLOTS = [\n  { label: \"12:00 AM\", startHour: 0, timeStr: \"00:00\" },\n  { label: \"1:00 AM\", startHour: 1, timeStr: \"01:00\" },\n  { label: \"2:00 AM\", startHour: 2, timeStr: \"02:00\" },\n  { label: \"3:00 AM\", startHour: 3, timeStr: \"03:00\" },\n  { label: \"4:00 AM\", startHour: 4, timeStr: \"04:00\" },\n  { label: \"5:00 AM\", startHour: 5, timeStr: \"05:00\" },\n  { label: \"6:00 AM\", startHour: 6, timeStr: \"06:00\" },\n  { label: \"7:00 AM\", startHour: 7, timeStr: \"07:00\" },\n  { label: \"8:00 AM\", startHour: 8, timeStr: \"08:00\" },\n  { label: \"9:00 AM\", startHour: 9, timeStr: \"09:00\" },\n  { label: \"10:00 AM\", startHour: 10, timeStr: \"10:00\" },\n  { label: \"11:00 AM\", startHour: 11, timeStr: \"11:00\" },\n  { label: \"12:00 PM\", startHour: 12, timeStr: \"12:00\" },\n  { label: \"1:00 PM\", startHour: 13, timeStr: \"13:00\" },\n  { label: \"2:00 PM\", startHour: 14, timeStr: \"14:00\" },\n  { label: \"3:00 PM\", startHour: 15, timeStr: \"15:00\" },\n  { label: \"4:00 PM\", startHour: 16, timeStr: \"16:00\" },\n  { label: \"5:00 PM\", startHour: 17, timeStr: \"17:00\" },\n  { label: \"6:00 PM\", startHour: 18, timeStr: \"18:00\" },\n  { label: \"7:00 PM\", startHour: 19, timeStr: \"19:00\" },\n  { label: \"8:00 PM\", startHour: 20, timeStr: \"20:00\" },\n  { label: \"9:00 PM\", startHour: 21, timeStr: \"21:00\" },\n  { label: \"10:00 PM\", startHour: 22, timeStr: \"22:00\" },\n  { label: \"11:00 PM\", startHour: 23, timeStr: \"23:00\" },\n];\n\nconst getSlotIndexForTime = (timeStr?: string) => {\n  if (!timeStr) return 2;\n  const parts = timeStr.split(\":\");\n  const hour = parseInt(parts[0], 10);\n  if (isNaN(hour)) return 2;\n\n  for (let i = TIME_SLOTS.length - 1; i >= 0; i--) {\n    if (hour >= TIME_SLOTS[i].startHour) {\n      return i;\n    }\n  }\n  return 0;\n};\n\n// Added (string & {}) so it accepts arbitrary hex codes without losing IDE autocomplete for the presets\nexport type CalendarColor =\n  | \"indigo\"\n  | \"rose\"\n  | \"emerald\"\n  | \"blue\"\n  | \"zinc\"\n  | (string & {});\n\nconst dashboardVariants: Record<CalendarVariant, Record<string, string>> = {\n  default: {\n    wrapper:\n      \"bg-card text-card-foreground border border-border shadow-sm\",\n    sidebar:\n      \"bg-card text-card-foreground border-r border-border\",\n    header:\n      \"bg-card text-card-foreground border-b border-border\",\n    gridOuter: \"bg-border p-px\",\n    gridGap: \"gap-px\",\n    gridHeader:\n      \"bg-card/95 border-b border-border\",\n    cellBg:\n      \"bg-card hover:bg-muted/50 text-card-foreground\",\n  },\n  minimal: {\n    wrapper: \"bg-transparent border-none\",\n    sidebar:\n      \"bg-muted/50 rounded-2xl border border-border lg:mr-6\",\n    header: \"bg-transparent border-none mb-4 rounded-xl\",\n    gridOuter: \"bg-transparent p-0\",\n    gridGap: \"gap-2 sm:gap-3\",\n    gridHeader: \"bg-transparent border-none pb-2\",\n    cellBg:\n      \"bg-muted rounded-2xl border border-border hover:border-foreground/20 hover:shadow-sm\",\n  },\n  glass: {\n    wrapper:\n      \"bg-white/30 dark:bg-black/25 backdrop-blur-xl border border-white/40 dark:border-white/10 shadow-2xl text-neutral-900 dark:text-white\",\n    sidebar:\n      \"bg-white/20 dark:bg-black/20 border-r border-white/30 dark:border-white/10\",\n    header: \"bg-transparent border-b border-white/30 dark:border-white/10\",\n    gridOuter: \"bg-white/20 dark:bg-black/20 p-px\",\n    gridGap: \"gap-px\",\n    gridHeader:\n      \"bg-white/30 dark:bg-black/30 backdrop-blur-md border-b border-white/30 dark:border-white/10\",\n    cellBg:\n      \"bg-white/25 dark:bg-black/30 hover:bg-white/40 dark:hover:bg-black/50 backdrop-blur-sm\",\n  },\n  \"liquid-glass\": {\n    wrapper:\n      \"bg-transparent border-0 shadow-[0_25px_60px_rgba(0,0,0,0.45)] text-white rounded-[22px] sm:rounded-[28px] [--foreground:#ffffff] [--muted-foreground:rgba(255,255,255,0.75)] [--color-foreground:#ffffff] [--color-muted-foreground:rgba(255,255,255,0.75)]\",\n    sidebar:\n      \"bg-white/[0.06] dark:bg-white/[0.04] border-r border-white/20 text-white\",\n    header: \"bg-white/[0.04] dark:bg-white/[0.02] border-b border-white/20 text-white\",\n    gridOuter: \"bg-white/15 p-px\",\n    gridGap: \"gap-px\",\n    gridHeader:\n      \"bg-white/[0.08] dark:bg-white/[0.05] backdrop-blur-xs border-b border-white/20 text-white\",\n    cellBg:\n      \"bg-white/[0.03] hover:bg-white/[0.10] transition-colors text-white\",\n  },\n};\n\nconst colorThemes: Record<string, Record<string, string>> = {\n  primary: {\n    primaryBg: \"bg-primary hover:opacity-90 text-primary-foreground shadow-sm\",\n    primaryText: \"text-primary\",\n    lightBg: \"bg-primary/15 text-primary dark:bg-primary/20 dark:text-primary\",\n    focusRing: \"focus:ring-ring\",\n    pulse: \"bg-primary\",\n  },\n  indigo: {\n    primaryBg:\n      \"bg-indigo-600 hover:bg-indigo-700 text-white shadow-indigo-500/20\",\n    primaryText: \"text-indigo-600 dark:text-indigo-400\",\n    lightBg:\n      \"bg-indigo-100 text-indigo-700 dark:bg-indigo-900/50 dark:text-indigo-300\",\n    focusRing: \"focus:ring-indigo-500\",\n    pulse: \"bg-indigo-500\",\n  },\n  rose: {\n    primaryBg: \"bg-rose-600 hover:bg-rose-700 text-white shadow-rose-500/20\",\n    primaryText: \"text-rose-600 dark:text-rose-400\",\n    lightBg: \"bg-rose-100 text-rose-700 dark:bg-rose-900/50 dark:text-rose-300\",\n    focusRing: \"focus:ring-rose-500\",\n    pulse: \"bg-rose-500\",\n  },\n  emerald: {\n    primaryBg:\n      \"bg-emerald-600 hover:bg-emerald-700 text-white shadow-emerald-500/20\",\n    primaryText: \"text-emerald-600 dark:text-emerald-400\",\n    lightBg:\n      \"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/50 dark:text-emerald-300\",\n    focusRing: \"focus:ring-emerald-500\",\n    pulse: \"bg-emerald-500\",\n  },\n  blue: {\n    primaryBg: \"bg-blue-600 hover:bg-blue-700 text-white shadow-blue-500/20\",\n    primaryText: \"text-blue-600 dark:text-blue-400\",\n    lightBg: \"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300\",\n    focusRing: \"focus:ring-blue-500\",\n    pulse: \"bg-blue-500\",\n  },\n  zinc: {\n    primaryBg:\n      \"bg-zinc-900 hover:bg-zinc-800 text-white dark:bg-white dark:hover:bg-gray-200 dark:text-black shadow-zinc-900/20\",\n    primaryText: \"text-zinc-900 dark:text-white\",\n    lightBg: \"bg-zinc-200 text-zinc-900 dark:bg-zinc-800 dark:text-white\",\n    focusRing: \"focus:ring-zinc-500 dark:focus:ring-zinc-400\",\n    pulse: \"bg-zinc-900 dark:bg-white\",\n  },\n};\n\n// --- START: react-day-picker wrapper ---\nfunction Calendar({\n  className,\n  classNames,\n  showOutsideDays = true,\n  captionLayout = \"label\",\n  buttonVariant = \"ghost\",\n  formatters,\n  components,\n  ...props\n}: React.ComponentProps<typeof DayPicker> & {\n  /** Button style used for the nav and day cells. */\n  buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\n}) {\n  const defaultClassNames = getDefaultClassNames();\n  return (\n    <DayPicker\n      showOutsideDays={showOutsideDays}\n      className={cn(\n        \"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\n        String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n        String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n        className,\n      )}\n      captionLayout={captionLayout}\n      formatters={{\n        formatMonthDropdown: (date) =>\n          date.toLocaleString(\"en-US\", { month: \"short\" }),\n        ...formatters,\n      }}\n      classNames={{\n        root: cn(\"w-fit\", defaultClassNames.root),\n        months: cn(\n          \"flex gap-4 flex-col md:flex-row relative\",\n          defaultClassNames.months,\n        ),\n        month: cn(\"flex flex-col w-full gap-4\", defaultClassNames.month),\n        nav: cn(\n          \"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between\",\n          defaultClassNames.nav,\n        ),\n        button_previous: cn(\n          buttonVariants({ variant: buttonVariant }),\n          \"size-(--cell-size) aria-disabled:opacity-50 p-0 cursor-pointer select-none\",\n          defaultClassNames.button_previous,\n        ),\n        button_next: cn(\n          buttonVariants({ variant: buttonVariant }),\n          \"size-(--cell-size) aria-disabled:opacity-50 p-0 cursor-pointer select-none\",\n          defaultClassNames.button_next,\n        ),\n        month_caption: cn(\n          \"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)\",\n          defaultClassNames.month_caption,\n        ),\n        dropdowns: cn(\n          \"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5\",\n          defaultClassNames.dropdowns,\n        ),\n        dropdown_root: cn(\n          \"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md cursor-pointer\",\n          defaultClassNames.dropdown_root,\n        ),\n        dropdown: cn(\n          \"absolute bg-popover inset-0 opacity-0 cursor-pointer\",\n          defaultClassNames.dropdown,\n        ),\n        caption_label: cn(\n          \"select-none font-medium cursor-pointer\",\n          captionLayout === \"label\"\n            ? \"text-sm\"\n            : \"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5\",\n          defaultClassNames.caption_label,\n        ),\n        ...({ table: \"w-full border-collapse\" } as Record<string, string>),\n        weekdays: cn(\"flex\", defaultClassNames.weekdays),\n        weekday: cn(\n          \"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none\",\n          defaultClassNames.weekday,\n        ),\n        week: cn(\"flex w-full mt-2\", defaultClassNames.week),\n        week_number_header: cn(\n          \"select-none w-(--cell-size)\",\n          defaultClassNames.week_number_header,\n        ),\n        week_number: cn(\n          \"text-[0.8rem] select-none text-muted-foreground\",\n          defaultClassNames.week_number,\n        ),\n        day: cn(\n          \"relative w-full h-full p-0 text-center cursor-pointer [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none\",\n          defaultClassNames.day,\n        ),\n        range_start: cn(\n          \"rounded-l-md bg-muted\",\n          defaultClassNames.range_start,\n        ),\n        range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\n        range_end: cn(\"rounded-r-md bg-muted\", defaultClassNames.range_end),\n        today: cn(\n          \"bg-muted text-foreground rounded-md data-[selected=true]:rounded-none\",\n          defaultClassNames.today,\n        ),\n        outside: cn(\n          \"text-muted-foreground aria-selected:text-muted-foreground\",\n          defaultClassNames.outside,\n        ),\n        disabled: cn(\n          \"text-muted-foreground opacity-50\",\n          defaultClassNames.disabled,\n        ),\n        hidden: cn(\"invisible\", defaultClassNames.hidden),\n        ...classNames,\n      }}\n      components={{\n        Root: ({ className, rootRef, ...props }) => (\n          <div\n            data-slot=\"calendar\"\n            ref={rootRef}\n            className={cn(className)}\n            {...props}\n          />\n        ),\n        Chevron: ({ className, orientation, ...props }) => {\n          if (orientation === \"left\")\n            return (\n              <ChevronLeftIcon\n                className={cn(\"size-4 cursor-pointer\", className)}\n                {...props}\n              />\n            );\n          if (orientation === \"right\")\n            return (\n              <ChevronRightIcon\n                className={cn(\"size-4 cursor-pointer\", className)}\n                {...props}\n              />\n            );\n          return (\n            <ChevronDownIcon\n              className={cn(\"size-4 cursor-pointer\", className)}\n              {...props}\n            />\n          );\n        },\n        DayButton: CalendarDayButton,\n        WeekNumber: ({ children, ...props }) => (\n          <td {...props}>\n            <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n              {children}\n            </div>\n          </td>\n        ),\n        ...components,\n      }}\n      {...props}\n    />\n  );\n}\n\nfunction CalendarDayButton({\n  className,\n  day,\n  modifiers,\n  ...props\n}: React.ComponentProps<typeof DayButton>) {\n  const defaultClassNames = getDefaultClassNames();\n  const ref = React.useRef<HTMLButtonElement>(null);\n  React.useEffect(() => {\n    if (modifiers.focused) ref.current?.focus();\n  }, [modifiers.focused]);\n  return (\n    <Button\n      ref={ref}\n      variant=\"ghost\"\n      size=\"icon\"\n      data-day={day.date.toLocaleDateString(\"en-US\")}\n      data-selected-single={\n        modifiers.selected &&\n        !modifiers.range_start &&\n        !modifiers.range_end &&\n        !modifiers.range_middle\n      }\n      data-range-start={modifiers.range_start}\n      data-range-end={modifiers.range_end}\n      data-range-middle={modifiers.range_middle}\n      className={cn(\n        \"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal cursor-pointer group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70\",\n        defaultClassNames.day,\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n// --- END: react-day-picker wrapper ---\n\nfunction useThemeDetector() {\n  const [isDark, setIsDark] = useState(false);\n\n  useEffect(() => {\n    const checkTheme = () => {\n      setIsDark(document.documentElement.classList.contains(\"dark\"));\n    };\n    checkTheme();\n    const observer = new MutationObserver(checkTheme);\n    observer.observe(document.documentElement, {\n      attributes: true,\n      attributeFilter: [\"class\"],\n    });\n    return () => observer.disconnect();\n  }, []);\n\n  return isDark;\n}\n\nconst formatDisplayDate = (dateStr: string) => {\n  if (!dateStr) return \"\";\n  const [y, m, d] = dateStr.split(\"-\").map(Number);\n  if (!y || !m || !d) return dateStr;\n  const dt = new Date(y, m - 1, d);\n  const day = String(dt.getDate()).padStart(2, \"0\");\n  const month = dt.toLocaleString(\"en-US\", { month: \"short\" });\n  const year = dt.getFullYear();\n  return `${day}-${month}-${year}`;\n};\n\nconst formatDisplayTime = (timeStr: string) => {\n  if (!timeStr) return \"12:00 PM\";\n  const [hStr, mStr] = timeStr.split(\":\");\n  let h = parseInt(hStr, 10);\n  const m = parseInt(mStr || \"0\", 10);\n  if (isNaN(h)) return timeStr;\n  const ampm = h >= 12 ? \"PM\" : \"AM\";\n  h = h % 12;\n  h = h ? h : 12;\n  return `${String(h).padStart(2, \"0\")}:${String(m).padStart(2, \"0\")} ${ampm}`;\n};\n\nfunction CustomDatePicker({\n  value,\n  onChange,\n  variant,\n  theme,\n}: {\n  value: string;\n  onChange: (val: string) => void;\n  variant?: CalendarVariant;\n  theme: Record<string, string>;\n}) {\n  const [isOpen, setIsOpen] = useState(false);\n  const containerRef = useRef<HTMLDivElement>(null);\n\n  const initialDate = useMemo(() => {\n    if (!value) return new Date();\n    const [y, m, d] = value.split(\"-\").map(Number);\n    if (y && m && d) return new Date(y, m - 1, d);\n    return new Date();\n  }, [value]);\n\n  const [viewDate, setViewDate] = useState<Date>(initialDate);\n\n  const [prevSync, setPrevSync] = useState({ value, isOpen });\n  if (prevSync.value !== value || prevSync.isOpen !== isOpen) {\n    setPrevSync({ value, isOpen });\n    if (value) {\n      const [y, m, d] = value.split(\"-\").map(Number);\n      if (y && m && d) setViewDate(new Date(y, m - 1, d));\n    }\n  }\n\n  useEffect(() => {\n    if (!isOpen) return;\n    const handleClickOutside = (e: MouseEvent) => {\n      if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n        setIsOpen(false);\n      }\n    };\n    document.addEventListener(\"mousedown\", handleClickOutside);\n    return () => document.removeEventListener(\"mousedown\", handleClickOutside);\n  }, [isOpen]);\n\n  const currentYear = viewDate.getFullYear();\n  const currentMonth = viewDate.getMonth();\n\n  const calendarCells = useMemo(() => {\n    const cells: { day: number; isCurrentMonth: boolean; dateKey: string }[] = [];\n    const firstDay = new Date(currentYear, currentMonth, 1).getDay();\n    const startOffset = firstDay === 0 ? 6 : firstDay - 1;\n    const daysInCurrentMonth = new Date(currentYear, currentMonth + 1, 0).getDate();\n    const daysInPrevMonth = new Date(currentYear, currentMonth, 0).getDate();\n\n    for (let i = startOffset - 1; i >= 0; i--) {\n      const d = daysInPrevMonth - i;\n      const prevDate = new Date(currentYear, currentMonth - 1, d);\n      cells.push({\n        day: d,\n        isCurrentMonth: false,\n        dateKey: `${prevDate.getFullYear()}-${String(prevDate.getMonth() + 1).padStart(2, \"0\")}-${String(d).padStart(2, \"0\")}`,\n      });\n    }\n\n    for (let i = 1; i <= daysInCurrentMonth; i++) {\n      cells.push({\n        day: i,\n        isCurrentMonth: true,\n        dateKey: `${currentYear}-${String(currentMonth + 1).padStart(2, \"0\")}-${String(i).padStart(2, \"0\")}`,\n      });\n    }\n\n    const totalCells = cells.length > 35 ? 42 : 35;\n    const remaining = totalCells - cells.length;\n    for (let i = 1; i <= remaining; i++) {\n      const nextDate = new Date(currentYear, currentMonth + 1, i);\n      cells.push({\n        day: i,\n        isCurrentMonth: false,\n        dateKey: `${nextDate.getFullYear()}-${String(nextDate.getMonth() + 1).padStart(2, \"0\")}-${String(i).padStart(2, \"0\")}`,\n      });\n    }\n\n    return cells;\n  }, [currentYear, currentMonth]);\n\n  return (\n    <div ref={containerRef} className=\"relative\">\n      <label\n        className={cn(\n          \"block text-sm font-medium mb-1\",\n          variant === \"liquid-glass\"\n            ? \"text-white/90\"\n            : variant === \"glass\"\n              ? \"text-neutral-800 dark:text-white/90\"\n              : \"text-foreground\",\n        )}\n      >\n        Date\n      </label>\n      <input type=\"hidden\" name=\"date\" value={value} />\n      <button\n        type=\"button\"\n        onClick={() => setIsOpen(!isOpen)}\n        className={cn(\n          \"w-full cursor-pointer flex items-center justify-between border rounded-xl px-3 py-2 text-sm bg-transparent transition-all outline-none\",\n          variant === \"liquid-glass\"\n            ? \"border-white/25 text-white bg-white/10 hover:bg-white/15 focus:bg-white/20 focus:border-white/50 shadow-[inset_0_1px_1px_rgba(255,255,255,0.15)]\"\n            : variant === \"glass\"\n              ? \"border-black/15 text-neutral-900 bg-black/5 hover:bg-black/10 focus:bg-white/40 focus:border-black/30 dark:border-white/25 dark:text-white dark:bg-white/10 dark:hover:bg-white/15 dark:focus:bg-white/20 dark:focus:border-white/50\"\n              : \"border-input text-foreground bg-background hover:bg-muted/50\",\n          isOpen && (theme.focusRing || \"ring-2 ring-primary/20\"),\n        )}\n      >\n        <span className=\"font-medium truncate\">{formatDisplayDate(value) || \"Pick a date\"}</span>\n        <CalendarIcon\n          className={cn(\n            \"w-4 h-4 shrink-0 opacity-70 cursor-pointer\",\n            variant === \"liquid-glass\"\n              ? \"text-white/80\"\n              : variant === \"glass\"\n                ? \"text-neutral-700 dark:text-white/80\"\n                : \"text-muted-foreground\",\n          )}\n        />\n      </button>\n\n      {isOpen && (\n        <div\n          className={cn(\n            \"absolute top-full left-0 mt-2 z-50 w-72 rounded-2xl border p-3.5 shadow-2xl animate-in fade-in zoom-in-95 duration-150 cursor-default\",\n            variant === \"liquid-glass\"\n              ? \"bg-black/50 backdrop-blur-3xl border border-white/30 text-white shadow-[0_25px_60px_rgba(0,0,0,0.6),inset_0_1px_1px_rgba(255,255,255,0.4),inset_-1px_-1px_1px_rgba(255,255,255,0.15)]\"\n              : variant === \"glass\"\n                ? \"bg-white/45 dark:bg-black/60 backdrop-blur-3xl border-white/50 dark:border-white/20 text-neutral-900 dark:text-white shadow-2xl\"\n                : \"bg-popover text-popover-foreground border-border\",\n          )}\n          onClick={(e) => e.stopPropagation()}\n        >\n          <div className=\"flex items-center justify-between mb-2\">\n            <span className=\"text-sm font-semibold\">\n              {viewDate.toLocaleString(\"en-US\", { month: \"long\" })} {currentYear}\n            </span>\n            <div className=\"flex items-center gap-1\">\n              <button\n                type=\"button\"\n                onClick={(e) => {\n                  e.stopPropagation();\n                  setViewDate(new Date(currentYear, currentMonth - 1, 1));\n                }}\n                className={cn(\n                  \"p-1 rounded-md transition-colors cursor-pointer\",\n                  variant === \"liquid-glass\"\n                    ? \"hover:bg-white/20 text-white border border-white/20\"\n                    : variant === \"glass\"\n                      ? \"hover:bg-black/10 dark:hover:bg-white/15\"\n                      : \"hover:bg-muted\",\n                )}\n              >\n                <ChevronLeft className=\"w-4 h-4 cursor-pointer\" />\n              </button>\n              <button\n                type=\"button\"\n                onClick={(e) => {\n                  e.stopPropagation();\n                  setViewDate(new Date(currentYear, currentMonth + 1, 1));\n                }}\n                className={cn(\n                  \"p-1 rounded-md transition-colors cursor-pointer\",\n                  variant === \"liquid-glass\"\n                    ? \"hover:bg-white/20 text-white border border-white/20\"\n                    : variant === \"glass\"\n                      ? \"hover:bg-black/10 dark:hover:bg-white/15\"\n                      : \"hover:bg-muted\",\n                )}\n              >\n                <ChevronRight className=\"w-4 h-4 cursor-pointer\" />\n              </button>\n            </div>\n          </div>\n\n          <div className=\"grid grid-cols-7 gap-1 text-center mb-1\">\n            {[\"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\", \"Su\"].map((d) => (\n              <span key={d} className=\"text-[11px] font-medium opacity-60\">\n                {d}\n              </span>\n            ))}\n          </div>\n\n          <div className=\"grid grid-cols-7 gap-1\">\n            {calendarCells.map((cell, idx) => {\n              const isSelected = cell.dateKey === value;\n              return (\n                <button\n                  key={idx}\n                  type=\"button\"\n                  onClick={(e) => {\n                    e.stopPropagation();\n                    onChange(cell.dateKey);\n                    setIsOpen(false);\n                  }}\n                  className={cn(\n                    \"h-8 w-8 mx-auto flex items-center justify-center rounded-lg text-xs transition-colors cursor-pointer\",\n                    !cell.isCurrentMonth && (variant === \"liquid-glass\" ? \"opacity-35 text-white/50\" : \"opacity-35\"),\n                    isSelected\n                      ? variant === \"liquid-glass\"\n                        ? \"bg-white/30 text-white font-bold border border-white/40 shadow-[0_0_12px_rgba(255,255,255,0.35),inset_0_1px_1px_rgba(255,255,255,0.4)]\"\n                        : cn(theme.primaryBg, \"font-bold text-white shadow-xs\")\n                      : variant === \"liquid-glass\"\n                        ? \"hover:bg-white/20 text-white\"\n                        : variant === \"glass\"\n                          ? \"hover:bg-black/10 dark:hover:bg-white/15 text-neutral-900 dark:text-white\"\n                          : \"hover:bg-muted text-foreground\",\n                  )}\n                >\n                  {cell.day}\n                </button>\n              );\n            })}\n          </div>\n\n          <div className={cn(\n            \"mt-2 pt-2 border-t flex justify-between items-center text-xs\",\n            variant === \"liquid-glass\"\n              ? \"border-white/15 text-white\"\n              : \"border-black/10 dark:border-white/10\",\n          )}>\n            <button\n              type=\"button\"\n              onClick={(e) => {\n                e.stopPropagation();\n                const today = new Date();\n                const k = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, \"0\")}-${String(today.getDate()).padStart(2, \"0\")}`;\n                setViewDate(today);\n                onChange(k);\n                setIsOpen(false);\n              }}\n              className={cn(\n                \"font-semibold cursor-pointer px-2.5 py-1 rounded-lg transition-all\",\n                variant === \"liquid-glass\"\n                  ? \"bg-white/20 hover:bg-white/30 border border-white/30 text-white backdrop-blur-md shadow-xs\"\n                  : theme.primaryText || \"text-primary font-semibold hover:underline\",\n              )}\n            >\n              Today\n            </button>\n            <button\n              type=\"button\"\n              onClick={(e) => {\n                e.stopPropagation();\n                setIsOpen(false);\n              }}\n              className={cn(\n                \"opacity-70 hover:opacity-100 cursor-pointer px-2 py-1 rounded transition-colors\",\n                variant === \"liquid-glass\" && \"hover:bg-white/15 text-white\",\n              )}\n            >\n              Close\n            </button>\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n\nfunction CustomTimePicker({\n  value,\n  onChange,\n  variant,\n  theme,\n}: {\n  value: string;\n  onChange: (val: string) => void;\n  variant?: CalendarVariant;\n  theme: Record<string, string>;\n}) {\n  const [isOpen, setIsOpen] = useState(false);\n  const containerRef = useRef<HTMLDivElement>(null);\n\n  const { hour12, minute, ampm } = useMemo(() => {\n    const [hStr, mStr] = (value || \"12:00\").split(\":\");\n    let h = parseInt(hStr, 10);\n    if (isNaN(h)) h = 12;\n    let m = parseInt(mStr || \"0\", 10);\n    if (isNaN(m)) m = 0;\n    const period: \"AM\" | \"PM\" = h >= 12 ? \"PM\" : \"AM\";\n    const h12 = h % 12 === 0 ? 12 : h % 12;\n    return { hour12: h12, minute: m, ampm: period };\n  }, [value]);\n\n  const updateTime = (nextH12: number, nextMin: number, nextPeriod: \"AM\" | \"PM\") => {\n    let h24 = nextH12 % 12;\n    if (nextPeriod === \"PM\") h24 += 12;\n    const formatted = `${String(h24).padStart(2, \"0\")}:${String(nextMin).padStart(2, \"0\")}`;\n    onChange(formatted);\n  };\n\n  useEffect(() => {\n    if (!isOpen) return;\n    const handleClickOutside = (e: MouseEvent) => {\n      if (containerRef.current && !containerRef.current.contains(e.target as Node)) {\n        setIsOpen(false);\n      }\n    };\n    document.addEventListener(\"mousedown\", handleClickOutside);\n    return () => document.removeEventListener(\"mousedown\", handleClickOutside);\n  }, [isOpen]);\n\n  const hoursList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n  const minutesList = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55];\n\n  return (\n    <div ref={containerRef} className=\"relative\">\n      <label\n        className={cn(\n          \"block text-sm font-medium mb-1\",\n          variant === \"liquid-glass\"\n            ? \"text-white/90\"\n            : variant === \"glass\"\n              ? \"text-neutral-800 dark:text-white/90\"\n              : \"text-foreground\",\n        )}\n      >\n        Time\n      </label>\n      <input type=\"hidden\" name=\"time\" value={value} />\n      <button\n        type=\"button\"\n        onClick={() => setIsOpen(!isOpen)}\n        className={cn(\n          \"w-full cursor-pointer flex items-center justify-between border rounded-xl px-3 py-2 text-sm bg-transparent transition-all outline-none\",\n          variant === \"liquid-glass\"\n            ? \"border-white/25 text-white bg-white/10 hover:bg-white/15 focus:bg-white/20 focus:border-white/50 shadow-[inset_0_1px_1px_rgba(255,255,255,0.15)]\"\n            : variant === \"glass\"\n              ? \"border-black/15 text-neutral-900 bg-black/5 hover:bg-black/10 focus:bg-white/40 focus:border-black/30 dark:border-white/25 dark:text-white dark:bg-white/10 dark:hover:bg-white/15 dark:focus:bg-white/20 dark:focus:border-white/50\"\n              : \"border-input text-foreground bg-background hover:bg-muted/50\",\n          isOpen && (theme.focusRing || \"ring-2 ring-primary/20\"),\n        )}\n      >\n        <span className=\"font-medium truncate\">{formatDisplayTime(value)}</span>\n        <Clock\n          className={cn(\n            \"w-4 h-4 shrink-0 opacity-70 cursor-pointer\",\n            variant === \"liquid-glass\"\n              ? \"text-white/80\"\n              : variant === \"glass\"\n                ? \"text-neutral-700 dark:text-white/80\"\n                : \"text-muted-foreground\",\n          )}\n        />\n      </button>\n\n      {isOpen && (\n        <div\n          className={cn(\n            \"absolute top-full right-0 mt-2 z-50 w-64 rounded-2xl border p-3.5 shadow-2xl animate-in fade-in zoom-in-95 duration-150 cursor-default\",\n            variant === \"liquid-glass\"\n              ? \"bg-black/50 backdrop-blur-3xl border border-white/30 text-white shadow-[0_25px_60px_rgba(0,0,0,0.6),inset_0_1px_1px_rgba(255,255,255,0.4),inset_-1px_-1px_1px_rgba(255,255,255,0.15)]\"\n              : variant === \"glass\"\n                ? \"bg-white/45 dark:bg-black/60 backdrop-blur-3xl border-white/50 dark:border-white/20 text-neutral-900 dark:text-white shadow-2xl\"\n                : \"bg-popover text-popover-foreground border-border\",\n          )}\n          onClick={(e) => e.stopPropagation()}\n        >\n          <div\n            className={cn(\n              \"flex items-center justify-between mb-2 pb-1.5 border-b\",\n              variant === \"liquid-glass\" ? \"border-white/20 text-white\" : \"border-black/10 dark:border-white/10\",\n            )}\n          >\n            <span className={cn(\n              \"text-xs font-semibold uppercase tracking-wider\",\n              variant === \"liquid-glass\" ? \"text-white/80\" : \"opacity-70\",\n            )}>\n              Pick Time\n            </span>\n            <span className={cn(\n              \"text-xs font-bold\",\n              variant === \"liquid-glass\" ? \"text-white drop-shadow-xs\" : theme.primaryText || \"text-primary\",\n            )}>\n              {formatDisplayTime(value)}\n            </span>\n          </div>\n\n          <div className=\"grid grid-cols-3 gap-1 h-44 py-1\">\n            {/* Hour Column */}\n            <div className=\"flex flex-col overflow-y-auto pr-0.5 space-y-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n              <span className=\"text-[10px] uppercase font-semibold text-center opacity-60 mb-0.5\">Hr</span>\n              {hoursList.map((h) => {\n                const isActive = h === hour12;\n                return (\n                  <button\n                    key={h}\n                    type=\"button\"\n                    onClick={(e) => {\n                      e.stopPropagation();\n                      updateTime(h, minute, ampm);\n                    }}\n                    className={cn(\n                      \"py-1 text-xs rounded-md transition-colors cursor-pointer font-medium\",\n                      isActive\n                        ? variant === \"liquid-glass\"\n                          ? \"bg-white/30 text-white font-bold border border-white/40 shadow-[0_0_10px_rgba(255,255,255,0.25),inset_0_1px_1px_rgba(255,255,255,0.4)]\"\n                          : cn(theme.primaryBg, \"text-white font-bold shadow-xs\")\n                        : variant === \"liquid-glass\"\n                          ? \"hover:bg-white/20 text-white/90\"\n                          : variant === \"glass\"\n                            ? \"hover:bg-black/10 dark:hover:bg-white/15 text-neutral-800 dark:text-neutral-200\"\n                            : \"hover:bg-muted text-foreground\",\n                    )}\n                  >\n                    {String(h).padStart(2, \"0\")}\n                  </button>\n                );\n              })}\n            </div>\n\n            {/* Minute Column */}\n            <div className=\"flex flex-col overflow-y-auto pr-0.5 space-y-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n              <span className=\"text-[10px] uppercase font-semibold text-center opacity-60 mb-0.5\">Min</span>\n              {minutesList.map((m) => {\n                const isActive = m === minute;\n                return (\n                  <button\n                    key={m}\n                    type=\"button\"\n                    onClick={(e) => {\n                      e.stopPropagation();\n                      updateTime(hour12, m, ampm);\n                    }}\n                    className={cn(\n                      \"py-1 text-xs rounded-md transition-colors cursor-pointer font-medium\",\n                      isActive\n                        ? variant === \"liquid-glass\"\n                          ? \"bg-white/30 text-white font-bold border border-white/40 shadow-[0_0_10px_rgba(255,255,255,0.25),inset_0_1px_1px_rgba(255,255,255,0.4)]\"\n                          : cn(theme.primaryBg, \"text-white font-bold shadow-xs\")\n                        : variant === \"liquid-glass\"\n                          ? \"hover:bg-white/20 text-white/90\"\n                          : variant === \"glass\"\n                            ? \"hover:bg-black/10 dark:hover:bg-white/15 text-neutral-800 dark:text-neutral-200\"\n                            : \"hover:bg-muted text-foreground\",\n                    )}\n                  >\n                    {String(m).padStart(2, \"0\")}\n                  </button>\n                );\n              })}\n            </div>\n\n            {/* AM / PM Column */}\n            <div className=\"flex flex-col gap-1\">\n              <span className=\"text-[10px] uppercase font-semibold text-center opacity-60 mb-0.5\">Period</span>\n              {([\"AM\", \"PM\"] as const).map((p) => {\n                const isActive = p === ampm;\n                return (\n                  <button\n                    key={p}\n                    type=\"button\"\n                    onClick={(e) => {\n                      e.stopPropagation();\n                      updateTime(hour12, minute, p);\n                    }}\n                    className={cn(\n                      \"py-2 text-xs rounded-md font-semibold transition-colors cursor-pointer\",\n                      isActive\n                        ? variant === \"liquid-glass\"\n                          ? \"bg-white/30 text-white font-bold border border-white/40 shadow-[0_0_10px_rgba(255,255,255,0.25),inset_0_1px_1px_rgba(255,255,255,0.4)]\"\n                          : cn(theme.primaryBg, \"text-white font-bold shadow-xs\")\n                        : variant === \"liquid-glass\"\n                          ? \"hover:bg-white/20 text-white/90\"\n                          : variant === \"glass\"\n                            ? \"hover:bg-black/10 dark:hover:bg-white/15 text-neutral-800 dark:text-neutral-200\"\n                            : \"hover:bg-muted text-foreground\",\n                    )}\n                  >\n                    {p}\n                  </button>\n                );\n              })}\n            </div>\n          </div>\n\n          <div\n            className={cn(\n              \"mt-2 pt-2 border-t flex justify-end text-xs\",\n              variant === \"liquid-glass\" ? \"border-white/15 text-white\" : \"border-black/10 dark:border-white/10\",\n            )}\n          >\n            <button\n              type=\"button\"\n              onClick={(e) => {\n                e.stopPropagation();\n                setIsOpen(false);\n              }}\n              className={cn(\n                \"cursor-pointer px-3 py-1 font-semibold rounded-lg transition-all\",\n                variant === \"liquid-glass\"\n                  ? \"bg-white/20 hover:bg-white/30 border border-white/30 text-white backdrop-blur-md shadow-xs\"\n                  : \"opacity-70 hover:opacity-100\",\n              )}\n            >\n              Done\n            </button>\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n\n// === MAIN CALENDAR DASHBOARD ===\nexport interface CalendarEvent {\n  id: string;\n  title: string;\n  date: string; // \"YYYY-MM-DD\"\n  time: string; // \"HH:MM\"\n  type: string;\n  platform: string;\n}\n\nexport interface CalendarDashboardProps {\n  variant?: CalendarVariant;\n  color?: CalendarColor;\n  className?: string;\n  /**\n   * Initial events mapped by date key, e.g. `{\"2026-10-2\": [\"pentest\", \"kickoff\"]}`.\n   * Month and day are not zero-padded in keys.\n   */\n  mockEvents?: Record<string, string[]>;\n}\n\nconst DEFAULT_CALENDAR_MOCK_EVENTS: Record<string, string[]> = {};\n\nexport default function CalendarDashboard({\n  variant = \"default\",\n  color = \"primary\",\n  mockEvents = DEFAULT_CALENDAR_MOCK_EVENTS,\n}: CalendarDashboardProps) {\n  const isDark = useThemeDetector();\n  const styles = dashboardVariants[variant] || dashboardVariants.default;\n  const theme = colorThemes[color] || colorThemes.primary;\n  const isLiquidGlass = variant === \"liquid-glass\";\n  const isGlass = variant === \"glass\" || variant === \"liquid-glass\";\n\n  // Check if color is a custom hex (starts with #) or arbitrary CSS color\n  const isCustomColor =\n    typeof color === \"string\" &&\n    (color.startsWith(\"#\") ||\n      color.startsWith(\"rgb\") ||\n      color.startsWith(\"hsl\"));\n\n  const customVars = isCustomColor\n    ? ({\n        \"--primary\": color,\n        \"--primary-foreground\": \"#ffffff\",\n        \"--ring\": color,\n      } as React.CSSProperties)\n    : undefined;\n\n  const [currentDate, setCurrentDate] = useState(new Date());\n  const [view, setView] = useState<\"month\" | \"week\" | \"day\">(\"month\");\n  const [activePopupEventId, setActivePopupEventId] = useState<string | null>(null);\n  const [isMobileSidebarOpen, setIsMobileSidebarOpen] = useState(false);\n\n  // Filters State\n  const [filters, setFilters] = useState({\n    types: { pentest: true, kickoff: true } as Record<string, boolean>,\n    platforms: { meet: true, slack: true, discord: true } as Record<string, boolean>,\n  });\n\n  const toggleFilter = (category: \"types\" | \"platforms\", key: string) => {\n    setFilters((prev) => ({\n      ...prev,\n      [category]: {\n        ...prev[category],\n        [key]: !prev[category][key],\n      },\n    }));\n  };\n\n  // Add / Edit Event Modal State\n  const [isAddModalOpen, setIsAddModalOpen] = useState(false);\n  const [editingEvent, setEditingEvent] = useState<CalendarEvent | null>(null);\n  const [modalDate, setModalDate] = useState(\"\");\n  const [modalTime, setModalTime] = useState(\"12:00\");\n  const [eventType, setEventType] = useState(\"pentest\");\n  const [eventPlatform, setEventPlatform] = useState(\"meet\");\n\n  // Initial Events Seed\n  const initialEvents: CalendarEvent[] = useMemo(() => {\n    const defaultTimeSlots = [\"09:00\", \"11:00\", \"14:00\", \"16:00\", \"18:00\"];\n    let idCounter = 1;\n    const list: CalendarEvent[] = [];\n\n    const platforms = [\"meet\", \"slack\", \"discord\"];\n\n    Object.entries(mockEvents).forEach(([dateKey, types]) => {\n      const [y, m, d] = dateKey.split(\"-\");\n      if (!y || !m || !d) return;\n      const formattedDate = `${y}-${m.padStart(2, \"0\")}-${d.padStart(2, \"0\")}`;\n\n      types.forEach((type, idx) => {\n        const time = defaultTimeSlots[idx % defaultTimeSlots.length];\n        const platform = platforms[idx % platforms.length];\n        const title =\n          type === \"pentest\"\n            ? `Security Audit & Pentest`\n            : `Client Kick-Off Meeting`;\n\n        list.push({\n          id: `evt-${idCounter++}`,\n          title,\n          date: formattedDate,\n          time,\n          type,\n          platform,\n        });\n      });\n    });\n\n    return list;\n  }, [mockEvents]);\n\n  const [events, setEvents] = useState<CalendarEvent[]>(initialEvents);\n\n  const prevEventsRef = useRef(initialEvents);\n  useEffect(() => {\n    if (prevEventsRef.current !== initialEvents) {\n      prevEventsRef.current = initialEvents;\n      setEvents(initialEvents);\n    }\n  }, [initialEvents]);\n\n  // Active Filtered Events\n  const filteredEvents = useMemo(() => {\n    return events.filter((e) => {\n      const typeAllowed = filters.types[e.type] ?? true;\n      const platformAllowed = filters.platforms[e.platform] ?? true;\n      return typeAllowed && platformAllowed;\n    });\n  }, [events, filters]);\n\n  // Date Navigation Helpers\n  const year = currentDate.getFullYear();\n  const month = currentDate.getMonth();\n  const date = currentDate.getDate();\n\n  const monthName = currentDate.toLocaleString(\"en-US\", { month: \"long\" });\n  const monthShortName = currentDate.toLocaleString(\"en-US\", {\n    month: \"short\",\n  });\n\n  const prevPeriod = () => {\n    if (view === \"month\") {\n      setCurrentDate(new Date(year, month - 1, 1));\n    } else if (view === \"week\") {\n      setCurrentDate(new Date(year, month, date - 7));\n    } else {\n      setCurrentDate(new Date(year, month, date - 1));\n    }\n  };\n\n  const nextPeriod = () => {\n    if (view === \"month\") {\n      setCurrentDate(new Date(year, month + 1, 1));\n    } else if (view === \"week\") {\n      setCurrentDate(new Date(year, month, date + 7));\n    } else {\n      setCurrentDate(new Date(year, month, date + 1));\n    }\n  };\n\n  // Calendar Grid Calculation\n  const calendarDays = useMemo(() => {\n    if (view === \"day\") {\n      const dateKey = `${year}-${String(month + 1).padStart(2, \"0\")}-${String(date).padStart(2, \"0\")}`;\n      return [{ day: date, isCurrentMonth: true, dateKey }];\n    }\n\n    if (view === \"week\") {\n      const curr = new Date(year, month, date);\n      const dayOfWeek = curr.getDay();\n      const startOffset = dayOfWeek === 0 ? 6 : dayOfWeek - 1;\n      const monday = new Date(year, month, date - startOffset);\n\n      const weekDays = [];\n      for (let i = 0; i < 7; i++) {\n        const d = new Date(\n          monday.getFullYear(),\n          monday.getMonth(),\n          monday.getDate() + i,\n        );\n        weekDays.push({\n          day: d.getDate(),\n          isCurrentMonth: d.getMonth() === month,\n          dateKey: `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, \"0\")}-${String(d.getDate()).padStart(2, \"0\")}`,\n        });\n      }\n      return weekDays;\n    }\n\n    // view === \"month\"\n    const firstDay = new Date(year, month, 1).getDay();\n    const startOffset = firstDay === 0 ? 6 : firstDay - 1;\n    const daysInCurrentMonth = new Date(year, month + 1, 0).getDate();\n    const daysInPrevMonth = new Date(year, month, 0).getDate();\n\n    const days: { day: number; isCurrentMonth: boolean; dateKey: string }[] = [];\n\n    // Previous month padding\n    for (let i = startOffset - 1; i >= 0; i--) {\n      const d = daysInPrevMonth - i;\n      const prevDate = new Date(year, month - 1, d);\n      days.push({\n        day: d,\n        isCurrentMonth: false,\n        dateKey: `${prevDate.getFullYear()}-${String(prevDate.getMonth() + 1).padStart(2, \"0\")}-${String(d).padStart(2, \"0\")}`,\n      });\n    }\n\n    // Current month days\n    for (let i = 1; i <= daysInCurrentMonth; i++) {\n      days.push({\n        day: i,\n        isCurrentMonth: true,\n        dateKey: `${year}-${String(month + 1).padStart(2, \"0\")}-${String(i).padStart(2, \"0\")}`,\n      });\n    }\n\n    // Next month padding (up to 35 or 42 cells total)\n    const totalCells = days.length > 35 ? 42 : 35;\n    const remaining = totalCells - days.length;\n    for (let i = 1; i <= remaining; i++) {\n      const nextDate = new Date(year, month + 1, i);\n      days.push({\n        day: i,\n        isCurrentMonth: false,\n        dateKey: `${nextDate.getFullYear()}-${String(nextDate.getMonth() + 1).padStart(2, \"0\")}-${String(i).padStart(2, \"0\")}`,\n      });\n    }\n\n    return days;\n  }, [year, month, date, view]);\n\n  // Modal Handlers\n  const openAddModalForDate = (dateKey: string, timeStr?: string) => {\n    setEditingEvent(null);\n    setModalDate(dateKey);\n    setModalTime(timeStr || \"12:00\");\n    setEventType(\"pentest\");\n    setEventPlatform(\"meet\");\n    setIsAddModalOpen(true);\n  };\n\n  const openEditModal = (event: CalendarEvent) => {\n    setEditingEvent(event);\n    setModalDate(event.date);\n    setModalTime(event.time);\n    setEventType(event.type);\n    setEventPlatform(event.platform);\n    setIsAddModalOpen(true);\n    setActivePopupEventId(null);\n  };\n\n  const closeModal = () => {\n    setIsAddModalOpen(false);\n    setEditingEvent(null);\n  };\n\n  const handleSaveEvent = (e: React.FormEvent<HTMLFormElement>) => {\n    e.preventDefault();\n    const formData = new FormData(e.currentTarget);\n    const title = formData.get(\"title\") as string;\n    const dateVal = (formData.get(\"date\") as string) || modalDate;\n    const timeVal = (formData.get(\"time\") as string) || modalTime;\n    const type = (formData.get(\"type\") as string) || eventType;\n    const platform = (formData.get(\"platform\") as string) || eventPlatform;\n\n    if (!title || !dateVal) return;\n\n    if (editingEvent) {\n      setEvents((prev) =>\n        prev.map((item) =>\n          item.id === editingEvent.id\n            ? {\n                ...item,\n                title,\n                date: dateVal,\n                time: timeVal,\n                type,\n                platform,\n              }\n            : item,\n        ),\n      );\n    } else {\n      const newEvent: CalendarEvent = {\n        id: `evt-${Date.now()}`,\n        title,\n        date: dateVal,\n        time: timeVal,\n        type,\n        platform,\n      };\n      setEvents((prev) => [...prev, newEvent]);\n    }\n\n    closeModal();\n  };\n\n  const deleteEvent = (id: string) => {\n    setEvents((prev) => prev.filter((e) => e.id !== id));\n    setActivePopupEventId(null);\n  };\n\n  const handleExportCSV = () => {\n    const headers = [\"ID\", \"Title\", \"Date\", \"Time\", \"Type\", \"Platform\"];\n    const csvRows = [headers.join(\",\")];\n    events.forEach((e) => {\n      csvRows.push(\n        `${e.id},\"${e.title}\",${e.date},${e.time},${e.type},${e.platform}`,\n      );\n    });\n    const blob = new Blob([csvRows.join(\"\\n\")], {\n      type: \"text/csv;charset=utf-8;\",\n    });\n    const url = URL.createObjectURL(blob);\n    const link = document.createElement(\"a\");\n    link.href = url;\n    link.setAttribute(\"download\", \"calendar_events.csv\");\n    document.body.appendChild(link);\n    link.click();\n    document.body.removeChild(link);\n  };\n\n  return (\n    <div\n      className={cn(\n        isDark ? \"dark\" : \"\",\n        \"w-full h-full max-w-full overflow-hidden relative\",\n        isLiquidGlass && \"isolate [contain:paint] [transform:translateZ(0)]\",\n      )}\n      style={customVars}\n    >\n      <LiquidGlassSvgFilter />\n\n      {isLiquidGlass && (\n        <>\n          {/* Inner Clipping Container for Liquid Background Stack */}\n          <div className=\"absolute inset-0 overflow-hidden rounded-[22px] sm:rounded-[28px] pointer-events-none z-0\">\n            {/* Layer 0: Liquid SVG Displaced Wave Background */}\n            <div\n              className=\"absolute -inset-10\"\n              style={{\n                backgroundImage:\n                  'url(\"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1200,c_limit/v1790146209/photo-1470071459604-3b5ec3a7fe05-1790146212205.jpg\")',\n                backgroundSize: \"cover\",\n                backgroundPosition: \"center\",\n                filter: \"url(#glass-blur)\",\n                transform: \"scale(1.1)\",\n              }}\n            />\n\n            {/* Layer 1: Contrast overlay & soft backdrop blur */}\n            <div className=\"absolute inset-0 bg-black/30 dark:bg-black/45 backdrop-blur-[2px]\" />\n\n            {/* Layer 2: Ambient Drop Shadow & Subtle Glow */}\n            <div\n              className=\"absolute inset-0 rounded-[22px] sm:rounded-[28px]\"\n              style={{\n                boxShadow:\n                  \"0 20px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.08)\",\n              }}\n            />\n          </div>\n\n          {/* Layer 3: Specular Inner Border Highlight */}\n          <div\n            className=\"absolute inset-0 z-40 pointer-events-none rounded-[22px] sm:rounded-[28px] border border-white/40 dark:border-white/15\"\n            style={{\n              boxShadow:\n                \"inset 2px 2px 2px 0 rgba(255, 255, 255, 0.45), inset -2px -2px 2px 0 rgba(255, 255, 255, 0.3)\",\n            }}\n          />\n        </>\n      )}\n\n      <div\n        className={cn(\n          \"w-full max-w-full h-auto flex flex-col lg:flex-row text-foreground font-sans transition-colors duration-300 relative z-10\",\n          styles.wrapper,\n          variant !== \"minimal\" && !isLiquidGlass ? \"rounded-xl\" : \"\",\n        )}\n      >\n        {/* MOBILE SIDEBAR DRAWER OVERLAY */}\n        <div\n          className={cn(\n            \"fixed inset-0 z-50 lg:hidden transition-all duration-300 ease-in-out\",\n            isMobileSidebarOpen\n              ? \"opacity-100 pointer-events-auto\"\n              : \"opacity-0 pointer-events-none\",\n          )}\n        >\n          {/* Backdrop */}\n          <div\n            className={cn(\n              \"fixed inset-0 bg-black/50 backdrop-blur-xs transition-opacity duration-300 cursor-pointer\",\n              isMobileSidebarOpen ? \"opacity-100\" : \"opacity-0\",\n            )}\n            onClick={() => setIsMobileSidebarOpen(false)}\n          />\n          {/* Drawer Container */}\n          <div\n            className={cn(\n              \"relative w-72 max-w-[80vw] h-full p-5 overflow-y-auto z-10 shadow-2xl flex flex-col justify-between transition-transform duration-300 ease-in-out transform\",\n              isMobileSidebarOpen ? \"translate-x-0\" : \"-translate-x-full\",\n              variant === \"liquid-glass\"\n                ? \"bg-black/40 backdrop-blur-2xl border-r border-white/25 text-white shadow-2xl overflow-hidden rounded-r-2xl\"\n                : variant === \"glass\"\n                  ? \"bg-white/25 dark:bg-black/50 backdrop-blur-2xl border-r border-white/25 text-white shadow-2xl\"\n                  : cn(styles.sidebar, \"bg-card text-card-foreground\"),\n            )}\n          >\n            {variant === \"liquid-glass\" && (\n              <div className=\"absolute inset-0 pointer-events-none z-0 overflow-hidden\">\n                <div\n                  className=\"absolute -inset-10\"\n                  style={{\n                    backgroundImage:\n                      'url(\"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1200,c_limit/v1790146209/photo-1470071459604-3b5ec3a7fe05-1790146212205.jpg\")',\n                    backgroundSize: \"cover\",\n                    backgroundPosition: \"left center\",\n                    filter: \"url(#glass-blur)\",\n                    transform: \"scale(1.1)\",\n                  }}\n                />\n                <div className=\"absolute inset-0 bg-black/40 dark:bg-black/60 backdrop-blur-[2px]\" />\n              </div>\n            )}\n\n            <div className=\"relative z-10 flex flex-col justify-between h-full\">\n              <div>\n                <div className=\"flex items-center justify-between mb-4\">\n                  <h2 className={cn(\"font-semibold text-lg\", isGlass ? \"text-white\" : \"text-foreground\")}>\n                    {monthName} {year}\n                  </h2>\n                  <button\n                    onClick={() => setIsMobileSidebarOpen(false)}\n                    className={cn(\n                      \"p-1.5 rounded-lg transition-colors cursor-pointer\",\n                      isGlass\n                        ? \"hover:bg-white/15 text-white/80 hover:text-white\"\n                        : \"hover:bg-muted text-muted-foreground\",\n                    )}\n                    aria-label=\"Close Sidebar\"\n                  >\n                    <X className=\"w-5 h-5 cursor-pointer\" />\n                  </button>\n                </div>\n\n                <hr className={cn(\"my-4\", isGlass ? \"border-white/20\" : \"border-border\")} />\n\n                <div className=\"mb-6\">\n                  <div className={cn(\"flex items-center justify-between mb-3 cursor-pointer\", isGlass ? \"text-white/80\" : \"text-muted-foreground\")}>\n                    <h3 className=\"text-sm font-medium\">Events</h3>\n                    <ChevronDown className=\"w-4 h-4 cursor-pointer\" />\n                  </div>\n                  <div className=\"space-y-2\">\n                    <div\n                      onClick={() => toggleFilter(\"types\", \"pentest\")}\n                      className={cn(\n                        \"flex items-center justify-between p-2.5 rounded-md cursor-pointer transition-colors\",\n                        isGlass\n                          ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                          : \"bg-muted/50 hover:bg-muted text-foreground\",\n                      )}\n                    >\n                      <div className=\"flex items-center gap-3\">\n                        <div className=\"w-1.5 h-4 bg-yellow-400 rounded-full\"></div>\n                        <span className={cn(\"text-sm font-medium\", isGlass ? \"text-white\" : \"text-foreground\")}>Pentest</span>\n                      </div>\n                      {filters.types.pentest ? (\n                        <CheckSquare\n                          className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                        />\n                      ) : (\n                        <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                      )}\n                    </div>\n                    <div\n                      onClick={() => toggleFilter(\"types\", \"kickoff\")}\n                      className={cn(\n                        \"flex items-center justify-between p-2.5 rounded-md cursor-pointer transition-colors\",\n                        isGlass\n                          ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                          : \"bg-muted/50 hover:bg-muted text-foreground\",\n                      )}\n                    >\n                      <div className=\"flex items-center gap-3\">\n                        <div className=\"w-1.5 h-4 bg-emerald-500 rounded-full\"></div>\n                        <span className={cn(\"text-sm font-medium\", isGlass ? \"text-white\" : \"text-foreground\")}>Kick-Off</span>\n                      </div>\n                      {filters.types.kickoff ? (\n                        <CheckSquare\n                          className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                        />\n                      ) : (\n                        <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                      )}\n                    </div>\n                  </div>\n                </div>\n\n                <div>\n                  <div className={cn(\"flex items-center justify-between mb-3 cursor-pointer\", isGlass ? \"text-white/80\" : \"text-muted-foreground\")}>\n                    <h3 className=\"text-sm font-medium\">Platforms</h3>\n                    <ChevronDown className=\"w-4 h-4 cursor-pointer\" />\n                  </div>\n                  <div className=\"space-y-2\">\n                    <div\n                      onClick={() => toggleFilter(\"platforms\", \"meet\")}\n                      className={cn(\n                        \"flex items-center justify-between p-2.5 rounded-md cursor-pointer transition-colors\",\n                        isGlass\n                          ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                          : \"bg-muted/50 hover:bg-muted text-foreground\",\n                      )}\n                    >\n                      <div className=\"flex items-center gap-2\">\n                        <Video className={cn(\"w-4 h-4\", isGlass ? \"text-emerald-400\" : \"text-emerald-600 dark:text-emerald-400\")} />\n                        <span className={cn(\"text-sm font-medium\", isGlass ? \"text-white\" : \"text-foreground\")}>Google Meet</span>\n                      </div>\n                      {filters.platforms.meet ? (\n                        <CheckSquare\n                          className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                        />\n                      ) : (\n                        <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                      )}\n                    </div>\n                    <div\n                      onClick={() => toggleFilter(\"platforms\", \"slack\")}\n                      className={cn(\n                        \"flex items-center justify-between p-2.5 rounded-md cursor-pointer transition-colors\",\n                        isGlass\n                          ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                          : \"bg-muted/50 hover:bg-muted text-foreground\",\n                      )}\n                    >\n                      <div className=\"flex items-center gap-2\">\n                        <Hash className={cn(\"w-4 h-4\", isGlass ? \"text-sky-400\" : \"text-sky-500\")} />\n                        <span className={cn(\"text-sm font-medium\", variant === \"glass\" ? \"text-neutral-900 dark:text-white\" : isGlass ? \"text-white\" : \"text-foreground\")}>Slack</span>\n                      </div>\n                      {filters.platforms.slack ? (\n                        <CheckSquare\n                          className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                        />\n                      ) : (\n                        <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                      )}\n                    </div>\n                    <div\n                      onClick={() => toggleFilter(\"platforms\", \"discord\")}\n                      className={cn(\n                        \"flex items-center justify-between p-2.5 rounded-md cursor-pointer transition-colors\",\n                        isGlass\n                          ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                          : \"bg-muted/50 hover:bg-muted text-foreground\",\n                      )}\n                    >\n                      <div className=\"flex items-center gap-2\">\n                        <MessageSquare className={cn(\"w-4 h-4\", isGlass ? \"text-indigo-400\" : \"text-indigo-500\")} />\n                        <span className={cn(\"text-sm font-medium\", isGlass ? \"text-white\" : \"text-foreground\")}>Discord</span>\n                      </div>\n                      {filters.platforms.discord ? (\n                        <CheckSquare\n                          className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                        />\n                      ) : (\n                        <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                      )}\n                    </div>\n                  </div>\n                </div>\n\n                <hr className={cn(\"my-5\", isGlass ? \"border-white/20\" : \"border-border\")} />\n\n                <button\n                  onClick={() => {\n                    handleExportCSV();\n                    setIsMobileSidebarOpen(false);\n                  }}\n                  className={cn(\n                    \"w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-md text-sm font-medium transition-colors cursor-pointer\",\n                    isGlass\n                      ? \"border border-white/25 bg-white/15 hover:bg-white/25 text-white backdrop-blur-md shadow-sm\"\n                      : \"border border-border bg-muted/50 hover:bg-muted text-foreground\",\n                  )}\n                >\n                  Export CSV <Download className=\"w-4 h-4\" />\n                </button>\n              </div>\n            </div>\n          </div>\n        </div>\n\n        {/* SIDEBAR FILTERS */}\n        <aside\n          className={cn(\n            \"w-64 flex-shrink-0 p-5 overflow-y-auto hidden lg:block z-10 transition-colors duration-300 relative\",\n            styles.sidebar,\n            variant === \"liquid-glass\" && \"rounded-l-[22px] sm:rounded-l-[28px]\",\n          )}\n        >\n          {variant === \"liquid-glass\" && (\n            <div className=\"absolute inset-0 pointer-events-none z-0 overflow-hidden rounded-l-[22px] sm:rounded-l-[28px]\">\n              <div\n                className=\"absolute -inset-10\"\n                style={{\n                  backgroundImage:\n                    'url(\"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1200,c_limit/v1790146209/photo-1470071459604-3b5ec3a7fe05-1790146212205.jpg\")',\n                  backgroundSize: \"cover\",\n                  backgroundPosition: \"left center\",\n                  filter: \"url(#glass-blur)\",\n                  transform: \"scale(1.1)\",\n                }}\n              />\n              <div className=\"absolute inset-0 bg-black/35 dark:bg-black/50 backdrop-blur-[2px]\" />\n            </div>\n          )}\n\n          <div className=\"relative z-10 flex flex-col h-full\">\n            <div className=\"flex items-center justify-between mb-4\">\n              <h2 className={cn(\"font-semibold text-lg\", variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-900 dark:text-white\" : \"text-foreground\")}>\n                {monthName} {year}\n              </h2>\n              <div className={cn(\"flex gap-1\", variant === \"liquid-glass\" ? \"text-white/80\" : variant === \"glass\" ? \"text-neutral-700 dark:text-white/80\" : \"text-muted-foreground\")}>\n                <button\n                  type=\"button\"\n                  aria-label=\"Previous period\"\n                  onClick={prevPeriod}\n                  className={cn(\n                    \"p-1 rounded transition-colors cursor-pointer\",\n                    variant === \"liquid-glass\"\n                      ? \"hover:bg-white/15 hover:text-white\"\n                      : variant === \"glass\"\n                        ? \"hover:bg-white/40 hover:text-neutral-900 dark:hover:bg-white/15 dark:hover:text-white\"\n                        : \"hover:bg-muted/50\",\n                  )}\n                >\n                  <ChevronLeft className=\"w-4 h-4 cursor-pointer\" />\n                </button>\n                <button\n                  type=\"button\"\n                  aria-label=\"Next period\"\n                  onClick={nextPeriod}\n                  className={cn(\n                    \"p-1 rounded transition-colors cursor-pointer\",\n                    variant === \"liquid-glass\"\n                      ? \"hover:bg-white/15 hover:text-white\"\n                      : variant === \"glass\"\n                        ? \"hover:bg-white/40 hover:text-neutral-900 dark:hover:bg-white/15 dark:hover:text-white\"\n                        : \"hover:bg-muted/50\",\n                  )}\n                >\n                  <ChevronRight className=\"w-4 h-4 cursor-pointer\" />\n                </button>\n              </div>\n            </div>\n\n            <hr className={cn(\"my-6\", isGlass ? \"border-white/20\" : \"border-border\")} />\n\n            <div className=\"mb-6\">\n              <div className={cn(\"flex items-center justify-between mb-3 cursor-pointer\", isGlass ? \"text-white/80\" : \"text-muted-foreground\")}>\n                <h3 className=\"text-sm font-medium\">Events</h3>\n                <ChevronDown className=\"w-4 h-4 cursor-pointer\" />\n              </div>\n              <div className=\"space-y-2\">\n                <div\n                  onClick={() => toggleFilter(\"types\", \"pentest\")}\n                  className={cn(\n                    \"flex items-center justify-between p-2 rounded-md cursor-pointer transition-colors\",\n                    variant === \"liquid-glass\"\n                      ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                      : variant === \"glass\"\n                        ? \"bg-white/40 hover:bg-white/60 border border-white/50 text-neutral-900 dark:bg-white/10 dark:hover:bg-white/20 dark:border-white/15 dark:text-white\"\n                        : \"bg-muted/50 hover:bg-muted text-foreground\",\n                  )}\n                >\n                  <div className=\"flex items-center gap-3\">\n                    <div className=\"w-1 h-4 bg-yellow-400 rounded-full\"></div>\n                    <span className={cn(\"text-sm font-medium\", variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-900 dark:text-white\" : \"text-foreground\")}>Pentest</span>\n                  </div>\n                  {filters.types.pentest ? (\n                    <CheckSquare\n                      className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                    />\n                  ) : (\n                    <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                  )}\n                </div>\n                <div\n                  onClick={() => toggleFilter(\"types\", \"kickoff\")}\n                  className={cn(\n                    \"flex items-center justify-between p-2 rounded-md cursor-pointer transition-colors\",\n                    variant === \"liquid-glass\"\n                      ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                      : variant === \"glass\"\n                        ? \"bg-white/40 hover:bg-white/60 border border-white/50 text-neutral-900 dark:bg-white/10 dark:hover:bg-white/20 dark:border-white/15 dark:text-white\"\n                        : \"bg-muted/50 hover:bg-muted text-foreground\",\n                  )}\n                >\n                  <div className=\"flex items-center gap-3\">\n                    <div className=\"w-1 h-4 bg-emerald-500 rounded-full\"></div>\n                    <span className={cn(\"text-sm font-medium\", variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-900 dark:text-white\" : \"text-foreground\")}>Kick-Off</span>\n                  </div>\n                  {filters.types.kickoff ? (\n                    <CheckSquare\n                      className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                    />\n                  ) : (\n                    <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                  )}\n                </div>\n              </div>\n            </div>\n\n            <div>\n              <div className={cn(\"flex items-center justify-between mb-3 cursor-pointer\", isGlass ? \"text-white/80\" : \"text-muted-foreground\")}>\n                <h3 className=\"text-sm font-medium\">Platforms</h3>\n                <ChevronDown className=\"w-4 h-4 cursor-pointer\" />\n              </div>\n              <div className=\"space-y-2\">\n                <div\n                  onClick={() => toggleFilter(\"platforms\", \"meet\")}\n                  className={cn(\n                    \"flex items-center justify-between p-2 rounded-md cursor-pointer transition-colors\",\n                    variant === \"liquid-glass\"\n                      ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                      : variant === \"glass\"\n                        ? \"bg-white/40 hover:bg-white/60 border border-white/50 text-neutral-900 dark:bg-white/10 dark:hover:bg-white/20 dark:border-white/15 dark:text-white\"\n                        : \"bg-muted/50 hover:bg-muted text-foreground\",\n                  )}\n                >\n                  <div className=\"flex items-center gap-2\">\n                    <Video className={cn(\"w-4 h-4\", isGlass ? \"text-emerald-400\" : \"text-emerald-600 dark:text-emerald-400\")} />\n                    <span className={cn(\"text-sm font-medium\", variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-900 dark:text-white\" : \"text-foreground\")}>Google Meet</span>\n                  </div>\n                  {filters.platforms.meet ? (\n                    <CheckSquare\n                      className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                    />\n                  ) : (\n                    <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                  )}\n                </div>\n                <div\n                  onClick={() => toggleFilter(\"platforms\", \"slack\")}\n                  className={cn(\n                    \"flex items-center justify-between p-2 rounded-md cursor-pointer transition-colors\",\n                    variant === \"liquid-glass\"\n                      ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                      : variant === \"glass\"\n                        ? \"bg-white/40 hover:bg-white/60 border border-white/50 text-neutral-900 dark:bg-white/10 dark:hover:bg-white/20 dark:border-white/15 dark:text-white\"\n                        : \"bg-muted/50 hover:bg-muted text-foreground\",\n                  )}\n                >\n                  <div className=\"flex items-center gap-2\">\n                    <Hash className={cn(\"w-4 h-4\", isGlass ? \"text-sky-400\" : \"text-sky-500\")} />\n                    <span className={cn(\"text-sm font-medium\", variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-900 dark:text-white\" : \"text-foreground\")}>Slack</span>\n                  </div>\n                  {filters.platforms.slack ? (\n                    <CheckSquare\n                      className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                    />\n                  ) : (\n                    <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                  )}\n                </div>\n                <div\n                  onClick={() => toggleFilter(\"platforms\", \"discord\")}\n                  className={cn(\n                    \"flex items-center justify-between p-2 rounded-md cursor-pointer transition-colors\",\n                    variant === \"liquid-glass\"\n                      ? \"bg-white/10 hover:bg-white/20 border border-white/15 text-white\"\n                      : variant === \"glass\"\n                        ? \"bg-white/40 hover:bg-white/60 border border-white/50 text-neutral-900 dark:bg-white/10 dark:hover:bg-white/20 dark:border-white/15 dark:text-white\"\n                        : \"bg-muted/50 hover:bg-muted text-foreground\",\n                  )}\n                >\n                  <div className=\"flex items-center gap-2\">\n                    <MessageSquare className={cn(\"w-4 h-4\", isGlass ? \"text-indigo-400\" : \"text-indigo-500\")} />\n                    <span className={cn(\"text-sm font-medium\", variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-900 dark:text-white\" : \"text-foreground\")}>Discord</span>\n                  </div>\n                  {filters.platforms.discord ? (\n                    <CheckSquare\n                      className={cn(\"w-4 h-4 cursor-pointer\", theme.primaryText)}\n                    />\n                  ) : (\n                    <Square className={cn(\"w-4 h-4 cursor-pointer\", isGlass ? \"text-white/50\" : \"text-muted-foreground\")} />\n                  )}\n                </div>\n              </div>\n            </div>\n          </div>\n        </aside>\n\n        {/* MAIN CALENDAR AREA */}\n        <main className=\"flex-1 flex flex-col min-w-0 h-full\">\n          <header\n            className={cn(\n              \"flex flex-col lg:flex-row items-start lg:items-center justify-between p-4 sm:p-5 gap-4 flex-shrink-0 z-10 transition-colors duration-300\",\n              styles.header,\n            )}\n          >\n            {/* Top Row: Title, Nav & Add Button */}\n            <div className=\"flex items-center justify-between w-full lg:w-auto gap-4\">\n              <div className=\"flex items-center gap-2 sm:gap-4 lg:hidden\">\n                <button\n                  onClick={() => setIsMobileSidebarOpen(true)}\n                  className={cn(\n                    \"p-2 rounded-lg transition-colors cursor-pointer\",\n                    variant === \"liquid-glass\"\n                      ? \"bg-white/15 hover:bg-white/25 border border-white/20 text-white backdrop-blur-md\"\n                      : variant === \"glass\"\n                        ? \"bg-white/40 hover:bg-white/60 border border-white/40 text-neutral-900 dark:bg-white/15 dark:hover:bg-white/25 dark:border-white/20 dark:text-white backdrop-blur-md\"\n                        : \"bg-muted/80 hover:bg-muted border border-border text-foreground\",\n                  )}\n                  aria-label=\"Open Calendar Filters\"\n                >\n                  <Menu className=\"w-5 h-5 cursor-pointer\" />\n                </button>\n                <div className={cn(\"flex gap-1\", variant === \"liquid-glass\" ? \"text-white/80\" : variant === \"glass\" ? \"text-neutral-700 dark:text-white/80\" : \"text-muted-foreground\")}>\n                  <button\n                    type=\"button\"\n                    aria-label=\"Previous period\"\n                    onClick={prevPeriod}\n                    className={cn(\n                      \"p-1 rounded transition-colors cursor-pointer\",\n                      variant === \"liquid-glass\"\n                        ? \"hover:bg-white/15 hover:text-white\"\n                        : variant === \"glass\"\n                          ? \"hover:bg-white/40 hover:text-neutral-900 dark:hover:bg-white/15 dark:hover:text-white\"\n                          : \"hover:bg-muted/50\",\n                    )}\n                  >\n                    <ChevronLeft className=\"w-4 h-4 cursor-pointer\" />\n                  </button>\n                  <button\n                    type=\"button\"\n                    aria-label=\"Next period\"\n                    onClick={nextPeriod}\n                    className={cn(\n                      \"p-1 rounded transition-colors cursor-pointer\",\n                      variant === \"liquid-glass\"\n                        ? \"hover:bg-white/15 hover:text-white\"\n                        : variant === \"glass\"\n                          ? \"hover:bg-white/40 hover:text-neutral-900 dark:hover:bg-white/15 dark:hover:text-white\"\n                          : \"hover:bg-muted/50\",\n                    )}\n                  >\n                    <ChevronRight className=\"w-4 h-4 cursor-pointer\" />\n                  </button>\n                </div>\n              </div>\n\n              <h1 className={cn(\"text-base sm:text-2xl font-semibold whitespace-nowrap lg:hidden\", variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-900 dark:text-white\" : \"text-foreground\")}>\n                <span className=\"sm:hidden\">\n                  {view === \"day\"\n                    ? `${monthShortName} ${date}, ${year}`\n                    : `${monthShortName} ${year}`}\n                </span>\n                <span className=\"hidden sm:inline\">\n                  {view === \"day\"\n                    ? `${monthName} ${date}, ${year}`\n                    : `${monthName} ${year}`}\n                </span>\n              </h1>\n\n              {/* Add Button Always at Top Row */}\n              <button\n                onClick={() => {\n                  setEditingEvent(null);\n                  setModalDate(`${year}-${String(month + 1).padStart(2, \"0\")}-${String(date).padStart(2, \"0\")}`);\n                  setModalTime(\"12:00\");\n                  setEventType(\"pentest\");\n                  setEventPlatform(\"meet\");\n                  setIsAddModalOpen(true);\n                }}\n                className={cn(\n                  \"flex items-center gap-2 cursor-pointer px-3 sm:px-4 py-1.5 sm:py-2 rounded-xl text-xs sm:text-sm font-semibold transition-all shadow-md ml-auto sm:ml-0\",\n                  theme.primaryBg,\n                )}\n              >\n                <Plus className=\"w-4 h-4 cursor-pointer\" /> <span className=\"hidden sm:inline\">Add</span>\n              </button>\n            </div>\n\n            {/* Bottom Row: View Selectors + Export Button */}\n            <div className=\"flex items-center w-full lg:w-auto gap-2 sm:gap-4 justify-between lg:justify-end\">\n              <div className={cn(\n                \"flex p-1 rounded-xl text-xs sm:text-sm font-medium shrink-0 justify-start\",\n                variant === \"liquid-glass\"\n                  ? \"bg-black/30 dark:bg-black/40 border border-white/20 backdrop-blur-md\"\n                  : variant === \"glass\"\n                    ? \"bg-white/30 dark:bg-white/10 border border-white/40 dark:border-white/15 backdrop-blur-md\"\n                    : \"bg-muted/60\",\n              )}>\n                <button\n                  onClick={() => setView(\"day\")}\n                  className={cn(\n                    \"px-3 sm:px-4 py-1.5 cursor-pointer rounded-lg shadow-sm transition-all\",\n                    view === \"day\"\n                      ? variant === \"liquid-glass\"\n                        ? \"bg-white/25 text-white font-semibold shadow-[0_2px_8px_rgba(0,0,0,0.3),inset_0_1px_1px_rgba(255,255,255,0.4)] border border-white/30 backdrop-blur-md\"\n                        : theme.lightBg\n                      : variant === \"liquid-glass\"\n                        ? \"text-white/70 hover:text-white hover:bg-white/10\"\n                        : variant === \"glass\"\n                          ? \"text-neutral-700 hover:text-neutral-900 dark:text-white/70 dark:hover:text-white\"\n                          : \"hover:text-foreground text-muted-foreground\",\n                  )}\n                >\n                  Day\n                </button>\n                <button\n                  onClick={() => setView(\"week\")}\n                  className={cn(\n                    \"px-3 sm:px-4 py-1.5 cursor-pointer rounded-lg shadow-sm transition-all\",\n                    view === \"week\"\n                      ? variant === \"liquid-glass\"\n                        ? \"bg-white/25 text-white font-semibold shadow-[0_2px_8px_rgba(0,0,0,0.3),inset_0_1px_1px_rgba(255,255,255,0.4)] border border-white/30 backdrop-blur-md\"\n                        : theme.lightBg\n                      : variant === \"liquid-glass\"\n                        ? \"text-white/70 hover:text-white hover:bg-white/10\"\n                        : variant === \"glass\"\n                          ? \"text-neutral-700 hover:text-neutral-900 dark:text-white/70 dark:hover:text-white\"\n                          : \"hover:text-foreground text-muted-foreground\",\n                  )}\n                >\n                  Week\n                </button>\n                <button\n                  onClick={() => setView(\"month\")}\n                  className={cn(\n                    \"px-3 sm:px-4 py-1.5 cursor-pointer rounded-lg shadow-sm transition-all\",\n                    view === \"month\"\n                      ? variant === \"liquid-glass\"\n                        ? \"bg-white/25 text-white font-semibold shadow-[0_2px_8px_rgba(0,0,0,0.3),inset_0_1px_1px_rgba(255,255,255,0.4)] border border-white/30 backdrop-blur-md\"\n                        : theme.lightBg\n                      : variant === \"liquid-glass\"\n                        ? \"text-white/70 hover:text-white hover:bg-white/10\"\n                        : variant === \"glass\"\n                          ? \"text-neutral-700 hover:text-neutral-900 dark:text-white/70 dark:hover:text-white\"\n                          : \"hover:text-foreground text-muted-foreground\",\n                  )}\n                >\n                  Month\n                </button>\n              </div>\n\n              <button\n                onClick={handleExportCSV}\n                className={cn(\n                  \"hidden sm:flex items-center cursor-pointer gap-2 px-3 sm:px-4 py-1.5 sm:py-2 rounded-xl text-xs sm:text-sm font-medium transition-colors\",\n                  variant === \"liquid-glass\"\n                    ? \"border border-white/25 bg-white/15 hover:bg-white/25 text-white backdrop-blur-md shadow-xs\"\n                    : variant === \"glass\"\n                      ? \"border border-white/40 dark:border-white/20 bg-white/30 hover:bg-white/50 text-neutral-900 dark:bg-white/10 dark:hover:bg-white/20 dark:text-white backdrop-blur-md shadow-xs\"\n                      : \"border border-border hover:bg-foreground/5\",\n                )}\n              >\n                Export <Download className=\"w-3.5 h-3.5 sm:w-4 sm:h-4 cursor-pointer\" />\n              </button>\n            </div>\n          </header>\n\n          {/* Grid Container */}\n          <div\n            className={cn(\n              \"flex-1 overflow-hidden relative transition-colors duration-300 flex flex-col\",\n              styles.gridOuter,\n            )}\n          >\n            {view === \"month\" ? (\n              <div className=\"w-full min-w-0 flex flex-col h-full\">\n                <div\n                  className={cn(\n                    \"sticky top-0 z-20 grid grid-cols-7 transition-colors duration-300\",\n                    styles.gridHeader,\n                  )}\n                >\n                  {[\n                    \"Monday\",\n                    \"Tuesday\",\n                    \"Wednesday\",\n                    \"Thursday\",\n                    \"Friday\",\n                    \"Saturday\",\n                    \"Sunday\",\n                  ].map((dayName, idx) => (\n                    <div\n                      key={dayName}\n                      className={cn(\n                        \"py-1.5 sm:py-3 px-1 sm:px-4 text-[11px] sm:text-sm font-semibold text-center truncate\",\n                        variant === \"liquid-glass\"\n                          ? \"text-white/90\"\n                          : variant === \"glass\"\n                            ? \"text-neutral-900 dark:text-white/90\"\n                            : \"text-muted-foreground\",\n                        variant !== \"minimal\" && idx !== 6\n                          ? isGlass ? \"border-r border-white/15\" : \"border-r border-border\"\n                          : \"\",\n                      )}\n                    >\n                      <span className=\"hidden sm:inline\">{dayName}</span>\n                      <span className=\"sm:hidden\">{dayName.slice(0, 3)}</span>\n                    </div>\n                  ))}\n                </div>\n\n                <div\n                  className={cn(\n                    \"grid flex-1 grid-cols-7 auto-rows-[minmax(65px,1fr)] md:auto-rows-[minmax(95px,1fr)] lg:auto-rows-[minmax(120px,1fr)]\",\n                    styles.gridGap,\n                  )}\n                >\n                  {calendarDays.map((dayObj, index) => {\n                    const dayEvents = filteredEvents.filter(\n                      (e) => e.date === dayObj.dateKey,\n                    );\n                    return (\n                      <CalendarCell\n                        key={index}\n                        day={dayObj.day}\n                        events={dayEvents}\n                        isGray={!dayObj.isCurrentMonth}\n                        activePopupEventId={activePopupEventId}\n                        setActivePopupEventId={setActivePopupEventId}\n                        colIndex={index % 7}\n                        rowIndex={Math.floor(index / 7)}\n                        dateStr={dayObj.dateKey.split(\"-\").reverse().join(\".\")}\n                        onDeleteEvent={deleteEvent}\n                        onEditEvent={openEditModal}\n                        onClickCell={() => openAddModalForDate(dayObj.dateKey)}\n                        cellClass={styles.cellBg}\n                        theme={theme}\n                        variant={variant}\n                      />\n                    );\n                  })}\n                </div>\n              </div>\n            ) : (\n              <div className={cn(\"w-full min-w-0 flex flex-col flex-1 overflow-y-auto max-h-[580px] sm:max-h-[660px] [scrollbar-width:thin] [scrollbar-color:rgba(255,255,255,0.2)_transparent]\", isGlass ? \"bg-transparent\" : \"bg-card/60\")}>\n                {/* Time Grid Sticky Header Bar */}\n                <div\n                  className={cn(\n                    \"sticky top-0 z-20 flex border-b transition-colors duration-300 shrink-0\",\n                    isGlass ? \"border-white/15\" : \"border-border\",\n                    styles.gridHeader,\n                  )}\n                >\n                  <div className={cn(\n                    \"w-16 sm:w-20 shrink-0 py-2 px-1 text-center text-xs font-semibold border-r flex items-center justify-center\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white/80 border-white/15 bg-white/5\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-900 font-semibold dark:text-white/80 border-white/15 bg-white/20 dark:bg-white/5\"\n                        : \"text-muted-foreground border-border/70 bg-muted/20\",\n                  )}>\n                    Time\n                  </div>\n                  <div\n                    className={cn(\n                      \"flex-1 grid\",\n                      view === \"week\" ? \"grid-cols-7\" : \"grid-cols-1\",\n                    )}\n                  >\n                    {calendarDays.map((dayObj, idx) => {\n                      const [y, m, d] = dayObj.dateKey.split(\"-\").map(Number);\n                      const dateObj = new Date(y, m - 1, d);\n                      const dayName = dateObj.toLocaleDateString(\"en-US\", {\n                        weekday: \"short\",\n                      });\n                      const fullDayName = dateObj.toLocaleDateString(\"en-US\", {\n                        weekday: \"long\",\n                      });\n                      const isToday =\n                        new Date().toDateString() === dateObj.toDateString();\n\n                      return (\n                        <div\n                          key={dayObj.dateKey}\n                          className={cn(\n                            \"py-2 px-1 text-center font-medium text-xs sm:text-sm truncate flex flex-col items-center justify-center gap-0.5\",\n                            variant === \"liquid-glass\"\n                              ? \"text-white\"\n                              : variant === \"glass\"\n                                ? \"text-neutral-900 dark:text-white\"\n                                : \"text-foreground\",\n                            idx < calendarDays.length - 1\n                              ? isGlass ? \"border-r border-white/15\" : \"border-r border-border\"\n                              : \"\",\n                          )}\n                        >\n                          <span className={cn(\n                            \"text-[10px] sm:text-xs uppercase tracking-wider font-semibold\",\n                            variant === \"liquid-glass\"\n                              ? \"text-white/70\"\n                              : variant === \"glass\"\n                                ? \"text-neutral-700 dark:text-white/70\"\n                                : \"text-muted-foreground\",\n                          )}>\n                            {view === \"day\" ? fullDayName : dayName}\n                          </span>\n                          <span\n                            className={cn(\n                              \"text-xs sm:text-sm font-semibold w-6 h-6 sm:w-7 sm:h-7 flex items-center justify-center rounded-full transition-colors\",\n                              isToday\n                                ? theme.primaryBg\n                                : variant === \"liquid-glass\"\n                                  ? \"text-white hover:bg-white/20\"\n                                  : variant === \"glass\"\n                                    ? \"text-neutral-900 hover:bg-white/30 dark:text-white dark:hover:bg-white/15\"\n                                    : \"text-foreground hover:bg-muted\",\n                            )}\n                          >\n                            {dayObj.day}\n                          </span>\n                        </div>\n                      );\n                    })}\n                  </div>\n                </div>\n\n                {/* Time Grid Body */}\n                <div className=\"flex-1 flex flex-col\">\n                  {TIME_SLOTS.map((slot, slotIdx) => (\n                    <div\n                      key={slot.label}\n                      className={cn(\"flex min-h-[38px] sm:min-h-[44px] border-b\", isGlass ? \"border-white/15\" : \"border-border/70\")}\n                    >\n                      {/* Time Label Column */}\n                      <div className={cn(\n                        \"w-16 sm:w-20 shrink-0 px-1 py-1 flex items-center justify-center text-[10px] sm:text-xs font-semibold border-r select-none\",\n                        variant === \"liquid-glass\"\n                          ? \"text-white/80 border-white/15 bg-white/5\"\n                          : variant === \"glass\"\n                            ? \"text-neutral-900 font-semibold dark:text-white/80 border-white/15 bg-white/20 dark:bg-white/5\"\n                            : \"text-muted-foreground border-border/70 bg-muted/20\",\n                      )}>\n                        {slot.label}\n                      </div>\n\n                      {/* Days Grid Columns */}\n                      <div\n                        className={cn(\n                          \"flex-1 grid\",\n                          view === \"week\" ? \"grid-cols-7\" : \"grid-cols-1\",\n                        )}\n                      >\n                        {calendarDays.map((dayObj, dayIdx) => {\n                          const slotEvents = filteredEvents.filter((e) => {\n                            if (e.date !== dayObj.dateKey) return false;\n                            return getSlotIndexForTime(e.time) === slotIdx;\n                          });\n\n                          return (\n                            <TimeGridCell\n                              key={`${dayObj.dateKey}-${slot.label}`}\n                              events={slotEvents}\n                              activePopupEventId={activePopupEventId}\n                              setActivePopupEventId={setActivePopupEventId}\n                              colIndex={view === \"day\" ? 0 : dayIdx}\n                              rowIndex={slotIdx}\n                              dateStr={dayObj.dateKey\n                                .split(\"-\")\n                                .reverse()\n                                .join(\".\")}\n                              onDeleteEvent={deleteEvent}\n                              onEditEvent={openEditModal}\n                              onClickCell={() =>\n                                openAddModalForDate(\n                                  dayObj.dateKey,\n                                  slot.timeStr,\n                                )\n                              }\n                              cellClass={cn(\n                                styles.cellBg,\n                                dayIdx < calendarDays.length - 1\n                                  ? isGlass ? \"border-r border-white/15\" : \"border-r border-border/70\"\n                                  : \"\",\n                              )}\n                              theme={theme}\n                              variant={variant}\n                            />\n                          );\n                        })}\n                      </div>\n                    </div>\n                  ))}\n                </div>\n              </div>\n            )}\n          </div>\n        </main>\n      </div>\n\n      {/* --- ADD / EDIT EVENT MODAL --- */}\n      {isAddModalOpen && (\n        <div\n          className=\"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-md p-4 cursor-pointer\"\n          onClick={closeModal}\n        >\n          <div\n            className={cn(\n              \"w-full max-w-md shadow-2xl animate-in fade-in zoom-in duration-200 cursor-default relative\",\n              variant === \"liquid-glass\"\n                ? \"rounded-[22px] sm:rounded-[28px] text-white shadow-[0_25px_60px_rgba(0,0,0,0.5)] border-0\"\n                : variant === \"glass\"\n                  ? \"rounded-xl bg-white/50 dark:bg-black/60 backdrop-blur-3xl border border-white/50 dark:border-white/20 text-neutral-900 dark:text-white shadow-2xl\"\n                  : \"rounded-xl bg-card border border-border\",\n            )}\n            onClick={(e) => e.stopPropagation()}\n          >\n            {variant === \"liquid-glass\" && (\n              <>\n                {/* Modal Layer 0: Liquid SVG Displaced Wave Background */}\n                <div className=\"absolute inset-0 overflow-hidden rounded-[22px] sm:rounded-[28px] pointer-events-none z-0\">\n                  <div\n                    className=\"absolute -inset-10\"\n                    style={{\n                      backgroundImage:\n                        'url(\"https://res.cloudinary.com/dodndg7ai/image/upload/f_webp,q_auto,w_1200,c_limit/v1790146209/photo-1470071459604-3b5ec3a7fe05-1790146212205.jpg\")',\n                      backgroundSize: \"cover\",\n                      backgroundPosition: \"center\",\n                      filter: \"url(#glass-blur)\",\n                      transform: \"scale(1.1)\",\n                    }}\n                  />\n                  <div className=\"absolute inset-0 bg-black/40 dark:bg-black/60 backdrop-blur-[2px]\" />\n                  <div\n                    className=\"absolute inset-0 rounded-[22px] sm:rounded-[28px]\"\n                    style={{\n                      boxShadow:\n                        \"0 20px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.08)\",\n                    }}\n                  />\n                </div>\n                {/* Modal Layer 3: Specular Inner Border Highlight */}\n                <div\n                  className=\"absolute inset-0 z-30 pointer-events-none rounded-[22px] sm:rounded-[28px] border border-white/40 dark:border-white/15\"\n                  style={{\n                    boxShadow:\n                      \"inset 2px 2px 2px 0 rgba(255, 255, 255, 0.45), inset -2px -2px 2px 0 rgba(255, 255, 255, 0.3)\",\n                  }}\n                />\n              </>\n            )}\n\n            <div className=\"relative z-40 flex flex-col flex-1\">\n              <div\n                className={cn(\n                  \"flex items-center justify-between px-6 py-4 border-b\",\n                  variant === \"liquid-glass\"\n                    ? \"border-white/20 dark:border-white/15 bg-white/10 dark:bg-white/5 text-white\"\n                    : variant === \"glass\"\n                      ? \"border-black/10 dark:border-white/20\"\n                      : \"border-border\",\n                )}\n              >\n                <h3\n                  className={cn(\n                    \"font-semibold text-lg\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-900 dark:text-white\"\n                        : \"text-foreground\",\n                  )}\n                >\n                  {editingEvent ? \"Update Event\" : \"Add New Event\"}\n                </h3>\n                <button\n                  onClick={closeModal}\n                  className={cn(\n                    \"cursor-pointer p-1 rounded-md transition-colors\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white/80 hover:text-white hover:bg-white/15\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-600 hover:text-neutral-900 hover:bg-black/5 dark:text-white/70 dark:hover:text-white dark:hover:bg-white/10\"\n                        : \"text-muted-foreground hover:text-foreground\",\n                  )}\n                >\n                  <X className=\"w-5 h-5 cursor-pointer\" />\n                </button>\n              </div>\n              <form onSubmit={handleSaveEvent} className=\"p-6 space-y-4\">\n                <div>\n                  <label\n                    className={cn(\n                      \"block text-sm font-medium mb-1\",\n                      variant === \"liquid-glass\"\n                        ? \"text-white/90\"\n                        : variant === \"glass\"\n                          ? \"text-neutral-800 dark:text-white/90\"\n                          : \"text-foreground\",\n                    )}\n                  >\n                    Event Title\n                  </label>\n                  <input\n                    required\n                    name=\"title\"\n                    type=\"text\"\n                    defaultValue={editingEvent ? editingEvent.title : \"\"}\n                    placeholder=\"e.g. Q3 Roadmap Review\"\n                    className={cn(\n                      \"w-full cursor-text border rounded-xl px-3 py-2 text-sm bg-transparent focus:ring-2 focus:outline-none transition-all\",\n                      variant === \"liquid-glass\"\n                        ? \"border-white/25 text-white placeholder:text-white/50 bg-white/10 hover:bg-white/15 focus:bg-white/20 focus:border-white/50 shadow-[inset_0_1px_1px_rgba(255,255,255,0.15)]\"\n                        : variant === \"glass\"\n                          ? \"border-black/15 text-neutral-900 placeholder:text-neutral-400 bg-black/5 hover:bg-black/10 focus:bg-white/40 focus:border-black/30 dark:border-white/25 dark:text-white dark:placeholder:text-white/50 dark:bg-white/10 dark:hover:bg-white/15 dark:focus:bg-white/20 dark:focus:border-white/50\"\n                          : \"border-input text-foreground\",\n                      theme.focusRing,\n                    )}\n                  />\n                </div>\n                <div className=\"grid grid-cols-2 gap-4\">\n                  <CustomDatePicker\n                    value={modalDate}\n                    onChange={setModalDate}\n                    variant={variant}\n                    theme={theme}\n                  />\n                  <CustomTimePicker\n                    value={modalTime}\n                    onChange={setModalTime}\n                    variant={variant}\n                    theme={theme}\n                  />\n                </div>\n                <div className=\"grid grid-cols-2 gap-4\">\n                  <div>\n                    <label\n                      className={cn(\n                        \"block text-sm font-medium mb-1\",\n                        variant === \"liquid-glass\"\n                          ? \"text-white/90\"\n                          : variant === \"glass\"\n                            ? \"text-neutral-800 dark:text-white/90\"\n                            : \"text-foreground\",\n                      )}\n                    >\n                      Event Type\n                    </label>\n                    <input type=\"hidden\" name=\"type\" value={eventType} />\n                    <SelectBlock\n                      options={EVENT_TYPE_OPTIONS}\n                      value={eventType}\n                      onChange={setEventType}\n                      color={color}\n                      variant={variant === \"liquid-glass\" ? \"liquid-glass\" : isGlass ? \"glass\" : \"default\"}\n                      inputSize=\"sm\"\n                    />\n                  </div>\n                  <div>\n                    <label\n                      className={cn(\n                        \"block text-sm font-medium mb-1\",\n                        variant === \"liquid-glass\"\n                          ? \"text-white/90\"\n                          : variant === \"glass\"\n                            ? \"text-neutral-800 dark:text-white/90\"\n                            : \"text-foreground\",\n                      )}\n                    >\n                      Platform\n                    </label>\n                    <input type=\"hidden\" name=\"platform\" value={eventPlatform} />\n                    <SelectBlock\n                      options={EVENT_PLATFORM_OPTIONS}\n                      value={eventPlatform}\n                      onChange={setEventPlatform}\n                      color={color}\n                      variant={variant === \"liquid-glass\" ? \"liquid-glass\" : isGlass ? \"glass\" : \"default\"}\n                      inputSize=\"sm\"\n                    />\n                  </div>\n                </div>\n                <div className=\"pt-4 flex items-center justify-end gap-3\">\n                  <button\n                    type=\"button\"\n                    onClick={closeModal}\n                    className={cn(\n                      \"px-4 py-2 text-sm font-medium rounded-xl transition-colors cursor-pointer\",\n                      variant === \"liquid-glass\"\n                        ? \"text-white/80 hover:bg-white/15 hover:text-white\"\n                        : variant === \"glass\"\n                          ? \"text-neutral-700 hover:bg-black/5 hover:text-neutral-900 dark:text-white/80 dark:hover:bg-white/10 dark:hover:text-white\"\n                          : \"text-foreground hover:bg-muted\",\n                    )}\n                  >\n                    Cancel\n                  </button>\n                  <button\n                    type=\"submit\"\n                    className={cn(\n                      \"px-4 py-2 text-sm font-semibold rounded-xl transition-colors shadow-sm cursor-pointer\",\n                      theme.primaryBg,\n                    )}\n                  >\n                    {editingEvent ? \"Update Event\" : \"Add Event\"}\n                  </button>\n                </div>\n              </form>\n            </div>\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n\n/** Shared by the month cell and the time-grid cell. */\ninterface CalendarCellBaseProps {\n  events?: CalendarEvent[];\n  activePopupEventId: string | null;\n  setActivePopupEventId: (id: string | null) => void;\n  colIndex: number;\n  rowIndex: number;\n  dateStr: string;\n  onDeleteEvent: (id: string) => void;\n  onEditEvent: (event: CalendarEvent) => void;\n  onClickCell: () => void;\n  cellClass?: string;\n  theme: Record<string, string>;\n  variant?: CalendarVariant;\n}\n\ninterface CalendarCellProps extends CalendarCellBaseProps {\n  day: number | string;\n  isGray?: boolean;\n}\n\ntype TimeGridCellProps = CalendarCellBaseProps;\n\n// === Sub Component: CalendarCell ===\nfunction CalendarCell({\n  day,\n  events = [],\n  isGray,\n  activePopupEventId,\n  setActivePopupEventId,\n  colIndex,\n  rowIndex,\n  dateStr,\n  onDeleteEvent,\n  onEditEvent,\n  onClickCell,\n  cellClass,\n  theme,\n  variant,\n}: CalendarCellProps) {\n  const popupXClass = colIndex >= 4 ? \"sm:right-0\" : \"sm:left-0\";\n  const popupYClass = rowIndex >= 4 ? \"sm:bottom-full sm:mb-2\" : \"sm:top-12\";\n  const isAnyPopupOpen = events.some((e: CalendarEvent) => e.id === activePopupEventId);\n\n  return (\n    <div\n      onClick={onClickCell}\n      className={cn(\n        `relative flex flex-col p-1.5 sm:p-2 h-full transition-colors cursor-pointer ${isAnyPopupOpen ? \"z-30\" : \"z-10 hover:z-20\"} ${\n          isGray\n            ? variant === \"liquid-glass\"\n              ? \"text-white/40 opacity-50\"\n              : variant === \"glass\"\n                ? \"text-neutral-400 dark:text-white/40 opacity-50\"\n                : \"text-muted-foreground opacity-60\"\n            : variant === \"liquid-glass\"\n              ? \"text-white font-semibold\"\n              : variant === \"glass\"\n                ? \"text-neutral-900 font-semibold dark:text-white\"\n                : \"text-foreground\"\n        }`,\n        cellClass,\n      )}\n    >\n      <div\n        className={`text-xs sm:text-sm font-medium mb-1 sm:mb-2 w-5 h-5 sm:w-6 sm:h-6 flex items-center justify-center rounded shrink-0`}\n      >\n        {day}\n      </div>\n\n      <div className=\"flex-1 overflow-y-auto space-y-1 sm:space-y-1.5 pr-1 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]\">\n        {events.map((event: CalendarEvent) => {\n          const isPopupOpen = activePopupEventId === event.id;\n          const isPentest = event.type === \"pentest\";\n          const borderClass = isGray\n            ? variant === \"liquid-glass\"\n              ? \"border-white/10 bg-white/10 text-white/50\"\n              : variant === \"glass\"\n                ? \"border-black/10 bg-black/5 text-neutral-500 dark:border-white/10 dark:bg-white/10 dark:text-white/50\"\n                : \"border-border bg-muted text-muted-foreground\"\n            : isPentest\n              ? variant === \"liquid-glass\"\n                ? \"border-amber-400/40 bg-amber-500/25 text-amber-100 backdrop-blur-sm shadow-xs font-medium\"\n                : variant === \"glass\"\n                  ? \"border-amber-500/50 bg-amber-400/30 text-amber-950 font-medium dark:border-amber-400/40 dark:bg-amber-500/25 dark:text-amber-100 backdrop-blur-sm shadow-xs\"\n                  : \"border-yellow-200 bg-yellow-50 text-yellow-800 dark:border-yellow-800/50 dark:bg-yellow-900/30 dark:text-yellow-400\"\n              : variant === \"liquid-glass\"\n                ? \"border-emerald-400/40 bg-emerald-500/25 text-emerald-100 backdrop-blur-sm shadow-xs font-medium\"\n                : variant === \"glass\"\n                  ? \"border-emerald-500/50 bg-emerald-400/30 text-emerald-950 font-medium dark:border-emerald-400/40 dark:bg-emerald-500/25 dark:text-emerald-100 backdrop-blur-sm shadow-xs\"\n                  : \"border-green-200 bg-green-50 text-green-800 dark:border-green-800/50 dark:bg-green-900/30 dark:text-green-400\";\n          const PlatformIcon =\n            event.platform === \"meet\"\n              ? Video\n              : event.platform === \"slack\"\n                ? Hash\n                : MessageSquare;\n          const iconColor =\n            event.platform === \"meet\"\n              ? \"text-green-600\"\n              : event.platform === \"slack\"\n                ? \"text-blue-500\"\n                : \"text-indigo-500\";\n\n          return (\n            <div\n              key={event.id}\n              onClick={(e) => {\n                e.stopPropagation();\n                setActivePopupEventId(isPopupOpen ? null : event.id);\n              }}\n              className={`flex items-center justify-between px-1 sm:px-2 py-0.5 text-[10px] sm:text-xs font-medium rounded border cursor-pointer hover:brightness-95 transition-all ${borderClass}`}\n            >\n              <div className=\"flex items-center gap-1 sm:gap-1.5 min-w-0\">\n                <PlatformIcon\n                  className={cn(\n                    \"w-2.5 h-2.5 sm:w-3 sm:h-3 shrink-0 cursor-pointer\",\n                    variant === \"liquid-glass\" || variant === \"glass\" ? \"text-current\" : iconColor,\n                  )}\n                />\n                <span className=\"truncate max-w-[35px] min-[400px]:max-w-[60px] sm:max-w-none cursor-pointer\">{event.title}</span>\n              </div>\n              <span\n                className={cn(\n                  \"opacity-75 shrink-0 ml-1 hidden sm:inline cursor-pointer\",\n                  variant === \"liquid-glass\"\n                    ? \"text-white/80 font-medium\"\n                    : variant === \"glass\"\n                      ? \"text-neutral-800 font-medium dark:text-white/80\"\n                      : \"\",\n                )}\n              >\n                {event.time}\n              </span>\n            </div>\n          );\n        })}\n      </div>\n\n      {events.map((event: CalendarEvent) => {\n        const isPopupOpen = activePopupEventId === event.id;\n        if (!isPopupOpen) return null;\n\n        const PlatformIcon =\n          event.platform === \"meet\"\n            ? Video\n            : event.platform === \"slack\"\n              ? Hash\n              : MessageSquare;\n        const iconColor =\n          event.platform === \"meet\"\n            ? \"text-green-600\"\n            : event.platform === \"slack\"\n              ? \"text-blue-500\"\n              : \"text-indigo-500\";\n\n        return (\n          <div key={`popup-${event.id}`}>\n            <div\n              className={cn(\n                \"fixed inset-0 z-40 sm:bg-transparent cursor-pointer\",\n                variant === \"liquid-glass\"\n                  ? \"bg-black/50 backdrop-blur-xs\"\n                  : variant === \"glass\"\n                    ? \"bg-black/30 dark:bg-black/60 backdrop-blur-xs\"\n                    : \"bg-black/20 dark:bg-black/60\",\n              )}\n              onClick={(e) => {\n                e.stopPropagation();\n                setActivePopupEventId(null);\n              }}\n            />\n            <div\n              className={cn(\n                \"fixed sm:absolute z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[90vw] max-w-[320px] sm:top-auto sm:left-auto sm:translate-x-0 sm:translate-y-0 sm:w-72\",\n                popupXClass,\n                popupYClass,\n                variant === \"liquid-glass\"\n                  ? \"bg-black/40 dark:bg-black/50 backdrop-blur-3xl border border-white/30 text-white shadow-[0_25px_60px_rgba(0,0,0,0.5),inset_0_1px_1px_rgba(255,255,255,0.4),inset_-1px_-1px_1px_rgba(255,255,255,0.15)] rounded-2xl\"\n                  : variant === \"glass\"\n                    ? \"bg-white/50 dark:bg-black/60 backdrop-blur-3xl border-white/50 dark:border-white/20 text-neutral-900 dark:text-white shadow-2xl rounded-xl\"\n                    : \"bg-popover text-popover-foreground border-border rounded-xl\",\n                \"shadow-2xl border p-4 cursor-default animate-in fade-in zoom-in-95 duration-150\",\n              )}\n              onClick={(e) => e.stopPropagation()}\n            >\n              <div className=\"flex items-start justify-between mb-4\">\n                <h4\n                  className={cn(\n                    \"font-bold text-base truncate pr-4\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white drop-shadow-xs\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-900 dark:text-white\"\n                        : \"text-foreground\",\n                  )}\n                >\n                  {event.title}\n                </h4>\n                <div\n                  className={cn(\n                    \"flex items-center gap-2 shrink-0\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white/80\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-600 dark:text-white/70\"\n                        : \"text-muted-foreground\",\n                  )}\n                >\n                  <Edit2\n                    onClick={(e) => {\n                      e.stopPropagation();\n                      onEditEvent(event);\n                    }}\n                    className={cn(\n                      \"w-4 h-4 cursor-pointer transition-colors\",\n                      variant === \"liquid-glass\"\n                        ? \"hover:text-white\"\n                        : variant === \"glass\"\n                          ? \"hover:text-neutral-900 dark:hover:text-white\"\n                          : \"hover:text-foreground\",\n                    )}\n                  />\n                  <Trash2\n                    onClick={(e) => {\n                      e.stopPropagation();\n                      onDeleteEvent(event.id);\n                    }}\n                    className=\"w-4 h-4 cursor-pointer hover:text-red-400 transition-colors\"\n                  />\n                </div>\n              </div>\n              <div className=\"flex items-center gap-2 mb-3\">\n                <span\n                  className={cn(\n                    \"flex items-center gap-1.5 px-2.5 py-1 text-xs font-semibold rounded-full\",\n                    variant === \"liquid-glass\"\n                      ? \"bg-emerald-500/25 text-emerald-200 border border-emerald-400/40 backdrop-blur-md shadow-[inset_0_1px_1px_rgba(255,255,255,0.25)]\"\n                      : variant === \"glass\"\n                        ? \"bg-emerald-500/20 text-emerald-800 dark:text-emerald-300 border border-emerald-500/30 backdrop-blur-sm\"\n                        : theme.lightBg,\n                  )}\n                >\n                  <div\n                    className={cn(\n                      \"w-1.5 h-1.5 rounded-full animate-pulse\",\n                      variant === \"liquid-glass\" || variant === \"glass\"\n                        ? \"bg-emerald-400 shadow-[0_0_8px_rgba(52,211,153,0.8)]\"\n                        : theme.pulse,\n                    )}\n                  ></div>{\" \"}\n                  Pending\n                </span>\n              </div>\n              <div\n                className={cn(\n                  \"flex items-center gap-2 text-sm mb-4 font-medium\",\n                  variant === \"liquid-glass\"\n                    ? \"text-white/90\"\n                    : variant === \"glass\"\n                      ? \"text-neutral-700 dark:text-white/85\"\n                      : \"text-muted-foreground\",\n                )}\n              >\n                <Calendar1\n                  className={cn(\n                    \"w-4 h-4 shrink-0\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white/85\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-600 dark:text-white/70\"\n                        : \"\",\n                  )}\n                />{\" \"}\n                {dateStr} at {event.time}\n              </div>\n              <button\n                className={cn(\n                  \"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl text-sm font-semibold transition-all cursor-pointer\",\n                  variant === \"liquid-glass\"\n                    ? \"bg-white/20 hover:bg-white/30 border border-white/35 text-white backdrop-blur-md shadow-[0_4px_16px_rgba(0,0,0,0.2),inset_0_1px_1px_rgba(255,255,255,0.4)] active:scale-[0.98]\"\n                    : variant === \"glass\"\n                      ? \"bg-white/40 hover:bg-white/60 border border-white/50 text-neutral-900 dark:bg-white/15 dark:hover:bg-white/25 dark:border-white/25 dark:text-white backdrop-blur-md shadow-xs\"\n                      : \"bg-muted hover:bg-muted/80 text-foreground\",\n                )}\n              >\n                Join with{\" \"}\n                {event.platform === \"meet\"\n                  ? \"Google Meet\"\n                  : event.platform === \"slack\"\n                    ? \"Slack\"\n                    : \"Discord\"}{\" \"}\n                <PlatformIcon\n                  className={`w-4 h-4 cursor-pointer ${variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-800 dark:text-white\" : iconColor}`}\n                />\n              </button>\n            </div>\n          </div>\n        );\n      })}\n    </div>\n  );\n}\n\n// === Sub Component: TimeGridCell ===\nfunction TimeGridCell({\n  events = [],\n  activePopupEventId,\n  setActivePopupEventId,\n  colIndex,\n  rowIndex,\n  dateStr,\n  onDeleteEvent,\n  onEditEvent,\n  onClickCell,\n  cellClass,\n  theme,\n  variant,\n}: TimeGridCellProps) {\n  const popupXClass = colIndex >= 4 ? \"sm:right-0\" : \"sm:left-0\";\n  const popupYClass = rowIndex >= 6 ? \"sm:bottom-full sm:mb-2\" : \"sm:top-10\";\n  const isAnyPopupOpen = events.some((e: CalendarEvent) => e.id === activePopupEventId);\n\n  return (\n    <div\n      onClick={onClickCell}\n      className={cn(\n        `relative flex flex-col p-1 sm:p-1.5 h-full transition-colors cursor-pointer ${isAnyPopupOpen ? \"z-30\" : \"z-10 hover:z-20\"} ${\n          variant === \"liquid-glass\"\n            ? \"text-white\"\n            : variant === \"glass\"\n              ? \"text-neutral-900 dark:text-white\"\n              : \"text-foreground\"\n        } min-h-[52px]`,\n        cellClass,\n      )}\n    >\n      <div className=\"flex-1 overflow-y-auto space-y-1 pr-0.5 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]\">\n        {events.map((event: CalendarEvent) => {\n          const isPopupOpen = activePopupEventId === event.id;\n          const isPentest = event.type === \"pentest\";\n          const borderClass = isPentest\n            ? variant === \"liquid-glass\"\n              ? \"border-amber-400/40 bg-amber-500/25 text-amber-100 backdrop-blur-sm shadow-xs font-medium\"\n              : variant === \"glass\"\n                ? \"border-amber-500/50 bg-amber-400/30 text-amber-950 font-medium dark:border-amber-400/40 dark:bg-amber-500/25 dark:text-amber-100 backdrop-blur-sm shadow-xs\"\n                : \"border-yellow-200 bg-yellow-50 text-yellow-800 dark:border-yellow-800/50 dark:bg-yellow-900/30 dark:text-yellow-400\"\n            : variant === \"liquid-glass\"\n              ? \"border-emerald-400/40 bg-emerald-500/25 text-emerald-100 backdrop-blur-sm shadow-xs font-medium\"\n              : variant === \"glass\"\n                ? \"border-emerald-500/50 bg-emerald-400/30 text-emerald-950 font-medium dark:border-emerald-400/40 dark:bg-emerald-500/25 dark:text-emerald-100 backdrop-blur-sm shadow-xs\"\n                : \"border-green-200 bg-green-50 text-green-800 dark:border-green-800/50 dark:bg-green-900/30 dark:text-green-400\";\n          const PlatformIcon =\n            event.platform === \"meet\"\n              ? Video\n              : event.platform === \"slack\"\n                ? Hash\n                : MessageSquare;\n          const iconColor =\n            event.platform === \"meet\"\n              ? \"text-green-600\"\n              : event.platform === \"slack\"\n                ? \"text-blue-500\"\n                : \"text-indigo-500\";\n\n          return (\n            <div\n              key={event.id}\n              onClick={(e) => {\n                e.stopPropagation();\n                setActivePopupEventId(isPopupOpen ? null : event.id);\n              }}\n              className={`flex items-center justify-between px-1 sm:px-2 py-0.5 text-[10px] sm:text-xs font-medium rounded border cursor-pointer hover:brightness-95 transition-all ${borderClass}`}\n            >\n              <div className=\"flex items-center gap-1 sm:gap-1.5 min-w-0\">\n                <PlatformIcon\n                  className={cn(\n                    \"w-2.5 h-2.5 sm:w-3 sm:h-3 shrink-0 cursor-pointer\",\n                    variant === \"liquid-glass\" || variant === \"glass\" ? \"text-current\" : iconColor,\n                  )}\n                />\n                <span className=\"truncate max-w-[35px] min-[400px]:max-w-[60px] sm:max-w-none cursor-pointer\">\n                  {event.title}\n                </span>\n              </div>\n              <span\n                className={cn(\n                  \"opacity-75 shrink-0 ml-1 hidden sm:inline cursor-pointer\",\n                  variant === \"liquid-glass\"\n                    ? \"text-white/80 font-medium\"\n                    : variant === \"glass\"\n                      ? \"text-neutral-800 font-medium dark:text-white/80\"\n                      : \"\",\n                )}\n              >\n                {event.time}\n              </span>\n            </div>\n          );\n        })}\n      </div>\n\n      {events.map((event: CalendarEvent) => {\n        const isPopupOpen = activePopupEventId === event.id;\n        if (!isPopupOpen) return null;\n\n        const PlatformIcon =\n          event.platform === \"meet\"\n            ? Video\n            : event.platform === \"slack\"\n              ? Hash\n              : MessageSquare;\n        const iconColor =\n          event.platform === \"meet\"\n            ? \"text-green-600\"\n            : event.platform === \"slack\"\n              ? \"text-blue-500\"\n              : \"text-indigo-500\";\n\n        return (\n          <div key={`popup-${event.id}`}>\n            <div\n              className={cn(\n                \"fixed inset-0 z-40 sm:bg-transparent cursor-pointer\",\n                variant === \"liquid-glass\"\n                  ? \"bg-black/50 backdrop-blur-xs\"\n                  : variant === \"glass\"\n                    ? \"bg-black/30 dark:bg-black/60 backdrop-blur-xs\"\n                    : \"bg-black/20 dark:bg-black/60\",\n              )}\n              onClick={(e) => {\n                e.stopPropagation();\n                setActivePopupEventId(null);\n              }}\n            />\n            <div\n              className={cn(\n                \"fixed sm:absolute z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[90vw] max-w-[320px] sm:top-auto sm:left-auto sm:translate-x-0 sm:translate-y-0 sm:w-72\",\n                popupXClass,\n                popupYClass,\n                variant === \"liquid-glass\"\n                  ? \"bg-black/40 dark:bg-black/50 backdrop-blur-3xl border border-white/30 text-white shadow-[0_25px_60px_rgba(0,0,0,0.5),inset_0_1px_1px_rgba(255,255,255,0.4),inset_-1px_-1px_1px_rgba(255,255,255,0.15)] rounded-2xl\"\n                  : variant === \"glass\"\n                    ? \"bg-white/50 dark:bg-black/60 backdrop-blur-3xl border-white/50 dark:border-white/20 text-neutral-900 dark:text-white shadow-2xl rounded-xl\"\n                    : \"bg-popover text-popover-foreground border-border rounded-xl\",\n                \"shadow-2xl border p-4 cursor-default animate-in fade-in zoom-in-95 duration-150\",\n              )}\n              onClick={(e) => e.stopPropagation()}\n            >\n              <div className=\"flex items-start justify-between mb-4\">\n                <h4\n                  className={cn(\n                    \"font-bold text-base truncate pr-4\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white drop-shadow-xs\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-900 dark:text-white\"\n                        : \"text-foreground\",\n                  )}\n                >\n                  {event.title}\n                </h4>\n                <div\n                  className={cn(\n                    \"flex items-center gap-2 shrink-0\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white/80\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-600 dark:text-white/70\"\n                        : \"text-muted-foreground\",\n                  )}\n                >\n                  <Edit2\n                    onClick={(e) => {\n                      e.stopPropagation();\n                      onEditEvent(event);\n                    }}\n                    className={cn(\n                      \"w-4 h-4 cursor-pointer transition-colors\",\n                      variant === \"liquid-glass\"\n                        ? \"hover:text-white\"\n                        : variant === \"glass\"\n                          ? \"hover:text-neutral-900 dark:hover:text-white\"\n                          : \"hover:text-foreground\",\n                    )}\n                  />\n                  <Trash2\n                    onClick={(e) => {\n                      e.stopPropagation();\n                      onDeleteEvent(event.id);\n                    }}\n                    className=\"w-4 h-4 cursor-pointer hover:text-red-400 transition-colors\"\n                  />\n                </div>\n              </div>\n              <div className=\"flex items-center gap-2 mb-3\">\n                <span\n                  className={cn(\n                    \"flex items-center gap-1.5 px-2.5 py-1 text-xs font-semibold rounded-full\",\n                    variant === \"liquid-glass\"\n                      ? \"bg-emerald-500/25 text-emerald-200 border border-emerald-400/40 backdrop-blur-md shadow-[inset_0_1px_1px_rgba(255,255,255,0.25)]\"\n                      : variant === \"glass\"\n                        ? \"bg-emerald-500/20 text-emerald-800 dark:text-emerald-300 border border-emerald-500/30 backdrop-blur-sm\"\n                        : theme.lightBg,\n                  )}\n                >\n                  <div\n                    className={cn(\n                      \"w-1.5 h-1.5 rounded-full animate-pulse\",\n                      variant === \"liquid-glass\" || variant === \"glass\"\n                        ? \"bg-emerald-400 shadow-[0_0_8px_rgba(52,211,153,0.8)]\"\n                        : theme.pulse,\n                    )}\n                  ></div>{\" \"}\n                  Pending\n                </span>\n              </div>\n              <div\n                className={cn(\n                  \"flex items-center gap-2 text-sm mb-4 font-medium\",\n                  variant === \"liquid-glass\"\n                    ? \"text-white/90\"\n                    : variant === \"glass\"\n                      ? \"text-neutral-700 dark:text-white/85\"\n                      : \"text-muted-foreground\",\n                )}\n              >\n                <Calendar1\n                  className={cn(\n                    \"w-4 h-4 shrink-0\",\n                    variant === \"liquid-glass\"\n                      ? \"text-white/85\"\n                      : variant === \"glass\"\n                        ? \"text-neutral-600 dark:text-white/70\"\n                        : \"\",\n                  )}\n                />{\" \"}\n                {dateStr} at {event.time}\n              </div>\n              <button\n                className={cn(\n                  \"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl text-sm font-semibold transition-all cursor-pointer\",\n                  variant === \"liquid-glass\"\n                    ? \"bg-white/20 hover:bg-white/30 border border-white/35 text-white backdrop-blur-md shadow-[0_4px_16px_rgba(0,0,0,0.2),inset_0_1px_1px_rgba(255,255,255,0.4)] active:scale-[0.98]\"\n                    : variant === \"glass\"\n                      ? \"bg-white/40 hover:bg-white/60 border border-white/50 text-neutral-900 dark:bg-white/15 dark:hover:bg-white/25 dark:border-white/25 dark:text-white backdrop-blur-md shadow-xs\"\n                      : \"bg-muted hover:bg-muted/80 text-foreground\",\n                )}\n              >\n                Join with{\" \"}\n                {event.platform === \"meet\"\n                  ? \"Google Meet\"\n                  : event.platform === \"slack\"\n                    ? \"Slack\"\n                    : \"Discord\"}{\" \"}\n                <PlatformIcon\n                  className={`w-4 h-4 cursor-pointer ${variant === \"liquid-glass\" ? \"text-white\" : variant === \"glass\" ? \"text-neutral-800 dark:text-white\" : iconColor}`}\n                />\n              </button>\n            </div>\n          </div>\n        );\n      })}\n    </div>\n  );\n}\n\nexport { Calendar, CalendarDashboard, CalendarDayButton };\n",
      "type": "registry:component",
      "target": "components/custom/blocks/Calendar.tsx"
    },
    {
      "path": "src/components/custom/ui/button-variants.ts",
      "content": "import { cva } from \"class-variance-authority\";\n\nexport const buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n  {\n    variants: {\n      variant: {\n        default:\n          \"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90\",\n        destructive:\n          \"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n        outline:\n          \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50\",\n        secondary:\n          \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n        ghost:\n          \"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n        sm: \"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5\",\n        lg: \"h-10 rounded-md px-6 has-[>svg]:px-4\",\n        icon: \"size-9\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  },\n);\n",
      "type": "registry:component",
      "target": "components/custom/ui/button-variants.ts"
    }
  ],
  "docs": "Named exports: Calendar, CalendarDashboard, CalendarDayButton. Built on react-day-picker; variants are default | minimal | glass. `mockEvents` is a Record<string, string[]> keyed by date for the event dots. Pulls in `select` and `ui-button` as registry dependencies. For a plain date field, use `date-picker`.",
  "categories": [
    "dates"
  ],
  "type": "registry:component"
}
