html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
/*    padding-top: 1.1rem;*/
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.expenditure-page {
    min-height: calc(100vh - 2rem);
}

.expenditure-header {
    align-items: center;
    border-bottom: 1px solid #d7dde2;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
/*    margin-bottom: 1rem;*/
    padding-bottom: 1rem;
}

.app-header {
    background-color: #e90802;
    flex-direction: row;
    height: 100px;
    padding: 2rem;
}

.app-title-group {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    min-width: 0;
}

.app-title-group img {
    flex: 0 0 auto;
    max-height: 58px;
}

.fund-menu-button {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 4px;
    display: inline-flex;
    flex: 0 0 2.25rem;
    flex-direction: column;
    gap: .25rem;
    height: 2.25rem;
    justify-content: center;
    padding: 0;
}

.fund-menu-button:hover {
    background: rgba(255, 255, 255, .14);
}

.fund-menu-button:focus-visible {
    box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .35);
    outline: 0;
}

.fund-menu-button span {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 1.15rem;
}

.expenditure-header h1 {
    color: #242a2f;
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0;
}

.expenditure-header p {
    color: #5f6b76;
    margin: .25rem 0 0;
}

.expenditure-actions {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.header-tool-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #fff;
    display: inline-flex;
    font-size: 1.25rem;
    font-weight: 700;
    gap: .35rem;
    line-height: 1;
    padding: .45rem .35rem;
}

.header-tool-button:hover,
.header-tool-button:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.header-tool-button:disabled {
    opacity: .55;
    text-decoration: none;
}

.tool-icon {
    border-color: #ffd85a;
    color: #ffd85a;
    display: inline-block;
    flex: 0 0 auto;
    height: 1rem;
    position: relative;
    width: 1rem;
}

.tool-icon-user::before {
    background: currentColor;
    border-radius: 50%;
    content: "";
    height: .42rem;
    left: .29rem;
    position: absolute;
    top: .05rem;
    width: .42rem;
}

.tool-icon-user::after {
    background: currentColor;
    border-radius: .5rem .5rem .15rem .15rem;
    bottom: .07rem;
    content: "";
    height: .48rem;
    left: .12rem;
    position: absolute;
    width: .76rem;
}

.tool-icon-print::before {
    border: 2px solid currentColor;
    content: "";
    height: .45rem;
    left: .18rem;
    position: absolute;
    top: 0;
    width: .64rem;
}

.tool-icon-print::after {
    background: currentColor;
    border-radius: 2px;
    content: "";
    height: .58rem;
    left: .04rem;
    position: absolute;
    top: .34rem;
    width: .92rem;
}

.tool-icon-share::before,
.tool-icon-share::after {
    background: currentColor;
    content: "";
    height: 2px;
    left: .32rem;
    position: absolute;
    width: .52rem;
}

.tool-icon-share::before {
    top: .3rem;
    transform: rotate(-28deg);
}

.tool-icon-share::after {
    top: .65rem;
    transform: rotate(28deg);
}

.tool-icon-share {
    background:
        radial-gradient(circle at .2rem .5rem, currentColor 0 .18rem, transparent .19rem),
        radial-gradient(circle at .82rem .18rem, currentColor 0 .18rem, transparent .19rem),
        radial-gradient(circle at .82rem .82rem, currentColor 0 .18rem, transparent .19rem);
}

.tool-icon-filter {
    border-left: .48rem solid transparent;
    border-right: .48rem solid transparent;
    border-top: .58rem solid currentColor;
    height: 0;
    margin-top: .15rem;
    width: 0;
}

.tool-icon-filter::after {
    background: currentColor;
    content: "";
    height: .45rem;
    left: -.1rem;
    position: absolute;
    top: -.12rem;
    width: .2rem;
}

.tool-caret {
    font-size: .75rem;
}

.print-menu {
    position: relative;
}

.print-menu-backdrop {
    background: transparent;
    inset: 0;
    position: fixed;
    z-index: 940;
}

.print-menu-list {
    background: #fff;
    border: 1px solid #cbd3da;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    min-width: 170px;
    padding: .35rem;
    position: absolute;
    right: 0;
    top: calc(100% + .3rem);
    z-index: 950;
}

.print-menu-list button {
    background: transparent;
    border: 0;
    color: #172533;
    display: block;
    padding: .45rem .6rem;
    text-align: left;
    width: 100%;
}

.print-menu-list button:hover {
    background: #edf3f6;
}

.expenditure-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
}

.expenditure-layout.fund-panel-hidden {
    grid-template-columns: minmax(0, 1fr);
}

.fund-panel {
    background: #fff;
    border: 1px solid #d7dde2;
    border-radius: 6px;
    bottom: 1rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
    left: 1rem;
    max-height: calc(100vh - 7rem);
    overflow: auto;
    position: fixed;
    top: 116px;
    transform: translateX(calc(-100% - 2rem));
    transition: transform .22s ease, visibility .22s ease;
    visibility: hidden;
    width: min(330px, calc(100vw - 2rem));
    z-index: 900;
}

