Find the smallest common element in all rows of a sorted integer matrix, or -1 if none.
Given a matrix mat with n rows where each row is sorted in ascending order, find the smallest element that appears in all rows. If no such element exists, return -1.
Each row contains unique elements within that row (sorted ascending), but the same element can appear in multiple rows.