/* --- SIMPLIFIED PROFILE WRAPPER (Global) --- */
.profile-wrapper { 
  position: relative; 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  cursor: pointer; 
  padding: 4px 12px;
  border-radius: 8px; 
  transition: background 0.2s;
}
.profile-wrapper:hover { background: rgba(0,0,0,0.05); }

.header-profile-img {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  border: 2px solid #e2e2ec; 
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: #555555;
  margin-bottom: 2px;
}

/* Dropdown Menu */
.profile-dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  width: 200px;
  background: #ffffff; 
  border: 1px solid #e2e2ec;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.profile-wrapper:hover .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex; /* Changed from flex to block to allow full width for settings */
  display: block; 
  width: 100%; /* Full width fills the dropdown */
  padding: 10px 16px;
  font-size: 0.9rem;
  color: #222222;
  transition: background 0.2s;
  cursor: pointer;
  text-decoration: none; /* Ensure no underline */
}

.dropdown-item:hover {
  background: #f3f4f8;
  color: #2c2f78;
}

/* Special Styling for the Settings Link */
.dropdown-item.settings-link {
  color: var(--primary); /* Primary color for visibility */
  font-weight: 600;
  border-left: 3px solid var(--border-color); /* Left border accent */
  padding-left: 13px; /* Space for the border */
}

/* Dark Mode Support */
body.dark-mode .profile-dropdown {
  background: #1e1e26;
  border-color: #333340;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
body.dark-mode .dropdown-item { color: #f0f0f0; }
body.dark-mode .dropdown-item:hover { background: rgba(255,255,255,0.05); color: #fbb040; }
body.dark-mode .dropdown-item.settings-link { color: var(--accent); border-left-color: var(--accent); }

.dropdown-divider {
  height: 1px;
  background: #e2e2ec;
  margin: 6px 0;
}