{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Searing Sandwiches | POS & Stock</title>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        :root {
            --deep-obsidian: #1A1A1D;
            --vibrant-accent: #FF4500;
            --slate-gray: #4E4E50;
            --soft-white: #F5F5F7;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--deep-obsidian);
            color: var(--soft-white);
            min-height: 100vh;
        }

        .navbar {
            background-color: rgba(26, 26, 29, 0.9);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--slate-gray);
        }

        .vibrant-text {
            color: var(--vibrant-accent);
        }

        .btn-vibrant {
            background-color: var(--vibrant-accent);
            color: white;
            border: none;
            transition: all 0.3s ease;
        }

        .btn-vibrant:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
            color: white;
        }

        .card {
            background-color: #242428;
            border: 1px solid var(--slate-gray);
        }
    </style>
    {% block extra_css %}{% endblock %}
</head>
<body>
    <nav class="navbar navbar-expand-lg sticky-top">
        <div class="container">
            <a class="navbar-brand fw-bolder fs-3" href="{% url 'home' %}">
                <span class="vibrant-text">SEARING</span> SANDWICHES
            </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">
                    {% if user.is_authenticated %}
                        {% if user.profile.role == 'manager' %}
                            <li class="nav-item">
                                <a class="nav-link text-light me-3" href="{% url 'dashboard' %}">Dashboard</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link text-light me-3" href="{% url 'manage_users' %}">Users</a>
                            </li>
                        {% endif %}
                        <li class="nav-item">
                            <a class="nav-link text-light me-3" href="{% url 'pos' %}">POS</a>
                        </li>
                        <li class="nav-item">
                            <span class="text-secondary me-3">Hi, {{ user.username }}</span>
                        </li>
                        <li class="nav-item">
                            <a href="{% url 'logout' %}" class="btn btn-sm btn-outline-secondary">Logout</a>
                        </li>
                    {% else %}
                        <li class="nav-item">
                            <a href="{% url 'login' %}" class="btn btn-vibrant px-4">Login</a>
                        </li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>

    <main>
        {% block content %}{% endblock %}
    </main>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    {% block extra_js %}{% endblock %}
</body>
</html>
