MDH Bakery POS - QR Discount Unlock + Persistent Top Notifications
=================================================================

Baseline used
-------------
- Latest user-provided bakery(10).zip
- Latest user-provided engrgolk_bakery(20261008-105045).sql

Database
--------
NO SQL migration is required.
Do not alter or drop the existing discount tables.

Deployment
----------
1. Back up /public_html/bakery/ and the database.
2. Upload the FULL_DIRECT_EXTRACT ZIP into /public_html/bakery/ and extract/overwrite,
   OR upload only the UPDATE_ONLY ZIP into /public_html/bakery/ and extract/overwrite.
3. Close the currently open Bakery POS tab once and reopen it so the updated
   asset version/service-worker cache is loaded.
4. Test with an Admin/Super Admin and a normal cashier account.

New discount authorization workflow
-----------------------------------
Admin/Super Admin:
- Administration -> Discount Authorization QR
- Create a credential using only a label.
- The QR contains no discount percentage and no Rupee amount.
- Existing credentials remain revocable.

Normal cashier:
- Discount (Rs.) inputs are locked when a new POS sale starts.
- Click Scan Authorization QR and scan an active Admin/Owner QR.
- The browser sends the QR to the server immediately for validation.
- A short-lived one-sale token is returned; the raw QR is cleared from the form.
- Discount (Rs.) inputs are then enabled for the current sale.
- The actual Rupee discount is entered by the cashier.
- On completion, the token is consumed inside the sale transaction and linked to the sale.
- A new sale/cart clear requires authorization again.
- If the token expires or is invalid/revoked, the sale is rejected until a new QR is scanned.

Admin/Super Admin POS users with sale.discount permission:
- Discount (Rs.) remains directly enabled; no QR is required.

Notifications / toasts
----------------------
- Success and danger application notifications are promoted to a fixed top notification area.
- POS dynamic messages also use the same top notification system.
- Notifications do not auto-dismiss.
- Each notification has an X button and remains until the user closes it.
- Contextual warning/info blocks remain inline so operational instructions are not removed from their page context.

Unrelated functions
-------------------
The update does not intentionally change stock, production, purchases, third-party goods,
pricing, reporting, sessions, OTP authentication, payment calculations, FEFO, printing,
or other unrelated business logic.
