# VIP Integration Map

## Modular structure
includes/VipFeatures.php → loader
includes/Vip/01_Core.php … 13_PhaseK.php

## Core flow wiring
- addInboundAccount: ensureUniqueRemark + PanelAPI::addClient (Sanaei/Alireza, fallback legacy)
- getJson: PanelAPI list first
- getOrderDetailKeys: volume left, web panel link + button
- increaseMyWallet: min/max VIP limits
- my configs list: 🟢/🔴
- freeTrial end: custom test message
- renewAccount: isServerNoRenew
- plan price: hourly server discount
- Admin VIP menu + vipAdminAllowed (sub-admin ACL via getAdminPermissions)

## Sub-admin ACL
If setting admin_perm_{id} is empty → previous full isAdmin access
If set with keys → only those permissions (+ main admin always full)
