Index: backend/controllers/forumController.js
===================================================================
--- backend/controllers/forumController.js	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ backend/controllers/forumController.js	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -149,101 +149,54 @@
 
 const getForumPosts = async (req, res) => {
-  console.log("BACKEND called");
-  try {
-    // Extract parameters with strict type checking and debug output
-    const page = req.query.page !== undefined ? parseInt(req.query.page) : 0;
-    const limit =
-      req.query.limit !== undefined ? parseInt(req.query.limit) : 20;
-
-    // Topic needs special handling
-    const topic = req.query.topic || null;
-
-    const sort = req.query.sort || null;
-    const date = req.query.date || null;
-    const commentSort = req.query.commentSort || null;
-    const search = req.query.search || null;
-
+  try {
+    const page = parseInt(req.query.page) || 0;
+    const limit = parseInt(req.query.limit) || 20;
+    const commentSort = req.query.commentSort;
+    const topic = req.query.topic?.trim();
+    const date = req.query.date;
+
+    const search = req.query.search?.trim();
+    const sort = req.query.sort;
     const skip = page * limit;
     const take = limit;
 
-    // Build filter conditions
-    const whereCondition = {};
-
-    // Filter by topic if provided
+    const filters = [];
+
     if (topic && topic !== "all") {
-      const trimmedTopic = topic.trim();
-
-      whereCondition.topic = trimmedTopic;
-    }
-
-    // Filter by specific date if provided
+      filters.push({ topic });
+    }
+
     if (date) {
       const selectedDate = new Date(date);
-
-      // Ensure the date is valid
-      if (isNaN(selectedDate.getTime())) {
+      if (!isNaN(selectedDate.getTime())) {
+        filters.push({ date_created: selectedDate });
+      } else {
         console.error(`Invalid date provided: "${date}"`);
-      } else {
-        whereCondition.date_created = selectedDate;
       }
     }
 
-    // Filter by search text if provided
-    if (search && search.trim()) {
-      const searchTerm = search.trim();
-
-      // Use Prisma's OR condition to search in both title and content
-      // Case-insensitive search using contains with mode: 'insensitive'
-      const searchCondition = {
+    if (search) {
+      filters.push({
         OR: [
-          {
-            title: {
-              contains: searchTerm,
-              mode: "insensitive",
-            },
-          },
-          {
-            content: {
-              contains: searchTerm,
-              mode: "insensitive",
-            },
-          },
+          { title: { contains: search, mode: "insensitive" } },
+          { content: { contains: search, mode: "insensitive" } },
         ],
-      };
-
-      // If we already have other conditions, combine them with AND
-      if (Object.keys(whereCondition).length > 0) {
-        whereCondition.AND = [{ ...whereCondition }, searchCondition];
-
-        // Clear the original conditions since they're now in AND
-        Object.keys(whereCondition).forEach((key) => {
-          if (key !== "AND") {
-            delete whereCondition[key];
-          }
-        });
-      } else {
-        // If no other conditions, just use the search condition
-        Object.assign(whereCondition, searchCondition);
-      }
-    }
+      });
+    }
+
+    // Combine filters with AND if there are any
+    const whereCondition = filters.length > 0 ? { AND: filters } : {};
 
     // Determine ordering - using an array to support multiple sorting criteria
     let orderBy = [];
 
-    // First, handle comment popularity sorting if specified
     if (commentSort === "most-popular") {
       orderBy.push({ comment_count: "desc" });
 
-      // Add date as secondary sort to make results consistent
       orderBy.push({ date_created: "desc" });
     } else if (commentSort === "least-popular") {
       orderBy.push({ comment_count: "asc" });
-
-      // Add date as secondary sort to make results consistent
       orderBy.push({ date_created: "desc" });
-    }
-    // Only apply date sorting as primary sort if comment sorting isn't specified
-    else {
-      // Always apply date sorting (either as primary or secondary criterion)
+    } else {
       if (sort === "oldest") {
         orderBy.push({ date_created: "asc" });
@@ -278,24 +231,4 @@
     }));
 
-    // Enhanced debug output
-
-    // Log topic distribution to help debug topic filtering issues
-    if (topic && topic !== "all") {
-      const topicsInResult = {};
-      forumPosts.forEach((post) => {
-        topicsInResult[post.topic] = (topicsInResult[post.topic] || 0) + 1;
-      });
-
-      // Check if filtering was successful
-      const nonMatchingCount = forumPosts.filter(
-        (post) => post.topic !== topic
-      ).length;
-      if (nonMatchingCount > 0) {
-        console.warn(
-          `WARNING: Found ${nonMatchingCount} posts with wrong topic in results!`
-        );
-      }
-    }
-
     // Set cache control headers to prevent caching
     res.set("Cache-Control", "no-store, no-cache, must-revalidate, private");
Index: backend/controllers/reviewController.js
===================================================================
--- backend/controllers/reviewController.js	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ backend/controllers/reviewController.js	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -125,10 +125,21 @@
             created_at: "asc",
           },
+          include: {
+            challenges: {
+              select: {
+                id: true,
+                title: true,
+              },
+            },
+          },
         }),
       ]);
 
       const totalPages = Math.ceil(totalPosts / parseInt(limit));
-
-      res.status(200).json({ posts, totalPages });
+      const reviewPosts = posts.map((post) => ({
+        ...post,
+        challengeTitle: post.challenges?.title,
+      }));
+      res.status(200).json({ posts: reviewPosts, totalPages });
     } catch (dbError) {
       console.error("Database query error:", dbError);
Index: backend/services/emailService.js
===================================================================
--- backend/services/emailService.js	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ backend/services/emailService.js	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -204,5 +204,4 @@
   try {
     await transporter.sendMail(mailOptions);
-    console.log(`Moderator email sent successfully to ${userEmail}`);
   } catch (error) {
     console.error(`Failed to send approval email to ${userEmail}:`, error);
Index: client/src/Dashboard/DashboardLayout.jsx
===================================================================
--- client/src/Dashboard/DashboardLayout.jsx	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ client/src/Dashboard/DashboardLayout.jsx	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -8,5 +8,5 @@
       <Navbar />
       {/* Main content area */}
-      <div className="flex-1 h-full overflow-y-auto lg:ml-0 pt-20 lg:pt-0">
+      <div className="flex-1 h-full overflow-y-auto lg:ml-0 pt-17 lg:pt-0">
         <Outlet />
       </div>
Index: client/src/Dashboard/components/CalendarPopover.jsx
===================================================================
--- client/src/Dashboard/components/CalendarPopover.jsx	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ client/src/Dashboard/components/CalendarPopover.jsx	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -64,5 +64,5 @@
     <div
       ref={popoverRef}
-      className="absolute top-10 mt-2 right-50 z-20 bg-base-200 rounded-lg shadow-xl p-4 border border-base-300 w-[320px]"
+      className="absolute top-10 mt-2  z-30 bg-base-200 rounded-lg shadow-xl p-4 border border-base-300 w-[320px]"
     >
       <calendar-date
Index: client/src/Dashboard/components/Forum.jsx
===================================================================
--- client/src/Dashboard/components/Forum.jsx	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ client/src/Dashboard/components/Forum.jsx	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -25,5 +25,5 @@
   });
   const [isDeleting, setIsDeleting] = useState(false);
-  const postsPerPage = 20;
+  const postsPerPage = 10;
   const { user } = useAuth();
 
