.finance-app {
    --ink: #152238;
    --muted: #66758a;
    --brand: #365bd7;
    font-family: Inter,Roboto,system-ui,sans-serif;
    color: var(--ink);
    background: #f4f6fa;
    min-height: 100vh
}

.app-sidebar {
    width: 250px;
    position: fixed;
    inset: 0 auto 0 0;
    background: #fff;
    border-right: 1px solid #e2e7ef;
    overflow: auto;
    padding: 26px 16px;
    z-index: 20
}

.app-main {
    margin-left: 250px;
    padding: 36px 40px;
    max-width: 1700px
}

.app-brand {
    display: flex;
    gap: 11px;
    align-items: center;
    color: #152238!important;
    text-decoration: none;
    font-weight: 750;
    font-size: 17px;
    margin-bottom: 30px
}

.app-brand small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: #718096;
    margin-top: 3px
}

.brand-icon {
    display: grid;
    place-items: center;
    background: #365bd7;
    color: #fff;
    width: 38px;
    height: 40px;
    border-radius: 11px;
    font-size: 26px
}

.space-label {
    display: block;
    color: #8490a4;
    font-size: 10px;
    letter-spacing: 1.3px;
    margin: 16px 8px
}

.space-switch {
    display: block;
    width: 100%;
    margin: 8px 0;
    font-size: 14px;
    color: #26364e;
    padding: 9px;
    border: 1px solid #e1e7ef;
    border-radius: 7px;
    background: #fff;
    letter-spacing: 0
}

.quick-add {
    display: block;
    padding: 11px;
    text-align: center;
    background: #365bd7;
    color: #fff!important;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    margin: 20px 4px
}

.app-sidebar .mud-nav-link {
    font-size: 13px;
    border-radius: 7px;
    padding: 9px 14px;
    color: #5c697e
}

.app-sidebar .mud-nav-link.active {
    background: #edf1ff;
    color: #365bd7;
    font-weight: 650
}

.sidebar-footer {
    border-top: 1px solid #e5e9ef;
    margin-top: 24px;
    padding: 20px 14px;
    font-size: 13px
}

.sidebar-footer .btn {
    padding: 5px 0
}

.sidebar-footer>a {
    color: #52627a
}

.app-mobile {
    display: none
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 25px
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-size: 10px;
    font-weight: 700;
    color: #7a8aa1
}

.finance-app h1 {
    font-size: 29px;
    letter-spacing: -.8px;
    line-height: 1.25;
    font-weight: 700;
    margin: 8px 0
}

.finance-app h2 {
    font-size: 17px;
    font-weight: 650;
    margin-bottom: 18px
}

.finance-app p {
    color: #718096;
    font-size: 14px
}

.panel {
    background: #fff;
    border: 1px solid #e2e7ef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 3px 8px #23314e03
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 18px;
    margin-bottom: 24px
}

.stat {
    background: #fff;
    border: 1px solid #e2e7ef;
    border-radius: 12px;
    padding: 23px
}

.stat .caption {
    font-size: 12px;
    color: #7b8798
}

.stat .value {
    font-size: 25px;
    font-weight: 700;
    margin-top: 13px;
    letter-spacing: -.5px
}

.stat.primary {
    background: #152c55;
    color: white;
    border-color: #152c55
}

.stat.primary .caption {
    color: #aebdd7
}

.two-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px
}

.form-grid>div.full,.form-grid>.full {
    grid-column: 1/-1
}

.finance-app label {
    font-size: 12px;
    font-weight: 600;
    color: #5e6c80;
    display: block
}

.finance-app input:not([type=checkbox]),.finance-app select,.finance-app textarea {
    margin-top: 6px;
    min-height: 38px;
    border-radius: 7px;
    font-size: 14px
}

.finance-app input[type=checkbox] {
    margin-right: 7px
}

.finance-app .btn-primary {
    background: #365bd7;
    border-color: #365bd7
}

.finance-app .btn {
    font-size: 13px;
    border-radius: 7px
}

.finance-app .table {
    font-size: 13px;
    color: #3d4d64
}

.finance-app .table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #8a95a5;
    border-color: #edf0f5;
    padding: 12px 8px
}

.finance-app .table td {
    padding: 13px 8px;
    vertical-align: middle;
    border-color: #edf0f5
}

.finance-app .table a {
    color: #365bd7;
    text-decoration: none;
    font-weight: 550
}

.table-wrap {
    overflow: auto
}

.row-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.pill {
    font-size: 10px;
    border-radius: 20px;
    padding: 5px 9px;
    background: #eef2ff;
    color: #365bd7;
    white-space: nowrap
}

.positive {
    color: #15866d
}

.negative {
    color: #c15a45
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: #8591a3;
    font-size: 14px
}

.paging {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin: 20px 0;
    font-size: 12px
}

.paging select {
    margin-left: 8px;
    padding: 3px
}

.toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px
}

.toolbar>label {
    min-width: 160px
}

.entry-line {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin: 12px 0
}

.split-line {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin: 12px 0
}

.progress-item {
    margin-bottom: 19px
}

.progress-item>div {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px
}

.progress-item progress {
    height: 7px;
    width: 100%;
    accent-color: #365bd7
}

.muted {
    color: #8190a4;
    font-size: 12px
}

.finance-app details summary {
    cursor: pointer;
    color: #365bd7;
    font-size: 13px
}

.finance-app pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 11px;
    background: #f6f8fc;
    padding: 12px
}

.finance-app fieldset {
    min-width: 0
}

.finance-app .validation-message {
    color: #c14545
}

.finance-app .alert {
    font-size: 13px
}

.category-bar {
    height: 9px;
    background: #e8edfb;
    border-radius: 5px;
    overflow: hidden
}

.category-bar>span {
    display: block;
    height: 100%;
    background: #5771d7
}

.panel .description {
    font-size: 12px;
    color: #7c889b
}

@media(max-width:1050px) {
    .app-main {
        padding: 28px 24px
    }

    .stat-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .two-columns {
        grid-template-columns: 1fr
    }

}

@media(max-width:760px) {
    .app-mobile {
        display: flex;
        align-items: center;
        gap: 20px;
        padding: 12px 18px;
        background: #fff;
        border-bottom: 1px solid #e2e7ef
    }

    .app-mobile a {
        text-decoration: none;
        color: #26364e;
        font-weight: 650
    }

    .app-sidebar {
        display: none;
        top: 62px
    }

    .app-sidebar.is-open {
        display: block;
        box-shadow: 15px 0 40px #15223830
    }

    .app-main {
        margin-left: 0;
        padding: 22px 16px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .stat-grid {
        gap: 10px
    }

    .stat {
        padding: 17px
    }

    .stat .value {
        font-size: 20px
    }

    .page-heading {
        align-items: flex-start
    }

    .finance-app h1 {
        font-size: 24px
    }

    .panel {
        padding: 18px
    }

    .entry-line,.split-line {
        grid-template-columns: 1fr 1fr
    }

    .paging {
        justify-content: start;
        flex-wrap: wrap
    }

}
