<div class="w-full max-w-3xl mx-auto px-4 py-6">
  <div class="bg-white/70 backdrop-blur rounded-2xl shadow border border-stone-200 p-6 sm:p-8 space-y-6">

    <h1 class="text-xl font-semibold tracking-tight">Tickets</h1>

    {% if tickets %}
      <div class="divide-y divide-stone-100">
        {% for ticket in tickets %}
          <div class="py-4 first:pt-0 last:pb-0">
            <div class="flex items-start justify-between gap-4">
              <div class="min-w-0 flex-1">
                <a href="{{ events_url('/tickets/' ~ ticket.code ~ '/') }}"
                   class="text-sm font-medium text-stone-800 hover:text-emerald-700 transition">
                  {{ ticket.entry_name }}
                </a>
                <div class="mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-stone-500">
                  <span>{{ ticket.entry_start_at.strftime('%d %b %Y, %H:%M') }}</span>
                  {% if ticket.calendar_name %}
                    <span>&middot; {{ ticket.calendar_name }}</span>
                  {% endif %}
                  {% if ticket.ticket_type_name %}
                    <span>&middot; {{ ticket.ticket_type_name }}</span>
                  {% endif %}
                </div>
              </div>
              <div class="flex-shrink-0">
                {% if ticket.state == 'checked_in' %}
                  <span class="inline-flex items-center rounded-full bg-blue-50 border border-blue-200 px-2.5 py-0.5 text-xs font-medium text-blue-700">checked in</span>
                {% elif ticket.state == 'confirmed' %}
                  <span class="inline-flex items-center rounded-full bg-emerald-50 border border-emerald-200 px-2.5 py-0.5 text-xs font-medium text-emerald-700">confirmed</span>
                {% else %}
                  <span class="inline-flex items-center rounded-full bg-amber-50 border border-amber-200 px-2.5 py-0.5 text-xs font-medium text-amber-700">{{ ticket.state }}</span>
                {% endif %}
              </div>
            </div>
          </div>
        {% endfor %}
      </div>
    {% else %}
      <p class="text-sm text-stone-500">No tickets yet.</p>
    {% endif %}

  </div>
</div>
