/* ==========================================
   FUND PAGE
========================================== */

.fund-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}


/* HEADER */

.fund-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    overflow: hidden;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 22px;
    background: #fff;
    position: relative;
    z-index: 25;
    margin-top: -46px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    padding: 17px;
}

.fund-page__eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #16A34A;
    font-size: 10px;
    font-weight: 700;
}

.fund-page__header h1 {
    margin: 0;
    color: #0F172A;
    font-size: 21px;
    font-weight: 800;
}

.fund-page__header p {
    margin: 3px 0 0;
    color: #64748B;
    font-size: 10px;
}

.fund-page__add {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: #16A34A;
    color: #fff;
    cursor: pointer;
}

    .fund-page__add svg {
        width: 20px;
        height: 20px;
    }


/* BALANCE */

.fund-balance-card {
    padding: 16px;
    border: 1px solid #E2E8F0;
    border-radius: 17px;
    background: #fff;
}

    .fund-balance-card > span {
        display: block;
        color: #64748B;
        font-size: 9px;
        font-weight: 600;
    }

    .fund-balance-card > strong {
        display: block;
        margin-top: 5px;
        color: #0F172A;
        font-size: 24px;
        font-weight: 800;
    }

        .fund-balance-card > strong.is-negative {
            color: #B91C1C;
        }

.fund-balance-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
    border-top: 1px solid #EEF2F7;
}

    .fund-balance-card__stats > div {
        padding-top: 11px;
    }

        .fund-balance-card__stats > div + div {
            padding-left: 14px;
            border-left: 1px solid #EEF2F7;
        }

    .fund-balance-card__stats span {
        display: block;
        color: #94A3B8;
        font-size: 8px;
    }

    .fund-balance-card__stats strong {
        display: block;
        margin-top: 3px;
        font-size: 11px;
        font-weight: 700;
    }

    .fund-balance-card__stats .is-income strong {
        color: #15803D;
    }

    .fund-balance-card__stats .is-expense strong {
        color: #B91C1C;
    }


/* SEARCH */

.fund-search {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #fff;
}

    .fund-search svg {
        width: 17px;
        height: 17px;
        color: #94A3B8;
    }

    .fund-search input {
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        font-family: inherit;
        font-size: 11px;
    }


/* FILTER */

.fund-filter {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fund-filter__item {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background: #fff;
    color: #64748B;
    font-family: inherit;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
}

    .fund-filter__item.is-active {
        border-color: #BBF7D0;
        background: #F0FDF4;
        color: #15803D;
    }


/* TRANSACTIONS */
/* ==========================================
   FUND TRANSACTION LIST
========================================== */

.fund-transaction-list {
    overflow: hidden;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    background: #fff;
}


/* ==========================================
   TRANSACTION
========================================== */

.fund-transaction {
    display: grid;
    grid-template-columns: 36px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 10px 11px 12px;
}

    .fund-transaction +
    .fund-transaction {
        border-top: 1px solid #EEF2F7;
    }


/* ==========================================
   ICON
========================================== */

.fund-transaction__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
}

    .fund-transaction__icon svg {
        width: 17px;
        height: 17px;
    }

    .fund-transaction__icon.is-income {
        background: #F0FDF4;
        color: #15803D;
    }

    .fund-transaction__icon.is-expense {
        background: #FEF2F2;
        color: #B91C1C;
    }


/* ==========================================
   CONTENT
========================================== */

.fund-transaction__content {
    min-width: 0;
}

    .fund-transaction__content > strong {
        display: block;
        overflow: hidden;
        color: #334155;
        font-size: 10px;
        font-weight: 700;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .fund-transaction__content small {
        display: block;
        margin-top: 3px;
        overflow: hidden;
        color: #94A3B8;
        font-size: 8px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }


/* ==========================================
   RIGHT
========================================== */

.fund-transaction__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-shrink: 0;
}


/* ==========================================
   AMOUNT
========================================== */

