.navbar {
  position: sticky;
  top: 12px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  margin: 12px auto 0;
  max-width: var(--container-max);
  border-radius: var(--radius-full);
  /* Trong suốt hơn hẳn - để lộ rõ nội dung/nền phía sau, chỉ còn lớp kính mờ nhẹ */
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.08) 45%, rgba(255,255,255,0.16) 100%);
  -webkit-backdrop-filter: var(--blur-lg) saturate(180%);
  backdrop-filter: var(--blur-lg) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  isolation: isolate;
}

/* Vệt sáng bóng loáng quét chéo qua navbar - hiệu ứng "glass shine" */
.navbar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 45%;
  height: 200%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(8deg);
  animation: navbarShine 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes navbarShine {
  0% { left: -60%; }
  35% { left: 130%; }
  100% { left: 130%; }
}

.navbar__brand,
.navbar__nav,
.navbar__user {
  position: relative;
  z-index: 2;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.navbar__brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--color-primary);
}

.navbar__brand-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.navbar__nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.navbar__nav-btn svg {
  width: 18px;
  height: 18px;
}

.navbar__nav-btn.is-active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.navbar__nav-btn:hover:not(.is-active) {
  background: rgba(124, 92, 255, 0.14);
  color: var(--color-primary);
}

.navbar__user {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: visible;
}

.navbar__user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-white);
  background: #d9dbe3;
}

.navbar__user-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid var(--color-white);
}

.navbar__nav-btn .navbar__nav-label {
  display: none;
}

@media (min-width: 768px) {
  .navbar__nav-btn {
    width: auto;
    padding: 0 14px;
    gap: 6px;
  }

  .navbar__nav-btn .navbar__nav-label {
    display: inline;
    font-size: 13px;
    font-weight: 700;
  }
}
