graph TB
    ActiveDealer([Active Dealer]) --> DealerOps{Dealer Operations}
    
    %% Resignation Path
    DealerOps -->|Resignation Request| ResignStart[Dealer Sends Email to ZBH]
    ResignStart --> ResignRecord[ZBH Records in System]
    ResignRecord --> ResignZBH{ZBH Approval}
    
    ResignZBH -->|Rejected| ResignRejectZBH[Return to Previous Level & Notify]
    ResignZBH -->|Approved| ResignDDL{DD Lead Approval}
    
    ResignDDL -->|Rejected| ResignRejectDDL[Return to ZBH & Notify]
    ResignDDL -->|Approved| ResignNBH{NBH Approval}
    
    ResignNBH -->|Rejected| ResignRejectNBH[Return to DD Lead & Notify]
    ResignNBH -->|Approved| GenResignLetter[Generate Resignation Acceptance Letter]
    GenResignLetter --> SendResignLetter[NBH Approves & Shares Letter]
    SendResignLetter --> StartFF1[Start F&F Process]
    
    %% Termination Path
    DealerOps -->|Termination Initiated| TermStart[Identify Termination Reason]
    TermStart --> TermType{Termination Type}
    TermType -->|Immediate| TermDocs1[ASM Collects Documentation]
    TermType -->|By Convenience| TermDocs2[ASM Collects Documentation]
    
    TermDocs1 --> PrepNotes[Generate Termination Notes PDF]
    TermDocs2 --> PrepNotes
    
    PrepNotes --> TermZBH{ZBH Approval}
    TermZBH -->|Rejected| TermRejectZBH[Return & Notify]
    TermZBH -->|Approved| TermDDL{DD Lead Approval}
    
    TermDDL -->|Rejected| TermRejectDDL[Return to ZBH & Notify]
    TermDDL -->|Approved| TermNBH{NBH Approval}
    
    TermNBH -->|Rejected| TermRejectNBH[Return to DD Lead & Notify]
    TermNBH -->|Approved| TermCCO{CCO Approval}
    
    TermCCO -->|Rejected| TermRejectCCO[Return to NBH & Notify]
    TermCCO -->|Approved| TermCEO{CEO Approval}
    
    TermCEO -->|Rejected| TermRejectCEO[Return to CCO & Notify]
    TermCEO -->|Approved| IssueNotice[Generate Show Cause Notice]
    
    IssueNotice --> Send15Day[Send Notice with 15-Day Deadline]
    Send15Day --> WaitDealer{Dealer Response?}
    
    WaitDealer -->|Response Received| ReviewResponse[Review Response]
    WaitDealer -->|No Response| UploadTermLetter[DD Lead Uploads Signed Termination Letter]
    ReviewResponse --> FinalDecision{Final Decision}
    
    FinalDecision -->|Proceed| UploadTermLetter
    FinalDecision -->|Withdraw| TermWithdraw[Termination Withdrawn]
    
    UploadTermLetter --> StartFF2[Start F&F Process]
    
    %% Common F&F
    StartFF1 --> FFNotify[Send F&F Notification to All Stakeholders]
    StartFF2 --> FFNotify
    
    FFNotify --> FFTrack[F&F Tracking System Activated]
    FFTrack --> FFStakeholders[Each Stakeholder Receives Task]
    
    FFStakeholders --> FFFinance[Finance: Settlement Forms]
    FFStakeholders --> FFLegal[Legal: Clearance Forms]
    FFStakeholders --> FFOthers[Other Stakeholders: Respective Forms]
    
    FFFinance --> FFUpdate1[Update Status in System]
    FFLegal --> FFUpdate2[Update Status in System]
    FFOthers --> FFUpdate3[Update Status in System]
    
    FFUpdate1 --> FFCheck{All Tasks Complete?}
    FFUpdate2 --> FFCheck
    FFUpdate3 --> FFCheck
    
    FFCheck -->|No| FFReminder[Send Reminder if TAT Exceeded]
    FFReminder --> FFCheck
    
    FFCheck -->|Yes| BlockDealer[Block Dealer from System]
    BlockDealer --> FFComplete[Send Completion Email to All Stakeholders]
    
    FFComplete --> End([Offboarding Complete])
    ResignRejectZBH --> End
    ResignRejectDDL --> End
    ResignRejectNBH --> End
    TermRejectZBH --> End
    TermRejectDDL --> End
    TermRejectNBH --> End
    TermRejectCCO --> End
    TermRejectCEO --> End
    TermWithdraw --> End
    
    style ActiveDealer fill:#87CEEB
    style End fill:#FFB6C1
    style ResignNBH fill:#FFD700
    style TermCEO fill:#FFD700
    style BlockDealer fill:#FF6B6B
