<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{% block title %}Hospital HRMS{% endblock %}</title>
  {% load static %}
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  <!-- Custom CSS -->
  <link rel="stylesheet" href="{% static 'css/custom.css' %}">
  {% block head %}{% endblock %}
</head>

<body>
  <!-- Sidebar -->
  <aside class="sidebar">
    <a href="/" class="sidebar-brand">
      <i class="fas fa-hospital-user"></i>
      <span>MediHR</span>
    </a>
    
    <nav class="nav-menu">
      <a href="{% url 'home' %}" class="nav-link {% if request.resolver_match.url_name == 'home' %}active{% endif %}">
        <i class="fas fa-th-large"></i>
        <span>Dashboard</span>
      </a>
      <a href="{% url 'attendance_list' %}" class="nav-link {% if request.resolver_match.url_name == 'attendance_list' %}active{% endif %}">
        <i class="fas fa-user-clock"></i>
        <span>Attendance</span>
      </a>
      <a href="{% url 'leave_list' %}" class="nav-link {% if request.resolver_match.url_name == 'leave_list' %}active{% endif %}">
        <i class="fas fa-calendar-minus"></i>
        <span>Leave Requests</span>
      </a>
      <a href="{% url 'employee_list' %}" class="nav-link {% if request.resolver_match.url_name == 'employee_list' %}active{% endif %}">
        <i class="fas fa-users"></i>
        <span>Employees</span>
      </a>
      <hr style="border-color: rgba(255,255,255,0.1)">
      <a href="/admin/" class="nav-link">
        <i class="fas fa-user-shield"></i>
        <span>Admin Panel</span>
      </a>
    </nav>
    
    <div class="mt-auto pt-4 border-top" style="border-color: rgba(255,255,255,0.1) !important">
        <div class="d-flex align-items-center">
            <div class="rounded-circle bg-primary d-flex align-items-center justify-content-center text-white" style="width: 32px; height: 32px; font-size: 0.8rem">HR</div>
            <div class="ms-2">
                <div class="small fw-bold text-white">HR Officer</div>
                <div class="text-muted" style="font-size: 0.7rem">System Administrator</div>
            </div>
        </div>
    </div>
  </aside>

  <!-- Main Content -->
  <main class="main-content">
    {% block content %}{% endblock %}
  </main>

  <!-- Bootstrap 5 JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>

</html>
