.summary-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin-bottom:18px}
.summary-panel{background:#fff;border:1px solid var(--line);border-radius:5px;padding:16px 18px;min-width:0}
.summary-panel .section-heading{margin-bottom:12px}
.summary-panel h2{font-size:16px}
.summary-table{table-layout:fixed;min-width:1160px}
.summary-table th,.summary-table td{text-align:center;padding:8px 10px;line-height:1.4}
.summary-table thead th{height:36px;color:#000;font-size:14px;white-space:normal}
.summary-table thead tr:first-child th[colspan]{background:#f2f6fa}
.summary-table thead tr:first-child th.summary-income-heading{background:#e6f4ff;color:#0958d9}
.summary-table thead tr:first-child th.summary-outflow-heading{background:#fff1df;color:#ad4e00}
.summary-table thead tr:first-child th.summary-profit-heading{background:#e5f7ed;color:#087f5b;position:relative;padding-right:32px}
.combined-summary-table{min-width:1500px}
.combined-summary-table thead tr:first-child th{height:42px;font-weight:600}
.combined-summary-table thead tr:first-child th.summary-sales-heading{background:#f5f7fa}
.combined-summary-table tbody td{height:48px}
.combined-summary-table .summary-sales-value{background:#fafbfc}
.combined-summary-table .summary-income-value{background:#f6fbff}
.combined-summary-table .summary-outflow-value{background:#fffdf7}
.combined-summary-table .summary-profit-value{background:#effbf4}
.summary-formulas{margin-top:12px;padding-top:9px;border-top:1px solid var(--line);color:#637786;font-size:12px;line-height:1.7}
.summary-formulas p{margin:3px 0;white-space:normal}
.summary-formulas b{font-weight:600;color:#455c6c}
.summary-formulas span{margin-left:7px;color:#82929d}
.summary-table tbody td{height:44px;border-bottom:0;font-variant-numeric:tabular-nums}
.summary-table .summary-subtotal{font-weight:600;background:#fafbfd}
.summary-table .summary-total{font-weight:600;background:#edf7ff}
.summary-amount{color:#000;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;cursor:default}
.combined-summary-table .summary-amount{font-weight:500}
.combined-summary-table .summary-sales-value .summary-amount{color:#293b46}
.combined-summary-table .summary-income-value .summary-amount{color:#0958ff}
.combined-summary-table .summary-outflow-value .summary-amount{color:#c25700}
.combined-summary-table .summary-profit-value .summary-amount{color:#00875a}
.combined-summary-table td:last-child .summary-amount{font-size:18px;font-weight:700}
.summary-note{font-size:12px;line-height:1.6;color:#7d8c97;margin:10px 0 0}
.inline-detail-section{scroll-margin-top:18px}
.inline-detail-section .section-heading{margin-bottom:12px}
.inline-detail-section .section-heading p{max-width:850px;line-height:1.6}
.inline-detail-table{min-width:840px}
.inline-detail-table th,.inline-detail-table td{padding:6px 10px;line-height:1.4}
.payment-table th,.payment-table td{padding:6px 10px;line-height:1.4}
.inline-detail-section .pagination{justify-content:space-between}
.detail-caption{font-size:12px;color:#6c8292}
.summary-detail-heading{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.summary-detail-heading>span{font-size:12px;color:#78909f}
@media(max-width:1250px){.summary-panel{padding:14px}}
@media(max-width:600px){.summary-layout{gap:14px}.summary-panel{padding:14px 12px}.inline-detail-section .section-heading{align-items:flex-start}}


.section-nav{flex-wrap:wrap;gap:8px 22px;margin:12px 0 0;padding:9px 12px;background:#fff;border:1px solid var(--line);border-radius:4px}
.summary-panel{scroll-margin-top:24px}


.formula-help-button{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:1px solid #53977b;border-radius:50%;background:transparent;color:#087f5b;font:600 12px/1 Arial,sans-serif;cursor:pointer}
.formula-help-button:hover,.formula-help-button[aria-expanded="true"]{background:#c9edd9;border-color:#087f5b}
.formula-popover{position:fixed;z-index:30;max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);overflow:auto;padding:15px 18px;background:#fff;border:1px solid #d9e3e9;border-radius:5px;box-shadow:0 6px 22px #203d5629}
.formula-popover-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.formula-popover-heading h3{margin:0;font-size:15px;font-weight:600;color:#293b46}
.formula-close-button{display:flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:3px;background:transparent;color:#75838d;font-size:22px;line-height:1;cursor:pointer}
.formula-close-button:hover{background:#f0f3f6;color:#293b46}
.formula-popover .summary-formulas{margin-top:9px;padding-top:9px}
.formula-popover .summary-formulas p{margin:7px 0}
