@page {
    size: A4;
    margin: 2cm 1.5cm 2.5cm 1.5cm;
    @bottom-center {
        content: element(footer);
    }
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    font-size: 11pt;
    margin-bottom: 60px; /* Add space for footer */
    min-height: 100vh;
    position: relative;
    padding-bottom: 100px; /* Space for footer */
}

/* Improve HTML display with margins */
@media screen {
    body {
        margin: 40px auto;
        max-width: 1000px;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        background-color: white;
        font-size: 12pt;
    }
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
}

/* PDF-only footer positioning (WeasyPrint) */
.footer {
    position: running(footer);
    text-align: center;
    font-size: 9pt;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Hide footer in HTML display */
@media screen {
    .footer {
        display: none !important;
    }
}

/* Make sure we don't have any fixed positioning in HTML */
html {
    height: 100%;
}

/* Override any fixed positioning for div.footer in HTML */
div.footer {
    position: running(footer);
    display: none;
}