<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ICA Video Enterprise Sharing Platform (VESP)</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary-dark-blue: #00264d;
            --primary-red: #ED1C24;
            --secondary-white: #FFFFFF;
            --background-color: #F0F4F8;
            --text-color: #333333;
            --border-radius: 10px;
            --box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        }

        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Roboto', Arial, sans-serif;
            background-color: var(--background-color);
            color: var(--text-color);
            line-height: 1.6;
        }

        .container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            background-color: var(--primary-dark-blue);
            color: var(--secondary-white);
            padding: 1.5rem 0;
            box-shadow: var(--box-shadow);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo-container {
            display: flex;
            align-items: center;
        }

        .logo-image {
            height: 40px;
            margin-right: 10px;
        }

        .logo-text {
            font-size: 22px;
            font-weight: 700;
            color: var(--secondary-white);
        }

        nav ul {
            list-style: none;
            display: flex;
        }

        nav li {
            margin-left: 20px;
        }

        nav a {
            color: var(--secondary-white);
            text-decoration: none;
            font-weight: 500;
            padding: 5px 10px;
            transition: background-color 0.3s, opacity 0.3s;
            border-radius: 5px;
        }

        nav a:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }

        h1, h2, h3 {
            color: var(--primary-dark-blue);
            margin-bottom: 20px;
        }

        .card {
            background: linear-gradient(135deg, #ffffff 0%, #e6eaf0 100%);
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 30px;
            margin-bottom: 20px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            background-color: var(--secondary-white);
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--box-shadow);
        }

        th, td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }

        th {
            background-color: var(--primary-dark-blue);
            color: var(--secondary-white);
        }

        tr:last-child td {
            border-bottom: none;
        }

        .badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: bold;
        }

        .badge-pending { background-color: #FFA500; color: var(--secondary-white); }
        .badge-approved { background-color: #28A745; color: var(--secondary-white); }
        .badge-rejected { background-color: var(--primary-red); color: var(--secondary-white); }
        .badge-high { background-color: #d9534f; color: var(--secondary-white); }
        .badge-medium { background-color: #f0ad4e; color: var(--secondary-white); }
        .badge-low { background-color: #5bc0de; color: var(--secondary-white); }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                align-items: flex-start;
            }

            nav ul {
                margin-top: 10px;
            }

            nav li {
                margin-left: 0;
                margin-right: 20px;
            }
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
        }

        button {
            background-color: var(--primary-dark-blue);
            color: var(--secondary-white);
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s, transform 0.3s;
        }

        button:hover {
            transform: translateY(-3px);
            background-color: #001f3d;
        }

        button.secondary {
            background-color: var(--secondary-white);
            color: var(--primary-dark-blue);
            border: 1px solid var(--primary-dark-blue);
        }

        button.secondary:hover {
            background-color: #e0e0e0;
        }

        input, textarea, select {
            width: 100%;
            padding: 12px;
            border: 1px solid #ccc;
            border-radius: 5px;
            margin-bottom: 10px;
        }

        .priority-select {
            width: auto;
            display: inline-block;
        }
    </style>
</head>
<body>
<header>
    <div class="container header-content">
        <div class="logo-container">
            <img src="/path/to/ica-logo.png" alt="ICA Logo" class="logo-image">
            <span class="logo-text">ICA Video Enterprise Sharing Platform</span>
        </div>
        <nav>
            <ul>
                <li><a href="#" class="nav-link" data-target="dashboard">Dashboard</a></li>
                <li><a href="#" class="nav-link" data-target="upload">Upload</a></li>
                <li><a href="#" class="nav-link" data-target="requests">Requests</a></li>
                <li><a href="#" class="nav-link" data-target="cases">Cases</a></li>
                <li><a href="#" class="nav-link" data-target="analytics">Analytics</a></li>
                <li><a href="#" class="nav-link" data-target="admin">Admin</a></li>
                <li><a href="#" id="logout">Logout</a></li>
            </ul>
        </nav>
    </div>
</header>

<div id="dashboard" class="container tab-content active">
    <h1>Dashboard Overview</h1>
    <div class="stats-grid">
        <div class="card">
            <h3>Total Videos Uploaded</h3>
            <p>124 videos this month</p>
        </div>
        <div class="card">
            <h3>Requests Resolved within SLA</h3>
            <p>85% of requests this month</p>
        </div>
        <div class="card">
            <h3>Current Active Cases</h3>
            <p>12 ongoing cases</p>
        </div>
    </div>
</div>

<div id="upload" class="container tab-content">
    <h2>Upload Video Evidence</h2>
    <div class="card">
        <form id="upload-form">
            <label for="case-number">Case Number:</label>
            <input type="text" id="case-number" name="case-number" required>

            <label for="video-title">Video Title:</label>
            <input type="text" id="video-title" name="video-title" required>

            <label for="video-description">Description:</label>
            <textarea id="video-description" name="video-description" rows="4" required></textarea>

            <label for="video-file">Video File:</label>
            <input type="file" id="video-file" name="video-file" accept="video/*" required>

            <button type="submit">Upload Evidence</button>
        </form>
    </div>
</div>

<div id="requests" class="container tab-content">
    <h2>Video Evidence Requests</h2>
    <div class="card">
        <table>
            <thead>
                <tr>
                    <th>Request ID</th>
                    <th>Requesting Party</th>
                    <th>Case Number</th>
                    <th>Priority</th>
                    <th>Status</th>
                    <th>Actions</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>REQ-001</td>
                    <td>ICA Enforcement (Internal)</td>
                    <td>ICA-2023-005</td>
                    <td><span class="badge badge-high">High</span></td>
                    <td><span class="badge badge-pending">Pending</span></td>
                    <td>
                        <button onclick="approveRequest('REQ-001')">Approve</button>
                        <button class="secondary" onclick="rejectRequest('REQ-001')">Reject</button>
                    </td>
                </tr>
                <!-- Additional rows can be added here -->
            </tbody>
        </table>
    </div>
</div>

<div id="cases" class="container tab-content">
    <h2>Active Cases</h2>
    <div class="card">
        <table>
            <thead>
                <tr>
                    <th>Case Number</th>
                    <th>Description</th>
                    <th>Status</th>
                    <th>Last Updated</th>
                    <th>Actions</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>ICA-2023-007</td>
                    <td>Unauthorized Entry Incident</td>
                    <td><span class="badge badge-pending">In Progress</span></td>
                    <td>2023-04-20</td>
                    <td><button onclick="viewCase('ICA-2023-007')">View Details</button></td>
                </tr>
            </tbody>
        </table>
    </div>
</div>

<div id="analytics" class="container tab-content">
    <h2>Analytics Dashboard</h2>
    <div class="card">
        <h3>Video Uploads</h3>
        <p>This Month: 124 Videos</p>
        
        <h3>Request SLA Compliance</h3>
        <p>85% of requests met SLA</p>
        
        <h3>Priority Request Breakdown</h3>
        <ul>
            <li>High: 30%</li>
            <li>Medium: 50%</li>
            <li>Low: 20%</li>
        </ul>
    </div>
</div>

<div id="admin" class="container tab-content">
    <h2>Admin Panel</h2>
    <div class="card">
        <h3>Manage Users</h3>
        <form id="admin-manage-users-form">
            <label for="user-email">Email Address:</label>
            <input type="email" id="user-email" name="user-email" required>

            <label for="user-role">Role:</label>
            <select id="user-role" name="user-role">
                <option value="officer">Officer</option>
                <option value="admin">Admin</option>
            </select>

            <button type="submit">Add User</button>
        </form>
    </div>
    <div class="card">
        <h3>Current Users</h3>
        <ul id="user-list">
            <li>Officer Alice - alice@example.com <button onclick="removeUser('alice@example.com')">Remove</button></li>
            <li>Admin Bob - bob@example.com <button onclick="removeUser('bob@example.com')">Remove</button></li>
        </ul>
    </div>
</div>

<script>
    // Function to handle visibility of page sections based on navigation
    function showSection(event) {
        const targetId = event.currentTarget.getAttribute('data-target');
        const sections = document.querySelectorAll('.container.tab-content');

        sections.forEach(section => section.classList.remove('active'));
        document.getElementById(targetId).classList.add('active');
    }

    // Assign event listeners to navigation links
    document.querySelectorAll('.nav-link').forEach(link => {
        link.addEventListener('click', showSection);
    });

    // Function to approve a request
    function approveRequest(requestId) {
        alert(`Request ${requestId} approved.`);
    }

    // Function to reject a request
    function rejectRequest(requestId) {
        alert(`Request ${requestId} rejected.`);
    }

    function viewCase(caseId) {
        alert(`Viewing details for case ${caseId}.`);
    }

    // Function to remove a user
    function removeUser(email) {
        const confirmRemoval = confirm(`Are you sure you want to remove the user with email: ${email}?`);
        if (confirmRemoval) {
            // Logic to actually remove the user if integrated with a backend
            document.querySelector(`#user-list li:contains('${email}')`).remove();
            alert(`User ${email} removed successfully.`);
        }
    }
</script>
</body>
</html>