Index: chapterx-frontend/src/components/admin/PlatformStats.tsx
===================================================================
--- chapterx-frontend/src/components/admin/PlatformStats.tsx	(revision b62cefc14094ca5ac7154f7d48797a1e6c444935)
+++ chapterx-frontend/src/components/admin/PlatformStats.tsx	(revision 99c1e45f4ac45a164229bc6f60f3b05bc26df047)
@@ -1,26 +1,26 @@
-import React from 'react'
-import { Users, BookOpen, FileText, Heart, Eye, MessageCircle } from 'lucide-react'
+import React, { useEffect } from 'react'
+import { Users, BookOpen, Heart, MessageCircle } from 'lucide-react'
 import { useAuthStore } from '../../store/authStore'
 import { useStoryStore } from '../../store/storyStore'
 
 export const PlatformStats: React.FC = () => {
-  const { allUsers } = useAuthStore()
-  const { stories, comments } = useStoryStore()
+  const { allUsers, fetchAllUsers } = useAuthStore()
+  const { stories, fetchStories } = useStoryStore()
 
-  const totalViews = stories.reduce((acc, s) => acc + s.total_views, 0)
+  useEffect(() => { fetchStories(); fetchAllUsers() }, [])
+
   const totalLikes = stories.reduce((acc, s) => acc + s.total_likes, 0)
+  const totalComments = stories.reduce((acc, s) => acc + s.total_comments, 0)
   const published = stories.filter(s => s.status === 'published').length
 
   const stats = [
-    { icon: <Users size={24} className="text-blue-300" />, label: 'Total Users', value: allUsers.length, color: 'bg-blue-500/20', change: '+12 this month' },
+    { icon: <Users size={24} className="text-blue-300" />, label: 'Total Users', value: allUsers.length, color: 'bg-blue-500/20', change: `${allUsers.filter(u => u.role === 'writer').length} writers` },
     { icon: <BookOpen size={24} className="text-violet-300" />, label: 'Total Stories', value: stories.length, color: 'bg-violet-500/20', change: `${published} published` },
-    { icon: <FileText size={24} className="text-emerald-300" />, label: 'Comments', value: comments.length, color: 'bg-emerald-500/20', change: 'Platform-wide' },
     { icon: <Heart size={24} className="text-rose-300" />, label: 'Total Likes', value: totalLikes.toLocaleString(), color: 'bg-rose-500/20', change: 'Across all stories' },
-    { icon: <Eye size={24} className="text-amber-300" />, label: 'Total Views', value: totalViews.toLocaleString(), color: 'bg-amber-500/20', change: 'All time' },
-    { icon: <MessageCircle size={24} className="text-cyan-300" />, label: 'Writers', value: allUsers.filter(u => u.role === 'writer').length, color: 'bg-cyan-500/20', change: 'Active creators' },
+    { icon: <MessageCircle size={24} className="text-emerald-300" />, label: 'Total Comments', value: totalComments.toLocaleString(), color: 'bg-emerald-500/20', change: 'Platform-wide' },
   ]
 
   return (
-    <div className="grid grid-cols-2 md:grid-cols-3 gap-4">
+    <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
       {stats.map(stat => (
         <div key={stat.label} className="bg-slate-800 border border-slate-700 rounded-2xl p-6">
Index: chapterx-frontend/src/components/admin/UserTable.tsx
===================================================================
--- chapterx-frontend/src/components/admin/UserTable.tsx	(revision b62cefc14094ca5ac7154f7d48797a1e6c444935)
+++ chapterx-frontend/src/components/admin/UserTable.tsx	(revision 99c1e45f4ac45a164229bc6f60f3b05bc26df047)
@@ -1,6 +1,6 @@
 import React, { useState } from 'react'
 import { Search, Shield, UserX, UserCheck } from 'lucide-react'
+import axios from 'axios'
 import { useAuthStore } from '../../store/authStore'
-import { useNotificationStore } from '../../store/notificationStore'
 import { useUIStore } from '../../store/uiStore'
 import { User, UserRole } from '../../types'
@@ -10,11 +10,15 @@
 import { Modal } from '../ui/Modal'
 
+const API = 'https://localhost:7125/api'
+
 export const UserTable: React.FC = () => {
-  const { allUsers, updateUserRole, currentUser } = useAuthStore()
-  const { addNotification } = useNotificationStore()
+  const { allUsers, updateUserRole, currentUser, token } = useAuthStore()
   const { addToast } = useUIStore()
   const [search, setSearch] = useState('')
   const [confirmUser, setConfirmUser] = useState<User | null>(null)
   const [confirmAction, setConfirmAction] = useState<'promote' | 'demote' | null>(null)
+  const [loading, setLoading] = useState(false)
+
+  const authHeaders = token ? { Authorization: `Bearer ${token}` } : {}
 
   const filtered = allUsers.filter(
@@ -25,22 +29,30 @@
   )
 
-  const handlePromote = (user: User) => {
-    const newRole: UserRole = user.role === 'regular' ? 'writer' : user.role === 'writer' ? 'admin' : 'admin'
-    updateUserRole(user.user_id, newRole)
-    addNotification({
-      user_id: user.user_id,
-      type: 'system',
-      title: 'Role Updated',
-      message: `Your account has been promoted to ${newRole}.`,
-    })
-    addToast(`${user.username} promoted to ${newRole}`)
-    setConfirmUser(null)
+  const handlePromote = async (user: User) => {
+    setLoading(true)
+    try {
+      await axios.post(`${API}/admins`, { userId: user.user_id }, { headers: authHeaders })
+      updateUserRole(user.user_id, 'admin')
+      addToast(`${user.username} promoted to admin`)
+    } catch (err: any) {
+      addToast(err?.response?.data?.message || 'Failed to promote user.', 'error')
+    } finally {
+      setLoading(false)
+      setConfirmUser(null)
+    }
   }
 
-  const handleDemote = (user: User) => {
-    const newRole: UserRole = user.role === 'admin' ? 'writer' : 'regular'
-    updateUserRole(user.user_id, newRole)
-    addToast(`${user.username} role changed to ${newRole}`, 'info')
-    setConfirmUser(null)
+  const handleDemote = async (user: User) => {
+    setLoading(true)
+    try {
+      await axios.delete(`${API}/admins/${user.user_id}`, { headers: authHeaders })
+      updateUserRole(user.user_id, 'writer')
+      addToast(`${user.username} removed from admin`, 'info')
+    } catch (err: any) {
+      addToast(err?.response?.data?.message || 'Failed to demote user.', 'error')
+    } finally {
+      setLoading(false)
+      setConfirmUser(null)
+    }
   }
 
@@ -140,4 +152,5 @@
                 variant={confirmAction === 'promote' ? 'primary' : 'danger'}
                 className="flex-1"
+                loading={loading}
                 onClick={() => confirmAction === 'promote' ? handlePromote(confirmUser) : handleDemote(confirmUser)}
               >
