{% extends "base.html" %}
{% block title %}{{ t.export_success_title }} - {{ config.APP_NAME }}{% endblock %}

{% block content %}
<main class="container-page" style="max-width:500px;margin:0 auto;padding:4rem 1rem;text-align:center">
  <div style="font-size:3rem;margin-bottom:1rem">&#10003;</div>
  <h1 style="font-size:1.5rem;margin-bottom:0.5rem">{{ t.export_success_title }}</h1>
  <p style="color:#64748B;margin-bottom:2rem">{{ t.export_success_subtitle }}</p>

  {% if exports %}
  {% for e in exports %}
  {% if e.status == 'ready' %}
  <a href="{{ url_for('planner.export_download', token=e.token) }}" class="btn" style="display:inline-block;padding:12px 32px">{{ t.export_download }}</a>
  {% else %}
  <div style="background:#FEF3C7;border:1px solid #FDE68A;border-radius:10px;padding:1rem;margin-bottom:1rem;font-size:0.875rem;color:#92400E">
    {{ t.export_success_status }}
  </div>
  <button onclick="window.location.reload()" class="btn-outline">{{ t.export_success_refresh }}</button>
  {% endif %}
  {% endfor %}
  {% endif %}

  <p style="margin-top:2rem">
    <a href="{{ url_for('planner.export') }}" style="color:#1D4ED8;font-size:0.875rem">{{ t.export_success_all }}</a>
    &middot;
    <a href="{{ url_for('planner.index') }}" style="color:#1D4ED8;font-size:0.875rem">{{ t.export_success_planner }}</a>
  </p>
</main>
{% endblock %}
