================================================================================
                          FON2FIX SYSTEM SITEMAP (v5.3)
================================================================================

1. GLOBAL HEADER & NAVIGATION
   - [BUTTON] 💾 BACKUP: Downloads Full System Zip (SQL + Source Code).
   - [BUTTON] 🔑 PASS: User password change modal.
   - [BUTTON] 🚪 LOGOUT: Secure session termination.
   - [TABS] Navigation:
     1. 🔧 REPAIR JOB
     2. 🛒 RETAIL SALE
     3. 📦 STOCK
     4. 📈 REPORT
     5. 👥 STAFF (Visible to Master or 'Endie' only)

--------------------------------------------------------------------------------

2. SYSTEM ARCHITECTURE & PERFORMANCE
   - No-Refresh Architecture (AJAX): 
     * Submitting forms (Repair, Retail, Stock) does NOT reload the page.
     * Tables auto-refresh instantly upon success.
   - Smart Notifications: 
     * Replaced browser popups with "Toast" bubbles (Top-Right corner).
     * Green for Success, Red for Errors.
   - LiteSpeed Optimization:
     * Dashboard HTML cached for 5 minutes (via PHP Headers).
     * API responses forced "No-Cache" for real-time data integrity.
     * OPcache enabled for instant script execution.
   - High-Definition Graphics:
     * QR Codes generated at 1200px (Retina quality) for sharp printing.
     * Charts rendered at 3x Device Pixel Ratio for crisp lines on high-res screens.

--------------------------------------------------------------------------------

3. AUTHENTICATION & SECURITY (RBAC)
   - Super-Admin ('Endie'):
     * Hardcoded bypass: Always has full access.
     * Cannot be deleted by anyone.
   - Staff Permissions:
     * 'can_edit' / 'can_delete' flags stored in DB.
     * Permissions applied dynamically to UI buttons.
   - Safeguards:
     * Users cannot delete themselves.
     * Master/Endie accounts protected from accidental deletion.

--------------------------------------------------------------------------------

4. 🔧 REPAIR JOB MODULE
   A. Create Ticket
      - Fields: Branch, Date, Customer, Phone, Model, IMEI, Passcode, Price, etc.
      - UX: Form auto-clears after submission without refresh.
   B. Job List
      - Columns: ID, Customer, Device, Price, Status.
      - Actions: [✏️] Edit, [📄] Invoice, [💬] WhatsApp, [🗑] Delete.

--------------------------------------------------------------------------------

5. 🛒 RETAIL SALE MODULE
   A. Smart Scanner (Global Listener)
      - Logic: Scanning anywhere auto-switches to Retail tab.
   B. Point of Sale (POS)
      - Stock Logic: Auto-Deducts qty from specific branch upon sale.
      - UX: Cart clears automatically after sale.
   C. Sales History
      - List of past transactions with Receipt printing.

--------------------------------------------------------------------------------

6. 📦 STOCK MANAGEMENT MODULE
   A. Quick Add Stock
      - Expanded Fields: Category, Model Group, Device Model, Cost, Supplier.
   B. Stock List
      - Live Editing: 'Endie' can click numbers to update stock instantly.
   C. QR Tools
      - High-Res Preview: 1200px generated image (scaled to 300px CSS).
      - No auto-print popup (Manual "Print" button).

--------------------------------------------------------------------------------

7. 👥 STAFF MANAGEMENT (Master / Endie Only)
   - [➕] ADD NEW STAFF Button: Create new user accounts (Username/Password).
   - User List Table: Shows all staff accounts.
   - Live Toggles: Checkboxes for Edit/Delete permissions.
   - [🔑] Reset Password: Force reset staff passwords.
   - [❌] Terminate: Permanently delete staff account (Restricted).

--------------------------------------------------------------------------------

8. 📈 REPORT & ANALYTICS MODULE
   - Filters: Start Date, End Date, Branch.
   - Visuals (High-Def):
     * 💳 Payment Methods (Doughnut Chart)
     * 🏢 Branch Performance (Pie Chart)
     * 📈 Sales Trend (Line Chart)
   - Breakdown: Detailed table of every transaction.
   - Summary Cards: Total Sales (RM), Transaction Count, Avg Ticket.