/* The pivot table scrolls inside its card on a phone. */
.ep-admin-report-page .fi-ta-content-ctn {
    overflow-x: auto;
    max-width: 100%;
}
.ep-admin-report-page .fi-ta-header-cell,
.ep-admin-report-page .fi-ta-header-group-cell {
    white-space: nowrap;
}
.ep-admin-report-page .fi-ta-cell a {
    font-variant-numeric: tabular-nums;
}
.ep-admin-report-page .fi-ta-cell a:focus-visible {
    outline: 2px solid #2fa308;
    outline-offset: 2px;
}
/* Scheme claims summary: one value per line, flat borders. */
.ep-scheme-claims {
    overflow-x: auto;
}
.ep-scheme-claims table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ep-scheme-claims th,
.ep-scheme-claims td {
    padding: 8px 10px;
    border-bottom: 1px solid #e4e9e3;
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
    white-space: nowrap;
}
.ep-scheme-claims th {
    background: #f3f9f1;
    font-weight: 600;
}
.ep-scheme-claims .ep-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.ep-scheme-claims td > span {
    display: block;
}
.ep-scheme-claims-total td {
    background: #ecf7e6;
}
/* New applications keep the old yellow cell. */
.ep-admin-report-page .fi-ta-cell.ep-report-new {
    background: #fff7dc;
}
/* Report chart switch: Bar / Doughnut, like a grouped toggle. */
.ep-report-chart-switch {
    display: flex;
    width: fit-content;
    margin: 0 0 10px auto;
    border: 1px solid #e4e9e3;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.ep-report-chart-switch button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #77857c;
}
.ep-report-chart-switch button + button {
    border-left: 1px solid #e4e9e3;
}
.ep-report-chart-switch button .fi-icon {
    width: 16px;
    height: 16px;
}
.ep-report-chart-switch button.ep-active {
    background: #ecf7e6;
    color: #237a06;
}
.ep-report-chart-switch button:focus-visible {
    outline: 2px solid #2fa308;
    outline-offset: -2px;
}
/* #234: the view switch and the buttons share one centred row. */
.ep-report-frame {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ep-report-frame-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
@media (min-width: 40rem) {
    .ep-report-frame-end {
        margin-left: auto;
    }
}
.ep-report-frame .ep-report-chart-switch {
    margin: 0;
}
.ep-report-frame .ep-report-chart-switch button {
    min-height: 2rem;
}
@media print {
    .ep-report-chart-switch {
        display: none;
    }
}
/* Report stat cards: one row, wrapping on a phone. */
.ep-report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
/* Phone: two per row; an odd first card takes the row (#212). */
@media (max-width: 639.98px) {
    .ep-report-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .ep-report-stats > :first-child:nth-last-child(odd) {
        grid-column: 1 / -1;
    }
    .ep-report-stats > .ui-stat {
        container-type: inline-size;
        padding: 14px;
    }
    .ep-report-stats .ui-stat-value.ui-stat-value-compact {
        font-size: min(1.25rem, calc(100cqi / (var(--ep-chars, 8) * 0.62)));
        white-space: nowrap;
    }
}
.ep-report-grid .fi-ta-table > tbody > .fi-ta-row {
    border-color: #d8dfd6;
}
.ep-report-grid .fi-ta-table > tbody > .fi-ta-row > td + td,
.ep-report-grid .fi-ta-table > thead > tr > th + th {
    border-inline-start: 1px solid #d8dfd6;
}
.ep-report-grid .fi-ta-table > thead > tr + tr > th {
    border-top: 1px solid #d8dfd6;
}
/* Sticky header (#49): collapsed borders stay behind, so draw lines inside. */
@media screen and (min-width: 40rem) {
    .ep-report-grid .fi-ta-content-ctn > .fi-ta-table > thead > tr > th:nth-child(n) {
        border-inline-start-width: 0;
        border-top-width: 0;
        box-shadow: var(--ep-grid-left, 0 0 #0000), var(--ep-grid-top, 0 0 #0000), var(--ep-grid-bottom, 0 0 #0000), var(--ep-head-line, 0 0 #0000);
    }
    .ep-report-grid .fi-ta-table > thead > tr > th + th {
        --ep-grid-left: inset 1px 0 0 #d8dfd6;
    }
    .ep-report-grid .fi-ta-table > thead > tr + tr > th {
        --ep-grid-top: inset 0 1px 0 #d8dfd6;
    }
    .ep-report-grid .fi-ta-table > thead > tr > th[rowspan] {
        --ep-grid-bottom: inset 0 -1px 0 var(--ui-line);
    }
}
/* Chart card full screen: fills the screen, chart grows with it. */
.ep-chart-full-icon {
    display: inline-flex;
}
.ep-share-chart:fullscreen {
    overflow: auto;
    padding: 24px;
    background: #fff;
}
.dark .ep-share-chart:fullscreen {
    background: #0b1510;
}
.ep-share-chart:fullscreen .fi-wi-chart-canvas-ctn {
    height: calc(100vh - 170px);
}
.ep-share-chart:fullscreen canvas {
    max-height: 100% !important;
}
.ep-share-chart:fullscreen svg.map {
    max-height: calc(100vh - 170px);
    aspect-ratio: auto;
}
/* A count that opens its list. */
.ep-drill-link {
    color: #237a06;
    font-weight: 600;
    cursor: pointer;
}
.ep-drill-link:hover,
.ep-drill-link:focus-visible {
    text-decoration: underline;
}
.dark .ep-drill-link {
    color: #8fd16a;
}
.ep-report-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.ep-report-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #237a06;
}
.ep-report-card.is-total .ep-report-card-title {
    color: #1f2a22;
}
.ep-report-card-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
}
/* An odd last box takes the full row. */
.ep-report-card-items > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
.ep-report-card-items > div {
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid #e4e9e3;
    border-radius: 8px;
    background: #f6f8f5;
}
.ep-report-card-items dt {
    overflow-wrap: break-word;
    font-size: 11px;
    line-height: 1.3;
    color: #5f6b5b;
}
.ep-report-card-items dd {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #1f2a22;
    font-variant-numeric: tabular-nums;
}
.ep-report-card-items dd small {
    margin-inline-start: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #5f6b5b;
}
.ep-report-card.is-total .ep-report-card-items > div {
    border-color: #b7e0a5;
    background: #ecf7e6;
}
