<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Monthly Report</title>

    <style>
        body {
            font-family: Arial, sans-serif;
            font-size: 12px;
        }

        h2 {
            margin-bottom: 10px;
        }

        .section {
            margin-bottom: 20px;
        }

        .box {
            border: 1px solid #ddd;
            padding: 10px;
            margin-bottom: 10px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            border: 1px solid #ccc;
            padding: 6px;
        }

        th {
            background: #f5f5f5;
        }
    </style>
</head>

<body>

<h2>Monthly Property Report</h2>

<div class="section">
    <div class="box">
        <strong>Total Income:</strong> KES {{ financial.total_collected }}<br>
        <strong>Total Expenses:</strong> KES {{ financial.total_expenses }}<br>
        <strong>Net Profit:</strong> KES {{ financial.net_profit }}
    </div>
</div>

<div class="section">
    <h4>Arrears Summary</h4>
    <table>
        <tr><th>Range</th><th>Amount</th></tr>
        <tr><td>0–7 days</td><td>{{ arrears.range_0_7 }}</td></tr>
        <tr><td>8–30 days</td><td>{{ arrears.range_8_30 }}</td></tr>
        <tr><td>31–60 days</td><td>{{ arrears.range_31_60 }}</td></tr>
        <tr><td>60+ days</td><td>{{ arrears.range_60_plus }}</td></tr>
    </table>
</div>

<div class="section">
    <h4>Tax Summary</h4>
    <table>
        <tr><th>Mode</th><td>{{ tax.mode }}</td></tr>
        <tr><th>Gross Income</th><td>{{ tax.gross_income }}</td></tr>
        <tr><th>Tax Payable</th><td>{{ tax.tax_payable }}</td></tr>
    </table>
</div>

</body>
</html>