<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        .header {
            background-color: #3b82f6;
            color: white;
            padding: 20px;
            text-align: center;
            border-radius: 5px;
        }
        .content {
            background-color: #f9fafb;
            padding: 20px;
            margin-top: 20px;
            border-radius: 5px;
        }
        .quote-details {
            background-color: white;
            padding: 15px;
            margin: 15px 0;
            border-left: 4px solid #3b82f6;
        }
        .quote-details table {
            width: 100%;
            border-collapse: collapse;
        }
        .quote-details td {
            padding: 8px 0;
        }
        .quote-details td:first-child {
            font-weight: bold;
            width: 40%;
        }
        .custom-message {
            background-color: #fef3c7;
            padding: 15px;
            margin: 15px 0;
            border-left: 4px solid #f59e0b;
            border-radius: 5px;
        }
        .footer {
            text-align: center;
            color: #6b7280;
            font-size: 12px;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #e5e7eb;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>{{ _('Quote') }} {{ quote.quote_number }}</h1>
    </div>
    
    <div class="content">
        <p>Hello,</p>
        
        <p>Please find attached quote <strong>{{ quote.quote_number }}</strong> for your review.</p>
        
        <div class="quote-details">
            <table>
                <tr>
                    <td>Quote Number:</td>
                    <td>{{ quote.quote_number }}</td>
                </tr>
                <tr>
                    <td>Title:</td>
                    <td>{{ quote.title }}</td>
                </tr>
                <tr>
                    <td>Date:</td>
                    <td>{{ quote.created_at|user_date if quote.created_at else 'N/A' }}</td>
                </tr>
                {% if quote.valid_until %}
                <tr>
                    <td>Valid Until:</td>
                    <td>{{ quote.valid_until|format_date }}</td>
                </tr>
                {% endif %}
                <tr>
                    <td>Amount:</td>
                    <td><strong>{{ quote.currency_code }} {{ "%.2f"|format(quote.total_amount) }}</strong></td>
                </tr>
            </table>
        </div>
        
        {% if custom_message %}
        <div class="custom-message">
            <p><strong>Message:</strong></p>
            <p>{{ custom_message }}</p>
        </div>
        {% endif %}
        
        <p>Please review the attached quote and let us know if you have any questions.</p>
        
        <p>Thank you for your interest!</p>
    </div>
    
    <div class="footer">
        <p><strong>{{ company_name }}</strong></p>
        <p>TimeTracker - Time Tracking & Project Management</p>
        <p>This quote was sent automatically. Please contact us if you have any questions.</p>
    </div>
</body>
</html>

