{% extends "ui/templates/base/layout.html" %}
{% block content %}
<div class="space-y-6">
  <div class="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
    <div>
      <h2 class="text-2xl font-semibold text-slate-900">Clients</h2>
      <p class="text-sm text-slate-500">Association-aware list view.</p>
    </div>

    <div class="flex gap-3">
      {% if can_export %}
      <a href="/clients/export?q={{ q }}&status={{ status }}&client_type={{ client_type }}&include_archived={{ include_archived }}&sort_by={{ sort_by }}&sort_order={{ sort_order }}"
         class="inline-flex rounded-xl border border-slate-300 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
        Export CSV
      </a>
      {% endif %}

      {% if can_import %}
      <a href="/clients/import"
         class="inline-flex rounded-xl border border-slate-300 px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50">
        Import Clients
      </a>
      {% endif %}

      {% if can_create %}
      <a href="/clients/new"
         class="inline-flex rounded-xl bg-brand-600 px-4 py-2 text-sm font-medium text-white hover:bg-brand-700">
        Add Client
      </a>
      {% endif %}
    </div>
  </div>

  {% include "modules/clients/templates/clients/partials/table.html" %}
</div>
{% endblock %}