.fund-panel-backdrop {
    background: transparent;
    inset: 0;
    position: fixed;
    z-index: 850;
}

.fund-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.fund-panel.is-closed {
    pointer-events: none;
}

.fund-panel-heading {
    align-items: center;
    background: #2f3a43;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: .75rem;
    position: sticky;
    top: 0;
    z-index: 2;
}

.fund-panel-heading h2 {
    font-size: 1rem;
    margin: 0;
}

.fund-panel-close {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 4px;
    color: #fff;
    display: inline-flex;
    font-size: 1rem;
    height: 1.75rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 1.75rem;
}

.fund-panel-close:hover {
    background: rgba(255, 255, 255, .14);
}

.fund-panel-close:focus-visible {
    box-shadow: 0 0 0 .18rem rgba(255, 255, 255, .3);
    outline: 0;
}

.fund-tree {
    padding: .65rem;
}

.fund-node {
    font-size: .88rem;
}

.fund-node-row {
    align-items: flex-start;
    display: flex;
    gap: .25rem;
}

.fund-node-row-toggle {
    border-radius: 4px;
    cursor: pointer;
}

.fund-node-row-toggle:hover {
    background: #edf3f6;
}

.fund-node-disclosure,
.fund-node-spacer {
    flex: 0 0 1rem;
    font-size: .75rem;
    line-height: 1.25;
    padding-top: .42rem;
    text-align: center;
}

.fund-node-disclosure {
    background: transparent;
    border: 0;
    border-radius: 3px;
    color: #52606b;
    cursor: pointer;
}

.fund-node-disclosure:hover {
    background: #edf3f6;
}

.fund-node-disclosure:focus-visible {
    box-shadow: 0 0 0 .16rem rgba(37, 140, 251, .25);
    outline: 0;
}

.fund-node-spacer {
    color: transparent;
}

.fund-node-label {
    align-items: flex-start;
    border-radius: 4px;
    display: flex;
    flex: 1 1 auto;
    gap: .45rem;
    line-height: 1.25;
    margin: .1rem 0;
    padding: .28rem;
}

.fund-node-row:not(.fund-node-row-toggle) .fund-node-label:hover {
    background: #edf3f6;
}

.fund-node-label input {
    flex: 0 0 auto;
    margin-top: .1rem;
}

.fund-node-children {
    border-left: 1px solid #d7dde2;
    margin-left: .65rem;
    padding-left: .55rem;
}

.matrix-panel {
    min-width: 0;
}

.matrix-content {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    min-height: 0;
}

.matrix-scroll {
    border: 1px solid #cfd7de;
    border-radius: 6px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    width: fit-content;
}

.allowability-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: .78rem;
    table-layout: fixed;
    width: max-content;
}

.allowability-table th,
.allowability-table td {
    border-bottom: 1px solid #dfe5ea;
    border-right: 1px solid #dfe5ea;
    box-sizing: border-box;
    max-width: 85px;
    min-width: 85px;
    padding: .35rem .3rem;
    text-align: center;
    vertical-align: middle;
    width: 85px;
}

.allowability-table thead th {
    background: #a9c6cf;
    color: #111;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 3;
}

.allowability-table .sticky-col {
    background: #a9c6cf;
    left: 0;
    max-width: 40px;
    min-width: 40px;
    position: sticky;
    width: 40px;
    z-index: 4;
}

.allowability-table tbody .sticky-col {
    z-index: 2;
}

.pool-button,
.restriction-button {
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    font-weight: 700;
    padding: 0;
    text-decoration: underline;
}

.restriction-button {
    font-weight: 600;
    line-height: 1.15;
    max-width: 79px;
}

.cell-no {
    background: #f4b7b4;
}

.cell-yes {
    background: #bcd9b3;
}

.cell-restricted {
    background: #fff0a8;
}

.cell-empty {
    background: #f5f7f8;
    color: #6e7780;
}

.selected-list {
    background: #fff;
    border-right: 10px solid #9aa4ad;
    color: #152536;
}

.selected-list h2 {
    background: #151c22;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
    padding: 1em;
    text-transform: uppercase;
}

.selected-list-item {
    background: #d4d8db;
    border-bottom: 1px solid #bbc1c6;
    box-sizing: border-box;
    display: block;
    font-size: .88rem;
    line-height: 1.2;
    padding: .32rem .75rem;
    width: 100%;
}

.selected-list .selected-list-link,
.selected-list button.selected-list-link {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    cursor: pointer;
    display: block !important;
    font: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    outline-offset: -2px;
    padding: 0 !important;
    text-align: left !important;
    width: 100% !important;
}

.selected-list .selected-list-link:hover,
.selected-list .selected-list-link:focus-visible {
    background: #c7ccd0;
    text-decoration: underline;
}