@@ -165,114 +165,18 @@
 
   return (
-    <div data-theme="luxury" className="min-h-screen bg-base-100">
-      <div className="flex flex-col h-screen">
-        {/* Sticky Header Section */}
-        <div className="sticky top-0 z-10 bg-base-100 border-b border-base-300 shadow-sm">
-          <div className="p-3 sm:p-4 md:p-6 md:pl-12 w-full">
-            <div className="flex flex-col space-y-3 sm:space-y-4 lg:flex-row lg:items-center lg:justify-between lg:space-y-0 lg:gap-4">
-              <h1 className="text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold text-center lg:text-left">
-                Forum Posts
-              </h1>
-              <div className="flex  xs:flex-row gap-2 sm:gap-3 w-full lg:w-auto">
-                <button
-                  onClick={() => {
-                    navigate("/dashboard/create-post");
-                  }}
-                  className="cursor-pointer px-3 py-2 sm:px-4 sm:py-2.5 md:px-6 md:py-3 bg-yellow-500 text-black rounded-lg hover:bg-yellow-600 text-sm sm:text-base font-medium transition-colors duration-200 flex-1 xs:flex-none lg:whitespace-nowrap"
-                >
-                  <span className="xs:hidden">Create Post</span>
-                </button>
-                <button
-                  onClick={() => {
-                    navigate("/dashboard/user-posts");
-                  }}
-                  className="cursor-pointer px-3 py-2 sm:px-4 sm:py-2.5 md:px-6 md:py-3 bg-yellow-500 text-black rounded-lg hover:bg-yellow-600 text-sm sm:text-base font-medium transition-colors duration-200 flex-1 xs:flex-none lg:whitespace-nowrap"
-                >
-                  <span className="xs:hidden">My Posts</span>
-                  <span className="hidden xs:inline">Your Posts</span>
-                </button>
-              </div>
-            </div>
-          </div>
-        </div>
-
-        {/* Filter Navbar */}
-        <div className="sticky top-[68px] sm:top-[76px] z-10 bg-base-200 border-b border-base-300 shadow-sm">
-          <div className="p-3 sm:p-4 md:pl-12 w-full max-w-full mx-auto">
-            {/* Mobile Filter Toggle */}
-            <div className="flex items-center justify-between mb-3 lg:hidden">
-              <h3 className="text-base sm:text-lg font-semibold flex items-center gap-2">
-                Filters
-                {/* Active filter count indicator */}
-                {(filters.topic !== "all" ||
-                  filters.dateSort !== "newest" ||
-                  filters.selectedDate ||
-                  filters.commentSort !== "none" ||
-                  (filters.searchText && filters.searchText.trim())) && (
-                  <span className="badge badge-sm bg-yellow-500 text-black border-none">
-                    {
-                      [
-                        filters.topic !== "all",
-                        filters.dateSort !== "newest",
-                        filters.selectedDate,
-                        filters.commentSort !== "none",
-                        filters.searchText && filters.searchText.trim(),
-                      ].filter(Boolean).length
-                    }
-                  </span>
-                )}
-              </h3>
-              <button
-                onClick={() => setShowFilters(!showFilters)}
-                className="btn btn-sm btn-ghost px-2"
-              >
-                <svg
-                  className={`w-5 h-5 transition-transform duration-200 ${
-                    showFilters ? "rotate-180" : ""
-                  }`}
-                  fill="none"
-                  stroke="currentColor"
-                  viewBox="0 0 24 24"
-                >
-                  <path
-                    strokeLinecap="round"
-                    strokeLinejoin="round"
-                    strokeWidth="2"
-                    d="M19 9l-7 7-7-7"
-                  />
-                </svg>
-              </button>
-            </div>
-
-            {/* Filter Controls */}
-            <div
-              className={`transition-all duration-300 ${
-                showFilters ? "block opacity-100" : "hidden opacity-0"
-              } lg:block lg:opacity-100`}
-            >
-              {/* Mobile-First Filter Layout */}
-              <div className="space-y-3 lg:space-y-0 lg:grid lg:grid-cols-6 xl:grid-cols-8 lg:gap-3 mb-3 max-w-full">
-                {/* Search Filter - Full width on mobile, 2 cols on desktop */}
-                <div className="flex flex-col gap-1.5 lg:col-span-2">
-                  <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                    Search Posts
-                  </label>
-                  <div className="relative">
-                    <input
-                      type="text"
-                      placeholder="Search titles and content..."
-                      value={filters.searchText}
-                      onChange={(e) =>
-                        setFilters({ ...filters, searchText: e.target.value })
-                      }
-                      onKeyDown={(e) => {
-                        if (e.key === "Enter") {
-                          applyFilters();
-                        }
-                      }}
-                      className="input input-sm input-bordered w-full text-sm pl-9 pr-3"
-                    />
+    <div data-theme="luxury" className="flex flex-col h-screen bg-base-100">
+      <div className="flex-1 overflow-y-auto">
+        <div className="sticky top-0 z-20 bg-base-100">
+          <div className="flex flex-col">
+            {/* Sticky Header Section */}
+            <div className=" border-base-300 shadow-sm">
+              <div className="flex xs:flex-row gap-2 sm:gap-3 w-full lg:w-auto justify-end p-2">
+                <div className="flex gap-3 justify-end">
+                  <button
+                    onClick={() => navigate("/dashboard/create-post")}
+                    className="btn bg-[#FFB800] text-black btn-sm gap-1"
+                  >
                     <svg
-                      className="z-10 w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"
+                      className="w-4 h-4"
                       fill="none"
                       stroke="currentColor"
@@ -283,80 +187,499 @@
                         strokeLinejoin="round"
                         strokeWidth="2"
-                        d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
+                        d="M12 4v16m8-8H4"
                       />
                     </svg>
+                    <span className="hidden sm:inline">Create Post</span>
+                  </button>
+                  <button
+                    onClick={() => navigate("/dashboard/user-posts")}
+                    className="btn btn-outline btn-sm gap-1"
+                  >
+                    <svg
+                      className="w-4 h-4"
+                      fill="none"
+                      stroke="currentColor"
+                      viewBox="0 0 24 24"
+                    >
+                      <path
+                        strokeLinecap="round"
+                        strokeLinejoin="round"
+                        strokeWidth="2"
+                        d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
+                      />
+                    </svg>
+                    <span className="hidden sm:inline">Your Posts</span>
+                  </button>
+                </div>
+              </div>
+            </div>
+
+            {/* Filter Navbar */}
+            <div className="border-b border-base-300 shadow-sm">
+              <div className="p-3 sm:p-4 md:pl-12 w-full max-w-full mx-auto">
+                {/* Mobile Filter Toggle */}
+                <div className="flex items-center justify-between mb-3 lg:hidden ">
+                  <h3 className="text-base sm:text-lg font-semibold flex items-center gap-2">
+                    Filters
+                    {/* Active filter count indicator */}
+                    {(filters.topic !== "all" ||
+                      filters.dateSort !== "newest" ||
+                      filters.selectedDate ||
+                      filters.commentSort !== "none" ||
+                      (filters.searchText && filters.searchText.trim())) && (
+                      <span className="badge badge-sm bg-yellow-500 text-black border-none">
+                        {
+                          [
+                            filters.topic !== "all",
+                            filters.dateSort !== "newest",
+                            filters.selectedDate,
+                            filters.commentSort !== "none",
+                            filters.searchText && filters.searchText.trim(),
+                          ].filter(Boolean).length
+                        }
+                      </span>
+                    )}
+                  </h3>
+                  <button
+                    onClick={() => setShowFilters(!showFilters)}
+                    className="btn btn-sm btn-ghost px-2"
+                  >
+                    <svg
+                      className={`w-5 h-5 transition-transform duration-200 ${
+                        showFilters ? "rotate-180" : ""
+                      }`}
+                      fill="none"
+                      stroke="currentColor"
+                      viewBox="0 0 24 24"
+                    >
+                      <path
+                        strokeLinecap="round"
+                        strokeLinejoin="round"
+                        strokeWidth="2"
+                        d="M19 9l-7 7-7-7"
+                      />
+                    </svg>
+                  </button>
+                </div>
+
+                {/* Filter Controls */}
+                <div
+                  className={`transition-all duration-300 ${
+                    showFilters ? "block opacity-100" : "hidden opacity-0"
+                  } lg:block lg:opacity-100`}
+                >
+                  {/* Mobile-First Filter Layout */}
+                  <div className="space-y-3 lg:space-y-0 lg:grid lg:grid-cols-6 xl:grid-cols-8 lg:gap-3 mb-3 max-w-full">
+                    {/* Search Filter - Full width on mobile, 2 cols on desktop */}
+                    <div className="flex flex-col gap-1.5 lg:col-span-2">
+                      <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                        Search Posts
+                      </label>
+                      <div className="relative">
+                        <input
+                          type="text"
+                          placeholder="Search titles and content..."
+                          value={filters.searchText}
+                          onChange={(e) =>
+                            setFilters({
+                              ...filters,
+                              searchText: e.target.value,
+                            })
+                          }
+                          onKeyDown={(e) => {
+                            if (e.key === "Enter") {
+                              applyFilters();
+                            }
+                          }}
+                          className="input input-sm input-bordered w-full text-sm pl-9 pr-3"
+                        />
+                        <svg
+                          className="z-10 w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"
+                          fill="none"
+                          stroke="currentColor"
+                          viewBox="0 0 24 24"
+                        >
+                          <path
+                            strokeLinecap="round"
+                            strokeLinejoin="round"
+                            strokeWidth="2"
+                            d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
+                          />
+                        </svg>
+                      </div>
+                    </div>
+
+                    {/* Mobile: 2-column grid for selects */}
+                    <div className="grid grid-cols-2 gap-3 lg:contents">
+                      {/* Topic Filter */}
+                      <div className="flex flex-col gap-1.5 lg:col-span-1">
+                        <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                          Topic
+                        </label>
+                        <select
+                          value={filters.topic}
+                          onChange={(e) =>
+                            setFilters({ ...filters, topic: e.target.value })
+                          }
+                          className="select select-sm select-bordered w-full text-sm"
+                        >
+                          <option value="all">All Topics</option>
+                          <option value="general">General</option>
+                          <option value="daily-challenge">
+                            Daily Challenge
+                          </option>
+                        </select>
+                      </div>
+
+                      {/* Date Sort */}
+                      <div className="flex flex-col gap-1.5 lg:col-span-1">
+                        <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                          Date Order
+                        </label>
+                        <select
+                          value={filters.dateSort}
+                          onChange={(e) =>
+                            setFilters({ ...filters, dateSort: e.target.value })
+                          }
+                          className="select select-sm select-bordered w-full text-sm"
+                        >
+                          <option value="newest">Most Recent</option>
+                          <option value="oldest">Oldest First</option>
+                        </select>
+                      </div>
+                    </div>
+
+                    {/* Mobile: Single column for date picker and popularity */}
+                    <div className="space-y-3 lg:space-y-0 lg:contents">
+                      <div className="flex flex-col gap-1.5 lg:col-span-1">
+                        <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                          Popularity
+                        </label>
+                        <select
+                          value={filters.commentSort}
+                          onChange={(e) =>
+                            setFilters({
+                              ...filters,
+                              commentSort: e.target.value,
+                            })
+                          }
+                          className="select select-sm select-bordered w-full text-sm"
+                        >
+                          <option value="none">No Sorting</option>
+                          <option value="most-popular">Most Popular</option>
+                          <option value="least-popular">Least Popular</option>
+                        </select>
+                      </div>
+                      {/* Specific Date Filter */}
+                      <div className="relative flex flex-col gap-1.5 lg:col-span-1">
+                        <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                          Specific Date
+                        </label>
+
+                        <div className="relative">
+                          <input
+                            type="text"
+                            readOnly // Makes the input non-editable by typing
+                            onClick={() => setIsCalendarOpen(!isCalendarOpen)} // Opens popover on click
+                            value={
+                              filters.selectedDate
+                                ? new Date(
+                                    filters.selectedDate
+                                  ).toLocaleDateString("en-US", {
+                                    year: "numeric",
+                                    month: "short",
+                                    day: "numeric",
+                                  })
+                                : "" // Use empty string so placeholder is visible
+                            }
+                            placeholder="Select date"
+                            // Style to match other inputs and add cursor-pointer
+                            className="input input-sm input-bordered w-full text-sm pl-9 pr-3 cursor-pointer"
+                          />
+                          <svg
+                            xmlns="http://www.w3.org/2000/svg"
+                            // Position the icon inside the input field
+                            className="z-10 w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"
+                            fill="none"
+                            viewBox="0 0 24 24"
+                            stroke="currentColor"
+                          >
+                            <path
+                              strokeLinecap="round"
+                              strokeLinejoin="round"
+                              strokeWidth={2}
+                              d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
+                            />
+                          </svg>
+                        </div>
+                        {/* Render the popover here */}
+                        <CalendarPopover
+                          isOpen={isCalendarOpen}
+                          onClose={() => setIsCalendarOpen(false)}
+                          selectedDate={filters.selectedDate}
+                          onDateSelect={(date) => {
+                            setFilters({ ...filters, selectedDate: date });
+                          }}
+                        />
+                      </div>
+                    </div>
+
+                    {/* Action Buttons */}
+                    <div className="flex flex-col gap-1.5 lg:col-span-1">
+                      <label className="text-xs font-medium text-gray-500 uppercase tracking-wide opacity-0">
+                        Actions
+                      </label>
+                      <div className="flex gap-2">
+                        {(filters.topic !== "all" ||
+                          filters.dateSort !== "newest" ||
+                          filters.selectedDate ||
+                          filters.commentSort !== "none" ||
+                          (filters.searchText &&
+                            filters.searchText.trim())) && (
+                          <button
+                            onClick={clearFilters}
+                            className="cursor-pointer px-2.5 py-2 bg-gray-500 text-white rounded-lg hover:bg-gray-600 text-xs font-medium transition-colors duration-200 flex-1 lg:flex-none"
+                          >
+                            <span className="lg:hidden">Clear Filters</span>
+                            <span className="hidden lg:inline">
+                              Clear Filters
+                            </span>
+                          </button>
+                        )}
+                        <button
+                          onClick={applyFilters}
+                          className="cursor-pointer px-2.5 py-2 bg-yellow-500 text-black rounded-lg hover:bg-yellow-600 text-xs font-medium transition-colors duration-200 flex-1 lg:flex-none"
+                        >
+                          <span className="lg:hidden">Apply Filters</span>
+                          <span className="hidden lg:inline">
+                            Apply Filters
+                          </span>
+                        </button>
+                      </div>
+                    </div>
+                  </div>
+
+                  {/* Active Filters Display - Improved Mobile Layout */}
+                  <div className="flex flex-wrap gap-1.5 sm:gap-2">
+                    {filters.topic !== "all" && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
+                        <span className="text-xs">Topic:</span>
+                        <span className="font-medium text-xs">
+                          {filters.topic === "general"
+                            ? "General"
+                            : "Daily Challenge"}
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = { ...filters, topic: "all" };
+                            setFilters(newFilters);
+                            fetchPosts(0, false, newFilters);
+                          }}
+                          aria-label="Remove topic filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
+                    {filters.searchText && filters.searchText.trim() && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1 max-w-[200px]">
+                        <span className="text-xs">Search:</span>
+                        <span className="font-medium text-xs truncate">
+                          "{filters.searchText.trim()}"
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = { ...filters, searchText: "" };
+                            setFilters(newFilters);
+                            fetchPosts(0, false, newFilters);
+                          }}
+                          aria-label="Remove search filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
+                    {filters.dateSort !== "newest" && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
+                        <span className="text-xs">Sort:</span>
+                        <span className="font-medium text-xs">
+                          {filters.dateSort === "oldest"
+                            ? "Oldest First"
+                            : "Most Recent"}
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = {
+                              ...filters,
+                              dateSort: "newest",
+                            };
+                            setFilters(newFilters);
+                            fetchPosts(0, false, newFilters);
+                          }}
+                          aria-label="Remove sort filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
+                    {filters.selectedDate && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
+                        <span className="text-xs">Date:</span>
+                        <span className="font-medium text-xs">
+                          {new Date(filters.selectedDate).toLocaleDateString(
+                            "en-US",
+                            {
+                              year: "numeric",
+                              month: "short",
+                              day: "numeric",
+                            }
+                          )}
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = {
+                              ...filters,
+                              selectedDate: null,
+                            };
+                            setFilters(newFilters);
+                            fetchPosts(0, false, newFilters);
+                          }}
+                          aria-label="Remove date filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
+                    {filters.commentSort !== "none" && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
+                        <span className="font-medium text-xs">
+                          {filters.commentSort === "most-popular"
+                            ? "Most Popular"
+                            : "Least Popular"}
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = {
+                              ...filters,
+                              commentSort: "none",
+                            };
+                            setFilters(newFilters);
+                            fetchPosts(0, false, newFilters);
+                          }}
+                          aria-label="Remove popularity filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
                   </div>
                 </div>
