.nav > .nav-links > a[href="profile.html"],
.nav > .nav-links > #logoutButton {
  display: none;
}

.nav-right {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.nav-right .nav-links {
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
}

.profile-menu {
  position: relative;
  z-index: 1000;
  flex: 0 0 auto;
}

.profile-menu-button {
  display: inline-flex;
  min-width: 54px;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 8px 3px 4px;
  border: 1px solid #d7e4da;
  border-radius: 999px;
  color: var(--brand-green-dark, var(--brand-dark, #073c1e));
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(21, 52, 34, 0.08);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.profile-menu-button:hover,
.profile-menu-button[aria-expanded="true"] {
  border-color: #9fc4aa;
  box-shadow: 0 8px 22px rgba(21, 52, 34, 0.13);
  transform: translateY(-1px);
}

.profile-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(145deg, #0d6a3b, #17854c);
}

.profile-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-initials {
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.profile-avatar-fallback {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-menu-chevron {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.profile-menu-button[aria-expanded="true"] .profile-menu-chevron {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 184px;
  padding: 7px;
  border: 1px solid #dce6df;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(21, 52, 34, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.profile-dropdown[hidden] {
  display: none;
}

.profile-dropdown::before {
  position: absolute;
  top: -5px;
  right: 20px;
  width: 9px;
  height: 9px;
  border-top: 1px solid #dce6df;
  border-left: 1px solid #dce6df;
  background: #ffffff;
  content: "";
  transform: rotate(45deg);
}

.profile-dropdown-item {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  color: var(--text, #17211d);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.profile-dropdown-item svg {
  width: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-dropdown-item:hover,
.profile-dropdown-item:focus-visible {
  color: var(--brand-green-dark, var(--brand-dark, #073c1e));
  background: var(--brand-green-soft, var(--brand-pale, #f0f7f2));
}

.profile-dropdown-logout {
  color: #8b2e2e;
}

.profile-dropdown-logout:hover,
.profile-dropdown-logout:focus-visible {
  color: #7b1f1f;
  background: #fff0f0;
}

@media (max-width: 980px) {
  .nav-right {
    width: 100%;
    gap: 10px;
  }

  .nav-right .nav-links {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
}

@media (max-width: 560px) {
  .profile-menu-button {
    min-width: 42px;
    width: 42px;
    padding: 3px;
  }

  .profile-menu-chevron {
    display: none;
  }

  .profile-dropdown {
    position: fixed;
    top: 92px;
    right: 13px;
  }

  .profile-dropdown::before {
    display: none;
  }
}
