{% extends "base.html" %}
{% block content %}

<div class="container mt-4">
    <h1 class="text-danger">⚠️ Admin Control Room</h1>
    <p class="text-muted">Restricted access. You are now viewing internal system controls.</p>
    <p class="text-muted">{{ message }}</p>
    <br>
    <a href="{{ url_for('logout') }}" class="btn btn-outline-secondary">Logout</a>
    <br>

    <div class="row">

        <!-- System Status -->
        <div class="col-md-6">
            <div class="card border-dark mb-4">
                <div class="card-header bg-dark text-white"><h2>System Status</h2></div>
                <div class="card-body">
                    <p>Firewall: <span class="badge bg-success">Active</span></p>
                    <p>Database Sync: <span class="badge bg-warning text-dark">Pending</span></p>
                    <p>Alerts: <span class="badge bg-danger">3 Critical</span></p>
                </div>
            </div>
        </div>
        <br>
        <!-- Controls -->
        <div class="col-md-6">
            <div class="card border-primary mb-4">
                <div class="card-header bg-primary text-white"><h2>Quick Actions</h2></div>
                <div class="card-body">
                    <form>
                        <div class="mb-3">
                            <label for="systemMode" class="form-label">System Mode</label>
                            <select class="form-select" id="systemMode">
                                <option>Normal</option>
                                <option>Maintenance</option>
                                <option>Lockdown</option>
                            </select>
                        </div>
                        <div class="form-check form-switch">
                            <input class="form-check-input" type="checkbox" id="autoBackup" checked>
                            <label class="form-check-label" for="autoBackup">Enable Auto Backup</label>
                        </div>
                        <div class="form-check form-switch mt-2">
                            <input class="form-check-input" type="checkbox" id="monitoring">
                            <label class="form-check-label" for="monitoring">Enable Intrusion Monitoring</label>
                        </div>
                        <button type="submit" class="btn btn-outline-danger mt-3" disabled>Apply Changes</button>
                    </form>
                </div>
            </div>
        </div>

    </div>
    <br>
    <!-- Logs -->
    <div class="card border-secondary">
        <div class="card-header bg-secondary text-white"><h2>Recent Access Logs</h2></div>
        <div class="card-body">
            <ul class="list-group">
                <li class="list-group-item">[2025-04-16 10:21] - Admin login from IP 192.168.0.21</li>
                <li class="list-group-item">[2025-04-16 09:53] - Attempted access to /repo by guest</li>
                <li class="list-group-item">[2025-04-16 09:12] - Backup completed successfully</li>
            </ul>
        </div>
    </div>
</div>

{% endblock %}
