{% extends 'base.html' %}
{% load static %}

{% block title %}Clients - webFirma{% endblock %}

{% block content %}
<div class="main-header">
  <div class="main-header-left">
      <h1>Clients</h1>
      <p>You have {{ total_clients }} clients</p>
  </div>
  <div class="header-actions">
    <div class="search-bar">
        <i data-feather="search"></i>
        <input type="text" placeholder="Search clients...">
    </div>
    <a href="{% url 'add_client' %}" class="btn btn-primary">Add client</a>
  </div>
</div>

<div class="content-grid">
    {% if clients %}
        {% for client in clients %}
            <div class="project-card">
                <div class="card-header">
                    <h3>{{ client.name }}</h3>
                </div>
                <div class="card-body">
                    <p><strong>Email:</strong> {{ client.email }}</p>
                    <p><strong>Phone:</strong> {{ client.phone_number }}</p>
                </div>
            </div>
        {% endfor %}
    {% else %}
    <div class="empty-state">
        <div class="empty-state-icon">
            <i data-feather="users"></i>
        </div>
        <h2>No clients yet</h2>
        <p>You don't have any clients yet. Click the button to add your first client.</p>
        <a href="{% url 'add_client' %}" class="btn btn-primary">Add client</a>
    </div>
    {% endif %}
</div>
{% endblock %}