.fund-transaction__amount {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

    .fund-transaction__amount.is-income {
        color: #15803D;
    }

        .fund-transaction__amount.is-income::before {
            content: "+";
        }

    .fund-transaction__amount.is-expense {
        color: #B91C1C;
    }

        .fund-transaction__amount.is-expense::before {
            content: "-";
        }


/* ==========================================
   MORE BUTTON
========================================== */

.fund-transaction__more {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #E2E8F0;
    border-radius: 9px;
    background: #F8FAFC;
    color: #64748B;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

    .fund-transaction__more svg {
        width: 15px;
        height: 15px;
        display: block;
    }

    .fund-transaction__more:hover {
        border-color: #CBD5E1;
        background: #F1F5F9;
        color: #334155;
    }

    .fund-transaction__more:active {
        transform: scale(.94);
    }

    .fund-transaction__more:focus-visible {
        outline: 2px solid #BBF7D0;
        outline-offset: 1px;
    }

/* EMPTY */

.fund-empty {
    padding: 24px 18px;
    border: 1px dashed #CBD5E1;
    border-radius: 16px;
    background: #F8FAFC;
    text-align: center;
}

    .fund-empty strong {
        color: #334155;
        font-size: 11px;
    }

    .fund-empty p {
        max-width: 280px;
        margin: 5px auto 12px;
        color: #64748B;
        font-size: 9px;
        line-height: 1.5;
    }

/* ==========================================
   DELETE TRANSACTION
========================================== */

.quick-edit-transaction__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.quick-edit-transaction__delete {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid #FECACA;
    border-radius: 11px;
    background: #FFF;
    color: #DC2626;
    font-family: inherit;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

    .quick-edit-transaction__delete svg {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
    }

    .quick-edit-transaction__delete:hover {
        border-color: #FCA5A5;
        background: #FEF2F2;
    }

    .quick-edit-transaction__delete:active {
        transform: scale(.98);
    }

    .quick-edit-transaction__delete:disabled {
        opacity: .55;
        cursor: not-allowed;
    }
.quick-delete-transaction__confirm {
    padding: 11px;
    border: 1px solid #FECACA;
    border-radius: 11px;
    background: #FEF2F2;
}

    .quick-delete-transaction__confirm p {
        margin: 0 0 9px;
        color: #991B1B;
        font-size: 8px;
        line-height: 1.4;
        text-align: center;
    }

    .quick-delete-transaction__confirm > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

.quick-delete-transaction__cancel,
.quick-delete-transaction__confirm-button {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
}

.quick-delete-transaction__cancel {
    border: 1px solid #E2E8F0;
    background: #FFF;
    color: #64748B;
}

.quick-delete-transaction__confirm-button {
    border: 1px solid #DC2626;
    background: #DC2626;
    color: #FFF;
}
/* ==========================================
   MONTH SUMMARY
========================================== */

.fund-month-summary {
    padding: 13px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 15px;
    background: #fff;
}

.fund-month-summary__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

    .fund-month-summary__heading span {
        display: block;
        color: #94A3B8;
        font-size: 8px;
    }

    .fund-month-summary__heading > div > strong {
        display: block;
        margin-top: 3px;
        color: #334155;
        font-size: 11px;
        font-weight: 700;
    }

.fund-month-summary__balance {
    color: #15803D;
    font-size: 12px;
    font-weight: 800;
}

    .fund-month-summary__balance.is-negative {
        color: #B91C1C;
    }

.fund-month-summary__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 11px;
    border-top: 1px solid #EEF2F7;
}

    .fund-month-summary__stats > div {
        padding-top: 10px;
    }

        .fund-month-summary__stats > div + div {
            padding-left: 12px;
            border-left: 1px solid #EEF2F7;
        }

    .fund-month-summary__stats span {
        display: block;
        color: #94A3B8;
        font-size: 8px;
    }

    .fund-month-summary__stats strong {
        display: block;
        margin-top: 3px;
        font-size: 10px;
        font-weight: 700;
    }

    .fund-month-summary__stats .is-income {
        color: #15803D;
    }

    .fund-month-summary__stats .is-expense {
        color: #B91C1C;
    }
