:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --font-color: #333;
    --border-color: #dce1e6;
    --header-bg: #ffffff;
    --button-bg: #4a90e2;
    --button-hover-bg: #357ABD;
    --danger-button-bg: #d9534f;
    --danger-button-hover-bg: #c9302c;

    --color-workday: #ffffff;
    --color-paid-leave: #e3f2fd; /* 青 for 有給 */
    --color-holiday: #ffebee;    /* 赤 for 休日 */
    --color-regular-holiday-status: #e0f7fa; /* 水色 for 定休日 */
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--secondary-color);
    color: var(--font-color);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
}

.year-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.year-selector .year-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

#current-year-input {
    -moz-appearance: textfield;
    border: none;
    background-color: transparent;
    font-size: 1.5em;
    font-weight: 500;
    color: var(--font-color);
    font-family: inherit;
    text-align: right;
    width: 75px;
    padding: 2px 4px;
    margin: 0;
    border-radius: 4px;
    transition: all .2s ease;
}

#current-year-input:hover,
#current-year-input:focus {
    background-color: white;
    box-shadow: 0 0 0 1px var(--primary-color);
    outline: none;
}

#current-year-input::-webkit-outer-spin-button,
#current-year-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.year-input-container .year-unit {
    font-size: 1.5em;
    font-weight: 500;
    color: var(--font-color);
    margin-left: 2px;
}

.year-selector button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    cursor: pointer;
    color: var(--primary-color);
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.year-selector button:hover {
    background-color: var(--primary-color);
    color: white;
}

.month-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.month-tab {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--font-color);
}

.month-tab:hover {
    background-color: var(--secondary-color);
    border-color: #ccc;
    color: var(--primary-color);
}

.month-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 700;
}

#current-month {
    font-size: 1.2em;
    font-weight: 500;
    margin: 0 15px;
    min-width: 150px;
    text-align: center;
}

.month-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.month-selector button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    color: var(--primary-color);
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-selector button:hover {
    background-color: var(--primary-color);
    color: white;
}

main {
    max-width: 95%;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.user-settings {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    align-items: center;
}

.regular-holiday-settings {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.regular-holiday-settings h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--primary-color);
}

.day-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.day-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
}

.allowance-settings {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
    min-width: 350px;
}

.allowance-settings h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--primary-color);
}

.deduction-settings {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
    min-width: 350px;
}

.deduction-settings h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--primary-color);
}

.setting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item label {
    font-weight: 500;
}

.setting-item input {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 150px;
    font-family: 'Noto Sans JP', sans-serif;
}

.setting-item input.wide-input {
    width: 300px;
}

.setting-item .checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.summary {
    text-align: right;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.controls button, .dropdown-toggle {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--button-bg);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
}

#how-to-use-btn {
    background-color: #5bc0de;
}
#how-to-use-btn:hover {
    background-color: #31b0d5;
}

#paste-prev-month-btn {
    background-color: #f0ad4e;
}
#paste-prev-month-btn:hover {
    background-color: #ec971f;
}

#undo-btn, #redo-btn {
    background-color: #6c757d;
}
#undo-btn:hover, #redo-btn:hover {
    background-color: #5a6268;
}

.controls button:hover, .dropdown-toggle:hover {
    background-color: var(--button-hover-bg);
}

#save-to-server-btn {
    background-color: #28a745; /* Green for update/save */
    font-weight: 500;
}
#save-to-server-btn:hover {
    background-color: #218838;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 240px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
    border-radius: 5px;
    padding: 5px 0;
    border: 1px solid #ddd;
    top: 100%; /* Position below the button */
    left: 0;
    margin-top: 5px;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu button {
    color: black;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-menu button:hover {
    background-color: #e7e7e7;
}

.dropdown-menu .menu-separator {
    height: 1px;
    background-color: #e5e5e5;
    margin: 5px 0;
}

#reset-btn {
    background-color: var(--danger-button-bg);
}

#reset-btn:hover {
    background-color: var(--danger-button-hover-bg);
}

#payslip-preview {
    margin-top: 40px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--secondary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

#payslip-preview h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
}

#attendance-grid {
    width: 100%;
    height: 65vh;
    overflow: hidden; /* Handsontable manages its own scrolling */
}

/* Handsontable Customization */
.handsontable {
    font-size: 13px;
}

.handsontable th {
    background-color: #f0f3f6;
    color: #333;
    font-weight: 500;
}

.handsontable .htDimmed {
    color: #757575;
}