.selected-list .selected-list-link:focus-visible {
    outline: 2px solid #258cfb;
}

.selected-list-group {
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
}

.selected-list-leaf {
    font-weight: 400;
}

.selected-list-level-1 {
    padding-left: 1rem;
}

.selected-list-level-2 {
    padding-left: 1.55rem;
}

.selected-list-level-3 {
    padding-left: 2.1rem;
}

.selected-list-level-4 {
    padding-left: 2.65rem;
}

.empty-state,
.status-panel {
    border: 1px solid #d7dde2;
    border-radius: 6px;
    color: #44515c;
    padding: 2rem;
}

.empty-state h2 {
    color: #242a2f;
    font-size: 1.2rem;
    margin: 0 0 .4rem;
}

.empty-state p {
    margin: 0;
}

.modal-backdrop-custom {
    background: rgba(24, 30, 35, .55);
    inset: 0;
    position: fixed;
    z-index: 1000;
}

.dialog-panel {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .25);
    left: 50%;
    max-height: 82vh;
    max-width: 520px;
    overflow: auto;
    padding: 1rem;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 2rem);
    z-index: 1001;
}

.dialog-wide {
    max-width: 760px;
}

.dialog-panel header {
    align-items: center;
    border-bottom: 1px solid #d7dde2;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #757575;
    color: white;
    flex-direction: row;
    align-items: center;

}

.dialog-panel h2 {
    font-size: 1.1rem;
    margin: 0;
}

.restriction-content {
    line-height: 1.45;
}

.share-row {
    display: flex;
    gap: .5rem;
}

.share-row input {
    border: 1px solid #cbd3da;
    border-radius: 4px;
    flex: 1 1 auto;
    min-width: 0;
    padding: .45rem .6rem;
}

.saved-filters-backdrop {
    background: rgba(24, 30, 35, .2);
    inset: 0;
    position: fixed;
    z-index: 960;
}

.saved-filters-panel {
    background: #fff;
    bottom: 0;
    box-shadow: -18px 0 45px rgba(0, 0, 0, .22);
    max-width: calc(100vw - 2rem);
    overflow: auto;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 0;
    width: 360px;
    z-index: 970;
}

.saved-filters-panel header {
    align-items: center;
    border-bottom: 1px solid #d7dde2;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
}

.saved-filters-panel h2,
.saved-filters-panel h3 {
    margin: 0;
}

.saved-filters-panel h2 {
    font-size: 1.15rem;
}

.saved-filters-panel h3 {
    font-size: 1rem;
    margin-bottom: .5rem;
}

.saved-filters-message {
    background: #eef4f7;
    border: 1px solid #cfdde3;
    border-radius: 4px;
    color: #24333b;
    margin-bottom: .75rem;
    padding: .55rem .65rem;
}

.saved-filter-create {
    border-bottom: 1px solid #d7dde2;
    display: grid;
    gap: .5rem;
    margin-bottom: .75rem;
    padding-bottom: .75rem;
}

.saved-filter-create input {
    border: 1px solid #cbd3da;
    border-radius: 4px;
    padding: .45rem .6rem;
}

.saved-filter-list {
    display: grid;
    gap: .45rem;
}

.saved-filter-row {
    align-items: center;
    border: 1px solid #d7dde2;
    border-radius: 4px;
    display: grid;
    gap: .35rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: .45rem;
}

.saved-filter-row a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-filter-row button {
    background: #f5f7f8;
    border: 1px solid #cbd3da;
    border-radius: 4px;
    padding: .25rem .45rem;
}

.print-only {
    display: none;
}

.print-restriction-item {
    border-bottom: 1px solid #d7dde2;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.print-restriction-item h2 {
    font-size: 1rem;
}

.toast-panel {
    background: #27343c;
    border-radius: 6px;
    bottom: 1rem;
    color: #fff;
    left: 50%;
    max-width: calc(100vw - 2rem);
    padding: .7rem .9rem;
    position: fixed;
    transform: translateX(-50%);
    z-index: 1050;
}

@media print {
    .app-header,
    .fund-panel,
    .fund-panel-backdrop,
    .saved-filters-panel,
    .saved-filters-backdrop,
    .toast-panel {
        display: none !important;
    }

    .print-only {
        display: block;
    }
}

@media (max-width: 900px) {
    .expenditure-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-header {
        height: auto;
        padding: 1rem;
    }

    .app-title-group {
        width: 100%;
    }

    .app-title-group h1 {
        font-size: 1.2rem;
    }

    .expenditure-layout {
        grid-template-columns: 1fr;
    }

    .matrix-content {
        grid-template-columns: 1fr;
    }

    .selected-list {
        border-bottom: 8px solid #9aa4ad;
        border-right: 0;
    }

    .fund-panel {
        bottom: 0;
        border-radius: 0 6px 6px 0;
        max-height: none;
        top: 88px;
    }
}