-
-                {/* Mobile: 2-column grid for selects */}
-                <div className="grid grid-cols-2 gap-3 lg:contents">
-                  {/* Topic Filter */}
-                  <div className="flex flex-col gap-1.5 lg:col-span-1">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                      Topic
-                    </label>
-                    <select
-                      value={filters.topic}
-                      onChange={(e) =>
-                        setFilters({ ...filters, topic: e.target.value })
-                      }
-                      className="select select-sm select-bordered w-full text-sm"
+              </div>
+            </div>
+          </div>
+        </div>
+
+        {/* Main Content Area */}
+        <div className="p-3 sm:p-4 md:p-6 md:pl-12 w-full">
+          {loading ? (
+            <div className="flex justify-center items-center h-full">
+              <span className="loading loading-spinner loading-md sm:loading-lg"></span>
+            </div>
+          ) : (
+            <>
+              {posts.length === 0 ? (
+                <div className="flex flex-col items-center justify-center py-10">
+                  <div className="text-xl sm:text-2xl font-semibold text-gray-400 mb-2">
+                    No posts found
+                  </div>
+                  <p className="text-gray-500 text-center text-sm sm:text-base">
+                    There are no posts that match your selected filters.
+                  </p>
+                  <button
+                    onClick={clearFilters}
+                    className="mt-4 cursor-pointer px-4 py-2 bg-yellow-500 text-black rounded-lg hover:bg-yellow-600 text-sm font-medium transition-colors duration-200"
+                  >
+                    Clear Filters
+                  </button>
+                </div>
+              ) : (
+                // Replace your current grid container with this responsive grid
+                <div className="grid grid-cols-1 md:grid-cols-2 2xl:grid-cols-2 3xl:grid-cols-4 gap-4 lg:gap-6">
+                  {posts.map((post) => (
+                    <div
+                      key={post.id}
+                      className="card bg-base-200 shadow-lg hover:shadow-xl transition-all duration-300 border h-full flex flex-col"
                     >
-                      <option value="all">All Topics</option>
-                      <option value="general">General</option>
-                      <option value="daily-challenge">Daily Challenge</option>
-                    </select>
-                  </div>
-
-                  {/* Date Sort */}
-                  <div className="flex flex-col gap-1.5 lg:col-span-1">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                      Date Order
-                    </label>
-                    <select
-                      value={filters.dateSort}
-                      onChange={(e) =>
-                        setFilters({ ...filters, dateSort: e.target.value })
-                      }
-                      className="select select-sm select-bordered w-full text-sm"
-                    >
-                      <option value="newest">Most Recent</option>
-                      <option value="oldest">Oldest First</option>
-                    </select>
-                  </div>
-                </div>
-
-                {/* Mobile: Single column for date picker and popularity */}
-                <div className="space-y-3 lg:space-y-0 lg:contents">
-                  <div className="flex flex-col gap-1.5 lg:col-span-1">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                      Popularity
-                    </label>
-                    <select
-                      value={filters.commentSort}
-                      onChange={(e) =>
-                        setFilters({ ...filters, commentSort: e.target.value })
-                      }
-                      className="select select-sm select-bordered w-full text-sm"
-                    >
-                      <option value="none">No Sorting</option>
-                      <option value="most-popular">Most Popular</option>
-                      <option value="least-popular">Least Popular</option>
-                    </select>
-                  </div>
-                  {/* Specific Date Filter */}
-                  <div className="realtive flex flex-col gap-1.5 lg:col-span-1">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                      Specific Date
-                    </label>
-
-                    <div className="relative">
-                      <input
-                        type="text"
-                        readOnly // Makes the input non-editable by typing
-                        onClick={() => setIsCalendarOpen(!isCalendarOpen)} // Opens popover on click
-                        value={
-                          filters.selectedDate
-                            ? new Date(filters.selectedDate).toLocaleDateString(
+                      <div className="card-body p-3 sm:p-4 lg:p-5 xl:p-6 flex flex-col h-full relative">
+                        {(post.author_name === user.name ||
+                          post.author_name === user.username ||
+                          user.isModerator) && (
+                          <button
+                            className="absolute top-2 right-2 p-1.5 cursor-pointer rounded-full hover:bg-base-300 transition-colors"
+                            onClick={(e) => {
+                              e.stopPropagation();
+                              showModal(
+                                "Are you sure you want to delete this post? This action cannot be undone.",
+                                "confirm",
+                                post.id
+                              );
+                            }}
+                          >
+                            <img
+                              src={trashIcon}
+                              alt="Delete"
+                              className="w-4 h-4 sm:w-5 sm:h-5"
+                            />
+                          </button>
+                        )}
+
+                        <h3
+                          className="card-title text-base sm:text-lg lg:text-xl mb-2 text-base-content line-clamp-2 hover:underline cursor-pointer pr-8"
+                          onClick={() => {
+                            navigate(`/dashboard/forum-detail/${post.id}`, {
+                              state: { post },
+                            });
+                          }}
+                        >
+                          {post.title}
+                        </h3>
+
+                        <div className="flex flex-wrap items-center gap-1.5 sm:gap-2 mb-2">
+                          <span
+                            className={`inline-block text-xs font-semibold px-1.5 py-0.5 rounded ${
+                              post.topic === "general"
+                                ? "bg-blue-100 text-blue-800"
+                                : "bg-green-100 text-green-800"
+                            }`}
+                          >
+                            {post.topic === "general"
+                              ? "General"
+                              : "Daily Challenge"}
+                          </span>
+                          {post.challengeTitle && (
+                            <span className="inline-block bg-yellow-100 text-yellow-800 text-xs font-semibold px-1.5 py-0.5 rounded">
+                              {post.challengeTitle}
+                            </span>
+                          )}
+                        </div>
+                        <div className="flex flex-wrap items-center gap-1 sm:gap-2 mb-3">
+                          <p className="text-xs sm:text-sm text-base-content/70">
+                            By{" "}
+                            <span className="font-semibold">
+                              {post.author_name}
+                            </span>
+                            <span className="mx-1">·</span>
+                            <span className="italic">
+                              {new Date(post.date_created).toLocaleDateString(
                                 "en-US",
                                 {
@@ -365,399 +688,105 @@
                                   day: "numeric",
                                 }
-                              )
-                            : "" // Use empty string so placeholder is visible
-                        }
-                        placeholder="Select date"
-                        // Style to match other inputs and add cursor-pointer
-                        className="input input-sm input-bordered w-full text-sm pl-9 pr-3 cursor-pointer"
-                      />
-                      <svg
-                        xmlns="http://www.w3.org/2000/svg"
-                        // Position the icon inside the input field
-                        className="z-10 w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"
-                        fill="none"
-                        viewBox="0 0 24 24"
-                        stroke="currentColor"
-                      >
-                        <path
-                          strokeLinecap="round"
-                          strokeLinejoin="round"
-                          strokeWidth={2}
-                          d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
-                        />
-                      </svg>
-                    </div>
-                    {/* Render the popover here */}
-                    <CalendarPopover
-                      isOpen={isCalendarOpen}
-                      onClose={() => setIsCalendarOpen(false)}
-                      selectedDate={filters.selectedDate}
-                      onDateSelect={(date) => {
-                        setFilters({ ...filters, selectedDate: date });
-                      }}
-                    />
-                  </div>
-                </div>
-
-                {/* Action Buttons */}
-                <div className="flex flex-col gap-1.5 lg:col-span-1">
-                  <label className="text-xs font-medium text-gray-500 uppercase tracking-wide opacity-0">
-                    Actions
-                  </label>
-                  <div className="flex gap-2">
-                    {(filters.topic !== "all" ||
-                      filters.dateSort !== "newest" ||
-                      filters.selectedDate ||
-                      filters.commentSort !== "none" ||
-                      (filters.searchText && filters.searchText.trim())) && (
-                      <button
-                        onClick={clearFilters}
-                        className="cursor-pointer px-2.5 py-2 bg-gray-500 text-white rounded-lg hover:bg-gray-600 text-xs font-medium transition-colors duration-200 flex-1 lg:flex-none"
-                      >
-                        <span className="lg:hidden">Clear</span>
-                        <span className="hidden lg:inline">Clear Filters</span>
-                      </button>
-                    )}
-                    <button
-                      onClick={applyFilters}
-                      className="cursor-pointer px-2.5 py-2 bg-yellow-500 text-black rounded-lg hover:bg-yellow-600 text-xs font-medium transition-colors duration-200 flex-1 lg:flex-none"
-                    >
-                      <span className="lg:hidden">Apply</span>
-                      <span className="hidden lg:inline">Apply Filters</span>
-                    </button>
-                  </div>
-                </div>
-              </div>
-
-              {/* Active Filters Display - Improved Mobile Layout */}
-              <div className="flex flex-wrap gap-1.5 sm:gap-2">
-                {filters.topic !== "all" && (
-                  <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
-                    <span className="text-xs">Topic:</span>
-                    <span className="font-medium text-xs">
-                      {filters.topic === "general"
-                        ? "General"
-                        : "Daily Challenge"}
-                    </span>
-                    <button
-                      type="button"
-                      className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
-                      onClick={() => {
-                        const newFilters = { ...filters, topic: "all" };
-                        setFilters(newFilters);
-                        fetchPosts(0, false, newFilters);
-                      }}
-                      aria-label="Remove topic filter"
-                    >
-                      ×
-                    </button>
-                  </span>
-                )}
-                {filters.searchText && filters.searchText.trim() && (
-                  <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1 max-w-[200px]">
-                    <span className="text-xs">Search:</span>
-                    <span className="font-medium text-xs truncate">
-                      "{filters.searchText.trim()}"
-                    </span>
-                    <button
-                      type="button"
-                      className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
-                      onClick={() => {
-                        const newFilters = { ...filters, searchText: "" };
-                        setFilters(newFilters);
-                        fetchPosts(0, false, newFilters);
-                      }}
-                      aria-label="Remove search filter"
-                    >
-                      ×
-                    </button>
-                  </span>
-                )}
-                {filters.dateSort !== "newest" && (
-                  <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
-                    <span className="text-xs">Sort:</span>
-                    <span className="font-medium text-xs">
-                      {filters.dateSort === "oldest"
-                        ? "Oldest First"
-                        : "Most Recent"}
-                    </span>
-                    <button
-                      type="button"
-                      className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
-                      onClick={() => {
-                        const newFilters = { ...filters, dateSort: "newest" };
-                        setFilters(newFilters);
-                        fetchPosts(0, false, newFilters);
-                      }}
-                      aria-label="Remove sort filter"
-                    >
-                      ×
-                    </button>
-                  </span>
-                )}
-                {filters.selectedDate && (
-                  <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
-                    <span className="text-xs">Date:</span>
-                    <span className="font-medium text-xs">
-                      {new Date(filters.selectedDate).toLocaleDateString(
-                        "en-US",
-                        {
-                          year: "numeric",
-                          month: "short",
-                          day: "numeric",
-                        }
-                      )}
-                    </span>
-                    <button
-                      type="button"
-                      className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
-                      onClick={() => {
-                        const newFilters = { ...filters, selectedDate: null };
-                        setFilters(newFilters);
-                        fetchPosts(0, false, newFilters);
-                      }}
-                      aria-label="Remove date filter"
-                    >
-                      ×
-                    </button>
-                  </span>
-                )}
-                {filters.commentSort !== "none" && (
-                  <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
-                    <span className="font-medium text-xs">
-                      {filters.commentSort === "most-popular"
-                        ? "Most Popular"
-                        : "Least Popular"}
-                    </span>
-                    <button
-                      type="button"
-                      className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
-                      onClick={() => {
-                        const newFilters = { ...filters, commentSort: "none" };
-                        setFilters(newFilters);
-                        fetchPosts(0, false, newFilters);
-                      }}
-                      aria-label="Remove popularity filter"
-                    >
-                      ×
-                    </button>
-                  </span>
-                )}
-              </div>
-            </div>
-          </div>
-        </div>
-
-        {/* Main Content Area */}
-        <div className="flex-1">
-          {loading ? (
-            <div className="flex justify-center items-center h-full">
-              <span className="loading loading-spinner loading-md sm:loading-lg"></span>
-            </div>
-          ) : (
-            <div className="h-full">
-              {/* Scrollable Posts Content */}
-              <div className="overflow-y-auto">
-                <div className="p-3 sm:p-4 md:p-6 md:pl-12 w-full">
-                  {posts.length === 0 ? (
-                    <div className="flex flex-col items-center justify-center py-10">
-                      <div className="text-xl sm:text-2xl font-semibold text-gray-400 mb-2">
-                        No posts found
-                      </div>
-                      <p className="text-gray-500 text-center text-sm sm:text-base">
-                        There are no posts that match your selected filters.
-                      </p>
-                      <button
-                        onClick={clearFilters}
-                        className="mt-4 cursor-pointer px-4 py-2 bg-yellow-500 text-black rounded-lg hover:bg-yellow-600 text-sm font-medium transition-colors duration-200"
-                      >
-                        Clear Filters
-                      </button>
-                    </div>
-                  ) : (
-                    <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-3 sm:gap-4 md:gap-6">
-                      {posts.map((post) => (
-                        <div
-                          key={post.id}
-                          className="card bg-base-200 shadow-lg hover:shadow-xl transition-all duration-300 border h-full flex flex-col"
-                        >
-                          <div className="card-body p-3 sm:p-4 lg:p-5 xl:p-6 flex flex-col h-full relative">
-                            {(post.author_name === user.name ||
-                              post.author_name === user.username ||
-                              user.isModerator) && (
-                              <button
-                                className="absolute top-2 right-2 p-1.5 cursor-pointer rounded-full hover:bg-base-300 transition-colors"
-                                onClick={(e) => {
-                                  e.stopPropagation();
-                                  showModal(
-                                    "Are you sure you want to delete this post? This action cannot be undone.",
-                                    "confirm",
-                                    post.id
-                                  );
-                                }}
-                              >
-                                <img
-                                  src={trashIcon}
-                                  alt="Delete"
-                                  className="w-4 h-4 sm:w-5 sm:h-5"
-                                />
-                              </button>
-                            )}
-
-                            <h3
-                              className="card-title text-base sm:text-lg lg:text-xl mb-2 text-base-content line-clamp-2 hover:underline cursor-pointer pr-8"
-                              onClick={() => {
-                                navigate(`/dashboard/forum-detail/${post.id}`, {
-                                  state: { post },
-                                });
-                              }}
-                            >
-                              {post.title}
-                            </h3>
-
-                            <div className="flex flex-wrap items-center gap-1 sm:gap-2 mb-3">
-                              <p className="text-xs sm:text-sm text-base-content/70">
-                                By{" "}
-                                <span className="font-semibold">
-                                  {post.author_name}
-                                </span>
-                                <span className="mx-1">·</span>
-                                <span className="italic">
-                                  {new Date(
-                                    post.date_created
-                                  ).toLocaleDateString("en-US", {
-                                    year: "numeric",
-                                    month: "short",
-                                    day: "numeric",
-                                  })}
-                                </span>
-                              </p>
-                            </div>
-
-                            <div className="flex flex-wrap gap-1.5 sm:gap-2 mb-3">
-                              <span
-                                className={`inline-block text-xs sm:text-sm font-semibold px-2 py-1 rounded ${
-                                  post.topic === "general"
-                                    ? "bg-blue-100 text-blue-800"
-                                    : "bg-green-100 text-green-800"
-                                }`}
-                              >
-                                {post.topic === "general"
-                                  ? "General"
-                                  : "Daily Challenge"}
-                              </span>
-                              {post.challengeTitle && (
-                                <span className="inline-block bg-yellow-100 text-yellow-800 text-xs sm:text-sm font-semibold px-2 py-1 rounded">
-                                  {post.challengeTitle}
-                                </span>
                               )}
-                            </div>
-
-                            <p className="hidden sm:block text-sm text-base-content/80 line-clamp-3 flex-grow">
-                              {post.content && post.content.length > 100
-                                ? post.content.slice(0, 100) + "..."
-                                : post.content}
+                            </span>
+                          </p>
+                        </div>
+
+                        <p className="hidden sm:block text-sm text-base-content/80 line-clamp-3 flex-grow">
+                          {post.content && post.content.length > 100
+                            ? post.content.slice(0, 100) + "..."
+                            : post.content}
+                        </p>
+
+                        <div className="card-actions justify-end mt-4">
+                          <div
+                            className="flex items-center gap-1.5 sm:gap-2 cursor-pointer"
+                            onClick={() => {
+                              navigate(`/dashboard/forum-detail/${post.id}`, {
+                                state: { post },
+                              });
+                            }}
+                          >
+                            <p className="text-xs sm:text-sm font-medium">
+                              {post.comment_count}
                             </p>
-
-                            <div className="card-actions justify-end mt-4">
-                              <div
-                                className="flex items-center gap-1.5 sm:gap-2 cursor-pointer"
-                                onClick={() => {
-                                  navigate(
-                                    `/dashboard/forum-detail/${post.id}`,
-                                    {
-                                      state: { post },
-                                    }
-                                  );
-                                }}
-                              >
-                                <p className="text-xs sm:text-sm font-medium">
-                                  {post.comment_count}
-                                </p>
-                                <img
-                                  src={commentIcon}
-                                  alt="Comment"
-                                  className="w-4 h-4 sm:w-5 sm:h-5 hover:opacity-80"
-                                />
-                              </div>
-                            </div>
+                            <img
+                              src={commentIcon}
+                              alt="Comment"
+                              className="w-4 h-4 sm:w-5 sm:h-5 hover:opacity-80"
+                            />
                           </div>
                         </div>
-                      ))}
+                      </div>
                     </div>
+                  ))}
+                </div>
+              )}
+
+              {!loading && (
+                <div className="flex justify-center items-center gap-1 sm:gap-2 mt-6 sm:mt-8">
+                  <button
+                    className="btn btn-sm btn-ghost px-2 sm:px-3"
+                    onClick={() => fetchPosts(page - 1, false, filters)}
+                    disabled={loading || page === 0}
+                    title="Previous Page"
+                  >
+                    ←
+                  </button>
+
+                  {Array.from({ length: Math.min(3, totalPages) }, (_, idx) => (
+                    <button
+                      key={idx}
+                      className={`btn btn-sm px-2 sm:px-3 ${
+                        page === idx ? "border-amber-400" : "btn-ghost"
+                      }`}
+                      onClick={() => fetchPosts(idx, false, filters)}
+                      disabled={loading}
+                    >
+                      {idx + 1}
+                    </button>
+                  ))}
+
+                  {totalPages > 3 && (
+                    <span className="px-1 sm:px-2 text-gray-500 text-sm">
+                      ...
+                    </span>
                   )}
 
-                  {!loading && totalPages > 1 && (
-                    <div className="flex justify-center items-center gap-1 sm:gap-2 mt-6 sm:mt-8">
-                      <button
-                        className="btn btn-sm btn-ghost px-2 sm:px-3"
-                        onClick={() => fetchPosts(page - 1, false, filters)}
-                        disabled={loading || page === 0}
-                        title="Previous Page"
-                      >
-                        ←
-                      </button>
-
-                      {Array.from(
-                        { length: Math.min(3, totalPages) },
-                        (_, idx) => (
-                          <button
-                            key={idx}
-                            className={`btn btn-sm px-2 sm:px-3 ${
-                              page === idx ? "border-amber-400" : "btn-ghost"
-                            }`}
-                            onClick={() => fetchPosts(idx, false, filters)}
-                            disabled={loading}
-                          >
-                            {idx + 1}
-                          </button>
-                        )
-                      )}
-
-                      {totalPages > 3 && (
-                        <span className="px-1 sm:px-2 text-gray-500 text-sm">
-                          ...
-                        </span>
-                      )}
-
-                      {page > 2 && page < totalPages - 1 && (
-                        <button
-                          className="btn btn-sm border-amber-400 px-2 sm:px-3"
-                          onClick={() => fetchPosts(page, false, filters)}
-                          disabled={loading}
-                        >
-                          {page + 1}
-                        </button>
-                      )}
-
-                      {totalPages > 3 && (
-                        <button
-                          className={`btn btn-sm px-2 sm:px-3 ${
-                            page === totalPages - 1
-                              ? "border-amber-400"
-                              : "btn-ghost"
-                          }`}
-                          onClick={() =>
-                            fetchPosts(totalPages - 1, false, filters)
-                          }
-                          disabled={loading}
-                        >
-                          {totalPages}
-                        </button>
-                      )}
-
-                      <button
-                        className="btn btn-sm btn-ghost px-2 sm:px-3"
-                        onClick={() => fetchPosts(page + 1, false, filters)}
-                        disabled={loading || page === totalPages - 1}
-                        title="Next Page"
-                      >
-                        →
-                      </button>
-                    </div>
+                  {page > 2 && page < totalPages - 1 && (
+                    <button
+                      className="btn btn-sm border-amber-400 px-2 sm:px-3"
+                      onClick={() => fetchPosts(page, false, filters)}
+                      disabled={loading}
+                    >
+                      {page + 1}
+                    </button>
                   )}
+
+                  {totalPages > 3 && (
+                    <button
+                      className={`btn btn-sm px-2 sm:px-3 ${
+                        page === totalPages - 1
+                          ? "border-amber-400"
+                          : "btn-ghost"
+                      }`}
+                      onClick={() => fetchPosts(totalPages - 1, false, filters)}
+                      disabled={loading}
+                    >
+                      {totalPages}
+                    </button>
+                  )}
+
+                  <button
+                    className="btn btn-sm btn-ghost px-2 sm:px-3"
+                    onClick={() => fetchPosts(page + 1, false, filters)}
+                    disabled={loading || page === totalPages - 1}
+                    title="Next Page"
+                  >
+                    →
+                  </button>
                 </div>
-              </div>
-            </div>
+              )}
+            </>
           )}
         </div>
Index: client/src/Dashboard/components/ManagePosts.jsx
===================================================================
--- client/src/Dashboard/components/ManagePosts.jsx	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ client/src/Dashboard/components/ManagePosts.jsx	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -9,5 +9,5 @@
   approveReviewPost,
 } from "@/services/reviewService";
-import { DatePicker } from "react-daisyui-timetools";
+import CalendarPopover from "./CalendarPopover";
 import "react-datepicker/dist/react-datepicker.css";
 import "cally";
@@ -17,5 +17,5 @@
   const [totalPages, setTotalPages] = useState(0);
   const [isFetching, setIsFetching] = useState(false);
-
+  const [isCalendarOpen, setIsCalendarOpen] = useState(false);
   const [error, setError] = useState(null);
   const postsPerPage = 5;
@@ -260,330 +260,485 @@
       className="dashboard min-h-screen flex bg-base-100"
     >
-      <div className="flex flex-col w-full h-full overflow-y-auto p-4 sm:p-6">
-        <div className="flex-1">
-          <h1 className="text-2xl sm:text-3xl lg:text-4xl font-bold mb-6 lg:mb-10 text-center lg:text-left">
-            Posts to be reviewed:
-          </h1>
-
-          {/* Filter System */}
-          <div className="bg-base-200 border-b border-base-300 shadow-sm rounded-lg mb-6">
-            <div className="p-3 sm:p-4 w-full max-w-full mx-auto">
-              {/* Mobile Filter Toggle */}
-              <div className="flex items-center justify-between mb-3 lg:hidden">
-                <h3 className="text-lg font-semibold">Filters</h3>
-                <button
-                  onClick={() => setShowFilters(!showFilters)}
-                  className="btn btn-sm btn-ghost"
+      <div className="flex flex-col w-full  ">
+        {/* Filter System */}
+        <div className="sticky top-0 z-20 bg-base-100">
+          <div className="flex flex-col">
+            {/* Sticky Header Section */}
+
+            {/* Filter Navbar */}
+            <div className="border-b border-base-300 shadow-sm">
+              <div className="p-3 sm:p-4 md:pl-12 w-full max-w-full mx-auto">
+                {/* Mobile Filter Toggle */}
+                <div className="flex items-center justify-between mb-3 lg:hidden ">
+                  <h3 className="text-base sm:text-lg font-semibold flex items-center gap-2">
+                    Filters
+                    {/* Active filter count indicator */}
+                    {(filters.topic !== "all" ||
+                      filters.dateSort !== "newest" ||
+                      filters.selectedDate ||
+                      filters.commentSort !== "none" ||
+                      (filters.searchText && filters.searchText.trim())) && (
+                      <span className="badge badge-sm bg-yellow-500 text-black border-none">
+                        {
+                          [
+                            filters.topic !== "all",
+                            filters.dateSort !== "newest",
+                            filters.selectedDate,
+                            filters.commentSort !== "none",
+                            filters.searchText && filters.searchText.trim(),
+                          ].filter(Boolean).length
+                        }
+                      </span>
+                    )}
+                  </h3>
+                  <button
+                    onClick={() => setShowFilters(!showFilters)}
+                    className="btn btn-sm btn-ghost px-2"
+                  >
+                    <svg
+                      className={`w-5 h-5 transition-transform duration-200 ${
+                        showFilters ? "rotate-180" : ""
+                      }`}
+                      fill="none"
+                      stroke="currentColor"
+                      viewBox="0 0 24 24"
+                    >
+                      <path
+                        strokeLinecap="round"
+                        strokeLinejoin="round"
+                        strokeWidth="2"
+                        d="M19 9l-7 7-7-7"
+                      />
+                    </svg>
+                  </button>
+                </div>
+
+                {/* Filter Controls */}
+                <div
+                  className={`transition-all duration-300 ${
+                    showFilters ? "block opacity-100" : "hidden opacity-0"
+                  } lg:block lg:opacity-100`}
                 >
-                  <svg
-                    className={`w-4 h-4 transition-transform ${
-                      showFilters ? "rotate-180" : ""
-                    }`}
-                    fill="none"
-                    stroke="currentColor"
-                    viewBox="0 0 24 24"
-                  >
-                    <path
-                      strokeLinecap="round"
-                      strokeLinejoin="round"
-                      strokeWidth="2"
-                      d="M19 9l-7 7-7-7"
-                    />
-                  </svg>
-                </button>
-              </div>
-
-              {/* Filter Controls */}
-              <div className={`${showFilters ? "block" : "hidden"} lg:block`}>
-                <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 xl:grid-cols-5 gap-3 mb-3 max-w-full">
-                  {/* Search Filter - Takes 2 columns to be wider */}
-                  <div className="flex flex-col gap-1 sm:col-span-2 lg:col-span-2">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                      Search Posts
-                    </label>
-                    <input
-                      type="text"
-                      placeholder="Search titles, content, and authors..."
-                      value={filters.searchText}
-                      onChange={(e) =>
-                        setFilters({ ...filters, searchText: e.target.value })
-                      }
-                      className="input input-sm input-bordered w-full text-sm"
-                    />
-                  </div>
-
-                  {/* Topic Filter */}
-                  <div className="flex flex-col gap-1">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                      Topic
-                    </label>
-                    <select
-                      value={filters.topic}
-                      onChange={(e) =>
-                        setFilters({ ...filters, topic: e.target.value })
-                      }
-                      className="select select-sm select-bordered w-full text-sm"
-                    >
-                      <option value="all">All Topics</option>
-                      <option value="general">General</option>
-                      <option value="daily-challenge">Daily Challenge</option>
-                    </select>
-                  </div>
-
-                  {/* Date Sort */}
-                  <div className="flex flex-col gap-1">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                      Date Order
-                    </label>
-                    <select
-                      value={filters.dateSort}
-                      onChange={(e) =>
-                        setFilters({ ...filters, dateSort: e.target.value })
-                      }
-                      className="select select-sm select-bordered w-full text-sm"
-                    >
-                      <option value="newest">Most Recent</option>
-                      <option value="oldest">Oldest First</option>
-                    </select>
-                  </div>
-
-                  {/* Specific Date Filter */}
-                  <div className="flex flex-col gap-1">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
-                      Specific Date
-                    </label>
-                    <DatePicker
-                      className="input input-sm input-bordered w-full text-sm"
-                      selected={
-                        filters.selectedDate instanceof Date
-                          ? filters.selectedDate
-                          : filters.selectedDate
-                          ? new Date(filters.selectedDate)
-                          : null
-                      }
-                      onChange={(date) => {
-                        if (date) {
-                          try {
-                            const validDate = new Date(date);
-                            if (!isNaN(validDate.getTime())) {
-                              setFilters({
-                                ...filters,
-                                selectedDate: validDate,
-                              });
-                            } else {
-                              console.error("Invalid date selected:", date);
-                              setFilters({ ...filters, selectedDate: null });
+                  {/* Mobile-First Filter Layout */}
+                  <div className="space-y-3 lg:space-y-0 lg:grid lg:grid-cols-6 xl:grid-cols-8 lg:gap-3 mb-3 max-w-full">
+                    {/* Search Filter - Full width on mobile, 2 cols on desktop */}
+                    <div className="flex flex-col gap-1.5 lg:col-span-2">
+                      <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                        Search Posts
+                      </label>
+                      <div className="relative">
+                        <input
+                          type="text"
+                          placeholder="Search titles and content..."
+                          value={filters.searchText}
+                          onChange={(e) =>
+                            setFilters({
+                              ...filters,
+                              searchText: e.target.value,
+                            })
+                          }
+                          onKeyDown={(e) => {
+                            if (e.key === "Enter") {
+                              applyFilters();
                             }
-                          } catch (err) {
-                            console.error("Error processing date:", err);
-                            setFilters({ ...filters, selectedDate: null });
+                          }}
+                          className="input input-sm input-bordered w-full text-sm pl-9 pr-3"
+                        />
+                        <svg
+                          className="z-10 w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"
+                          fill="none"
+                          stroke="currentColor"
+                          viewBox="0 0 24 24"
+                        >
+                          <path
+                            strokeLinecap="round"
+                            strokeLinejoin="round"
+                            strokeWidth="2"
+                            d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
+                          />
+                        </svg>
+                      </div>
+                    </div>
+
+                    {/* Mobile: 2-column grid for selects */}
+                    <div className="grid grid-cols-2 gap-3 lg:contents">
+                      {/* Topic Filter */}
+                      <div className="flex flex-col gap-1.5 lg:col-span-1">
+                        <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                          Topic
+                        </label>
+                        <select
+                          value={filters.topic}
+                          onChange={(e) =>
+                            setFilters({ ...filters, topic: e.target.value })
                           }
-                        } else {
-                          setFilters({ ...filters, selectedDate: null });
-                        }
-                      }}
-                      placeholder="Select date"
-                      maxDate={new Date()}
-                      dateFormat="MM/dd/yyyy"
-                      showYearDropdown
-                      showMonthDropdown
-                      isClearable={true}
-                    />
-                  </div>
-
-                  {/* Clear Filters & Apply Buttons */}
-                  <div className="flex flex-col gap-1">
-                    <label className="text-xs font-medium text-gray-500 uppercase tracking-wide opacity-0">
-                      Actions
-                    </label>
-                    <div className="flex gap-1">
-                      <button
-                        onClick={clearFilters}
-                        className="cursor-pointer px-2 py-2 bg-gray-500 text-white rounded hover:bg-gray-600 text-xs font-medium w-16"
-                      >
-                        Clear
-                      </button>
-                      <button
-                        onClick={applyFilters}
-                        className="cursor-pointer px-2 py-2 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-xs font-medium w-16"
-                      >
-                        Apply
-                      </button>
+                          className="select select-sm select-bordered w-full text-sm"
+                        >
+                          <option value="all">All Topics</option>
+                          <option value="general">General</option>
+                          <option value="daily-challenge">
+                            Daily Challenge
+                          </option>
+                        </select>
+                      </div>
+
+                      {/* Date Sort */}
+                      <div className="flex flex-col gap-1.5 lg:col-span-1">
+                        <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                          Date Order
+                        </label>
+                        <select
+                          value={filters.dateSort}
+                          onChange={(e) =>
+                            setFilters({
+                              ...filters,
+                              dateSort: e.target.value,
+                            })
+                          }
+                          className="select select-sm select-bordered w-full text-sm"
+                        >
+                          <option value="newest">Most Recent</option>
+                          <option value="oldest">Oldest First</option>
+                        </select>
+                      </div>
+                    </div>
+
+                    {/* Mobile: Single column for date picker and popularity */}
+                    <div className="space-y-3 lg:space-y-0 lg:contents">
+                      {/* Specific Date Filter */}
+                      <div className="relative flex flex-col gap-1.5 lg:col-span-1">
+                        <label className="text-xs font-medium text-gray-500 uppercase tracking-wide">
+                          Specific Date
+                        </label>
+
+                        <div className="relative">
+                          <input
+                            type="text"
+                            readOnly // Makes the input non-editable by typing
+                            onClick={() => setIsCalendarOpen(!isCalendarOpen)} // Opens popover on click
+                            value={
+                              filters.selectedDate
+                                ? new Date(
+                                    filters.selectedDate
+                                  ).toLocaleDateString("en-US", {
+                                    year: "numeric",
+                                    month: "short",
+                                    day: "numeric",
+                                  })
+                                : "" // Use empty string so placeholder is visible
+                            }
+                            placeholder="Select date"
+                            // Style to match other inputs and add cursor-pointer
+                            className="input input-sm input-bordered w-full text-sm pl-9 pr-3 cursor-pointer"
+                          />
+                          <svg
+                            xmlns="http://www.w3.org/2000/svg"
+                            // Position the icon inside the input field
+                            className="z-10 w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"
+                            fill="none"
+                            viewBox="0 0 24 24"
+                            stroke="currentColor"
+                          >
+                            <path
+                              strokeLinecap="round"
+                              strokeLinejoin="round"
+                              strokeWidth={2}
+                              d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
+                            />
+                          </svg>
+                        </div>
+                        {/* Render the popover here */}
+                        <CalendarPopover
+                          isOpen={isCalendarOpen}
+                          onClose={() => setIsCalendarOpen(false)}
+                          selectedDate={filters.selectedDate}
+                          onDateSelect={(date) => {
+                            setFilters({ ...filters, selectedDate: date });
+                          }}
+                        />
+                      </div>
+                    </div>
+
+                    {/* Action Buttons */}
+                    <div className="flex flex-col gap-1.5 lg:col-span-1">
+                      <label className="text-xs font-medium text-gray-500 uppercase tracking-wide opacity-0">
+                        Actions
+                      </label>
+                      <div className="flex gap-2">
+                        {(filters.topic !== "all" ||
+                          filters.dateSort !== "newest" ||
+                          filters.selectedDate ||
+                          (filters.searchText &&
+                            filters.searchText.trim())) && (
+                          <button
+                            onClick={clearFilters}
+                            className="cursor-pointer px-2.5 py-2 bg-gray-500 text-white rounded-lg hover:bg-gray-600 text-xs font-medium transition-colors duration-200 flex-1 lg:flex-none"
+                          >
+                            <span className="lg:hidden">Clear Filters</span>
+                            <span className="hidden lg:inline">
+                              Clear Filters
+                            </span>
+                          </button>
+                        )}
+                        <button
+                          onClick={applyFilters}
+                          className="cursor-pointer px-2.5 py-2 bg-yellow-500 text-black rounded-lg hover:bg-yellow-600 text-xs font-medium transition-colors duration-200 flex-1 lg:flex-none"
+                        >
+                          <span className="lg:hidden">Apply Filters</span>
+                          <span className="hidden lg:inline">
+                            Apply Filters
+                          </span>
+                        </button>
+                      </div>
                     </div>
                   </div>
-                </div>
-
-                {/* Active Filters Display */}
-                <div className="flex flex-wrap gap-2">
-                  {filters.topic !== "all" && (
-                    <span className="badge badge-outline badge-sm">
-                      Topic:{" "}
-                      {filters.topic === "general"
-                        ? "General"
-                        : "Daily Challenge"}
-                    </span>
-                  )}
-                  {filters.searchText && filters.searchText.trim() && (
-                    <span className="badge badge-outline badge-sm">
-                      Search: "{filters.searchText.trim()}"
-                    </span>
-                  )}
-                  {filters.dateSort !== "newest" && (
-                    <span className="badge badge-outline badge-sm">
-                      Sort:{" "}
-                      {filters.dateSort === "oldest"
-                        ? "Oldest First"
-                        : "Most Recent"}
-                    </span>
-                  )}
-                  {filters.selectedDate && (
-                    <span className="badge badge-outline badge-sm">
-                      Date:{" "}
-                      {filters.selectedDate instanceof Date
-                        ? filters.selectedDate.toLocaleDateString()
-                        : new Date(filters.selectedDate).toLocaleDateString()}
-                    </span>
-                  )}
+
+                  {/* Active Filters Display - Improved Mobile Layout */}
+                  <div className="flex flex-wrap gap-1.5 sm:gap-2">
+                    {filters.topic !== "all" && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
+                        <span className="text-xs">Topic:</span>
+                        <span className="font-medium text-xs">
+                          {appliedFilters.topic === "general"
+                            ? "General"
+                            : "Daily Challenge"}
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = { ...filters, topic: "all" };
+                            setFilters(newFilters);
+                            applyFiltersToPendingPosts(posts, newFilters);
+                          }}
+                          aria-label="Remove topic filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
+                    {filters.searchText && filters.searchText.trim() && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1 max-w-[200px]">
+                        <span className="text-xs">Search:</span>
+                        <span className="font-medium text-xs truncate">
+                          "{filters.searchText.trim()}"
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = { ...filters, searchText: "" };
+                            setFilters(newFilters);
+                            applyFiltersToPendingPosts(posts, newFilters);
+                          }}
+                          aria-label="Remove search filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
+                    {filters.dateSort !== "newest" && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
+                        <span className="text-xs">Sort:</span>
+                        <span className="font-medium text-xs">
+                          {filters.dateSort === "oldest"
+                            ? "Oldest First"
+                            : "Most Recent"}
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = {
+                              ...filters,
+                              dateSort: "newest",
+                            };
+                            setFilters(newFilters);
+                            applyFiltersToPendingPosts(posts, newFilters);
+                          }}
+                          aria-label="Remove sort filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
+                    {filters.selectedDate && (
+                      <span className="badge badge-outline badge-sm flex items-center gap-1 px-2 py-1">
+                        <span className="text-xs">Date:</span>
+                        <span className="font-medium text-xs">
+                          {new Date(filters.selectedDate).toLocaleDateString(
+                            "en-US",
+                            {
+                              year: "numeric",
+                              month: "short",
+                              day: "numeric",
+                            }
+                          )}
+                        </span>
+                        <button
+                          type="button"
+                          className="ml-1 text-xs font-bold hover:text-error hover:cursor-pointer focus:outline-none"
+                          onClick={() => {
+                            const newFilters = {
+                              ...filters,
+                              selectedDate: null,
+                            };
+                            setFilters(newFilters);
+                            applyFiltersToPendingPosts(posts, newFilters);
+                          }}
+                          aria-label="Remove date filter"
+                        >
+                          ×
+                        </button>
+                      </span>
+                    )}
+                  </div>
                 </div>
               </div>
             </div>
           </div>
-
-          {error && (
-            <div className="alert alert-error shadow-lg mb-4 mx-auto max-w-4xl">
-              <span className="text-sm sm:text-base">{error}</span>
+        </div>
+
+        {error && (
+          <div className="alert alert-error shadow-lg mb-4 mx-auto max-w-4xl">
+            <span className="text-sm sm:text-base">{error}</span>
+          </div>
+        )}
+        {isLoading && (
+          <div className="flex justify-center mt-6">
+            <span className="loading loading-spinner loading-md sm:loading-lg"></span>
+          </div>
+        )}
+        {filteredPosts.length === 0 && !isLoading && !error && (
+          <div className="text-center text-gray-500 py-8 sm:py-10">
+            <div className="w-12 h-12 sm:w-16 sm:h-16 lg:w-20 lg:h-20 bg-base-300 rounded-full flex items-center justify-center mx-auto mb-4">
+              <svg
+                className="w-6 h-6 sm:w-8 sm:h-8 lg:w-10 lg:h-10 text-base-content/40"
+                fill="none"
+                stroke="currentColor"
+                viewBox="0 0 24 24"
+              >
+                <path
+                  strokeLinecap="round"
+                  strokeLinejoin="round"
+                  strokeWidth="2"
+                  d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
+                ></path>
+              </svg>
             </div>
-          )}
-          {isLoading && (
-            <div className="flex justify-center mt-6">
-              <span className="loading loading-spinner loading-md sm:loading-lg"></span>
+            <p className="text-base sm:text-lg text-base-content/60">
+              No posts found matching your criteria.
+            </p>
+            <p className="text-xs sm:text-sm text-base-content/40 mt-2">
+              {appliedFilters.searchText ||
+              appliedFilters.topic !== "all" ||
+              appliedFilters.selectedDate
+                ? "Try adjusting your filters to see more posts."
+                : "No posts are currently awaiting review."}
+            </p>
+            {(appliedFilters.searchText ||
+              appliedFilters.topic !== "all" ||
+              appliedFilters.selectedDate) && (
+              <button
+                onClick={clearFilters}
+                className="mt-4 cursor-pointer px-4 py-2 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-sm font-medium"
+              >
+                Clear Filters
+              </button>
+            )}
+          </div>
+        )}
+
+        {!isLoading && (
+          <div className=" grid grid-cols-1 2xl:grid-cols-2 gap-3 sm:gap-4 lg:gap-6 p-3 sm:p-4 md:p-6 md:pl-12 w-full">
+            {filteredPosts.map((post) => (
+              <div
+                key={post.id}
+                className="p-4 sm:p-6 border border-base-300 bg-base-200 rounded-lg shadow-sm hover:shadow-md transition relative w-full"
+              >
+                <h1 className="text-lg sm:text-xl lg:text-2xl font-bold mb-4 pr-16 sm:pr-20">
+                  {post.title}
+                </h1>
+                <div className="absolute top-3 sm:top-4 right-3 sm:right-4 flex gap-1 sm:gap-2">
+                  <button
+                    title="Approve Post"
+                    className="btn btn-xs sm:btn-sm btn-success btn-circle"
+                    onClick={() => openConfirmationModal("approve", post)}
+                  >
+                    <img
+                      src={doneAll}
+                      alt="Approve"
+                      className="w-3 h-3 sm:w-4 sm:h-4 lg:w-5 lg:h-5"
+                    />
+                  </button>
+                  <button
+                    title="Delete Post"
+                    className="btn btn-xs sm:btn-sm btn-error btn-circle"
+                    onClick={() => openConfirmationModal("delete", post)}
+                  >
+                    <img
+                      src={trashIcon}
+                      alt="Delete"
+                      className="w-3 h-3 sm:w-4 sm:h-4 lg:w-5 lg:h-5"
+                    />
+                  </button>
+                </div>
+
+                {/* Topic Badge */}
+                <div className="flex flex-wrap items-center gap-1.5 sm:gap-2 mb-2">
+                  <span
+                    className={`inline-block text-xs font-semibold px-1.5 py-0.5 rounded ${
+                      post.topic === "general"
+                        ? "bg-blue-100 text-blue-800"
+                        : "bg-green-100 text-green-800"
+                    }`}
+                  >
+                    {post.topic === "general" ? "General" : "Daily Challenge"}
+                  </span>
+                  {post.challengeTitle && (
+                    <span className="inline-block bg-yellow-100 text-yellow-800 text-xs font-semibold px-1.5 py-0.5 rounded">
+                      {post.challengeTitle}
+                    </span>
+                  )}
+                </div>
+
+                <p className="text-xs sm:text-sm text-base-content/70 mb-2 sm:mb-6">
+                  By {post.author_name}
+                  <span className="mx-1">·</span>
+                  <span className="italic">
+                    {new Date(post.created_at).toLocaleDateString("en-US", {
+                      year: "numeric",
+                      month: "short",
+                      day: "numeric",
+                    })}
+                  </span>
+                </p>
+                <p className="text-sm sm:text-base text-base-content/90 whitespace-pre-line break-words">
+                  {post.content}
+                </p>
+              </div>
+            ))}
+          </div>
+        )}
+
+        {!isLoading && posts.length > 0 && totalPages > 1 && (
+          <div className="flex flex-wrap justify-center gap-1 sm:gap-2 mt-6 sm:mt-8 px-4">
+            <div className="text-sm text-base-content/60 mb-2 w-full text-center">
+              Showing {filteredPosts.length} of {posts.length} posts
             </div>
-          )}
-          {filteredPosts.length === 0 && !isLoading && !error && (
-            <div className="text-center text-gray-500 py-8 sm:py-10">
-              <div className="w-12 h-12 sm:w-16 sm:h-16 lg:w-20 lg:h-20 bg-base-300 rounded-full flex items-center justify-center mx-auto mb-4">
-                <svg
-                  className="w-6 h-6 sm:w-8 sm:h-8 lg:w-10 lg:h-10 text-base-content/40"
-                  fill="none"
-                  stroke="currentColor"
-                  viewBox="0 0 24 24"
-                >
-                  <path
-                    strokeLinecap="round"
-                    strokeLinejoin="round"
-                    strokeWidth="2"
-                    d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
-                  ></path>
-                </svg>
-              </div>
-              <p className="text-base sm:text-lg text-base-content/60">
-                No posts found matching your criteria.
-              </p>
-              <p className="text-xs sm:text-sm text-base-content/40 mt-2">
-                {appliedFilters.searchText ||
-                appliedFilters.topic !== "all" ||
-                appliedFilters.selectedDate
-                  ? "Try adjusting your filters to see more posts."
-                  : "No posts are currently awaiting review."}
-              </p>
-              {(appliedFilters.searchText ||
-                appliedFilters.topic !== "all" ||
-                appliedFilters.selectedDate) && (
-                <button
-                  onClick={clearFilters}
-                  className="mt-4 cursor-pointer px-4 py-2 bg-yellow-500 text-black rounded hover:bg-yellow-600 text-sm font-medium"
-                >
-                  Clear Filters
-                </button>
-              )}
-            </div>
-          )}
-
-          {!isLoading && (
-            <div className="grid grid-cols-1 2xl:grid-cols-2 gap-3 sm:gap-4 lg:gap-6">
-              {filteredPosts.map((post) => (
-                <div
-                  key={post.id}
-                  className="p-4 sm:p-6 border border-base-300 bg-base-200 rounded-lg shadow-sm hover:shadow-md transition relative w-full"
-                >
-                  <h1 className="text-lg sm:text-xl lg:text-2xl font-bold mb-2 pr-16 sm:pr-20">
-                    {post.title}
-                  </h1>
-                  <div className="absolute top-3 sm:top-4 right-3 sm:right-4 flex gap-1 sm:gap-2">
-                    <button
-                      title="Approve Post"
-                      className="btn btn-xs sm:btn-sm btn-success btn-circle"
-                      onClick={() => openConfirmationModal("approve", post)}
-                    >
-                      <img
-                        src={doneAll}
-                        alt="Approve"
-                        className="w-3 h-3 sm:w-4 sm:h-4 lg:w-5 lg:h-5"
-                      />
-                    </button>
-                    <button
-                      title="Delete Post"
-                      className="btn btn-xs sm:btn-sm btn-error btn-circle"
-                      onClick={() => openConfirmationModal("delete", post)}
-                    >
-                      <img
-                        src={trashIcon}
-                        alt="Delete"
-                        className="w-3 h-3 sm:w-4 sm:h-4 lg:w-5 lg:h-5"
-                      />
-                    </button>
-                  </div>
-
-                  {/* Topic Badge */}
-                  <div className="mb-2">
-                    <span
-                      className={`inline-block text-xs font-semibold px-2 py-1 rounded ${
-                        post.topic === "general"
-                          ? "bg-blue-100 text-blue-800"
-                          : "bg-green-100 text-green-800"
-                      }`}
-                    >
-                      {post.topic === "general" ? "General" : "Daily Challenge"}
-                    </span>
-                  </div>
-
-                  <p className="text-xs sm:text-sm text-base-content/70 mb-2 sm:mb-3">
-                    By {post.author_name} on{" "}
-                    <span>
-                      {new Date(post.created_at).toLocaleDateString("en-GB", {
-                        day: "2-digit",
-                        month: "2-digit",
-                        year: "numeric",
-                      })}
-                    </span>
-                  </p>
-                  <p className="text-sm sm:text-base text-base-content/90 whitespace-pre-line break-words">
-                    {post.content}
-                  </p>
-                </div>
-              ))}
-            </div>
-          )}
-
-          {!isLoading && posts.length > 0 && totalPages > 1 && (
-            <div className="flex flex-wrap justify-center gap-1 sm:gap-2 mt-6 sm:mt-8 px-4">
-              <div className="text-sm text-base-content/60 mb-2 w-full text-center">
-                Showing {filteredPosts.length} of {posts.length} posts
-              </div>
-              {Array.from({ length: totalPages }, (_, idx) => (
-                <button
-                  key={idx + 1}
-                  className={`btn btn-xs sm:btn-sm ${
-                    page === idx + 1 ? "border-amber-400" : "btn-ghost"
-                  }`}
-                  onClick={() => setPage(idx + 1)}
-                  disabled={isLoading}
-                >
-                  {idx + 1}
-                </button>
-              ))}
-            </div>
-          )}
-        </div>
+            {Array.from({ length: totalPages }, (_, idx) => (
+              <button
+                key={idx + 1}
+                className={`btn btn-xs sm:btn-sm ${
+                  page === idx + 1 ? "border-amber-400" : "btn-ghost"
+                }`}
+                onClick={() => setPage(idx + 1)}
+                disabled={isLoading}
+              >
+                {idx + 1}
+              </button>
+            ))}
+          </div>
+        )}
       </div>
 
@@ -591,10 +746,10 @@
       {modal.isOpen && (
         <div
-          className="fixed inset-0 z-50 flex items-center justify-center bg-opacity-50 backdrop-blur-sm p-4"
+          className="fixed inset-0 z-50 flex items-center justify-center bg-opacity-50 backdrop-blur-xs p-4"
           aria-labelledby="modal-title"
           role="dialog"
           aria-modal="true"
         >
-          <div className="bg-base-200 rounded-lg shadow-xl p-4 sm:p-6 w-full max-w-sm sm:max-w-md mx-4">
+          <div className="bg-base-200 rounded-lg shadow-xl p-4 sm:p-6  w-full max-w-sm sm:max-w-md mx-4">
             <div className="flex items-center gap-3 mb-4">
               {(modal.type === "approve" || modal.type === "success") && (
@@ -642,5 +797,7 @@
               </h3>
             </div>
-            <p className="py-3 sm:py-4 text-sm sm:text-base">{modal.message}</p>
+            <div className="flex py-3 sm:py-4 items-center gap-3">
+              <p>{modal.message}</p>
+            </div>
             <div className="flex justify-end gap-2 sm:gap-3 mt-3 sm:mt-4">
               {modal.type === "approve" || modal.type === "delete" ? (
Index: client/src/LandingPage/components/Footer.jsx
===================================================================
--- client/src/LandingPage/components/Footer.jsx	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ client/src/LandingPage/components/Footer.jsx	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -1,8 +1,9 @@
-import React from "react";
+import React, { use } from "react";
 import logoIcon from "../../assets/images/logoIcon.png";
 import { useNavigate } from "react-router-dom";
-
+import { useAuth } from "@/contexts/AuthContext";
 const Footer = () => {
   const navigate = useNavigate();
+  const { user } = useAuth();
   return (
     <footer className="footer footer-horizontal footer-center bg-base-100 text-base-content rounded p-10 b">
@@ -11,5 +12,9 @@
           className="link link-hover"
           onClick={() => {
-            navigate("/register");
+            if (user) {
+              navigate("/dashboard");
+            } else {
+              navigate("/register");
+            }
           }}
         >
@@ -19,5 +24,9 @@
           className="link link-hover"
           onClick={() => {
-            navigate("/login");
+            if (user) {
+              navigate("/dashboard");
+            } else {
+              navigate("/login");
+            }
           }}
         >
@@ -30,5 +39,5 @@
           }}
         >
-          Attempt a challenge
+          Attempt the challenge
         </a>
         <a
Index: client/src/services/forumService.js
===================================================================
--- client/src/services/forumService.js	(revision d6433e6b116b6f1c633537e18ea3f97a81143dd9)
+++ client/src/services/forumService.js	(revision 7829e2775936dac429a91cc6718a77cda167feae)
@@ -31,9 +31,6 @@
             : new Date(String(filters.selectedDate));
 
-        // Validate the date before proceeding
         if (!isNaN(dateObj.getTime())) {
-          const formattedDate = dateObj.toISOString().split("T")[0];
-
-          url += `&date=${formattedDate}`;
+          url += `&date=${dateObj}`;
 
           // Log combined filter details when using specific date with other filters
