.master-detail-page {
  padding: 64px 0 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
}

.master-detail-header {
  position: fixed;
  top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 8px 16px;
  z-index: 25;
  transition: opacity 180ms ease;
}

.master-detail-title {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1b1b1b;
}

.master-detail-back,
.master-detail-edit {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.master-detail-back img,
.master-detail-edit img {
  width: 24px;
  height: 24px;
}

.master-detail-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.master-detail-loading,
.master-detail-error {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

.master-detail-card {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.master-detail-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  overflow: hidden;
}

.master-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.master-detail-avatar--image {
  background: #d1d5db !important;
}

.master-detail-name {
  font-size: 24px;
  font-weight: 600;
  color: #1B1B1B;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.master-detail-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
}

.master-detail-role__indicator {
  width: 4px;
  height: 16px;
  border-radius: 999px;
}

.master-detail-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 6px 0 10px;
}

.master-detail-action {
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #1B1B1B;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
}

.master-detail-action__icon {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: #1B1B1B;
  display: grid;
  place-items: center;
}

.master-detail-action__icon img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.master-detail-action--disabled {
  cursor: default;
}

.master-detail-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.master-detail-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.master-detail-row:last-child {
  border-bottom: none;
}

.master-detail-row__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.master-detail-row__label img {
  width: 16px;
  height: 16px;
}

.master-detail-row__value {
  font-size: 14px;
  font-weight: 600;
  color: #1B1B1B;
  text-align: right;
}

.master-detail-row--link {
  cursor: pointer;
}

.master-detail-row__value--icon {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.master-detail-row__value--icon img {
  width: 18px;
  height: 18px;
}

.master-detail-footer {
  width: 100%;
  margin-top: 6px;
}

.master-detail-btn {
  border: 1.5px solid #1B1B1B;
  border-radius: 16px;
  background: #fff;
  height: 48px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1b1b1b;
  cursor: pointer;
}

.master-detail-btn img {
  width: 18px;
  height: 18px;
}

.master-detail-btn--danger {
  border-color: #1B1B1B;
}
