<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>Admin Panel</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
  <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />


  <style>
    body {
      margin: 0;
      min-height: 100vh;
      background: #f3f8ff;
      font-family: 'Inter', Arial, sans-serif;
      display: flex;
      flex-direction: row;
    }

    /* ✨ Sidebar Glass + Animated Highlight Effect */
    .sidebar {
      width: 200px;
      height: 100vh;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 240, 255, 0.95)) !important;
      box-shadow: 2px 0 25px rgba(0, 0, 0, 0.08);
      backdrop-filter: blur(8px);
      border-right: 1px solid rgba(180, 200, 255, 0.3);
      z-index: 200;
      padding-top: 8px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      transition: all 0.3s ease-in-out;
      position: fixed;
      top: 0;
      left: 0;
      
    }

    .sidebar .logo {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding: 6px 0 6px 10px;
      margin-bottom: 10px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .sidebar .logo img {
      height: 30px;
      width: auto;
      margin-right: 6px;
    }

    .sidebar .word {
      color: #800000; font-size: 13px; line-height: 1.24;
    }

    /* 🔥 Sidebar Links */
    .sidebar a {
      display: flex;
      align-items: center;
      color: #2b5cb6 !important;
      text-decoration: none;
      padding: 11px 13px;
      font-size: 0.97rem;
      border-radius: 12px;
      margin: 10px 10px 0 10px;
      font-weight: 500;
      position: relative;
      overflow: hidden;
      transition: all 0.25s ease;
      z-index: 0;
      
    }

    /* Background Animation */
    .sidebar a::before {
      content: "";
      position: absolute;
      left: -100%;
      top: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, #a8c0ff, #3f2b96);
      opacity: 0;
      transition: all 0.4s ease;
      border-radius: 12px;
      z-index: -1;
    }

    .sidebar a:hover::before {
      left: 0;
      opacity: 0.12;
    }

    .sidebar a:hover {
      transform: translateX(6px);
      color: #1258e0 !important;
    }

    /* Icon bounce effect */
    .sidebar a i {
      margin-right: 8px;
      font-size: 1.1rem;
      transition: transform 0.2s, color 0.2s;
    }

    .sidebar a:hover i {
      transform: scale(1.1);
      color: #1258e0 !important;
    }

    /* Active link glow effect */
    .sidebar a.active {
      background: linear-gradient(90deg, rgba(80,120,255,0.15), rgba(120,180,255,0.2));
      color: #1258e0 !important;
      font-weight: 600;
      box-shadow: 0 0 8px rgba(80,120,255,0.15);
      border: 1px solid rgba(160, 190, 255, 0.4);
      transform: scale(1.03);
    }

    .sidebar a.active::before {
      left: 0;
      opacity: 0.2;
    }

    /* Logout Button */
    .sidebar form button {
      border-radius: 12px;
      margin-top: 12px;
      font-weight: 500;
      transition: 0.3s ease;
      margin-bottom: 20px;
    }

    .sidebar form button:hover {
      box-shadow: 0 3px 10px rgba(255, 0, 0, 0.3);
      transform: scale(1.03);
    }

    /* 🧭 Main Content */
    .main-content {
      flex-grow: 1;
      min-height: 100vh;
      background: #f3f8ff;
      display: flex;
      flex-direction: column;
      width: calc(100vw - 190px);
      margin-left: 190px;
    }

    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: #fff;
      padding: 10px 18px !important;
      position: relative;
      height: 48px;
      width: 100%;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .content-wrapper {
      padding: 18px 16px 16px 16px;
      flex-grow: 1;
      overflow-y: auto;
    }

    .dropdown-user-profile-name {
      font-size: 1.06rem;
      font-weight: 500;
    }
  </style>
</head>
<body>
  <div class="sidebar">
    <div class="logo">
      <img src="{{ asset('images/kent_logo2.png') }}" alt="Kent Logo">
      <div class="word"><strong>KENT</strong><br /><small>International Pvt. Ltd.</small></div>
    </div>

    <a href="{{ route('admin.dashboard') }}" class="{{ request()->routeIs('admin.dashboard') ? 'active' : '' }}"><i class="bi bi-house"></i> Dashboard</a>
    <a href="{{ route('admin.shipments') }}" class="{{ request()->routeIs('admin.shipments') ? 'active' : '' }}"><i class="bi bi-truck"></i> Shipments</a>
   <a href="{{ route('admin.invoices.index') }}" 
      class="{{ request()->routeIs('admin.invoices.index') ? 'active' : '' }}">
      <i class="bi bi-receipt"></i> Invoice
    </a>

    <a href="{{ route('admin.customers.index') }}" 
      class="{{ request()->routeIs('admin.customers.index') ? 'active' : '' }}">
      <i class="bi bi-people"></i> Customers
    </a>

    <a href="{{ route('admin.reports') }}" 
      class="{{ request()->routeIs('admin.reports') ? 'active' : '' }}">
      <i class="bi bi-graph-up"></i> Reports
    </a>


        <a href="{{ route('admin.chat_support') }}" class="{{ request()->routeIs('admin.chat_support') ? 'active' : '' }}"><i class="bi bi-chat-dots"></i> Chat Support</a>
<!-- <a href="{{ route('admin.orders.index') }}" 
   class="{{ request()->routeIs('admin.orders.*') ? 'active' : '' }}">
   <i class="bi bi-bag"></i> Orders
</a> -->
<a href="{{ route('admin.orders') }}"
   class="{{ request()->routeIs('admin.orders') ? 'active' : '' }}">
   <i class="bi bi-bag"></i> Orders
</a>
<a href="{{ route('admin.requests') }}" class="{{ request()->routeIs('admin.requests') ? 'active' : '' }}"><i class="bi bi-envelope"></i> Requests</a>
    <a href="{{ route('admin.staff') }}" class="{{ request()->routeIs('admin.staff') ? 'active' : '' }}"><i class="bi bi-person-badge"></i> Staff</a>
    <a href="{{ route('admin.account') }}" class="{{ request()->routeIs('admin.account') ? 'active' : '' }}"><i class="bi bi-gear"></i> Account</a>
    <a href="{{ route('admin.marklist.index') }}" class="{{ request()->routeIs('admin.marklist.index') ? 'active' : '' }}"><i class="bi bi-list-check"></i> Mark List</a>

    <!-- <form method="POST" action="{{ route('admin.logout') }}" class="mt-4 px-3">
      @csrf
      <button type="submit" class="btn btn-danger w-100"><i class="bi bi-box-arrow-right"></i> Logout</button>
    </form> -->
  </div>

  <div class="main-content">
    <header>
      <h5>@yield('page-title')</h5>
      <div class="d-flex align-items-center gap-3">
        <i class="bi bi-bell position-relative fs-4">
          <span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">2</span>
        </i>
        <div class="dropdown">
          <a href="#" class="d-flex align-items-center text-decoration-none dropdown-toggle" data-bs-toggle="dropdown">
            <img src="https://i.pravatar.cc/40" class="rounded-circle me-2" width="35" height="35">
            <span class="dropdown-user-profile-name">{{ Auth::guard('admin')->user()->name ?? 'User' }}</span>
          </a>
          <ul class="dropdown-menu dropdown-menu-end">
            <li><a class="dropdown-item" href="{{ route('admin.profile') }}"><i class="bi bi-person-circle me-2"></i>Profile</a></li>
            <li><hr class="dropdown-divider"></li>
            <li>
              <form method="POST" action="{{ route('admin.logout') }}">
                @csrf
                <button class="dropdown-item" type="submit"><i class="bi bi-box-arrow-right me-2"></i>Logout</button>
              </form>
            </li>
          </ul>
        </div>
      </div>
    </header>
    <div class="content-wrapper">
      @yield('content')
    </div>
  </div>
  
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
