WinGo Exact Next-Result Override Fix
====================================

What is fixed
-------------

- The admin number is now saved together with the exact displayed WinGo period.
- Old history rows are immutable and can never consume a new override.
- Backlogged/unsynced old periods keep their provider result.
- The selected number stays active until that exact period result is saved.
- After that one result, automatic feed mode resumes.
- The same safe behavior is enabled for WinGo 30 Sec, 1 Min, 3 Min and 5 Min.
- Current draw, history and admin now use one UTC period formula. History feeds
  that arrive with an Asia/Kolkata-offset label are translated back to the
  exact UTC round without changing the provider's winning number.
- Invalid future-offset rows are removed only when no completed bet is tied to
  them. Existing settled history remains immutable.
- Winning payouts now deduct a mandatory fixed 2% tax before wallet credit and
  before the payout is stored in the winner popup, My History and transactions.
- An old/incorrect database tax setting cannot disable this 2% deduction.
- Example: 100 stake at 2X = 200 gross, minus 4 tax = 196 net payout.
- VIP experience is now credited from every accepted SaaS lottery stake at
  Bet Rs.1 = 1 EXP. Duplicate/retried requests cannot add EXP twice.
- Existing SaaS bets are backfilled once on first run, VIP levels are derived
  from total EXP, and level/monthly rewards continue through the existing
  one-time claim checks so rewards cannot be double-credited.

Deployment
----------

1. Upload the ZIP inside public_html and extract it there. This build places
   admin, api, assets, saas_lottery and the other site files directly at the
   ZIP root so they overwrite the live files instead of creating a nested
   project folder.
2. Preserve hidden .htaccess files while extracting.
3. Clear site/CDN cache and hard-refresh the admin and game pages.

Quick check
-----------

1. Open a WinGo admin page and note the displayed Period Id.
2. Select a number, for example 8.
3. Confirm the red banner shows both 8 and the same target period.
4. Wait for that period to close.
5. That exact period must show 8 in game history; older rows must remain unchanged.
6. The admin banner then returns to AUTO MODE.

VIP check
---------

1. Place a new Rs.100 lottery bet.
2. Open VIP and refresh once; My experience must increase by 100 EXP.
3. The VIP record list must contain that SaaS bet and the progress bar must use
   the updated total. A network retry of the same bet must not add EXP again.

Payout check
------------

1. Place a 100 stake on a WinGo selection with a 2X winning rate.
2. When it wins, the gross payout is 200.
3. Wallet, ledger and My History must all show a 196 net payout after 2% tax.

Note: the fix prevents future history changes. It does not rewrite an already
incorrect result stored in the live database before this build was installed.
Likewise, the payout correction applies to bets settled after deployment and
does not recalculate bets that were already settled.
