<div class="space-y-6">
  <div class="grid gap-4 md:grid-cols-3">
    <div class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft"><div class="text-xs font-semibold uppercase text-slate-500">Enabled Services</div><div class="mt-2 text-2xl font-bold">{{ overview.enabled_service_count }}</div></div>
    <div class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft"><div class="text-xs font-semibold uppercase text-slate-500">Missing Templates</div><div class="mt-2 text-2xl font-bold {% if overview.services_without_templates %}text-amber-700{% else %}text-emerald-700{% endif %}">{{ overview.services_without_templates }}</div></div>
    <div class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft"><div class="text-xs font-semibold uppercase text-slate-500">Action</div><div class="mt-3"><a href="/services" class="rounded-xl bg-brand-600 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-700">Open Firm Services</a></div></div>
  </div>
  <div class="rounded-3xl border border-slate-200 bg-white shadow-soft">
    <div class="border-b border-slate-100 p-5"><h2 class="text-lg font-bold text-slate-900">Services Setup</h2><p class="text-sm text-slate-500">Enabled services and firm task template readiness.</p></div>
    <div class="overflow-x-auto">
      <table class="min-w-full divide-y divide-slate-100 text-sm">
        <thead class="bg-slate-50 text-left text-xs font-semibold uppercase tracking-wide text-slate-500"><tr><th class="px-5 py-3">Service</th><th class="px-5 py-3">Category</th><th class="px-5 py-3">Recurrence</th><th class="px-5 py-3 text-right">Task Templates</th><th class="px-5 py-3">Status</th></tr></thead>
        <tbody class="divide-y divide-slate-100">
          {% for service in services %}
          <tr class="hover:bg-slate-50"><td class="px-5 py-3"><div class="font-semibold text-slate-900">{{ service.service_name }}</div><div class="text-xs text-slate-500">{{ service.service_code }}</div></td><td class="px-5 py-3">{{ service.category }}</td><td class="px-5 py-3">{{ service.recurrence_type }}</td><td class="px-5 py-3 text-right font-semibold">{{ service.template_count }}</td><td class="px-5 py-3"><span class="rounded-full px-2 py-1 text-xs font-semibold {% if service.ready %}bg-emerald-50 text-emerald-700{% else %}bg-amber-50 text-amber-700{% endif %}">{% if service.ready %}Ready{% else %}Template Pending{% endif %}</span></td></tr>
          {% else %}
          <tr><td colspan="5" class="px-5 py-8 text-center text-slate-500">No firm services selected yet.</td></tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
  </div>
</div>
