:root {
    --ink: #202b35;
    --muted: #75818c;
    --bg: #f5f7f8;
    --card: #fff;
    --line: #e8edef;
    --green: #2f806c;
    --green2: #e8f4ef;
    --peach: #fff1e9;
    --gold: #f0bd68;
    --shadow: 0 12px 35px rgba(34, 53, 62, .06)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer;
    border: 0
}

.app {
    display: grid;
    grid-template-columns: 238px 1fr;
    min-height: 100vh
}

aside {
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    gap: 28px
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px;
    font-weight: 750;
    font-size: 17px
}

.logo {
    width: 37px;
    height: 37px;
    border-radius: 12px;
    background: var(--green);
    color: white;
    display: grid;
    place-items: center;
    font-size: 19px
}

.nav-label {
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #a0aab1;
    font-weight: 750;
    padding: 0 12px;
    margin-bottom: 8px
}

.nav {
    display: grid;
    gap: 5px
}

.nav button {
    background: transparent;
    text-align: left;
    padding: 11px 12px;
    border-radius: 11px;
    color: #697680;
    display: flex;
    gap: 12px;
    align-items: center
}

.nav button.active,
.nav button:hover {
    background: var(--green2);
    color: var(--green);
    font-weight: 650
}

.nav .ico {
    width: 19px;
    text-align: center;
    font-size: 17px
}

.side-note {
    margin-top: auto;
    background: #f7f8f6;
    padding: 16px;
    border-radius: 14px;
    color: #68766f;
    font-size: 12px
}

.side-note strong {
    display: block;
    color: var(--ink);
    font-size: 13px;
    margin-bottom: 5px
}

main {
    padding: 34px clamp(20px, 4vw, 58px);
    max-width: 1440px;
    width: 100%;
    margin: auto
}

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

.eyebrow {
    color: var(--green);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.5px;
    text-transform: uppercase
}

.top h1 {
    font-size: 29px;
    letter-spacing: -.8px;
    margin: 4px 0 0
}

.date {
    color: var(--muted);
    font-size: 13px
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5e7d8;
    display: grid;
    place-items: center;
    font-weight: 750;
    color: #966b4a
}

.page {
    display: none
}

.page.active {
    display: block
}

.grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 18px
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow)
}

.card h2 {
    font-size: 16px;
    margin: 0 0 4px
}

.sub {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 18px
}

.balance {
    background: #214f46;
    color: white;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    min-height: 190px
}

.balance:after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    border: 1px solid #ffffff20;
    border-radius: 50%;
    right: -60px;
    top: -90px;
    box-shadow: 0 0 0 25px #ffffff09, 0 0 0 50px #ffffff07
}

.balance .eyebrow {
    color: #b8ded0
}

.balance h2 {
    font-size: 13px;
    font-weight: 500;
    color: #d3e7df;
    margin: 10px 0 0
}

.amount {
    font-size: 36px;
    font-weight: 750;
    letter-spacing: -1px;
    margin: 2px 0 14px
}

.balance-foot {
    display: flex;
    gap: 25px;
    color: #d3e7df;
    font-size: 12px
}

.balance-foot b {
    display: block;
    color: white;
    font-size: 14px;
    margin-top: 2px
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 25px 0 13px
}

.section-head h2 {
    font-size: 17px;
    margin: 0
}

.link {
    background: none;
    color: var(--green);
    font-size: 12px;
    font-weight: 700
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px
}

.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 15px
}

.stat .symbol {
    font-size: 17px
}

.stat small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin: 7px 0 2px
}

.stat strong {
    font-size: 18px
}

.progress-wrap {
    margin-top: 16px
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 7px
}

.progress {
    height: 8px;
    background: #edf1ef;
    border-radius: 20px;
    overflow: hidden
}

.progress span {
    display: block;
    height: 100%;
    background: var(--green);
    border-radius: 20px;
    width: 0
}

.obligation {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line)
}

.obligation:last-child {
    border: 0;
    padding-bottom: 0
}

