# Installation

## Installer

Run from the report directory:

```bash
chmod +x install_fid_report_updates.sh
./install_fid_report_updates.sh
```

Or specify the target directory:

```bash
./install_fid_report_updates.sh /Users/rbutare/websites/fid/reports
```

## What changes

The installer replaces:

- `fid.perf.php`
- `report-ui.css`
- `report-ui.js`

It creates or updates:

- `docs/README.md`
- `docs/REQUIREMENTS.md`
- `docs/DEVELOPERS_GUIDE.md`
- `docs/CALCULATIONS.md`
- `docs/INSTALL.md`

It does not modify:

- `dbconn.php`
- `report-functions.php`
- `columns.json`

## Backup and validation

A timestamped backup is created under `backups/`. The installer validates `fid.perf.php` with `php -l` before and after replacement. It restores the three replaced application files and prior docs directory if the final lint fails.

## Responsive behavior

- Settings panels move from two columns to one column on narrow screens.
- Range information is two columns on wide screens and one column on narrower screens.
- Financial table retains readable columns and horizontally scrolls when the viewport is too narrow.
