PANEL(4) SPORTS INTEGRATION
===========================

What was added
--------------
1. Sports Management page: /sports.php
   - Sports ON/OFF switch
   - Menu title and upcoming-day control
   - Same multi-sport catalogue used by the supplied IBO sports page
   - Add/delete leagues
   - Add/edit/delete events
   - Manual refresh of the next configured league batch using the IBO/TheSportsDB refresh engine

2. App Sports API: /api/sports.php
   - Returns config, leagues and events
   - Supports ?days=N and ?type=soccer (or basketball, motorsport, fighting, etc.)

3. App feature advertisement
   Existing endpoints now include:
   - sports_enabled: true/false
   - sports.enabled
   - sports.position = "above_vpn"
   - sports.endpoint = URL to /api/sports.php
   - sports.webview = URL to /webview.php?fetch=sport

   Added to:
   - /api/index.php
   - /api/dns.php
   - /api/device/resolve.php

4. Sports WebView: /webview.php?fetch=sport
   - Three-column Sports -> Leagues -> Events interface
   - Remote/D-pad friendly
   - Uses the sports database/API data

5. Database migration
   config.php creates/migrates:
   - leagues
   - sport_events
   - sport_* settings

App-side requirement
--------------------
The supplied decompiled TiviMate project has now been integrated.

Implemented app logic:
1. Reads /api/sports.php and caches enabled/title.
2. If false: hides Sports and repairs D-pad navigation so My List goes directly to VPN.
3. If true: displays Sports immediately ABOVE VPN and repairs D-pad navigation My List -> Sports -> VPN -> Settings.
4. Sports opens /webview.php?fetch=sport inside an in-app WebView so the leagues/events configured here are exactly what the app shows.
5. The app refreshes Sports state on launch and whenever MainActivity resumes.
6. /api/sports.php also exposes top-level enabled/title/key fields for compatibility with the bundled native Sports fallback.

SERVER REQUIREMENTS
-------------------
Enable PHP PDO SQLite (pdo_sqlite/sqlite3) and cURL. The panel stores its data in
/data/panel.sqlite and the optional automatic sports refresh uses cURL.
