<!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</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }
        header {
            background-color: #007bff;
            color: white;
            padding: 10px 20px;
            text-align: center;
        }
        nav {
            margin: 20px 0;
        }
        nav a {
            margin: 0 15px;
            color: #007bff;
            text-decoration: none;
            font-weight: bold;
        }
        .container {
            padding: 20px;
            background: white;
            border-radius: 5px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            max-width: 800px;
            margin: auto;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        th, td {
            padding: 10px;
            border: 1px solid #ddd;
            text-align: left;
        }
        th {
            background-color: #007bff;
            color: white;
        }
        .badge {
            padding: 5px 10px;
            border-radius: 5px;
            color: white;
        }
        .badge-pending { background-color: #ffc107; }
        .badge-approved { background-color: #28a745; }
        .badge-rejected { background-color: #dc3545; }
        button {
            padding: 5px 10px;
            margin: 0 5px;
            border: none;
            border-radius: 5px;
            color: white;
            cursor: pointer;
        }
        .approve { background-color: #28a745; }
        .reject { background-color: #dc3545; }
        .card {
            margin-top: 20px;
            padding: 15px;
            background: #e9ecef;
            border-radius: 5px;
        }
        input[type="email"], select {
            width: calc(100% - 20px);
            padding: 10px;
            margin-top: 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        button[type="submit"] {
            background-color: #007bff;
        }
    </style>
</head>
<body>
    <header>
        <h1>ICA Video Enterprise Sharing Platform</h1>
    </header>

    <nav>
        <a href="#upload">Upload Video Evidence</a>
        <a href="#requests">Video Requests</a>
        <a href="#admin">Admin Panel</a>
    </nav>

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

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

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

        <div id="requests" style="display: none;">
            <h2>Video Requests</h2>
            <table>
                <thead>
                    <tr>
                        <th>Request ID</th>
                        <th>Case Number</th>
                        <th>Requested By</th>
                        <th>Status</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>REQ-001</td>
                        <td>ICA-2023-001</td>
                        <td>Officer Tan</td>
                        <td><span class="badge badge-pending">Pending</span></td>
                        <td><button class="approve">Approve</button> <button class="reject">Reject</button></td>
                    </tr>
                    <tr>
                        <td>REQ-002</td>
                        <td>ICA-2023-002</td>
                        <td>Officer Lim</td>
                        <td><span class="badge badge-approved">Approved</span></td>
                        <td>-</td>
                    </tr>
                    <tr>
                        <td>REQ-003</td>
                        <td>ICA-2023-003</td>
                        <td>Officer Lee</td>
                        <td><span class="badge badge-rejected">Rejected</span></td>
                        <td>-</td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div id="admin" style="display: none;">
            <h2>Admin Panel</h2>
            <div class="card">
                <h3>Manage Users</h3>
                <form id="manage-users-form">
                    <label for="user-email">User Email:</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>System Settings</h3>
                <form id="system-settings-form">
                    <label for="maintenance-mode">Maintenance Mode:</label>
                    <select id="maintenance-mode" name="maintenance-mode">
                        <option value="off">Off</option>
                        <option value="on">On</option>
                    </select>

                    <button type="submit">Save Settings</button>
                </form>
            </div>
        </div>
    </div>

    <script>
        // Toggle visibility of sections based on navigation
        const links = document.querySelectorAll('nav a');
        const sections = document.querySelectorAll('.container > div');

        links.forEach(link => {
            link.addEventListener('click', (e) => {
                e.preventDefault();
                const target = link.getAttribute('href').substring(1);
                
                sections.forEach(section => {
                    section.style.display = 'none';
                });
                
                document.getElementById(target).style.display = 'block';
            });
        });

        // Show upload section by default
        document.getElementById('upload').style.display = 'block';

        // Handle upload form submission
        document.getElementById('upload-form').addEventListener('submit', (e) => {
            e.preventDefault();
            alert('Video evidence uploaded successfully!');
            // Reset form here if needed
            e.target.reset();
        });

        // Handle manage users form submission
        document.getElementById('manage-users-form').addEventListener('submit', (e) => {
            e.preventDefault();
            alert('User added successfully!');
            e.target.reset();
        });

        // Handle system settings form submission
        document.getElementById('system-settings-form').addEventListener('submit', (e) => {
            e.preventDefault();
            alert('Settings saved successfully!');
            e.target.reset();
        });
    </script>
</body>
</html>