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

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{% block title %}Qosh Tepa Project{% endblock %}</title>
  
  {% if project_description %}
  <meta name="description" content="{{ project_description }}">
  {% endif %}
  
  {% load static %}
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Inter:wght@400;500&display=swap" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  
  <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
  
  <style>
    :root {
      --primary-gradient: linear-gradient(135deg, #8E2DE2 0%, #F000B8 100%);
      --bg-dark: #0f0c29;
      --glass-bg: rgba(255, 255, 255, 0.1);
      --glass-border: rgba(255, 255, 255, 0.2);
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg-dark);
      background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
      color: #fff;
      min-height: 100vh;
      overflow-x: hidden;
    }

    h1, h2, h3, h4, .navbar-brand {
      font-family: 'Poppins', sans-serif;
      font-weight: 700;
    }

    .navbar {
      background: rgba(15, 12, 41, 0.8) !important;
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--glass-border);
    }

    .navbar-brand {
      background: var(--primary-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      font-size: 1.5rem;
    }

    .glass-card {
      background: var(--glass-bg);
      backdrop-filter: blur(15px);
      border: 1px solid var(--glass-border);
      border-radius: 20px;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .glass-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 30px rgba(142, 45, 226, 0.3);
    }

    .btn-primary-gradient {
      background: var(--primary-gradient);
      border: none;
      color: white;
      font-weight: 600;
      padding: 10px 25px;
      border-radius: 12px;
      transition: opacity 0.3s;
    }

    .btn-primary-gradient:hover {
      opacity: 0.9;
      color: white;
    }

    .sidebar-link {
      color: rgba(255, 255, 255, 0.7);
      text-decoration: none;
      padding: 10px 15px;
      display: block;
      border-radius: 10px;
      transition: all 0.3s;
    }

    .sidebar-link:hover, .sidebar-link.active {
      background: var(--glass-bg);
      color: #fff;
    }

    .stat-icon {
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: var(--primary-gradient);
      font-size: 1.5rem;
      margin-bottom: 15px;
    }
  </style>
  {% block head %}{% endblock %}
</head>

<body>
  <nav class="navbar navbar-expand-lg navbar-dark sticky-top">
    <div class="container-fluid">
      <a class="navbar-brand" href="/">Qosh Tepa Management</a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
        <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" href="/"><i class="fas fa-home me-1"></i> Dashboard</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/admin/"><i class="fas fa-user-shield me-1"></i> Admin</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>

  <div class="container-fluid py-4">
    <div class="row">
      <!-- Sidebar -->
      <div class="col-md-3 col-lg-2 d-none d-md-block">
        <div class="glass-card p-3 h-100">
          <h6 class="text-uppercase text-muted mb-3 small fw-bold">Departments</h6>
          <nav class="nav flex-column">
            <a class="sidebar-link active mb-2" href="#"><i class="fas fa-chart-line me-2"></i> Overview</a>
            <a class="sidebar-link mb-2" href="#"><i class="fas fa-building me-2"></i> Admin</a>
            <a class="sidebar-link mb-2" href="#"><i class="fas fa-shopping-cart me-2"></i> Procurement</a>
            <a class="sidebar-link mb-2" href="#"><i class="fas fa-boxes me-2"></i> Assets</a>
            <a class="sidebar-link mb-2" href="#"><i class="fas fa-truck me-2"></i> Transport</a>
            <a class="sidebar-link mb-2" href="#"><i class="fas fa-money-bill-wave me-2"></i> Finance</a>
            <a class="sidebar-link mb-2" href="#"><i class="fas fa-check-circle me-2"></i> Control</a>
            <a class="sidebar-link" href="#"><i class="fas fa-file-invoice me-2"></i> Invoices</a>
          </nav>
        </div>
      </div>

      <!-- Main Content -->
      <div class="col-md-9 col-lg-10">
        {% block content %}{% endblock %}
      </div>
    </div>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  {% block scripts %}{% endblock %}
</body>

</html>