<div style="text-align: center; border-bottom: 2px solid #333; padding-bottom: 20px; margin-bottom: 30px;">
    <h1 style="margin: 0; color: #333;">{{perusahaan}}</h1>
    <p style="margin: 5px 0;">{{alamat_perusahaan}}</p>
    <p style="margin: 0;">Telp: {{telepon_perusahaan}} | Email: {{email_perusahaan}}</p>
</div>

<div style="display: flex; justify-content: space-between; margin-bottom: 30px;">
    <div>
        <h2 style="margin: 0;">INVOICE</h2>
        <p>{{nomor_invoice}}</p>
    </div>
    <div style="text-align: right;">
        <p><strong>Tanggal:</strong> {{tanggal_invoice}}</p>
        <p><strong>Jatuh Tempo:</strong> {{tanggal_jatuh_tempo}}</p>
    </div>
</div><div style="margin-bottom: 30px;">
    <h3>Kepada:</h3>
    <p><strong>{{nama_pelanggan}}</strong></p>
    <p>{{alamat_pelanggan}}</p>
    <p>HP: {{nomor_hp}}</p>
</div>

<table style="width: 100%; border-collapse: collapse; margin: 20px 0;">
    <thead>
        <tr style="background: #f5f5f5;">
            <th style="border: 1px solid #ddd; padding: 10px; text-align: left;">Deskripsi</th>
            <th style="border: 1px solid #ddd; padding: 10px; text-align: left;">Periode</th>
            <th style="border: 1px solid #ddd; padding: 10px; text-align: right;">Jumlah</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="border: 1px solid #ddd; padding: 10px;">{{paket}}</td>
            <td style="border: 1px solid #ddd; padding: 10px;">{{periode_display}}</td>
            <td style="border: 1px solid #ddd; padding: 10px; text-align: right;">{{subtotal}}</td>
        </tr>
    </tbody>
    <tfoot>
        <tr style="background: #f5f5f5; font-weight: bold;">
            <td colspan="2" style="border: 1px solid #ddd; padding: 10px;">TOTAL</td>
            <td style="border: 1px solid #ddd; padding: 10px; text-align: right;">{{total_amount}}</td>
        </tr>
    </tfoot>
</table><div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #ddd;">
    <h4>Pembayaran:</h4>
    {{#if rekening_utama}}
    <p>Transfer ke: {{rekening_utama}}</p>
    {{/if}}
    
    <p style="margin-top: 20px;"><em>Terima kasih atas kepercayaan Anda.</em></p>
</div>