TIDEWATER: setup
1. Create an empty MySQL database (for example tidewater), select it in phpMyAdmin, and import install.sql (one file).
2. Edit config.php: database name, user, password, base_url (with trailing slash), mail_from, and Sumsub keys if you use them.
3. Make sure the storage/avatars folder is writable by PHP (needed for profile photos) and the PHP GD extension is on.
4. Create admins: php create_admin.php you@example.com approver   (then a second one with: operator)
5. Open /  for the front page, /admin/login.php for the admin.
6. On a live server, delete install.sql and this file after setup, and keep PHP display_errors off.
Demo shortcut (no email or KYC provider): UPDATE users SET email_verified_at=NOW(), kyc_status='verified' WHERE email='test@example.com';

IDENTITY VERIFICATION
- config.php  'kyc_mode' => 'manual'  (customer uploads ID + selfie; admins review at /admin/kyc.php; works offline on XAMPP)
  or 'sumsub' (provider widget; needs keys and a public webhook).
- If you imported an earlier install.sql, run upgrade_kyc.sql once. New installs already include the table.
- Manual review is two steps: any admin recommends, then a DIFFERENT admin with the approver role decides.
- storage/kyc must be writable by PHP. It holds ID images, blocked from direct web access. Use HTTPS on a live site.

PAYMENT METHODS (deposits)
- Admin > Payment methods: approvers fill in the details for each method (bank, PayPal, wallet addresses) and switch each On or Off.
  A method only shows to customers when it is On and every detail has a value. Every change is audit-logged with old and new values.
- If you imported an earlier install.sql, run upgrade_payment_methods.sql once. New installs already include it.

EMAIL
- config.php 'mail_driver': 'log' (default; writes emails to storage/mail.log, no internet needed, copy verification links from it),
  'smtp' (recommended on a live site; fill smtp_host/port/secure/user/pass), or 'mail' (PHP mail()).
- Customers get emails for deposits, transfers, investments, identity decisions and adjustments. Staff alerts go to 'admin_alert_email'.
  Switch any type off in the 'notify' and 'admin_alerts' lists. Failed sends are recorded in the audit log as email.failed.
- storage/mail.log contains links and account details: use 'smtp' on a live site and delete the log file.
- SMTP is sent with PHPMailer (bundled in vendor/phpmailer, LGPL licence included).

INVESTMENT PLANS
- Admin > Investment plans (approvers edit): add or change plans, switch each On/Off. They show on the front page and the customers' Invest page.
- Each investment keeps the name and return it was opened with. If you imported an earlier install.sql, run upgrade_plans.sql once.
