I want the analytics charts about the height of 350ish and i want them daily not monthly. I also want a chart that has the money made daily. I also want the messages proccessed chart to have multiple Lines for all the ai models that are made. The notification symbol doesnt open the notification box and the pfp button i want it to be able to be pressed from the pfp or the karot on the dropdown. Please send the entire code im sending but updating






<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Scams.rip - Admin Dashboard</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        :root {
            --matte-black: #121212;
            --darker-black: #0a0a0a;
            --dark-red: #8b0000;
            --light-red: #a52a2a;
            --bright-red: #d10000;
            --gray-800: #252525;
            --gray-700: #333333;
            --gray-600: #4d4d4d;
            --gray-400: #999999;
            --gray-300: #c0c0c0;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--darker-black);
            color: #e0e0e0;
        }
        
        .sidebar {
            background-color: var(--matte-black);
            border-right: 1px solid var(--gray-800);
        }
        
        .navbar {
            background-color: var(--matte-black);
            border-bottom: 1px solid var(--gray-800);
        }
        
        .btn-primary {
            background-color: var(--dark-red);
            color: white;
        }
        
        .btn-primary:hover {
            background-color: var(--bright-red);
        }
        
        .card {
            background-color: var(--matte-black);
            border: 1px solid var(--gray-800);
            border-radius: 8px;
        }
        
        .table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .table th, .table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid var(--gray-800);
        }
        
        .table th {
            background-color: var(--gray-800);
            color: var(--gray-300);
            font-weight: 600;
        }
        
        .table tr:hover {
            background-color: var(--gray-800);
        }
        
        .dropdown-menu {
            background-color: var(--matte-black);
            border: 1px solid var(--gray-800);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
        }
        
        .modal {
            background-color: var(--matte-black);
            border: 1px solid var(--gray-800);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
        }
        
        .modal-overlay {
            background-color: rgba(0, 0, 0, 0.7);
        }
        
        .pagination .active {
            background-color: var(--dark-red);
            color: white;
        }
        
        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        
        ::-webkit-scrollbar-track {
            background: var(--matte-black);
        }
        
        ::-webkit-scrollbar-thumb {
            background: var(--gray-600);
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: var(--gray-400);
        }
        
        /* Text selection */
        ::selection {
            background: var(--bright-red);
            color: white;
        }
    </style>
