# HomeSyncHub v5 Role Access + Theme Upgrade

## Role hierarchy

HomeSyncHub now uses a clean inherited role hierarchy:

```text
Superadmin
  includes Owner permissions
Owner
  includes Parent Admin permissions
Parent Admin
  includes Editor permissions
Editor
  can add/edit/delete family items and lists
Viewer
  read-only
Kid View
  child-safe view + complete assigned chores/tasks
```

## Permissions

| Permission | Superadmin | Owner | Parent Admin | Editor | Viewer | Kid View |
|---|---:|---:|---:|---:|---:|---:|
| View dashboard/calendar/lists/meals/rewards | Yes | Yes | Yes | Yes | Yes | Yes |
| Add/edit/delete events/tasks/chores/meals | Yes | Yes | Yes | Yes | No | No |
| Complete chores/tasks for points | Yes | Yes | Yes | Yes | No | Yes |
| Manage rewards/star values through chores | Yes | Yes | Yes | Limited | No | No |
| Manage family profiles/settings/display | Yes | Yes | Yes | No | No | No |
| Manage calendar sync records | Yes | Yes | Yes | No | No | No |
| Create invite codes | Yes | Yes | Limited | No | No | No |
| Create Parent Admin invites | Yes | Yes | No | No | No | No |
| Manage system users/roles | Yes | No | No | No | No | No |

## Invite flow

1. Owner or Parent Admin opens **Settings → Share Access**.
2. Create an invite code for a role.
3. New user opens registration and enters the invite code.
4. The new account joins the same family hub with the chosen role.

Blank invite code creates a brand-new **Owner** family hub.

## Superadmin bootstrap

A local Superadmin account is created automatically if no Superadmin exists:

```text
Email: superadmin@homesynchub.local
Password: ChangeMe123!
```

Change this before public deployment. This simple PWA build does not yet include a password-change screen.

## Light, Dark, and Auto modes

Settings now include:

```text
Dark
Light
Auto
```

The CSS has been strengthened for clearer text visibility, higher contrast panels, clearer form fields, and mobile-safe readability.
