<!DOCTYPE html>
<html lang="en">
{% load static %}

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>City Cycle Admin</title>
  <meta content="" name="description">
  <meta content="" name="keywords">

  <!-- Favicons -->
  <link href="{% static 'adminapp/assets/img/d1.jpg' %}" rel="icon">
  <link href="{% static 'adminapp/assets/img/d1.jpg' %}" rel="apple-touch-icon">

  <!-- Google Fonts -->
  <link href="https://fonts.gstatic.com" rel="preconnect">
  <link
    href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|Nunito:300,400,600,700|Poppins:300,400,500,600,700"
    rel="stylesheet">

  <!-- Bootstrap CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
    integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">

  <!-- Icons & Vendor CSS -->
  <link href="{% static 'adminapp/assets/vendor/bootstrap-icons/bootstrap-icons.css' %}" rel="stylesheet">
  <link href="{% static 'adminapp/assets/vendor/boxicons/css/boxicons.min.css' %}" rel="stylesheet">
  <link href="{% static 'adminapp/assets/vendor/quill/quill.snow.css' %}" rel="stylesheet">
  <link href="{% static 'adminapp/assets/vendor/quill/quill.bubble.css' %}" rel="stylesheet">
  <link href="{% static 'adminapp/assets/vendor/remixicon/remixicon.css' %}" rel="stylesheet">
  <link href="{% static 'adminapp/assets/vendor/simple-datatables/style.css' %}" rel="stylesheet">

  <!-- Custom Styles -->
  <link href="{% static 'adminapp/assets/css/style.css' %}" rel="stylesheet">

  <!-- Inline CSS for sidebar and layout -->
  <style>
    body {
      padding-top: 80px;
      background-color: #f5f6fa;
    }

    .sidebar {
      background-color: #f8f9fa;
      min-height: 100vh;
      box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
      padding-top: 40px;
      
      padding-left: 15px;
      padding-right: 15px;
      position: fixed;
      width: 260px;
      transition: all 0.3s;
    }

    .col-8 {
      margin-left: 270px;
    }

    .sidebar-nav {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .sidebar-nav .nav-item {
      margin-bottom: 8px;
    }

    .sidebar-nav .nav-link {
      display: flex;
      align-items: center;
      font-size: 17px;
      font-weight: 600;
      color: #333;
      padding: 10px 15px;
      border-radius: 8px;
      transition: background 0.3s ease, color 0.3s ease;
    }

    .sidebar-nav .nav-link i {
      margin-right: 10px;
      font-size: 18px;
    }

    .sidebar-nav .nav-link:hover {
      background-color: #e0f0ff;
      color: #0d6efd;
    }

    .sidebar-nav .nav-link.active {
      background-color: #0d6efd;
      color: #fff;
    }

    .nav-content {
      padding-left: 20px;
    }

    .nav-content .nav-link {
      font-size: 14px;
      color: #555;
      padding: 8px 15px;
    }

    .nav-content .nav-link:hover {
      background: #e9f5ff;
      color: #0d6efd;
    }
  </style>
</head>

<body>

  <!-- ======= Header ======= -->
  <header id="header" class="header fixed-top d-flex align-items-center bg-white shadow-sm px-3">
    <div class="d-flex align-items-center justify-content-between w-100">
      <a href="{% url 'adminindex' %}" class="logo d-flex align-items-center text-decoration-none">
        <img src="{% static 'adminapp/assets/img/d1.jpg' %}" alt="" height="40" class="me-2">
        <span class="fs-4 fw-bold text-dark">City Cycle</span>
      </a>

      <div class="d-inline-flex align-items-center">
        {% if request.user.is_authenticated %}
        <div class="dropdown">
          <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton"
            data-bs-toggle="dropdown" aria-expanded="false">
            {{ request.user }}
          </button>
          <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
            <li><a class="dropdown-item {% if request.path == '/user_profile/' %}active{% endif %}"
                href="{% url 'user_profile' %}">My Profile</a></li>
            <li><a class="dropdown-item" href="{% url 'userlogout' %}">Logout</a></li>
          </ul>
        </div>
        {% else %}
        <a href="{% url 'userlogin' %}" class="btn btn-outline-primary">Login/Register</a>
        {% endif %}
      </div>
    </div>
  </header>

  <!-- ======= Sidebar ======= -->
  <div class="row">
    <div class="col-3">
      <aside id="sidebar" class="sidebar">
        <ul class="sidebar-nav" id="sidebar-nav">

          <li class="nav-item text-bold">
            <a class="nav-link" href="{% url 'adminindex' %}">
              <i class="bi bi-grid"></i><span>Dashboard</span>
            </a>
          </li>

          <li class="nav-item text-bold">
            <a class="nav-link collapsed" data-bs-target="#forms-nav" data-bs-toggle="collapse" href="#">
              <i class="bi bi-journal-text"></i><span>Category</span><i class="bi bi-chevron-down ms-auto"></i>
            </a>
            <ul id="forms-nav" class="nav-content collapse">
              <li><a href="{% url 'category_add' %}"><i class="bi bi-circle"></i><span>Category Add</span></a></li>
              <li><a href="{% url 'category_list' %}"><i class="bi bi-circle"></i><span>Category List</span></a></li>
            </ul>
          </li>

          <li class="nav-item text-bold">
            <a class="nav-link collapsed" data-bs-target="#forms-nav2" data-bs-toggle="collapse" href="#">
              <i class="bi bi-bicycle"></i><span>Bicycle</span><i class="bi bi-chevron-down ms-auto"></i>
            </a>
            <ul id="forms-nav2" class="nav-content collapse">
              <li><a href="{% url 'bike_add' %}"><i class="bi bi-circle"></i><span>Bicycle Add</span></a></li>
              <li><a href="{% url 'bike_list' %}"><i class="bi bi-circle"></i><span>Bicycle List</span></a></li>
            </ul>
          </li>

          <li class="nav-item text-bold">
            <a class="nav-link collapsed" data-bs-target="#forms-nav3" data-bs-toggle="collapse" href="#">
              <i class="bi bi-geo-alt"></i><span>Station</span><i class="bi bi-chevron-down ms-auto"></i>
            </a>
            <ul id="forms-nav3" class="nav-content collapse">
              <li><a href="{% url 'station_add' %}"><i class="bi bi-circle"></i><span>Station Add</span></a></li>
              <li><a href="{% url 'station_list' %}"><i class="bi bi-circle"></i><span>Station List</span></a></li>
            </ul>
          </li>

          <li class="nav-item text-bold">
            <a class="nav-link collapsed" href="{% url 'registered_users' %}">
              <i class="bi bi-people"></i><span>Registered Users</span>
            </a>
          </li>

          <li class="nav-item text-bold">
            <a class="nav-link collapsed" href="{% url 'user_profile' %}">
              <i class="bi bi-person"></i><span>Profile</span>
            </a>
          </li>

          <li class="nav-item text-bold">
            <a class="nav-link collapsed" href="{% url 'adminfeedback' %}">
              <i class="bi bi-chat-dots"></i><span>Feedback</span>
            </a>
          </li>

          <li class="nav-item text-bold">
            <a class="nav-link collapsed" href="{% url 'admin_enquiry' %}">
              <i class="bi bi-chat-dots"></i><span>Enquiry Contact</span>
            </a>
          </li>
        </ul>
      </aside>
    </div>

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

  <!-- ======= Footer ======= -->
  <footer id="footer" class="footer mt-5 text-center">
    <div class="copyright">
      &copy; Copyright <strong><span>City Cycle</span></strong>. All Rights Reserved
    </div>
    <div class="credits">
      Designed by <a href="">Demo!!</a>
    </div>
  </footer>

  <!-- Back to Top -->
  <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i
      class="bi bi-arrow-up-short"></i></a>

  <!-- Vendor JS Files -->
  <script src="{% static 'adminapp/assets/vendor/apexcharts/apexcharts.min.js' %}"></script>
  <script src="{% static 'adminapp/assets/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
  <script src="{% static 'adminapp/assets/vendor/chart.js/chart.umd.js' %}"></script>
  <script src="{% static 'adminapp/assets/vendor/echarts/echarts.min.js' %}"></script>
  <script src="{% static 'adminapp/assets/vendor/quill/quill.js' %}"></script>
  <script src="{% static 'adminapp/assets/vendor/simple-datatables/simple-datatables.js' %}"></script>
  <script src="{% static 'adminapp/assets/vendor/tinymce/tinymce.min.js' %}"></script>
  <script src="{% static 'adminapp/assets/vendor/php-email-form/validate.js' %}"></script>

  <!-- Template Main JS -->
  <script src="{% static 'adminapp/assets/js/main.js' %}"></script>

</body>

</html>
