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

{% block title %}{{ project_name }} - Panel de Control{% endblock %}

{% block content %}
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">{{ project_name }}</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav ms-auto">
        <li class="nav-item">
          <a class="nav-link active" aria-current="page" href="#">Panel de Control</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="/admin">Administración</a>
        </li>
      </ul>
    </div>
  </div>
</nav>

<div class="hero-section text-center mb-5">
  <div class="container">
    <h1 class="display-4">Bienvenido al Asistente de Reparación</h1>
    <p class="lead">Su guía para diagnosticar y reparar máquinas Nespresso.</p>
  </div>
</div>

<div class="container">
  <div class="row text-center">
    
    <div class="col-md-6 col-lg-3 mb-4">
      <div class="card stat-card">
        <div class="card-body">
          <div class="stat-number">{{ intervention_count }}</div>
          <div class="card-title">Intervenciones Totales</div>
        </div>
      </div>
    </div>

    <div class="col-md-6 col-lg-3 mb-4">
      <div class="card stat-card">
        <div class="card-body">
          <div class="stat-number">{{ pending_interventions }}</div>
          <div class="card-title">Intervenciones Pendientes</div>
        </div>
      </div>
    </div>

    <div class="col-md-6 col-lg-3 mb-4">
      <div class="card stat-card">
        <div class="card-body">
          <div class="stat-number">{{ spare_part_count }}</div>
          <div class="card-title">Repuestos</div>
        </div>
      </div>
    </div>

    <div class="col-md-6 col-lg-3 mb-4">
      <div class="card stat-card">
        <div class="card-body">
          <div class="stat-number">{{ machine_model_count }}</div>
          <div class="card-title">Modelos de Máquinas</div>
        </div>
      </div>
    </div>

  </div>
</div>
{% endblock %}