.income-overview {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    display: grid;
    gap: 16px;
}

.income-overview,
.income-overview * {
    box-sizing: border-box;
}

.income-overview .panel {
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
}

.income-overview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.income-overview__state {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0,0,0,.04);
}

    .income-overview__state.is-error {
        background: rgba(255,0,0,.08);
        white-space: pre-line;
    }

.ov-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ov-row {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
    box-shadow: var(--rk-shadow-card);
}

.ov-row__main {
    width: 100%;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.7fr 0.8fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 12px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
    -webkit-text-fill-color: currentColor;
}

.ov-row__col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ov-row__total {
    font-weight: 600;
}

.ov-row__imgBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    text-decoration: none;
}

.ov-row__chev {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: transform 200ms ease;
}

.ov-row.is-open .ov-row__chev {
    transform: rotate(180deg);
}

/* Details slide animatie */
.ov-details {
    max-height: 0px;
    overflow: hidden;
    transition: max-height 260ms ease;
    border-top: 1px solid rgba(0,0,0,.06);
    background: rgba(0,0,0,.02);
}

.ov-details__inner {
    padding: 12px;
}

.ov-details__loading,
.ov-details__empty,
.ov-details__error {
    padding: 8px 2px;
    opacity: 0.9;
}

.ov-details__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.ov-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ov-line {
    display: grid;
    grid-template-columns: 1fr 70px 120px;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
}

.ov-line__qty,
.ov-line__total {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Popup image */
.ov-imgPopup__wrap {
    width: 100%;
}

.ov-imgPopup__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}

.ov-row__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ov-row__iconBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 10px;
}

.ov-row__iconBtn--danger {
    opacity: .9;
}

.income-overview__headerActions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.ov-filter {
    position: relative;
}

.ov-filter__panel {
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    min-width: 320px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 12px;
    padding: .75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    z-index: 50;
}

.ov-filter__panelHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .25rem;
}

.ov-filter__panelTitle {
    font-size: 25px;
    font-weight: 600;
    color: #111;
}

.ov-filter__clearBtn {
    padding: 6px;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: translate(0, -7px);
}

.ov-filter__row {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .75rem;
}

.ov-filter__label {
    font-size: .9rem;
    opacity: .85;
}

.ov-filter__select,
.ov-filter__date {
    width: 100%;
    padding: .45rem .55rem;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.15);
}

.ov-filter__dates {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ov-filter__dateSep {
    opacity: .7;
    font-size: .9rem;
}

.ov-filter__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: .25rem;
}

#ovFilterApplyBtn {
    width: 100%;
    margin: 0;
}

.ov-filter__close {
    display: flex;
    justify-content: center;
    margin-top: .25rem;
}

.ov-filter__closeBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: .7;
    margin: 0;
    padding: 0;
}

    .ov-filter__closeBtn:hover {
        opacity: 1;
        background: rgba(0,0,0,.05);
    }



@media (pointer: coarse) {
    .ov-filter__closeBtn {
        width: 24px;
        height: 24px; /* nicer tap target on mobile */
    }
}



@media (max-width: 768px) {
    .ov-row__main {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "store chev"
            "date chev"
            "total chev";
        row-gap: 6px;
        column-gap: 10px;
        align-items: center;
    }

    .ov-row__store {
        grid-area: store;
    }

    .ov-row__date {
        grid-area: date;
        opacity: 0.85;
        font-size: 0.95em;
    }

    /* Items tellertje verbergen op mobiel (optioneel) */
    .ov-row__items {
        display: none;
    }

    .ov-row__total {
        grid-area: total;
        font-weight: 700;
    }

    .ov-row__chev {
        grid-area: chev;
        align-self: center;
        justify-self: end;
        width: 40px;
        height: 40px;
    }

    /* Zorg dat lange winkelnaam netjes afkapt */
    .ov-row__store,
    .ov-row__date,
    .ov-row__total {
        min-width: 0;
    }
}

.income-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 0;
    background: var(--color-primary, #1d4ed8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
    z-index: 60;
}

.income-fab svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.4;
    color: white;
}

.income-fab:hover {
    filter: brightness(1.05);
}

@media (max-width: 600px) {
    .income-fab {
        right: 16px;
        bottom: 16px;
    }
}



