{# Anti-FOUC: apply dark class before any rendering #} {# Critical theme colors: painted before the Tailwind CDN generates its CSS #} {# Strings for the static JS bundle. Inline scripts run while the document is parsed, deferred ones only afterwards, so this is always set before app.js. #} {% if current_user.is_authenticated %} {# ── App shell: top nav + sidebar + content ── #} {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
{% for category, message in messages %}
{{ message }}
{% endfor %}
{% endif %} {% endwith %} {# Mobile floating sync button #} {# Notification permission banner #}
{# ── MAX bonus banner: shown to Premium orgs during their 30-day MAX taste ── #} {# max_bonus_days_left is None when no active bonus or stored plan != premium #} {% if max_bonus_days_left is not none and max_bonus_days_left <= 10 %}
{% if max_bonus_days_left <= 2 %}timer{% elif max_bonus_days_left <= 5 %}hourglass_bottom{% else %}rocket_launch{% endif %}

{% if max_bonus_days_left <= 2 %} {% trans count=max_bonus_days_left %}Last {{ count }} day!{% pluralize %}Last {{ count }} days!{% endtrans %} {% trans %}Your free taste of MAX ends soon — upgrade now to keep unlimited modules, team seats, and advanced features.{% endtrans %} {% elif max_bonus_days_left <= 5 %} {% trans days=max_bonus_days_left %}{{ days }} days left{% endtrans %} {% trans %}on your free MAX experience. Don't lose access to unlimited modules, credentials, and team features — upgrade before it expires.{% endtrans %} {% else %} {% trans days=max_bonus_days_left %}{{ days }} days left{% endtrans %} {% trans %}of your free MAX taste. You're enjoying all MAX features — upgrade to keep them permanently.{% endtrans %} {% endif %}

{{ _('Upgrade to MAX') }}
{% endif %} {% block content %}{% endblock %}
{% else %} {# ── Public layout (login) ── #}
{% block public_content %}{% endblock %}
{% endif %} {# Safelist div removed — Tailwind CLI scans all sources; classes are baked into tailwind.css #} {# ── Upgrade modal (shared, one per page) ── #}