<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Fox Fitt - Work & Payroll{% endblock %}</title>
    {% if project_description %}
    <meta name="description" content="{{ project_description }}">
    {% endif %}
    {% load static %}
    <!-- Bootstrap 5 CDN -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
    <style>
        body { font-family: 'Inter', sans-serif; }
    </style>
    {% block head %}{% endblock %}
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #0f172a;">
        <div class="container">
            <a class="navbar-brand heading-font fw-bold" href="{% url 'home' %}">
                <span style="color: #10b981;">Fox</span> Fitt
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto align-items-center">
                    <li class="nav-item"><a class="nav-link" href="{% url 'home' %}">Dashboard</a></li>
                    <li class="nav-item"><a class="nav-link" href="{% url 'log_attendance' %}">Log Work</a></li>
                    <li class="nav-item"><a class="nav-link" href="{% url 'work_log_list' %}">History</a></li>
                    <li class="nav-item"><a class="nav-link" href="{% url 'payroll_dashboard' %}">Payroll</a></li>
                    <li class="nav-item"><a class="nav-link" href="{% url 'loan_list' %}">Loans</a></li>
                    <li class="nav-item"><a class="nav-link" href="{% url 'manage_resources' %}">Manage</a></li>
                    <li class="nav-item ms-lg-3"><a class="btn btn-sm btn-outline-light" href="/admin/">Admin Panel</a></li>
                </ul>
            </div>
        </div>
    </nav>

    <main>
        {% if messages %}
        <div class="container mt-3">
            {% for message in messages %}
            <div class="alert alert-{{ message.tags|default:'info' }} alert-dismissible fade show" role="alert">
                {{ message }}
                <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
            </div>
            {% endfor %}
        </div>
        {% endif %}
        
        {% block content %}{% endblock %}
    </main>

    <footer class="py-4 mt-5 border-top bg-light">
        <div class="container text-center text-muted small">
            &copy; 2026 Fox Fitt Management System. All rights reserved.
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>