# Customization

Customize the appearance of your documents to reflect your brand. Logo, colors, and numbering formats are key elements of your fiscal and commercial identity.

## Logo

### Upload Your Logo

Upload a logo in **PNG** or **SVG** format with transparency. The recommended size is **1000x400 px** or larger to maintain quality in prints.

The logo appears in the upper left corner of:
- Invoices
- Quotes
- Credit notes
- Receipts

### Technical Requirements

- **Formats**: PNG, SVG (without external CSS styles)
- **Maximum size**: 5 MB
- **Minimum resolution**: 150 DPI for printing
- **Transparency**: Recommended for flexibility

### Design Tips

The logo must be legible in black and white, as PDFs may be printed in grayscale. Avoid gradients or effects that may not render correctly on older printers.

## Brand Color

### Accent Color Configuration

Choose a hexadecimal color that will be applied to:
- Headers in invoices and quotes
- Borders and dividing lines
- Buttons in interactive PDFs (if applicable)

The default color is **#1F2937** (dark gray). You can use any valid hexadecimal.

```
Example:
#2563EB (blue)
#DC2626 (red)
#059669 (green)
```

The application shows you a real-time preview of how your document will look with the selected color.

## Footer

### Custom Text in Documents

Add text to the footer that will appear on all your invoices, quotes, and credit notes.

Common use cases:
- Bank details (IBAN, BIC)
- Payment terms
- Legal or contact information
- Registration or license numbers

**Limit**: 500 characters. The text automatically adjusts to the document width.

```
Example:
Bank: BBVA | IBAN: ES91 0182 0981 2300 0123 4567
Payment term: 30 days from issue
CIF: A12345678 | Registered in the Commercial Registry
```

## Document Numbering

### Custom Patterns

Frihet automatically generates sequential numbers for invoices, quotes, and other documents. You can customize the format.

#### Available Variables

- `{YEAR}`: Current year (e.g.: 2024)
- `{MONTH}`: Month (01-12)
- `{SEQ}`: Sequential number (resets annually)
- `{CUSTOM}`: Custom prefix

#### Examples

```
FAC-2024-{SEQ}        → FAC-2024-0001, FAC-2024-0002
{YEAR}{MONTH}-{SEQ}   → 202401-0001, 202401-0002
INV-{CUSTOM}-{SEQ}    → INV-ACME-0001, INV-ACME-0002
{SEQ}/{YEAR}          → 0001/2024, 0002/2024
```

### Configuration by Document Type

You can use different patterns for:
- **Invoices**: `FAC-{YEAR}-{SEQ}`
- **Quotes**: `PRES-{YEAR}-{SEQ}`
- **Credit notes**: `NC-{YEAR}-{SEQ}`
- **Receipts**: `REC-{YEAR}-{SEQ}`

Frihet maintains an independent counter for each type, ensuring no duplicates.

## Preview

Before applying changes, the application generates an interactive preview showing how a document would look with your configuration.

If you are not satisfied, make adjustments and regenerate the preview. Changes are not applied until you click **Save**.

## Application to Existing Documents

Customization changes affect **only new documents**. Those already issued retain their original format, maintaining the immutability required by law.

If you need to regenerate old documents, download them with the new configuration from the document details (option **Regenerate PDF**).
---
