# EduNest v2 – what changed

## Design system (one look for all 3 portals)
- `assets/css/edunest.css` – single stylesheet: Inter font, light clean UI, cards, tables, buttons, forms, badges, mobile bottom-nav.
  Re-brand the whole app by editing the `--en-brand*` variables at the top.
- `includes/ui.php` – shared kit: SVG icons, role-based grouped navigation, app shell, login page, helper widgets.
- `includes/{header,sidebar,footer}.php`, `teacher/includes/*`, `student/includes/*` now just call the shell.
- Old pages (students, teachers, classes, exams, fees, notice, subjects, timetable, student fees/results/profile…)
  keep their logic and are re-skinned by the "legacy layer" at the bottom of edunest.css.

## Rewritten screens
- One login for Management / Teacher / Student with role tabs (same APIs as before): `login.php`, `teacher/login.php`, `student/login.php`
- Dashboards for all three roles.

## New features (SchoolChimes-style)
- Homework: teacher assigns, student views, management monitors.
- Events & Calendar: management creates, everyone sees.
- Teacher portal pages that existed in the menu but were missing: My Students, Attendance (segmented Present/Absent/Late), Enter Marks, Notices, Profile (+ change password).

## Fixed
- Broken menu links (student `student_dashboard.php` / `results.php`, teacher pages that didn't exist, student logout path).
- Removed test files (`teacher/test*.php`, `logout.phpn`).

## Install
1. Copy over your existing `sms/` folder (keeps your `uploads/`).
2. Run `database/001_new_modules.sql` (optional – auto-created otherwise).
3. Hard-refresh browsers / clear the PWA cache (bump `CACHE_NAME` in sw.js if needed).

## Next steps to make it more sellable
Rewrite the remaining legacy pages natively (students, fees, exams), add parent login, SMS/WhatsApp alerts, online fee payment, library, transport, ID cards, reports/PDF export.

## Database config
The DB config now lives inside the app: `config/db_sms_config.php` (edit host/db/user/password there).
`config/.htaccess` blocks direct web access. `includes/db.php` loads it for every page.
