/* ===========================
   🌙 Elegant InJourney Navbar - Full Final Version
   FIX bell turun di mobile
=========================== */

/* --- Reset & Base --- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* --- Navbar Utama Full Kiri --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between !important; /* 🟦 FIX utama bell di kanan */
  background: rgba(250, 250, 252, 0.9);
  backdrop-filter: blur(10px);
  padding: 10px 16px;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 10px;
}

/* --- Grup Kiri: Hamburger, Logo, Brand --- */
.navbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 10px;

  flex: 1 1 auto;  /* 🟦 FIX kiri nggak memakan seluruh ruang */
  min-width: 0;    /* 🟦 FIX supaya brand shrink dan bell tidak turun */
}

/* brand auto shrink */
.brand-block {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Hamburger --- */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 26px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 6px;
  z-index: 1600;
  transition: transform 0.3s ease;
  margin-top: -50px;
}


.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  
}

/* Animasi ke bentuk X */
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Logo & Brand --- */
.logo {
  height: 34px;
  margin: 0;
}
.brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-left: 4px;
}

/* --- Sidebar Kanan (navbar-right) --- */
.navbar-right {
  position: fixed;
  top: 0;
  left: -260px;
  width: 240px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 70px;
  padding-left: 20px;
  padding-right: 20px;
  transition: all 0.35s ease-in-out;
  opacity: 0;
  z-index: 1500;
  overflow-y: auto;
}

.navbar-right.active {
  left: 0;
  opacity: 1;
}

.navbar-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 58, 138, 0.88);
  backdrop-filter: blur(8px);
  z-index: -1;
}

.navbar-right a {
  color: white;
  text-decoration: none;
  width: 100%;
  padding: 12px 0;
  margin: 8px 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.navbar-right a:hover {
  color: #ffd54f;
  transform: translateX(6px);
}

/* --- Overlay Saat Sidebar Terbuka --- */
body.sidebar-open {
  overflow: hidden;
}
body.sidebar-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1400;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ===========================
   ⚙️ Responsif
=========================== */
@media (max-width: 768px) {
  .navbar {
    padding: 10px 14px;
  }

  .navbar-left {
    gap: 8px;
  }

  .logo {
    height: 30px;
  }

  .brand {
    font-size: 1rem;
  }

  .navbar-right {
    width: 210px;
    padding: 70px 18px 18px 18px;
  }

  .navbar-right a {
    font-size: 0.95rem;
  }
}

/* ===========================
   🔔 FIX Notifikasi & Bell
=========================== */

/* Dropdown notifikasi fix ke kanan */
#notifDropdown {
    position: fixed !important;
    top: 65px !important;
    right: 20px !important;
    z-index: 99999 !important;

    width: 360px !important;
    max-height: 420px !important;
    overflow-y: auto;
}

/* Bell tetap di kanan */
#notifBtn {
    position: relative;
    z-index: 100000;
}

/* Badge tetap di atas bell */
#notifCount {
    z-index: 200000;
}