</head>
<body class="flex h-screen overflow-hidden">
    <!-- Sidebar -->
    <div class="sidebar w-64 flex-shrink-0 h-full overflow-y-auto">
        <div class="p-4">
            <div class="flex items-center space-x-2 mb-8">
                <i class="fas fa-shield-alt text-2xl text-red-600"></i>
                <span class="text-xl font-bold">Scams.rip</span>
            </div>
            
            <nav class="space-y-1">
                <a href="#analytics" class="flex items-center px-4 py-3 rounded-lg bg-gray-800 text-white">
                    <i class="fas fa-chart-line mr-3"></i>
                    Analytics
                </a>
                <a href="#users" class="flex items-center px-4 py-3 rounded-lg hover:bg-gray-800 text-gray-300 hover:text-white">
                    <i class="fas fa-users mr-3"></i>
                    Users
                </a>
                <a href="#flags" class="flex items-center px-4 py-3 rounded-lg hover:bg-gray-800 text-gray-300 hover:text-white">
                    <i class="fas fa-flag mr-3"></i>
                    Flagged Messages
                </a>
                <a href="#models" class="flex items-center px-4 py-3 rounded-lg hover:bg-gray-800 text-gray-300 hover:text-white">
                    <i class="fas fa-robot mr-3"></i>
                    AI Models
                </a>
                <a href="#settings" class="flex items-center px-4 py-3 rounded-lg hover:bg-gray-800 text-gray-300 hover:text-white">
                    <i class="fas fa-cog mr-3"></i>
                    Settings
                </a>
            </nav>
        </div>
    </div>

    <!-- Main Content -->
    <div class="flex-1 flex flex-col overflow-hidden">
        <!-- Top Navigation -->
        <header class="navbar text-white py-3 px-6 sticky top-0 z-40 shadow-sm">
            <div class="flex items-center justify-between">
                <div class="flex items-center">
                    <button class="mr-4 md:hidden text-white focus:outline-none">
                        <i class="fas fa-bars text-xl"></i>
                    </button>
                    <h1 class="text-lg font-semibold" id="page-title">Analytics Dashboard</h1>
                </div>
                
                <div class="flex items-center space-x-4">
                    <button class="relative p-2 rounded-full hover:bg-gray-800">
                        <i class="fas fa-bell text-xl"></i>
                        <span class="absolute top-0 right-0 w-3 h-3 bg-red-600 rounded-full"></span>
                    </button>
                    
                    <div class="relative">
                        <button id="user-menu-button" class="flex items-center space-x-2 focus:outline-none">
                            <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-8 h-8 rounded-full border-2 border-red-600">
                            <span class="hidden md:inline">Admin</span>
                            <i class="fas fa-chevron-down text-xs"></i>
                        </button>
                        
                        <div id="user-menu" class="dropdown-menu absolute right-0 mt-2 w-48 rounded-md py-1 z-50 hidden">
                            <a href="#profile" class="block px-4 py-2 hover:bg-gray-800">Profile</a>
                            <a href="#subscription" class="block px-4 py-2 hover:bg-gray-800">Buy Subscription</a>
                            <a href="#logout" class="block px-4 py-2 hover:bg-gray-800">Sign Out</a>
                        </div>
                    </div>
                </div>
            </div>
        </header>

        <!-- Page Content -->
        <main class="flex-1 overflow-y-auto p-6 bg-darker-black">
            <!-- Analytics Page -->
            <div id="analytics-page">
                <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
                    <!-- Stats Cards -->
                    <div class="card p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-400">Total Threats Stopped</p>
                                <h3 class="text-3xl font-bold">24,589</h3>
                                <p class="text-green-500 text-sm"><i class="fas fa-arrow-up mr-1"></i> 12.5% from last month</p>
                            </div>
                            <div class="p-3 rounded-full bg-red-900/30 text-red-500">
                                <i class="fas fa-shield-alt text-2xl"></i>
                            </div>
                        </div>
                    </div>
                    
                    <div class="card p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-400">Total Revenue</p>
                                <h3 class="text-3xl font-bold">$48,756</h3>
                                <p class="text-green-500 text-sm"><i class="fas fa-arrow-up mr-1"></i> 8.3% from last month</p>
                            </div>
                            <div class="p-3 rounded-full bg-green-900/30 text-green-500">
                                <i class="fas fa-dollar-sign text-2xl"></i>
                            </div>
                        </div>
                    </div>
                    
                    <div class="card p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-400">Total Users</p>
                                <h3 class="text-3xl font-bold">3,245</h3>
                                <p class="text-green-500 text-sm"><i class="fas fa-arrow-up mr-1"></i> 5.2% from last month</p>
                            </div>
                            <div class="p-3 rounded-full bg-blue-900/30 text-blue-500">
                                <i class="fas fa-users text-2xl"></i>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Charts -->
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
                    <div class="card p-6">
                        <h3 class="text-lg font-semibold mb-4">Messages Processed (Last 30 Days)</h3>
                        <canvas id="messagesChart" height="300"></canvas>
                    </div>
                    
                    <div class="card p-6">
                        <h3 class="text-lg font-semibold mb-4">New User Signups (Last 30 Days)</h3>
                        <canvas id="usersChart" height="300"></canvas>
                    </div>
                </div>
                
                <div class="card p-6">
                    <h3 class="text-lg font-semibold mb-4">Recent Activity</h3>
                    <div class="overflow-x-auto">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>Time</th>
                                    <th>User</th>
                                    <th>Action</th>
                                    <th>Details</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>2 min ago</td>
                                    <td class="flex items-center">
                                        <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-6 h-6 rounded-full mr-2">
                                        Sarah Williams
                                    </td>
                                    <td>Updated model</td>
                                    <td>Phishing detection v2.1</td>
                                </tr>
                                <tr>
                                    <td>15 min ago</td>
                                    <td class="flex items-center">
                                        <img src="https://randomuser.me/api/portraits/men/22.jpg" alt="User" class="w-6 h-6 rounded-full mr-2">
                                        David Kim
                                    </td>
                                    <td>Added dataset</td>
                                    <td>Scam messages Q3 2023</td>
                                </tr>
                                <tr>
                                    <td>1 hour ago</td>
                                    <td class="flex items-center">
                                        <img src="https://randomuser.me/api/portraits/men/75.jpg" alt="User" class="w-6 h-6 rounded-full mr-2">
                                        Michael Chen
                                    </td>
                                    <td>Terminated user</td>
                                    <td>john_doe (Violation of TOS)</td>
                                </tr>
                                <tr>
                                    <td>3 hours ago</td>
                                    <td class="flex items-center">
                                        <img src="https://randomuser.me/api/portraits/women/63.jpg" alt="User" class="w-6 h-6 rounded-full mr-2">
                                        Emily Rodriguez
                                    </td>
                                    <td>Updated settings</td>
                                    <td>API rate limits</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            
            <!-- Users Page (hidden by default) -->
            <div id="users-page" class="hidden">
                <div class="flex justify-between items-center mb-6">
                    <h2 class="text-2xl font-bold">User Management</h2>
                    <div class="flex space-x-3">
                        <button class="btn-primary px-4 py-2 rounded-md text-sm">
                            <i class="fas fa-plus mr-2"></i> Add User
                        </button>
                        <div class="relative">
                            <input type="text" placeholder="Search users..." class="bg-gray-800 border border-gray-700 rounded-md px-4 py-2 pl-10 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <i class="fas fa-search absolute left-3 top-3 text-gray-500"></i>
                        </div>
                    </div>
                </div>
                
                <div class="card overflow-hidden">
                    <div class="overflow-x-auto">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th class="w-12"></th>
                                    <th>Username</th>
                                    <th>Email</th>
                                    <th>Role</th>
                                    <th>Status</th>
                                    <th>Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User" class="w-8 h-8 rounded-full">
                                    </td>
                                    <td>john_doe</td>
                                    <td>john@example.com</td>
                                    <td><span class="px-2 py-1 bg-blue-900/30 text-blue-400 rounded-full text-xs">Customer</span></td>
                                    <td><span class="px-2 py-1 bg-green-900/30 text-green-400 rounded-full text-xs">Active</span></td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 more-info-btn">
                                            <i class="fas fa-info-circle"></i>
                                        </button>
                                        <button class="text-yellow-400 hover:text-yellow-300 mr-2 edit-user-btn">
                                            <i class="fas fa-edit"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 terminate-user-btn">
                                            <i class="fas fa-user-slash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img src="https://randomuser.me/api/portraits/women/2.jpg" alt="User" class="w-8 h-8 rounded-full">
                                    </td>
                                    <td>jane_smith</td>
                                    <td>jane@example.com</td>
                                    <td><span class="px-2 py-1 bg-purple-900/30 text-purple-400 rounded-full text-xs">Admin</span></td>
                                    <td><span class="px-2 py-1 bg-green-900/30 text-green-400 rounded-full text-xs">Active</span></td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 more-info-btn">
                                            <i class="fas fa-info-circle"></i>
                                        </button>
                                        <button class="text-yellow-400 hover:text-yellow-300 mr-2 edit-user-btn">
                                            <i class="fas fa-edit"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 terminate-user-btn">
                                            <i class="fas fa-user-slash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img src="https://randomuser.me/api/portraits/men/3.jpg" alt="User" class="w-8 h-8 rounded-full">
                                    </td>
                                    <td>mike_johnson</td>
                                    <td>mike@example.com</td>
                                    <td><span class="px-2 py-1 bg-blue-900/30 text-blue-400 rounded-full text-xs">Customer</span></td>
                                    <td><span class="px-2 py-1 bg-yellow-900/30 text-yellow-400 rounded-full text-xs">Pending</span></td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 more-info-btn">
                                            <i class="fas fa-info-circle"></i>
                                        </button>
                                        <button class="text-yellow-400 hover:text-yellow-300 mr-2 edit-user-btn">
                                            <i class="fas fa-edit"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 terminate-user-btn">
                                            <i class="fas fa-user-slash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img src="https://randomuser.me/api/portraits/women/4.jpg" alt="User" class="w-8 h-8 rounded-full">
                                    </td>
                                    <td>sarah_williams</td>
                                    <td>sarah@example.com</td>
                                    <td><span class="px-2 py-1 bg-green-900/30 text-green-400 rounded-full text-xs">Moderator</span></td>
                                    <td><span class="px-2 py-1 bg-green-900/30 text-green-400 rounded-full text-xs">Active</span></td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 more-info-btn">
                                            <i class="fas fa-info-circle"></i>
                                        </button>
                                        <button class="text-yellow-400 hover:text-yellow-300 mr-2 edit-user-btn">
                                            <i class="fas fa-edit"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 terminate-user-btn">
                                            <i class="fas fa-user-slash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <img src="https://randomuser.me/api/portraits/men/5.jpg" alt="User" class="w-8 h-8 rounded-full">
                                    </td>
                                    <td>david_brown</td>
                                    <td>david@example.com</td>
                                    <td><span class="px-2 py-1 bg-blue-900/30 text-blue-400 rounded-full text-xs">Customer</span></td>
                                    <td><span class="px-2 py-1 bg-red-900/30 text-red-400 rounded-full text-xs">Suspended</span></td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 more-info-btn">
                                            <i class="fas fa-info-circle"></i>
                                        </button>
                                        <button class="text-yellow-400 hover:text-yellow-300 mr-2 edit-user-btn">
                                            <i class="fas fa-edit"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 terminate-user-btn">
                                            <i class="fas fa-user-slash"></i>
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    
                    <div class="p-4 border-t border-gray-800 flex justify-between items-center">
                        <div class="text-sm text-gray-400">
                            Showing 1 to 5 of 124 users
                        </div>
                        <div class="flex space-x-1 pagination">
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">&laquo;</button>
                            <button class="px-3 py-1 rounded-md bg-red-700 text-white">1</button>
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">2</button>
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">3</button>
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">&raquo;</button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Flags Page (hidden by default) -->
            <div id="flags-page" class="hidden">
                <div class="flex justify-between items-center mb-6">
                    <h2 class="text-2xl font-bold">Flagged Messages</h2>
                    <div class="flex space-x-3">
                        <div class="relative">
                            <input type="text" placeholder="Search messages..." class="bg-gray-800 border border-gray-700 rounded-md px-4 py-2 pl-10 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <i class="fas fa-search absolute left-3 top-3 text-gray-500"></i>
                        </div>
                        <select class="bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <option>All Threat Types</option>
                            <option>Phishing</option>
                            <option>Fraud</option>
                            <option>Malware</option>
                            <option>Scam</option>
                        </select>
                    </div>
                </div>
                
                <div class="card overflow-hidden">
                    <div class="overflow-x-auto">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Threat Type</th>
                                    <th>Message Preview</th>
                                    <th>Date</th>
                                    <th>Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>#FL-5842</td>
                                    <td><span class="px-2 py-1 bg-red-900/30 text-red-400 rounded-full text-xs">Phishing</span></td>
                                    <td>Congratulations! You've won a $1000 Amazon gift card. Click here to claim your prize: bit.ly/fake-link...</td>
                                    <td>2023-10-15 14:32</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 view-message-btn">
                                            <i class="fas fa-eye"></i> View
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>#FL-5841</td>
                                    <td><span class="px-2 py-1 bg-orange-900/30 text-orange-400 rounded-full text-xs">Fraud</span></td>
                                    <td>Urgent: Your bank account has been compromised. Please verify your details immediately: www.fake-bank.com/login...</td>
                                    <td>2023-10-15 13:45</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 view-message-btn">
                                            <i class="fas fa-eye"></i> View
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>#FL-5840</td>
                                    <td><span class="px-2 py-1 bg-purple-900/30 text-purple-400 rounded-full text-xs">Tech Support</span></td>
                                    <td>Hi, this is Microsoft Support. We've detected a virus on your computer. Call us now at 1-800-FAKE-NUM to fix it...</td>
                                    <td>2023-10-15 12:18</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 view-message-btn">
                                            <i class="fas fa-eye"></i> View
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>#FL-5839</td>
                                    <td><span class="px-2 py-1 bg-yellow-900/30 text-yellow-400 rounded-full text-xs">Government</span></td>
                                    <td>You're eligible for a government COVID-19 relief payment of $1200. Submit your information here: gov-relief-scam.com...</td>
                                    <td>2023-10-15 11:02</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 view-message-btn">
                                            <i class="fas fa-eye"></i> View
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>#FL-5838</td>
                                    <td><span class="px-2 py-1 bg-red-900/30 text-red-400 rounded-full text-xs">Phishing</span></td>
                                    <td>Your PayPal account has been limited. Please update your information by clicking this link: paypal.fake-update.com...</td>
                                    <td>2023-10-15 10:37</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 view-message-btn">
                                            <i class="fas fa-eye"></i> View
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    
                    <div class="p-4 border-t border-gray-800 flex justify-between items-center">
                        <div class="text-sm text-gray-400">
                            Showing 1 to 5 of 342 flagged messages
                        </div>
                        <div class="flex space-x-1 pagination">
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">&laquo;</button>
                            <button class="px-3 py-1 rounded-md bg-red-700 text-white">1</button>
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">2</button>
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">3</button>
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">&raquo;</button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Models Page (hidden by default) -->
            <div id="models-page" class="hidden">
                <div class="flex justify-between items-center mb-6">
                    <h2 class="text-2xl font-bold">AI Models</h2>
                    <button class="btn-primary px-4 py-2 rounded-md text-sm add-model-btn">
                        <i class="fas fa-plus mr-2"></i> Add Model
                    </button>
                </div>
                
                <div class="card overflow-hidden">
                    <div class="overflow-x-auto">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>Model Name</th>
                                    <th>Version</th>
                                    <th>Dataset</th>
                                    <th>Accuracy</th>
                                    <th>Last Updated</th>
                                    <th>Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>Phishing Detection</td>
                                    <td>v2.1.4</td>
                                    <td>
                                        <a href="#" class="text-blue-400 hover:text-blue-300">
                                            <i class="fas fa-download mr-1"></i> phishing_data_2023.json
                                        </a>
                                    </td>
                                    <td>98.7%</td>
                                    <td>2023-10-12</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 add-dataset-btn">
                                            <i class="fas fa-database"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 remove-model-btn">
                                            <i class="fas fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Fraud Detection</td>
                                    <td>v1.9.2</td>
                                    <td>
                                        <a href="#" class="text-blue-400 hover:text-blue-300">
                                            <i class="fas fa-download mr-1"></i> fraud_data_2023.json
                                        </a>
                                    </td>
                                    <td>96.2%</td>
                                    <td>2023-10-05</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 add-dataset-btn">
                                            <i class="fas fa-database"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 remove-model-btn">
                                            <i class="fas fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Malware Link Detection</td>
                                    <td>v3.0.1</td>
                                    <td>
                                        <a href="#" class="text-blue-400 hover:text-blue-300">
                                            <i class="fas fa-download mr-1"></i> malware_links_2023.json
                                        </a>
                                    </td>
                                    <td>99.1%</td>
                                    <td>2023-09-28</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 add-dataset-btn">
                                            <i class="fas fa-database"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 remove-model-btn">
                                            <i class="fas fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Tech Support Scam</td>
                                    <td>v1.5.7</td>
                                    <td>
                                        <a href="#" class="text-blue-400 hover:text-blue-300">
                                            <i class="fas fa-download mr-1"></i> tech_support_scams.json
                                        </a>
                                    </td>
                                    <td>94.8%</td>
                                    <td>2023-09-15</td>
                                    <td>
                                        <button class="text-blue-400 hover:text-blue-300 mr-2 add-dataset-btn">
                                            <i class="fas fa-database"></i>
                                        </button>
                                        <button class="text-red-400 hover:text-red-300 remove-model-btn">
                                            <i class="fas fa-trash"></i>
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    
                    <div class="p-4 border-t border-gray-800 flex justify-between items-center">
                        <div class="text-sm text-gray-400">
                            Showing 1 to 4 of 4 models
                        </div>
                        <div class="flex space-x-1 pagination">
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">&laquo;</button>
                            <button class="px-3 py-1 rounded-md bg-red-700 text-white">1</button>
                            <button class="px-3 py-1 rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700">&raquo;</button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Settings Page (hidden by default) -->
            <div id="settings-page" class="hidden">
                <h2 class="text-2xl font-bold mb-6">Settings</h2>
                
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                    <!-- Password Change -->
                    <div class="card p-6">
                        <h3 class="text-lg font-semibold mb-4">Change Password</h3>
                        <form>
                            <div class="mb-4">
                                <label class="block text-gray-400 mb-2">Current Password</label>
                                <input type="password" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            </div>
                            <div class="mb-4">
                                <label class="block text-gray-400 mb-2">New Password</label>
                                <input type="password" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            </div>
                            <div class="mb-4">
                                <label class="block text-gray-400 mb-2">Confirm New Password</label>
                                <input type="password" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            </div>
                            <button type="submit" class="btn-primary px-4 py-2 rounded-md">Update Password</button>
                        </form>
                    </div>
                    
                    <!-- API Keys -->
                    <div class="card p-6">
                        <h3 class="text-lg font-semibold mb-4">API Keys</h3>
                        <div class="mb-6">
                            <label class="block text-gray-400 mb-2">Current API Key</label>
                            <div class="flex">
                                <input type="text" value="sk_live_1234567890abcdef1234567890abcdef" readonly class="w-full bg-gray-800 border border-gray-700 rounded-l-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                                <button class="bg-gray-700 px-4 rounded-r-md hover:bg-gray-600">
                                    <i class="fas fa-copy"></i>
                                </button>
                            </div>
                            <p class="text-sm text-gray-500 mt-2">Keep this key secret. It provides full access to your account.</p>
                        </div>
                        <button class="btn-primary px-4 py-2 rounded-md refresh-api-btn">
                            <i class="fas fa-sync-alt mr-2"></i> Refresh API Key
                        </button>
                    </div>
                    
                    <!-- Notification Settings -->
                    <div class="card p-6">
                        <h3 class="text-lg font-semibold mb-4">Notification Settings</h3>
                        <div class="space-y-4">
                            <div class="flex items-center justify-between">
                                <div>
                                    <h4 class="font-medium">Email Notifications</h4>
                                    <p class="text-sm text-gray-400">Receive email alerts for important events</p>
                                </div>
                                <label class="relative inline-flex items-center cursor-pointer">
                                    <input type="checkbox" value="" class="sr-only peer" checked>
                                    <div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-red-600"></div>
                                </label>
                            </div>
                            <div class="flex items-center justify-between">
                                <div>
                                    <h4 class="font-medium">SMS Notifications</h4>
                                    <p class="text-sm text-gray-400">Receive text messages for urgent alerts</p>
                                </div>
                                <label class="relative inline-flex items-center cursor-pointer">
                                    <input type="checkbox" value="" class="sr-only peer">
                                    <div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-red-600"></div>
                                </label>
                            </div>
                            <div class="flex items-center justify-between">
                                <div>
                                    <h4 class="font-medium">Push Notifications</h4>
                                    <p class="text-sm text-gray-400">Receive app notifications for new threats</p>
                                </div>
                                <label class="relative inline-flex items-center cursor-pointer">
                                    <input type="checkbox" value="" class="sr-only peer" checked>
                                    <div class="w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-red-600"></div>
                                </label>
                            </div>
                        </div>
                    </div>
                    
                    <!-- System Settings -->
                    <div class="card p-6">
                        <h3 class="text-lg font-semibold mb-4">System Settings</h3>
                        <div class="mb-4">
                            <label class="block text-gray-400 mb-2">Timezone</label>
                            <select class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                                <option>(UTC-05:00) Eastern Time (US & Canada)</option>
                                <option>(UTC-08:00) Pacific Time (US & Canada)</option>
                                <option>(UTC+00:00) London</option>
                                <option>(UTC+01:00) Berlin</option>
                            </select>
                        </div>
                        <div class="mb-4">
                            <label class="block text-gray-400 mb-2">Date Format</label>
                            <select class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                                <option>MM/DD/YYYY</option>
                                <option>DD/MM/YYYY</option>
                                <option>YYYY-MM-DD</option>
                            </select>
                        </div>
                        <div>
                            <label class="block text-gray-400 mb-2">Theme</label>
                            <div class="flex space-x-4">
                                <button class="px-4 py-2 rounded-md bg-gray-800 border border-gray-700">Dark</button>
                                <button class="px-4 py-2 rounded-md bg-gray-300 text-gray-800 border border-gray-400">Light</button>
                                <button class="px-4 py-2 rounded-md bg-gray-800 border border-red-600">Red</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <!-- Modals -->
    
    <!-- User Info Modal -->
    <div id="user-info-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden modal-overlay">
        <div class="modal rounded-lg w-full max-w-md">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold">User Details</h3>
                    <button class="text-gray-400 hover:text-gray-300 close-modal">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="space-y-4">
                    <div class="flex items-center space-x-4">
                        <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="User" class="w-16 h-16 rounded-full border-2 border-red-600">
                        <div>
                            <h4 class="font-bold text-lg">john_doe</h4>
                            <p class="text-gray-400">Customer</p>
                        </div>
                    </div>
                    
                    <div class="grid grid-cols-2 gap-4">
                        <div>
                            <p class="text-gray-400 text-sm">Full Name</p>
                            <p>John Doe</p>
                        </div>
                        <div>
                            <p class="text-gray-400 text-sm">Email</p>
                            <p>john@example.com</p>
                        </div>
                        <div>
                            <p class="text-gray-400 text-sm">Phone</p>
                            <p>(123) 456-7890</p>
                        </div>
                        <div>
                            <p class="text-gray-400 text-sm">Status</p>
                            <p><span class="px-2 py-1 bg-green-900/30 text-green-400 rounded-full text-xs">Active</span></p>
                        </div>
                    </div>
                    
                    <div>
                        <p class="text-gray-400 text-sm">Address</p>
                        <p>123 Main St, Apt 4B<br>New York, NY 10001<br>United States</p>
                    </div>
                    
                    <div class="grid grid-cols-2 gap-4">
                        <div>
                            <p class="text-gray-400 text-sm">Joined</p>
                            <p>2023-05-15</p>
                        </div>
                        <div>
                            <p class="text-gray-400 text-sm">Last Active</p>
                            <p>2023-10-15 14:32</p>
                        </div>
                    </div>
                    
                    <div>
                        <p class="text-gray-400 text-sm">Subscription</p>
                        <p>Pro Plan (expires 2024-01-15)</p>
                    </div>
                </div>
                
                <div class="mt-6 flex justify-end space-x-3">
                    <button class="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 close-modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Edit User Modal -->
    <div id="edit-user-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden modal-overlay">
        <div class="modal rounded-lg w-full max-w-md">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold">Edit User</h3>
                    <button class="text-gray-400 hover:text-gray-300 close-modal">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <form>
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Username</label>
                        <input type="text" value="john_doe" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Email</label>
                        <input type="email" value="john@example.com" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Role</label>
                        <select class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <option>Customer</option>
                            <option>Moderator</option>
                            <option>Admin</option>
                        </select>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Status</label>
                        <select class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <option>Active</option>
                            <option>Pending</option>
                            <option>Suspended</option>
                            <option>Banned</option>
                        </select>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Subscription</label>
                        <select class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <option>Basic</option>
                            <option selected>Pro</option>
                            <option>Enterprise</option>
                            <option>None</option>
                        </select>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Subscription Expiry</label>
                        <input type="date" value="2024-01-15" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                    </div>
                    
                    <div class="mt-6 flex justify-end space-x-3">
                        <button type="button" class="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 close-modal">Cancel</button>
                        <button type="submit" class="btn-primary px-4 py-2 rounded-md">Save Changes</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    
    <!-- Terminate User Modal -->
    <div id="terminate-user-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden modal-overlay">
        <div class="modal rounded-lg w-full max-w-md">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold">Terminate User</h3>
                    <button class="text-gray-400 hover:text-gray-300 close-modal">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <form>
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Username</label>
                        <input type="text" value="john_doe" readonly class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Reason</label>
                        <select class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600 mb-2">
                            <option>Violation of Terms</option>
                            <option>Abusive Behavior</option>
                            <option>Payment Fraud</option>
                            <option>Other</option>
                        </select>
                        <textarea placeholder="Additional details..." class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600" rows="3"></textarea>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Duration</label>
                        <div class="flex space-x-2">
                            <input type="number" min="0" placeholder="0" class="w-16 bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <select class="flex-1 bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                                <option>Hours</option>
                                <option>Days</option>
                                <option selected>Months</option>
                                <option>Years</option>
                                <option>Permanent</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="mt-6 flex justify-end space-x-3">
                        <button type="button" class="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 close-modal">Cancel</button>
                        <button type="submit" class="btn-primary px-4 py-2 rounded-md">Confirm Termination</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    
    <!-- View Message Modal -->
    <div id="view-message-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden modal-overlay">
        <div class="modal rounded-lg w-full max-w-2xl">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold">Flagged Message Details</h3>
                    <button class="text-gray-400 hover:text-gray-300 close-modal">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="mb-6">
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div>
                            <p class="text-gray-400 text-sm">Message ID</p>
                            <p>#FL-5842</p>
                        </div>
                        <div>
                            <p class="text-gray-400 text-sm">Date</p>
                            <p>2023-10-15 14:32</p>
                        </div>
                        <div>
                            <p class="text-gray-400 text-sm">Threat Type</p>
                            <p><span class="px-2 py-1 bg-red-900/30 text-red-400 rounded-full text-xs">Phishing</span></p>
                        </div>
                        <div>
                            <p class="text-gray-400 text-sm">Confidence</p>
                            <p>98.7%</p>
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <p class="text-gray-400 text-sm">Original Message</p>
                        <div class="bg-gray-800 p-4 rounded-md mt-2">
                            <p>Congratulations! You've won a $1000 Amazon gift card. Click here to claim your prize: bit.ly/fake-link</p>
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <p class="text-gray-400 text-sm">Analysis</p>
                        <div class="bg-gray-800 p-4 rounded-md mt-2">
                            <p>This message exhibits several characteristics of a phishing attempt:</p>
                            <ul class="list-disc pl-5 mt-2 space-y-1">
                                <li>Promises unexpected financial gain (classic scam tactic)</li>
                                <li>Uses a URL shortener (bit.ly) to hide the true destination</li>
                                <li>Creates false sense of urgency to act quickly</li>
                                <li>No personalized information (generic greeting)</li>
                            </ul>
                        </div>
                    </div>
                    
                    <div>
                        <p class="text-gray-400 text-sm">Suggested Action</p>
                        <div class="bg-gray-800 p-4 rounded-md mt-2">
                            <p>Mark as spam and delete. Do not click on any links or provide any personal information.</p>
                        </div>
                    </div>
                </div>
                
                <div class="mt-6 flex justify-end space-x-3">
                    <button class="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 close-modal">Close</button>
                    <button class="btn-primary px-4 py-2 rounded-md">Add to Training Data</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Add Model Modal -->
    <div id="add-model-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden modal-overlay">
        <div class="modal rounded-lg w-full max-w-md">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold">Add New Model</h3>
                    <button class="text-gray-400 hover:text-gray-300 close-modal">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <form>
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Model Name</label>
                        <input type="text" placeholder="e.g., Phishing Detection" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Version</label>
                        <input type="text" placeholder="e.g., v1.0.0" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Model Type</label>
                        <select class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <option>Text Classification</option>
                            <option>URL Analysis</option>
                            <option>Image Analysis</option>
                            <option>Behavioral</option>
                        </select>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Initial Dataset</label>
                        <div class="border-2 border-dashed border-gray-700 rounded-md p-4 text-center">
                            <input type="file" id="dataset-upload" class="hidden">
                            <label for="dataset-upload" class="cursor-pointer">
                                <i class="fas fa-cloud-upload-alt text-3xl text-gray-500 mb-2"></i>
                                <p class="text-gray-400">Click to upload or drag and drop</p>
                                <p class="text-sm text-gray-500">JSON, CSV, or TXT files (max 100MB)</p>
                            </label>
                        </div>
                    </div>
                    
                    <div class="mt-6 flex justify-end space-x-3">
                        <button type="button" class="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 close-modal">Cancel</button>
                        <button type="submit" class="btn-primary px-4 py-2 rounded-md">Create Model</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    
    <!-- Add Dataset Modal -->
    <div id="add-dataset-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden modal-overlay">
        <div class="modal rounded-lg w-full max-w-md">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold">Add Dataset to Model</h3>
                    <button class="text-gray-400 hover:text-gray-300 close-modal">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <form>
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Model</label>
                        <input type="text" value="Phishing Detection v2.1.4" readonly class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Dataset Name</label>
                        <input type="text" placeholder="e.g., phishing_data_2023_q4" class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Dataset File</label>
                        <div class="border-2 border-dashed border-gray-700 rounded-md p-4 text-center">
                            <input type="file" id="dataset-file" class="hidden">
                            <label for="dataset-file" class="cursor-pointer">
                                <i class="fas fa-cloud-upload-alt text-3xl text-gray-500 mb-2"></i>
                                <p class="text-gray-400">Click to upload or drag and drop</p>
                                <p class="text-sm text-gray-500">JSON, CSV, or TXT files (max 100MB)</p>
                            </label>
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-gray-400 mb-2">Dataset Type</label>
                        <select class="w-full bg-gray-800 border border-gray-700 rounded-md px-4 py-2 focus:outline-none focus:ring-2 focus:ring-red-600">
                            <option>Training Data</option>
                            <option>Validation Data</option>
                            <option>Test Data</option>
                        </select>
                    </div>
                    
                    <div class="mt-6 flex justify-end space-x-3">
                        <button type="button" class="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 close-modal">Cancel</button>
                        <button type="submit" class="btn-primary px-4 py-2 rounded-md">Add Dataset</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    
    <!-- Remove Model Modal -->
    <div id="remove-model-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden modal-overlay">
        <div class="modal rounded-lg w-full max-w-md">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold">Remove Model</h3>
                    <button class="text-gray-400 hover:text-gray-300 close-modal">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="mb-6">
                    <p class="mb-4">Are you sure you want to remove the following model?</p>
                    <div class="bg-gray-800 p-4 rounded-md">
                        <h4 class="font-bold">Phishing Detection v2.1.4</h4>
                        <p class="text-sm text-gray-400">Accuracy: 98.7% | Last Updated: 2023-10-12</p>
                    </div>
                    <p class="mt-4 text-red-400">This action cannot be undone. All associated datasets will also be removed.</p>
                </div>
                
                <div class="flex justify-end space-x-3">
                    <button type="button" class="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 close-modal">Cancel</button>
                    <button type="button" class="btn-primary px-4 py-2 rounded-md">Confirm Removal</button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Refresh API Key Modal -->
    <div id="refresh-api-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden modal-overlay">
        <div class="modal rounded-lg w-full max-w-md">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold">Refresh API Key</h3>
                    <button class="text-gray-400 hover:text-gray-300 close-modal">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="mb-6">
                    <p class="mb-4">Refreshing your API key will immediately invalidate the current key. Any applications or services using the current key will stop working until they are updated with the new key.</p>
                    <p class="text-red-400">Are you sure you want to refresh your API key?</p>
                </div>
                
                <div class="flex justify-end space-x-3">
                    <button type="button" class="px-4 py-2 rounded-md bg-gray-700 hover:bg-gray-600 close-modal">Cancel</button>
                    <button type="button" class="btn-primary px-4 py-2 rounded-md">Refresh API Key</button>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Navigation between pages
        document.querySelectorAll('nav a').forEach(link => {
            link.addEventListener('click', function(e) {
                e.preventDefault();
                
                // Update active state in sidebar
                document.querySelectorAll('nav a').forEach(el => {
                    el.classList.remove('bg-gray-800', 'text-white');
                    el.classList.add('hover:bg-gray-800', 'text-gray-300', 'hover:text-white');
                });
                this.classList.add('bg-gray-800', 'text-white');
                this.classList.remove('hover:bg-gray-800', 'text-gray-300', 'hover:text-white');
                
                // Hide all pages
                document.querySelectorAll('main > div').forEach(page => {
                    page.classList.add('hidden');
                });
                
                // Show selected page
                const pageId = this.getAttribute('href').substring(1) + '-page';
                document.getElementById(pageId).classList.remove('hidden');
                
                // Update page title
                const pageTitle = this.textContent.trim();
                document.getElementById('page-title').textContent = pageTitle + (pageTitle === 'Analytics' ? ' Dashboard' : ' Management');
            });
        });
        
        // User menu dropdown
        const userMenuButton = document.getElementById('user-menu-button');
        const userMenu = document.getElementById('user-menu');
        
        userMenuButton.addEventListener('click', function() {
            userMenu.classList.toggle('hidden');
        });
        
        // Close dropdown when clicking outside
        document.addEventListener('click', function(e) {
            if (!userMenu.contains(e.target) && e.target !== userMenuButton) {
                userMenu.classList.add('hidden');
            }
        });
        
        // Modal handling
        function setupModal(openButtons, modalId, closeButtons) {
            const modal = document.getElementById(modalId);
            
            // Open modal
            if (typeof openButtons === 'string') {
                document.querySelectorAll(openButtons).forEach(btn => {
                    btn.addEventListener('click', function() {
                        modal.classList.remove('hidden');
                    });
                });
            } else {
                openButtons.forEach(btn => {
                    btn.addEventListener('click', function() {
                        modal.classList.remove('hidden');
                    });
                });
            }
            
            // Close modal
            closeButtons.forEach(btn => {
                btn.addEventListener('click', function() {
                    modal.classList.add('hidden');
                });
            });
            
            // Close when clicking outside modal
            modal.addEventListener('click', function(e) {
                if (e.target === modal) {
                    modal.classList.add('hidden');
                }
            });
        }
        
        // Setup all modals
        setupModal('.more-info-btn', 'user-info-modal', document.querySelectorAll('#user-info-modal .close-modal'));
        setupModal('.edit-user-btn', 'edit-user-modal', document.querySelectorAll('#edit-user-modal .close-modal'));
        setupModal('.terminate-user-btn', 'terminate-user-modal', document.querySelectorAll('#terminate-user-modal .close-modal'));
        setupModal('.view-message-btn', 'view-message-modal', document.querySelectorAll('#view-message-modal .close-modal'));
        setupModal('.add-model-btn', 'add-model-modal', document.querySelectorAll('#add-model-modal .close-modal'));
        setupModal('.add-dataset-btn', 'add-dataset-modal', document.querySelectorAll('#add-dataset-modal .close-modal'));
        setupModal('.remove-model-btn', 'remove-model-modal', document.querySelectorAll('#remove-model-modal .close-modal'));
        setupModal('.refresh-api-btn', 'refresh-api-modal', document.querySelectorAll('#refresh-api-modal .close-modal'));
        
        // Charts
        // Messages Chart
        const messagesCtx = document.getElementById('messagesChart').getContext('2d');
        const messagesChart = new Chart(messagesCtx, {
            type: 'line',
            data: {
                labels: Array.from({length: 30}, (_, i) => i + 1 + ' Oct'),
                datasets: [{
                    label: 'Messages Processed',
                    data: [1250, 1300, 1280, 1320, 1400, 1450, 1500, 1480, 1550, 1600, 1650, 1700, 1750, 1800, 1850, 1900, 1950, 2000, 2050, 2100, 2150, 2200, 2250, 2300, 2350, 2400, 2450, 2500, 2550, 2600],
                    borderColor: '#d10000',
                    backgroundColor: 'rgba(139, 0, 0, 0.1)',
                    tension: 0.4,
                    fill: true
                }]
            },
            options: {
                responsive: true,
                plugins: {
                    legend: {
                        display: false
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true,
                        grid: {
                            color: 'rgba(255, 255, 255, 0.1)'
                        },
                        ticks: {
                            color: '#999'
                        }
                    },
                    x: {
                        grid: {
                            color: 'rgba(255, 255, 255, 0.1)'
                        },
                        ticks: {
                            color: '#999'
                        }
                    }
                }
            }
        });
        
        // Users Chart
        const usersCtx = document.getElementById('usersChart').getContext('2d');
        const usersChart = new Chart(usersCtx, {
            type: 'bar',
            data: {
                labels: Array.from({length: 30}, (_, i) => i + 1 + ' Oct'),
                datasets: [{
                    label: 'New Users',
                    data: [15, 20, 18, 22, 25, 28, 30, 32, 35, 38, 40, 42, 45, 48, 50, 52, 55, 58, 60, 62, 65, 68, 70, 72, 75, 78, 80, 82, 85, 90],
                    backgroundColor: 'rgba(0, 123, 255, 0.7)',
                    borderColor: 'rgba(0, 123, 255, 1)',
                    borderWidth: 1
                }]
            },
            options: {
                responsive: true,
                plugins: {
                    legend: {
                        display: false
                    }
                },
                scales: {
                    y: {
                        beginAtZero: true,
                        grid: {
                            color: 'rgba(255, 255, 255, 0.1)'
                        },
                        ticks: {
                            color: '#999'
                        }
                    },
                    x: {
                        grid: {
                            color: 'rgba(255, 255, 255, 0.1)'
                        },
                        ticks: {
                            color: '#999'
                        }
                    }
                }
            }
        });
    </script>
</body>
</html>