Impact Life Executive Dashboard v16 - Purpose-Fit Executive Edition
==================================================================

WHAT CHANGED
------------
1. Executive alerts are no longer treated as final until payment analytics reaches 100% and the Claims summary check completes.
2. Dashboard health is driven by api_sync_settings (enabled status, last status and last successful sync) instead of hard-coded "Live" labels.
3. Added target_settings.php for Company, Branch and Product monthly targets.
4. Target achievement now follows the active management scope:
   - Company target for unfiltered company view
   - Branch target for Branch-only view
   - Product target for Product-only view
   - Disabled for Product Type-only views and simultaneous Branch + Product filters
5. Added server-side full filtered CSV exports through export.php for Payments and Claims.
6. Added Claims scope protection: Branch filtering is not applied to Claims because the Claims API has no branch field; branch-level Claims Ratio is shown as N/A.
7. Month-over-month growth now shows N/A if the selected range excludes the prior month.
8. Current-month projection is only calculated from a complete month-to-date range beginning on day 1.
9. Updated dashboard/service-worker assets to v16.
10. Runtime cache data and HTTP debug logs are not shipped in the deployment package.

DEPLOYMENT
----------
1. Back up the current application and database.
2. Replace the application files with this package.
3. Fresh installation: import install.sql.
4. Existing v15 installation: no new database migration is required for v16; dashboard_targets already exists in install.sql.
5. Open sync_settings.php and confirm the API settings/token.
6. Test Payments and Claims with a known-good one-day range.
7. Run a manual/backfill sync where required.
8. Open target_settings.php and enter the management-approved monthly targets.
9. Open dashboard.php and confirm:
   - sync health is accurate;
   - payment analytics reaches 100%;
   - claims totals load;
   - CEO alerts appear only after the final checks;
   - Branch-filtered Claims Ratio shows N/A;
   - Payments and Claims exports download the complete filtered dataset.
10. Keep cron running every minute; the application enforces the configured interval (default 10 minutes).

SECURITY
--------
Prefer UPSTREAM_BEARER_TOKEN and DB_* environment variables in production.
Do not deploy old cache/*.json files or populated logs/upstream_api_debug.log files from test environments.
