# Per-Controller Ticket Page Generation

## Pattern: Generate a summary page for one controller's tickets across multiple days

### Use case
User wants to see all tickets for a specific controller (e.g., Зозуля) across days 1-19.

### Data source
Individual day ticket files: `tickets/DD.MM.26.html` (note: NOT `YYYY-MM-DD.html`)

Each day file contains `<div class="entry-card">` sections with:
```html
<div class="entry-card">
  <h2>Прізвище</h2>
  <div class="entry-row"><b>Квитки:</b><span>N квитків</span></div>
  <div class="entry-row"><b>Дані:</b><span>details or —</span></div>
</div>
```

### Extraction regex
```python
entries = re.findall(
    r'<div class="entry-card"><h2>([^<]+)</h2>(.*?)</div>\s*</div>',
    html, re.DOTALL
)
for name, content in entries:
    cm = re.search(r'<b>Квитки:</b><span>(\d+)', content)
    cnt = int(cm.group(1)) if cm else 0
    dm = re.search(r'<b>Дані:</b><span>(.*?)</span>', content, re.DOTALL)
    det = dm.group(1).strip() if dm else "—"
```

### Output page structure
- Summary panel with total count
- Day grid (1-19) with count per day, color-coded (red border if > 0)
- Detail section listing each day's entries
- Navigation back to month page

### Important
- Use string concatenation (`+`), NOT f-strings with HTML content
- Use HTML entities for emoji (`&#127937;` not `🎫`)
- Weekend days get `weekend` class (gray background)
- Days with tickets get `has-tickets` class (red border)
