flowchart TD
    subgraph "User"
        U((User))
    end

    subgraph "Authentication Use Cases"
        UC1(Sign In)
        UC2(Sign Out)
        UC3(Password Reset)
    end

    subgraph "Event Management Use Cases"
        UC4(Create Event)
        UC5(View Event Details)
        UC6(List Events)
    end

    subgraph "Invoice Management Use Cases"
        UC7(List Invoices)
        UC8(View Invoice Details)
    end

    subgraph "Staff Management Use Cases"
        UC9(View Assigned Staff)
        UC10(Rate Staff)
        UC11(Manual Clock In/Out)
    end

    subgraph "Profile Management Use Cases"
        UC12(View Profile)
        UC13(Edit Profile)
    end
    
    subgraph "Notification Use Cases"
        UC14(List Notifications)
        UC15(View Notification Details)
    end

    U --> UC1
    UC1 -- Success --> UC6
    UC1 -- Forgot Password --> UC3
    
    UC6 --> UC5
    UC5 --> UC9
    UC9 --> UC11
    UC5 --> UC10

    U --> UC4
    UC4 -- Success --> UC5

    UC6 -- Triggers --> UC7
    UC7 --> UC8
    UC8 -- View Event --> UC5

    U --> UC12
    UC12 --> UC13
    UC13 -- Success --> UC12

    U --> UC14
    UC14 --> UC15

    UC12 -- Sign Out --> UC2
    UC2 -- Success --> UC1
    
    %% Styling
    style UC1 fill:#f9f,stroke:#333,stroke-width:2px
    style UC2 fill:#f9f,stroke:#333,stroke-width:2px
    style UC3 fill:#f9f,stroke:#333,stroke-width:2px
    style UC4 fill:#bbf,stroke:#333,stroke-width:2px
    style UC5 fill:#bbf,stroke:#333,stroke-width:2px
    style UC6 fill:#bbf,stroke:#333,stroke-width:2px
    style UC7 fill:#bbf,stroke:#333,stroke-width:2px
    style UC8 fill:#bbf,stroke:#333,stroke-width:2px
    style UC9 fill:#bbf,stroke:#333,stroke-width:2px
    style UC10 fill:#bbf,stroke:#333,stroke-width:2px
    style UC11 fill:#bbf,stroke:#333,stroke-width:2px
    style UC12 fill:#bbf,stroke:#333,stroke-width:2px
    style UC13 fill:#bbf,stroke:#333,stroke-width:2px
    style UC14 fill:#bbf,stroke:#333,stroke-width:2px
    style UC15 fill:#bbf,stroke:#333,stroke-width:2px
