/* Profile Dropdown */
#profile-dropdown {
  position: fixed;
  top: 60px;
  right: 16px;
  width: 260px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 999999;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#profile-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
  visibility: visible;
}

.profile-dropdown-btn {
  cursor: pointer;
      width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: rgb(255, 255, 255);
    flex-shrink: 0;
}
.profile-dropdown-btn img {
  width: 100%;
  height: 100%;
  border-radius: 9px;
}

/* Header */
.pd-header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.pd-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfd, #8B7FFF);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.pd-user-info {
  text-align: left;
}

.pd-user-name {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
}

.pd-user-email {
  font-size: 11.5px;
  color: #888;
  margin-top: 1px;
}

/* Menu */
.pd-menu {
  padding: 8px 0;
}

.pd-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13.5px;
  color: #000000;
  text-decoration: none;
}

.pd-menu-item:hover {
  background: #f4f3ff;
  color: #7c5cfd;
}

.pd-menu-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.pd-menu-item:hover svg g path {
  fill: #7c5cfd;
}
.pd-menu-item:hover svg {
  opacity: 1;
}

/* Divider */
.pd-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 4px 0;
}

/* Log Out (red) */
.pd-menu-item.logout {
  color: #e74c3c;
}

.pd-menu-item.logout:hover {
  background: #fef2f2;
  color: #c0392b;
}

/* Backdrop (click outside to close) */
#profile-dropdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999998;
  display: none;
}

#profile-dropdown-backdrop.open {
  display: block;
}

#profile-dropdown-backdrop.backdrop {
  background: #00000066;
}