{% load report %}

<head>
    <style>
        @page {
            {% block page_style %}
            {% block page_size %}
            size: {{ page_size }};
            {% endblock %}
            {% block page_margin %}
            margin: 2cm;
            {% endblock %}
            font-family: Arial, Helvetica, sans-serif;
            font-size: 75%;
            {% endblock %}

            @top-left {
                {% block top_left %}
                {% endblock %}
            }

            @top-center {
                {% block top_center %}
                {% endblock %}
            }

            @top-right {
                {% block top_right %}
                {% endblock %}
            }

            @bottom-left {
                {% block bottom_left %}
                {% endblock %}
            }

            @bottom-center {
                {% block bottom_center %}
                {% endblock %}
            }

            @bottom-right {
                {% block bottom_right %}
                content: "Page " counter(page) " of " counter(pages);
                {% endblock %}
            }
        }

        body {
            {% block body_style %}
            font-family: Arial, Helvetica, sans-serif;
            {% endblock %}
        }

        .header {
            {% block header_style %}
            top: 0px;
            left: 0px;
            position: fixed;
            width: 100%;
            margin-top: -2.5cm;
            {% endblock %}
        }

        .content {
            {% block content_style %}
            width: 100%;
            page-break-inside: auto;
            position: relative;
            {% endblock %}
        }

        .footer {
            {% block footer_style %}
            bottom: 0px;
            left: 0px;
            position: fixed;
            width: 100%;
            margin-bottom: -20mm;
            {% endblock %}
        }

        {% block style %}
        /* User defined styles go here */
        {% endblock %}

    </style>
</head>

<body>

    <div class='header'>
        {% block header_content %}
        {% endblock header_content %}
    </div>

    <div class='content'>
        {% block page_content %}
        {% endblock page_content %}
    </div>

    <div class='footer'>
        {% block footer_content %}
        {% endblock footer_content %}
    </div>

</body>
