<nav class="fixed top-0 z-50 w-full border-b border-[#2E6B2A] bg-[#388E3C]">
  <div class="px-3 py-3 lg:px-5 lg:pl-3 flex items-center justify-between">
    <div class="flex items-center justify-start rtl:justify-end">
      <button 
        data-drawer-target="logo-sidebar" 
        data-drawer-toggle="logo-sidebar" 
        aria-controls="logo-sidebar" 
        type="button" 
        class="inline-flex items-center p-2 text-white rounded-lg sm:hidden hover:bg-[#2E6B2A] focus:outline-none focus:ring-2 focus:ring-white"
      >
        <span class="sr-only">Open sidebar</span>
        <svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
          <path clip-rule="evenodd" fill-rule="evenodd" d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z"></path>
        </svg>
      </button>
      <a href="#" class="flex ms-2 md:me-24 items-center">
        <img src="/assets/img/gallery/Cabai-Logo.png" class="h-8 me-3" alt="Logo SPK" />
        <span class="self-center text-xl font-semibold sm:text-2xl whitespace-nowrap text-white">SPK Kesesuaian Lahan Cabai</span>
      </a>
    </div>
    <div class="flex items-center ms-3 relative">
  <!-- Tombol user -->
  <button type="button" class="flex items-center bg-white rounded-full px-2 py-1 focus:ring-2 focus:ring-green-300" aria-expanded="false" data-dropdown-toggle="dropdown-user">
    <img class="w-8 h-8 rounded-full" src="/assets/img/gallery/duck.jpg" alt="user photo">
    <span class=" px-3 py-1 bg-white text-gray-800 rounded-full text-sm font-medium">{{ auth()->user()->username }}</span>
  </button>

  <!-- Dropdown menu -->
  <div class="z-50 hidden absolute right-0 top-12 my-4 text-base list-none bg-gray-100 divide-y divide-[#FF0000] rounded-sm shadow-sm" id="dropdown-user">
    <ul class="py-1" role="none">
      <li>
        <a href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();" 
          class="block px-4 py-2 text-sm text-black hover:bg-[#FF0000] hover:text-white rounded" 
          role="menuitem">
          Sign out
        </a>

        <form id="logout-form" action="{{ route('logout') }}" method="POST" class="hidden">
          @csrf
        </form>
      </li>
    </ul>
  </div>
</div>

  </div>
</nav>
