The receiver answers a FIN with the next client sequence slot.
The server acknowledges the FIN
The client sends FIN at sequence 1003. The server answers with ACK 1004.
ACK=1004
FIN then ACK
The timeline order is small: FIN first, ACK second.
messages=2
The server uses its own sequence number
The server's ACK segment uses server sequence 5001. That is separate from the client FIN count.
server seq=5001
Summary
The ACK confirms the FIN and asks for the next client sequence slot.
next client slot=1004