/* =========================================================
   MAIN CARD
========================================================= */

.flow-card {
    overflow: hidden;

    margin-bottom: 60px;

    background: var(--bg-2);

    border: 1px solid var(--border-1);
    border-radius: 20px;

    box-shadow:
        0 2px 4px
        color-mix(
            in srgb,
            var(--text-1) 3%,
            transparent
        ),
        0 18px 45px
        color-mix(
            in srgb,
            var(--text-1) 7%,
            transparent
        );
}


.flow-card-body {
    padding: 28px;
}


/* =========================================================
   HEADER
========================================================= */

.flow-header {
    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 26px;
}


.flow-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    color: var(--text-2);

    background: var(--bg-3);

    border: 1px solid var(--border-1);
    border-radius: 13px;

    font-size: 20px;

    box-shadow:
        inset 0 1px 0
        color-mix(
            in srgb,
            var(--bg-2) 82%,
            transparent
        );
}


.flow-title {
    margin: 0 0 3px;

    color: var(--text-1);

    font-size: 20px;
    font-weight: 750;

    letter-spacing: -.025em;
}


.flow-subtitle {
    color: var(--text-3);

    font-size: 13px;
}


/* =========================================================
   ERROR
========================================================= */

.flow-error {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 20px;

    padding: 14px 16px;

    color: var(--text-1);

    background:
        color-mix(
            in srgb,
            var(--bg-2) 88%,
            #dc3545
        );

    border:
        1px solid
        color-mix(
            in srgb,
            var(--border-1) 72%,
            #dc3545
        );

    border-radius: 14px;

    font-size: 14px;
}


.flow-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    background: var(--bg-2);

    border-radius: 10px;

    font-size: 16px;
}


/* =========================================================
   LOADING
========================================================= */

.flow-loading {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    min-height: 180px;

    color: var(--text-3);

    font-size: 14px;
}


.flow-loading .spinner-border {
    color: var(--text-2);
}


/* =========================================================
   LIST
========================================================= */

.flow-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


/* =========================================================
   ITEM
========================================================= */

.flow-item {
    display: flex;
    align-items: center;

    gap: 14px;

    min-height: 84px;

    padding: 15px 16px;

    background:
        linear-gradient(
            135deg,
            var(--bg-2) 0%,
            color-mix(
                in srgb,
                var(--bg-2) 74%,
                var(--bg-3)
            ) 100%
        );

    border: 1px solid var(--border-1);
    border-radius: 15px;

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}


.flow-item:hover {
    transform: translateY(-1px);

    border-color:
        color-mix(
            in srgb,
            var(--border-1) 45%,
            var(--text-3)
        );

    box-shadow:
        0 8px 22px
        color-mix(
            in srgb,
            var(--text-1) 6%,
            transparent
        );
}


/* =========================================================
   ICON
========================================================= */

.flow-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    color: var(--text-2);

    background: var(--bg-3);

    border: 1px solid var(--border-1);
    border-radius: 13px;

    font-size: 18px;
}


.flow-item-icon.is-income {
    color:
        color-mix(
            in srgb,
            #198754 72%,
            var(--text-1)
        );

    background:
        color-mix(
            in srgb,
            var(--bg-2) 90%,
            #198754
        );

    border-color:
        color-mix(
            in srgb,
            var(--border-1) 75%,
            #198754
        );
}


.flow-item-icon.is-expense {
    color:
        color-mix(
            in srgb,
            #dc3545 72%,
            var(--text-1)
        );

    background:
        color-mix(
            in srgb,
            var(--bg-2) 91%,
            #dc3545
        );

    border-color:
        color-mix(
            in srgb,
            var(--border-1) 76%,
            #dc3545
        );
}


/* =========================================================
   CONTENT
========================================================= */

.flow-item-content {
    min-width: 0;

    flex: 1;
}


.flow-item-about {
    margin-bottom: 6px;

    color: var(--text-1);

    font-size: 15px;
    font-weight: 650;

    line-height: 1.35;
}


.flow-item-date {
    display: flex;
    align-items: center;

    gap: 6px;

    color: var(--text-3);

    font-size: 12px;
}


.flow-item-date i {
    font-size: 11px;
}


/* =========================================================
   AMOUNT
========================================================= */

.flow-item-amount {
    flex-shrink: 0;

    color: var(--text-1);

    font-size: 17px;
    font-weight: 750;

    letter-spacing: -.02em;

    white-space: nowrap;
}


.flow-item-amount.is-income {
    color:
        color-mix(
            in srgb,
            #198754 78%,
            var(--text-1)
        );
}


.flow-item-amount.is-expense {
    color:
        color-mix(
            in srgb,
            #dc3545 72%,
            var(--text-1)
        );
}


/* =========================================================
   EMPTY
========================================================= */

.flow-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 260px;

    padding: 40px 20px;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            var(--bg-1),
            color-mix(
                in srgb,
                var(--bg-1) 68%,
                var(--bg-3)
            )
        );

    border: 1px dashed var(--border-1);
    border-radius: 16px;
}


.flow-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 68px;
    height: 68px;

    margin-bottom: 16px;

    color: var(--text-2);

    background: var(--bg-2);

    border: 1px solid var(--border-1);
    border-radius: 18px;

    font-size: 28px;

    box-shadow:
        0 8px 24px
        color-mix(
            in srgb,
            var(--text-1) 6%,
            transparent
        );
}


.flow-empty-title {
    margin-bottom: 5px;

    color: var(--text-1);

    font-size: 17px;
    font-weight: 700;
}


.flow-empty-text {
    color: var(--text-3);

    font-size: 13px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767.98px) {

    .flow-card {
        margin-bottom: 40px;

        border-radius: 16px;
    }


    .flow-card-body {
        padding: 18px;
    }


    .flow-header {
        gap: 11px;

        margin-bottom: 20px;
    }


    .flow-header-icon {
        width: 40px;
        height: 40px;

        flex-basis: 40px;

        border-radius: 11px;

        font-size: 17px;
    }


    .flow-title {
        font-size: 18px;
    }


    .flow-subtitle {
        font-size: 12px;
    }


    .flow-item {
        min-height: 74px;

        gap: 11px;

        padding: 12px 13px;

        border-radius: 13px;
    }


    .flow-item:hover {
        transform: none;

        box-shadow: none;
    }


    .flow-item-icon {
        width: 42px;
        height: 42px;

        flex-basis: 42px;

        border-radius: 11px;

        font-size: 16px;
    }


    .flow-item-about {
        margin-bottom: 4px;

        font-size: 14px;
    }


    .flow-item-date {
        font-size: 11px;
    }


    .flow-item-amount {
        font-size: 15px;
    }


    .flow-empty {
        min-height: 220px;

        padding: 34px 18px;
    }


    .flow-empty-icon {
        width: 58px;
        height: 58px;

        margin-bottom: 14px;

        border-radius: 16px;

        font-size: 24px;
    }

}


/* =========================================================
   VERY SMALL
========================================================= */

@media (max-width: 420px) {

    .flow-item {
        align-items: flex-start;

        flex-wrap: wrap;
    }


    .flow-item-content {
        width: calc(100% - 56px);
    }


    .flow-item-amount {
        width: 100%;

        padding-left: 57px;

        font-size: 16px;
    }

}