.handsontable .cell-workday { background-color: var(--color-workday); }
.handsontable .cell-holiday { background-color: var(--color-holiday); }
.handsontable .cell-paid-leave { background-color: var(--color-paid-leave); }
.handsontable .cell-regular-holiday-status { background-color: var(--color-regular-holiday-status); }


/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    font-family: 'Noto Sans JP', sans-serif;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-content.wide-modal {
    max-width: 800px;
}

.manual-content-area {
    height: 70vh;
    overflow-y: auto;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    white-space: pre-wrap;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    text-align: left;
    line-height: 1.5;
    font-size: 14px;
    color: #333;
}

.modal-overlay:not([style*="display: none"]) .modal-content {
    transform: translateY(0);
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.modal-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--button-bg);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
}

.modal-action-btn:hover {
    background-color: var(--button-hover-bg);
}

.modal-content h2 {
    text-align: center;
    margin-top: 0;
    color: var(--primary-color);
}

.modal-content p {
    margin-bottom: 0.5rem;
}

.payslip-details p {
    margin: 10px 0;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payslip-details p strong {
   padding-right: 1em;
}

.payslip-section-header {
    font-size: 1.1em !important;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 15px !important;
    margin-bottom: 5px !important;
    justify-content: center !important;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.payslip-details hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

.payslip-total {
    text-align: right;
    font-size: 1.3em !important;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 15px !important;
}

/* New Payslip Styles */

.payslip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
}

.payslip-header-left {
    text-align: left;
}

.payslip-header-right {
    text-align: right;
    flex-shrink: 0;
}

.payslip-company-name {
    font-size: 1.1em;
    font-weight: 500;
    margin: 0 0 5px 0;
    color: var(--font-color);
}

.payslip-company-address,
.payslip-company-phone {
    font-size: 0.9em;
    color: #555;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.payslip-period {
    font-size: 1.1em;
    font-weight: 500;
    color: #555;
    margin: 0;
}

.payslip-employee-name {
    font-size: 1.5em;
    font-weight: 700;
    margin: 5px 0 0 0;
    color: var(--font-color);
}

.payslip-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.summary-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}

.summary-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.summary-value {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--font-color);
}

.summary-item.net-pay {
    background-color: var(--primary-color);
    color: white;
}

.summary-item.net-pay .summary-label {
    color: rgba(255, 255, 255, 0.8);
}
.summary-item.net-pay .summary-value {
    color: white;
    font-size: 2em;
}

.payslip-main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
}

.payslip-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}

.payslip-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-size: 1.2em;
}

.payslip-section.remarks {
    grid-column: 1 / -1; /* Span full width */
}
.payslip-section.remarks p {
    white-space: pre-wrap; /* To respect newlines from textarea */
    line-height: 1.7;
    padding: 0 5px;
    margin: 0;
    font-size: 14px;
}

.payslip-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
    font-size: 1em;
}

.payslip-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.payslip-item span:first-child {
    color: #555;
}

.payslip-item span:last-child {
    font-weight: 500;
}

.payslip-item.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid var(--border-color);
    font-weight: 700;
    color: var(--primary-color);
}

.payslip-footer {
    display: none;
}

.payslip-footer p {
    margin: 4px 0;
}

.payslip-remarks-container {
    margin-top: 20px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}
.payslip-remarks-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--primary-color);
}
#payslip-remarks {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box; /* To include padding in width */
}

.company-info-settings {
    margin-top: 20px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.company-info-settings h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--primary-color);
}

.add-item-btn {
    padding: 6px 12px;
    border: 1px dashed var(--primary-color);
    background-color: #fff;
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    margin-top: 15px;
    display: inline-block;
}

.add-item-btn:hover {
    background-color: #f0f8ff;
    border-style: solid;
}

.custom-items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.custom-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-item input {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Noto Sans JP', sans-serif;
}

.custom-item .item-name {
    width: 180px;
}
.custom-item .item-value {
    width: 120px;
}

.custom-item .remove-item-btn {
    background: none;
    border: none;
    color: var(--danger-button-bg);
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.custom-item .remove-item-btn:hover {
    color: #a02020;
}


/* Annual Summary Styles */
#annual-summary-view {
    padding-top: 20px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.summary-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.summary-header .year-selector {
    justify-content: center;
    gap: 10px;
    flex-grow: 1;
}

.summary-header .year-selector button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    background-color: var(--button-bg);
    color: white;
    border: none;
}

.summary-header .year-selector button:hover {
    background-color: var(--button-hover-bg);
}

.summary-actions {
    display: flex;
    gap: 10px;
}

