How safe is demat account

How secure is my investment in a demat account?,

Demat accounts are considered safe as they are regulated by SEBI and managed by depositories like NSDL and CDSL.