/* Profile Compact */
.profile-compact {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-compact-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: none;
}

@media (min-width: 640px) {
  .profile-compact-name {
    display: block;
  }
}

.profile-compact-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  padding: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-compact-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--primary-glow);
}

.profile-compact-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--bg-card);
}

.profile-compact-avatar span:not(.profile-compact-status) {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  border: 2px solid var(--bg-card);
}

.profile-compact-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px var(--success);
}

/* Profile Dropdown - Updated */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 0;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: dropdownFade 0.15s ease;
  overflow: hidden;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}

.profile-dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-dropdown-info {
  min-width: 0;
  flex: 1;
}

.profile-dropdown-info p:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-role-badge {
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
  background: rgba(229, 57, 53, 0.15);
  color: var(--accent-light);
  font-weight: 500;
  font-size: 10px;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s ease;
  cursor: pointer;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
}

.profile-dropdown-item:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.profile-dropdown-item.text-error {
  color: var(--error);
}

.profile-dropdown-item.text-error:hover {
  background: rgba(239, 68, 68, 0.1);
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0;
}

/* Icon Button */
.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-icon:active {
  transform: scale(0.95);
}

/* =====================================================
   WEBMASS UI IMPROVEMENTS - Responsive & Modern
   ===================================================== */