#print-summary-btn {
    padding: 12px 25px;
    border: none;
    background-color: #5cb85c;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 16px;
}
#print-summary-btn:hover {
    background-color: #4cae4c;
}

#back-to-timesheet-btn {
    padding: 12px 25px;
    border: none;
    background-color: var(--button-bg);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 16px;
}
#back-to-timesheet-btn:hover {
    background-color: var(--button-hover-bg);
}

#annual-summary-table-container {
    overflow-x: auto;
}

.annual-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
}

.annual-summary-table th, .annual-summary-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
}

.annual-summary-table th {
    background-color: #f0f3f6;
    font-weight: 500;
}

.annual-summary-table td:first-child {
    font-weight: 500;
    text-align: center;
}

.annual-summary-table tfoot td {
    font-weight: 700;
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Auth Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.auth-modal {
    background: white;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.auth-modal h2 {
    margin-top: 0;
    color: var(--primary-color);
}

.auth-modal p {
    color: #666;
    margin-bottom: 20px;
}

#auth-form input[type="password"] {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1em;
}

#auth-submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: var(--button-bg);
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

#auth-submit-btn:hover {
    background-color: var(--button-hover-bg);
}

.auth-error {
    color: var(--danger-button-bg);
    margin-top: 10px;
    font-weight: 500;
    min-height: 1.2em;
}

#logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    border: 1px solid var(--danger-button-bg);
    background-color: #fff;
    color: var(--danger-button-bg);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
}

#logout-btn:hover {
    background-color: var(--danger-button-bg);
    color: #fff;
}

@media print {
    /* --- Payslip Printing --- */
    body.printing-payslip > *:not(#payslip-modal) {
        display: none !important;
    }

    body.printing-payslip #payslip-modal {
        position: static !important;
        background: none !important;
        display: block !important;
        justify-content: initial !important;
        align-items: initial !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
    }

    body.printing-payslip .modal-content {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        margin: 0 !important;
        transform: none !important;
        border-radius: 0 !important;
    }

    body.printing-payslip .modal-close, body.printing-payslip .modal-actions {
        display: none !important;
    }

    body.printing-payslip .payslip-content-wrapper, body.printing-payslip #payslip-preview, body.printing-payslip .payslip-section {
        box-shadow: none;
        border: none;
        background: none;
        padding: 0;
    }

    body.printing-payslip .payslip-summary-grid {
         grid-template-columns: repeat(3, 1fr);
         gap: 5px;
    }

    body.printing-payslip .summary-item {
        padding: 10px;
        border: 1px solid var(--border-color);
    }

    body.printing-payslip .summary-value {
        font-size: 1.5em;
    }

    body.printing-payslip .summary-item.net-pay .summary-value {
        font-size: 1.6em;
    }

    body.printing-payslip .payslip-main-content {
         grid-template-columns: 1fr 1fr;
         gap: 20px;
    }

    body.printing-payslip h1, body.printing-payslip h2, body.printing-payslip h3, body.printing-payslip h4, body.printing-payslip p {
        page-break-after: avoid;
    }

    body.printing-payslip .payslip-section, body.printing-payslip .payslip-summary-grid {
        page-break-inside: avoid;
    }

    /* --- Annual Summary Printing --- */
    body.printing-summary > header,
    body.printing-summary > .auth-overlay,
    body.printing-summary > .modal-overlay,
    body.printing-summary main > *:not(#annual-summary-view) {
        display: none !important;
    }

    body.printing-summary #annual-summary-view {
        display: block !important;
        padding-top: 0;
    }

    body.printing-summary main {
        max-width: 100%;
        margin: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background-color: #fff;
    }

    body.printing-summary .summary-header {
        border-bottom: none;
    }

    body.printing-summary .summary-header .year-selector,
    body.printing-summary .summary-actions {
        display: none !important;
    }

    body.printing-summary .summary-header h2 {
        width: 100%;
        text-align: center;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--primary-color);
    }

    body.printing-summary #annual-summary-table-container {
        overflow-x: visible;
    }

    body.printing-summary .annual-summary-table {
        width: 100%;
        font-size: 9pt;
        page-break-inside: auto;
    }

    body.printing-summary .annual-summary-table thead {
        display: table-header-group;
    }
    
    body.printing-summary .annual-summary-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    body.printing-summary .annual-summary-table th, 
    body.printing-summary .annual-summary-table td {
        padding: 5px;
    }

    body.printing-summary h1, body.printing-summary h2, body.printing-summary h3 {
        page-break-after: avoid;
    }
}