.ob-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f2f5f3;
    display: grid;
    place-items: center;
    font-size: 17px
}

.ob-info {
    flex: 1;
    min-width: 0
}

.ob-info strong {
    display: block;
    font-size: 13px
}

.ob-info small {
    color: var(--muted);
    font-size: 11px
}

.ob-amount {
    text-align: right;
    font-size: 13px;
    font-weight: 700
}

.ob-amount small {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: 10px
}

.btn {
    padding: 10px 15px;
    border-radius: 10px;
    background: var(--green);
    color: white;
    font-weight: 650;
    font-size: 12px
}

.btn:hover {
    background: #246b59
}

.btn.secondary {
    background: #edf5f1;
    color: var(--green)
}

.btn.ghost {
    background: #f4f6f6;
    color: #64717a
}

.btn.danger {
    background: #fff0ed;
    color: #b65c4d
}

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

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

.field {
    display: grid;
    gap: 6px
}

.field label {
    font-size: 12px;
    font-weight: 650;
    color: #53616a
}

.field input,
.field select {
    width: 100%;
    border: 1px solid #dfe6e7;
    background: #fff;
    border-radius: 10px;
    padding: 11px 12px;
    outline: none;
    color: var(--ink)
}

.field input:focus,
.field select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px #2f806c18
}

.wide {
    grid-column: 1/-1
}

.hint {
    font-size: 11px;
    color: var(--muted)
}

.checkrow {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #53616a
}

.checkrow input {
    accent-color: var(--green);
    width: 16px;
    height: 16px
}

.category-row {
    display: grid;
    grid-template-columns: 1fr 135px;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line)
}

.category-row:last-child {
    border: 0
}

.category-row label {
    font-size: 13px
}

.category-row input {
    width: 100%;
    border: 1px solid #e1e7e8;
    border-radius: 9px;
    padding: 9px
}

.result-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--green2);
    border-radius: 12px;
    margin-top: 15px
}

.result-total strong {
    font-size: 20px;
    color: var(--green)
}

.notice {
    padding: 13px 15px;
    background: #fff5e8;
    border-radius: 12px;
    color: #8b652e;
    font-size: 12px;
    margin-top: 14px
}

.empty {
    padding: 22px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    background: #fafbfb;
    border-radius: 12px
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px
}

.table th {
    text-align: left;
    color: var(--muted);
    font-weight: 600;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line)
}

.table td {
    padding: 13px 8px;
    border-bottom: 1px solid var(--line)
}

.table tr:last-child td {
    border: 0
}

.pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 30px;
    background: var(--green2);
    color: var(--green);
    font-size: 10px;
    font-weight: 700
}

.pill.warn {
    background: #fff3e5;
    color: #a06b22
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px
}

.summary-box {
    background: #f7f9f8;
    padding: 17px;
    border-radius: 13px
}

.summary-box small {
    color: var(--muted)
}

.summary-box strong {
    display: block;
    font-size: 23px;
    margin-top: 4px
}

.toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: #203e37;
    color: white;
    padding: 12px 17px;
    border-radius: 11px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    transition: .2s;
    pointer-events: none;
    font-size: 13px
}

.toast.show {
    opacity: 1;
    transform: translateY(0)
}

@media(max-width:850px) {
    .app {
        grid-template-columns: 1fr
    }

    aside {
        padding: 13px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        gap: 12px
    }

    .brand {
        padding: 0 3px
    }

    .nav-label,
    .side-note {
        display: none
    }

    .nav {
        display: flex;
        overflow: auto
    }

    .nav button {
        white-space: nowrap;
        padding: 9px 11px;
        font-size: 12px
    }

    .nav .ico {
        display: none
    }

    main {
        padding: 25px 17px
    }

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

@media(max-width:520px) {
    .top h1 {
        font-size: 23px
    }

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

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

    .wide {
        grid-column: auto
    }

    .category-row {
        grid-template-columns: 1fr 110px
    }

    .card {
        padding: 17px
    }

    .balance {
        padding: 20px
    }

    .amount {
        font-size: 31px
    }
}