BURSARY FIX SUMMARY
===================

1. Bursary navigation uses the same Admin panel shell/sidebar markup and Admin panel CSS.

2. General/date-based predefined discounts are resolved against the BANK PAYMENT DATE.
   When exactly one predefined rule is eligible, it is automatic. Duplicate matching predefined
   rules block payment until the setup is corrected.

3. NEW-BILL DISCOUNT PERSISTENCE FIX
   The new school-fee bill screen no longer relies on the old one-request "bill + discount + payment"
   path, because the deployed endpoint was saving the original bill and treating the discounted
   amount as a partial payment.

   When a discount is selected/automatic, the frontend now uses the same authoritative sequence as
   Bill Details:
     a) create the bill with zero payment;
     b) call apply-discount for that exact bill;
     c) record the payment against the discounted bill.

   Example: original N300,000, discount N70,000, payment N230,000 should persist as:
     Original amount: N300,000
     Discount:        N70,000
     Net bill:        N230,000
     Paid:            N230,000
     Outstanding:     N0
   The receipt should therefore show the discount instead of N70,000 as a remaining partial balance.

4. FAMILY LINK WITHOUT FORMAL GUARDIAN RELATIONSHIP
   A guardian foreign-key/relationship is NOT required for the current family discount flow.
   Until a dedicated household/family table is introduced, the existing students.emergency_contact_phone
   field is used as an application-level Family / guardian phone.

   Admin -> Students should store the same VERIFIED phone on siblings. The app normalizes common
   Nigerian formats, so +2348012345678 and 08012345678 are treated as the same family link.
   If the API later provides family_id / household_id / guardian_id, those explicit identifiers
   automatically take priority over the phone fallback.

5. Family discounts remain EXACT-COUNT rules and only activate when all selected students share the
   same persisted family link. Selecting unrelated students together does not qualify them.

6. Related Children uses that same relationship key. Students without a family link are clearly
   identified and Admin is directed to populate the Family / guardian phone.

7. The Bursary screen redesign remains included: responsive forms, mobile record cards, dialogs,
   family checkout layout, and Admin-style navigation/theme.

SECURITY / BACKEND NOTE
-----------------------
The supplied frontend ZIP still does not contain the deployed fees.php source. Existing server
resources such as apply-discount and payments are used so discount persistence follows the backend's
current database workflow. For strongest anti-manipulation protection, fees.php should also independently
recalculate bank-date eligibility and family membership from authoritative student data instead of
trusting browser flags. If you later provide the deployed fees.php, that server-side verification can
be hardened as well.
