# Story 12.5: PDF Template Color Update - Dark Charcoal & Warm Gold

## Story

**As a** developer
**I want to** update PDF export templates to use the new dark charcoal and warm gold colors
**So that** all exported documents reflect the refined LIBRA for Rights branding

## Acceptance Criteria

### AC1: Users Export PDF Updated

**Given** `resources/views/pdf/users-export.blade.php` uses current colors
**When** I update the template
**Then** the following changes are applied:
- Header background: Dark Forest Green (`#2D3624`)
- Header text: White (`#FFFFFF`)
- Accent elements: Warm Gold (`#A68966`) or Gold Light (`#C4A882`)
- Table headers: Dark Forest Green background, white text
- Borders: Gold Light (`#C4A882`)
- Body text: Forest Green (`#2D322A`)

### AC2: Consultations Export PDF Updated

**Given** `resources/views/pdf/consultations-export.blade.php` uses current colors
**When** I update the template
**Then** colors match the new palette:
- Headers: Dark Forest Green background
- Status badges: Appropriate contrast colors
- Table styling: Gold accents

### AC3: Timelines Export PDF Updated

**Given** `resources/views/pdf/timelines-export.blade.php` uses current colors
**When** I update the template
**Then** colors match the new palette:
- Timeline markers: Warm Gold (`#A68966`)
- Section headers: Dark Forest Green background
- Borders and accents: Gold Light (`#C4A882`)

### AC4: Monthly Report PDF Updated

**Given** `resources/views/pdf/monthly-report.blade.php` uses current colors
**When** I update the template
**Then** the following changes are applied:
- Header/footer: Dark Forest Green background (`#2D3624`)
- Header/footer text: White
- Accent colors: Warm Gold (`#A68966`)
- Charts/graphs: Updated color scheme
- Text: Forest Green (`#2D322A`)

### AC5: Monthly Report Service Updated

**Given** `app/Services/MonthlyReportService.php` contains color references for charts
**When** I update the service
**Then** chart colors use new palette:
- Primary chart color: Warm Gold (`#A68966`)
- Secondary: Gold Light (`#C4A882`)
- Tertiary: Dark Forest Green (`#2D3624`)
- Quaternary: Olive Green (`#4A5D23`)

### AC6: Print-Friendly Colors

**Given** PDFs are often printed
**When** colors are updated
**Then** they remain legible when printed:
- Dark Forest Green (`#2D3624`) prints as dark green/gray - excellent contrast
- Warm Gold (`#A68966`) prints as medium tone - good visibility
- Sufficient contrast for all text
- Consider adding subtle borders for light-colored sections

### AC7: All PDF Exports Tested

**Given** the admin can export various data types
**When** I test each PDF export
**Then** colors display correctly and documents are professional:
- Users export
- Consultations export
- Timelines export
- Monthly report

## Technical Notes

### Files to Modify

**PDF Templates:**
- `resources/views/pdf/users-export.blade.php`
- `resources/views/pdf/consultations-export.blade.php`
- `resources/views/pdf/timelines-export.blade.php`
- `resources/views/pdf/monthly-report.blade.php`

**Services:**
- `app/Services/MonthlyReportService.php` (chart colors)

**Livewire Components (review for inline PDF styles):**
- `resources/views/livewire/admin/reports/monthly-report.blade.php`

**Tests:**
- `tests/Feature/Admin/PdfBrandColorsTest.php` (update color assertions)

### Color Mapping for PDFs

| Element | New Color | Hex |
|---------|-----------|-----|
| Primary Background | Dark Forest Green | `#2D3624` |
| Accent/Highlight | Warm Gold | `#A68966` |
| Light Accent | Gold Light | `#C4A882` |
| Page Background | Warm Cream | `#F4F1EA` |
| Text | Forest Green | `#2D322A` |
| Table Header BG | Dark Forest Green | `#2D3624` |
| Table Header Text | White | `#FFFFFF` |
| Borders | Gold Light | `#C4A882` |

### PDF Styling Notes

PDF templates use inline CSS. Common patterns to update:

```html
<!-- Header -->
<div style="background-color: #2D3624; color: #FFFFFF;">

<!-- Table Header -->
<th style="background-color: #2D3624; color: #FFFFFF;">

<!-- Accent Border -->
<div style="border-left: 4px solid #A68966;">

<!-- Text -->
<p style="color: #2D322A;">
```

### Chart Color Palette for Reports

```php
// Monthly Report Service chart colors
$chartColors = [
    'primary' => '#A68966',    // Warm Gold
    'secondary' => '#C4A882',  // Gold Light
    'tertiary' => '#2D3624',   // Dark Forest Green
    'quaternary' => '#4A5D23', // Olive Green
    'background' => '#F4F1EA', // Warm Cream
];
```

### Print Considerations

- Dark Forest Green (`#2D3624`) prints as dark green/gray - excellent readability
- Warm Gold (`#A68966`) prints as medium brown/tan - good visibility
- Gold Light (`#C4A882`) prints as light tan - use for borders/accents only
- Ensure table borders are visible in grayscale
- Test print preview in browser

## Dev Checklist

- [x] Update `users-export.blade.php` colors
- [x] Update `consultations-export.blade.php` colors
- [x] Update `timelines-export.blade.php` colors
- [x] Update `monthly-report.blade.php` colors
- [x] Update `MonthlyReportService.php` chart colors
- [x] Review `monthly-report.blade.php` Livewire component
- [x] Update `PdfBrandColorsTest.php` color assertions
- [ ] Test Users PDF export
- [ ] Test Consultations PDF export
- [ ] Test Timelines PDF export
- [ ] Test Monthly Report PDF generation
- [ ] Verify logo displays correctly in all PDFs
- [ ] Test print preview for readability
- [ ] Test grayscale printing

## Estimation

**Complexity:** Low-Medium
**Risk:** Low - PDF templates are isolated

## Dependencies

- Story 12.1 (Logo Deployment) - Completed
- Story 12.2 (Core CSS) should be completed for color reference consistency

---

## Dev Agent Record

### Status
Ready for Review

### Agent Model Used
Claude Opus 4.5 (claude-opus-4-5-20251101)

### File List

**Modified:**
- `resources/views/pdf/users-export.blade.php` - Updated colors to new palette
- `resources/views/pdf/consultations-export.blade.php` - Updated colors to new palette
- `resources/views/pdf/timelines-export.blade.php` - Updated colors to new palette
- `resources/views/pdf/monthly-report.blade.php` - Updated colors to new palette
- `app/Services/MonthlyReportService.php` - Updated chart colors
- `resources/views/livewire/admin/reports/monthly-report.blade.php` - Updated TOC number badge colors
- `tests/Feature/Admin/PdfBrandColorsTest.php` - Updated color assertions

### Change Log

| Date | Change |
|------|--------|
| 2026-01-04 | Story updated with new Dark Charcoal & Warm Gold palette |
| 2026-01-04 | Implementation complete: All PDF templates and service updated |

### Completion Notes
- All 4 PDF templates updated with new color palette:
  - Dark Forest Green (#2D3624) for headers and table header backgrounds
  - Warm Gold (#A68966) for accent text and highlights
  - Gold Light (#C4A882) for borders
  - Warm Cream (#F4F1EA) for backgrounds
  - Forest Green (#2D322A) for body text
  - White (#FFFFFF) for table header text
- MonthlyReportService chart colors updated (pie chart and trend line)
- Livewire monthly-report component TOC badges updated
- Test file updated with new color assertions - all 6 tests pass (44 assertions)
- Manual testing of PDF exports and print preview still required
