{# F1 — Inbox-wiring status tile. Renders either standalone (HTMX fragment) or inline (settings index). Status semantics: green | yellow | red | unconfigured | None (failed to run). Color scheme mirrors the rest of the Settings page (slate-800 cards, accent dot). #}
{% if not inbox_status %} Inbox wiring {% elif inbox_status.status == 'green' %} Inbox wiring — healthy {% elif inbox_status.status == 'yellow' %} Inbox wiring — parsing trouble {% elif inbox_status.status == 'red' %} Inbox wiring — not delivering {% else %} Inbox wiring — unconfigured {% endif %}
{% if not inbox_status %}

Could not run the check (no DB connection).

{% else %}

{{ inbox_status.summary }}

{{ inbox_status.reason }}

{% if inbox_status.gmail_auth %}
Gmail: {% if inbox_status.gmail_auth.ok %}OK{% else %}{{ inbox_status.gmail_auth.error_kind }}{% endif %} — {{ inbox_status.gmail_auth.message }}
{% endif %} {% if inbox_status.imap_auth %}
IMAP: {% if inbox_status.imap_auth.ok %}OK{% else %}{{ inbox_status.imap_auth.error_kind }}{% endif %} — {{ inbox_status.imap_auth.message }}
{% endif %} {% endif %}