{% extends "base.html" %} {% block title %}{{ _("Billing & Plan") }}{% endblock %} {% block content %}
{{ _("Manage your ModuleDesk subscription and AI credits.") }}
{# ── Flash banners ── #} {% if topup_success %}{{ _("MAX trial active") }} — {% if days_left == 0 %}{{ _("last day today") }}{% else %}{% trans count=days_left %}{{ count }} day remaining{% pluralize %}{{ count }} days remaining{% endtrans %}{% endif %}
{% trans %}You have full MAX access during your trial. After it ends, the account moves to the Free plan unless you subscribe.{% endtrans %}
STRIPE_SECRET_KEY and price IDs to enable billing.{% endtrans %}
{{ _("Current Plan") }}
€{{ plan_prices.premium }}{{ _("/mo") }}
{% elif effective_plan in ('max', 'internal') %}{% if effective_plan == 'internal' %}Internal{% else %}€{{ plan_prices.max }}{{ _("/mo") }}{% endif %}
{% else %}Free
{% endif %}{{ _("AI Credits") }}
{% if ai_limit is none %}{{ _("Unlimited") }}
{{ _("BYOK or internal plan") }}
{% else %}{{ ai_used }} / {{ ai_limit }}
{# Progress bar #} {% set pct = [(ai_used / ai_limit * 100)|int, 100]|min %}{% trans ai_extra=ai_extra %}+{{ ai_extra }} extra credits purchased{% endtrans %}
{% else %}{{ _("resets monthly") }}
{% endif %} {% endif %}{{ _("Module Slots") }}
{% if module_limit is none %}{{ modules_used }} / {{ _("Unlimited") }}
{% else %}{{ modules_used }} / {{ module_limit }}
{% set mpct = [(modules_used / module_limit * 100)|int, 100]|min %}{% trans extra=extra_slots, count=n_units %}+{{ extra }} extra slots ({{ count }} add-on unit){% pluralize %}+{{ extra }} extra slots ({{ count }} add-on units){% endtrans %}
{% endif %}€0{{ _("/mo") }}
€{{ plan_prices.premium }}{{ _("/mo") }}
€{{ plan_prices.max }}{{ _("/mo") }}
{{ _("Extra credits are added immediately, persist across billing cycles and never expire.") }}
{% if not stripe_ok %}{{ _("Payments are not configured yet.") }}{% else %}{{ _("Top-up packs are not configured yet.") }}{% endif %}
{% else %} {# Three packs as a row of cards. The largest is marked "Best value" because its per-credit price genuinely is the lowest — the label is not decoration. #}{{ _("If you are an EU business, enter your VAT ID for reverse-charge invoicing. We verify it via VIES.") }}
{{ _("Add 5 extra module slots per unit for €5/month (recurring). Current base: 6 slots.") }}