{% load static themis_tags %}
<!DOCTYPE html>
<html lang="en" data-theme="{{ user_theme_name }}"
      data-light-theme="{{ user_theme_name }}"
      data-dark-theme="{{ user_dark_theme_name }}"
      data-theme-mode="{{ user_theme_mode }}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}{{ themis_app_name }}{% endblock %}</title>

    <!-- DaisyUI + Tailwind CDN -->
    <link href="https://cdn.jsdelivr.net/npm/daisyui@4/dist/full.min.css" rel="stylesheet">
    <script src="https://cdn.tailwindcss.com"></script>

    {% block extra_head %}{% endblock %}
</head>
<body class="min-h-screen flex flex-col"
      {% themis_body_attrs %}
      {% if themis_notifications_enabled %}data-notification-poll-interval="{{ themis_notification_poll_interval }}"
      data-notification-count-url="{% url 'themis:notification-count' %}"
      data-browser-notifications="{{ themis_browser_notifications_enabled|yesno:'true,false' }}"{% endif %}
      {% block body_attrs %}{% endblock %}>

    {% block navbar %}{% include "themis/includes/navbar.html" %}{% endblock %}

    {% include "themis/includes/messages.html" %}

    <main class="flex-1 container mx-auto px-4 py-6">
        {% block content %}{% endblock %}
    </main>

    {% block footer %}{% include "themis/includes/bottom_nav.html" %}{% endblock %}

    <!-- Theme toggle script -->
    <script src="{% static 'themis/js/theme-toggle.js' %}"></script>
    {% if themis_notifications_enabled %}
    <script src="{% static 'themis/js/notifications.js' %}"></script>
    {% endif %}
    {% block extra_scripts %}{% endblock %}
</body>
</html>
