.profile-menu-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 13px;
  color: var(--text);
  background: var(--subtle-bg);
  border: 1px solid var(--line-soft);
  box-shadow: none;
}

.actions .profile-menu-button { flex: 0 0 auto; }

.profile-menu-button:hover,
.profile-menu-button.active {
  color: var(--emerald);
  background: var(--emerald-soft);
  border-color: var(--emerald);
}

.user-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--emerald-dark);
  border: 2px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.user-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--panel-strong);
}

.user-avatar img.hidden { display: none; }

.profile-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.profile-summary {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar-large .user-avatar {
  width: 112px;
  height: 112px;
  flex-basis: 112px;
  border-width: 4px;
  font-size: 28px;
  box-shadow: 0 14px 34px var(--shadow);
}

.profile-summary h3 { margin: 16px 0 3px; }
.profile-summary p { margin: 0; color: var(--muted); }
.profile-phone { margin-top: 8px; color: var(--muted); font-size: 13px; }
.profile-summary > small { margin-top: 8px; color: var(--muted); }
.profile-photo-actions { width: 100%; display: flex; justify-content: center; gap: 7px; margin-top: 18px; }
.profile-upload-label { cursor: pointer; }
.profile-main { min-width: 0; display: grid; gap: 14px; }
.profile-main .surface { margin: 0; }

@media (max-width: 760px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-summary { position: static; }
  .profile-menu-button > span:last-child { display: none; }
  .profile-menu-button { width: 44px; padding: 4px; justify-content: center; }
}

@media (max-width: 390px) {
  .profile-photo-actions { flex-direction: column; }
  .profile-photo-actions > * { width: 100%; }
}
