============================================================
  AVA Courier & SkyWave Airlines — Complete Package
  Full-Stack PHP/MySQL + HTML/CSS/JS Website Suite
============================================================

WHAT'S INSIDE:
  /skywave/   → SkyWave Airlines flight booking website
  /delivery/  → AVA Courier delivery tracking system

Both systems share the SAME MySQL database (skywave_db)
and the SAME admin password.

============================================================
  SETUP GUIDE (Do These Steps In Order)
============================================================

STEP 1: UPLOAD FILES
  Upload BOTH folders (skywave/ and delivery/) to your
  web hosting's public_html or www root.
  Keep the folder structure exactly as is.

  Final structure should be:
    public_html/
      skywave/       ← Flight booking
      delivery/      ← Delivery tracking

STEP 2: DATABASE SETUP (phpMyAdmin)
  a) Create a database called: skywave_db
  b) Import FIRST:  skywave/backend/skywave_db.sql
  c) Import SECOND: delivery/backend/delivery_tables.sql
  (Both use the same skywave_db database)

STEP 3: EDIT DATABASE CREDENTIALS
  Edit BOTH config files with your MySQL username & password:
    skywave/backend/config/db.php
    delivery/backend/config/db.php

  Change these two lines in BOTH files:
    define('DB_USER', 'your_mysql_username');
    define('DB_PASS', 'your_mysql_password');

STEP 4: ADMIN LOGIN
  FLIGHT ADMIN:   yoursite.com/skywave/admin.html
  DELIVERY ADMIN: yoursite.com/delivery/admin.html

  BOTH use the same password: admin123
  Change it from the Flight Admin → Settings → Change Password

STEP 5: ADD CONTENT
  FLIGHTS: Login to skywave/admin.html → Manage Flights → Add Flight
           → Add dates, pricing for all cabin classes → Save
           Users see flights LIVE on the website immediately!

  PACKAGES: Login to delivery/admin.html → Create Package
            → Fill sender + recipient + package details → Create
            A unique AVA tracking ID is generated automatically
            → Share the ID with the recipient for tracking

STEP 6: CONFIGURE PAYMENTS
  Login to skywave/admin.html → Payment Methods
  → Fill in your wallet addresses, bank details, PayPal email
  → Toggle ON the ones you want → Save
  (These same payment methods appear in BOTH flight booking
   AND delivery payment page automatically!)

============================================================
  HOW THE SITES CONNECT
============================================================

  Both sites share:
  - Same MySQL database (skywave_db)
  - Same admin credentials (admins table)
  - Same payment methods (payment_methods table)

  From delivery site → Click "✈ Book Flight" → 3-second
  animation → redirects to skywave/index.html

  From skywave site → Click "📦 Track Parcel" → 3-second
  animation → redirects to delivery/index.html

  Browser remembers which site user last visited for 30 days!

============================================================
  FILE STRUCTURE
============================================================

  skywave/
    index.html          Homepage
    search.html         Flight search
    booking.html        4-step booking flow
    payment.html        Payment selection
    receipt.html        E-ticket / booking receipt
    tracker.html        Live flight tracker (satellite map)
    ticket.html         Printable boarding pass
    admin.html          Admin panel (flights, bookings, payments)
    js/api.js           Central API client
    css/style.css       Global styles
    backend/
      config/db.php     ← EDIT YOUR DB CREDENTIALS HERE
      api/flights.php   Flight CRUD API
      api/bookings.php  Booking management API
      api/payments.php  Payment methods API
      api/auth.php      Admin auth
      skywave_db.sql    ← IMPORT THIS FIRST IN PHPMYADMIN

  delivery/
    index.html          Homepage
    track.html          Package tracking + map + invoice
    about.html          About page
    policy.html         Shipping policy
    admin.html          Delivery admin panel
    js/api.js           Delivery API client
    css/style.css       Delivery styles
    backend/
      config/db.php     ← EDIT YOUR DB CREDENTIALS HERE
      api/packages.php  Package CRUD (admin)
      api/updates.php   Tracking updates (admin)
      api/public.php    Public tracking endpoint (no auth)
      api/auth.php      Admin auth
      api/contact.php   Contact form handler
      api/payments.php  Payment methods (shared)
      uploads/          Package images stored here
      delivery_tables.sql ← IMPORT THIS SECOND IN PHPMYADMIN

============================================================
  TRACKING ID FORMAT
============================================================

  Every package gets a unique ID like: AVA76Hj7I3lk9
  - Starts with "AVA"
  - Followed by 10 random alphanumeric characters
  - Case sensitive

============================================================
  DEFAULT ADMIN PASSWORD
============================================================
  admin123
  Change immediately from: skywave/admin.html → Settings

============================================================
