/* Cash Flow section navigation (page tabs + sidebar sub-links), opening strip and pagination v1.1.0 */

/* ---------- Page tabs: Cash Flow | Daily Opening & Closing ---------- */
.cash-flow-view-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
    padding: 8px;
    border-radius: 18px;
}

.cash-flow-view-navigation > a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #15233a;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.cash-flow-view-navigation > a:hover {
    background: #f3f7fd;
    border-color: #d9e3ef;
}

.cash-flow-view-navigation > a:focus-visible {
    outline: 2px solid #2c6bed;
    outline-offset: 2px;
}

.cash-flow-view-navigation > a > span {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eaf1fd;
    color: #2c6bed;
    font-size: 12px;
    font-weight: 800;
}

.cash-flow-view-navigation > a > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cash-flow-view-navigation strong {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.cash-flow-view-navigation small {
    overflow: hidden;
    color: #5f718a;
    font-size: 11px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cash-flow-view-navigation > a.active {
    background: linear-gradient(135deg, #2c6bed 0%, #1f56c9 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 7px 17px rgba(44, 107, 237, .22);
}

.cash-flow-view-navigation > a.active > span {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.cash-flow-view-navigation > a.active small {
    color: rgba(255, 255, 255, .82);
}

@media (max-width: 640px) {
    .cash-flow-view-navigation {
        grid-template-columns: 1fr;
    }

    .cash-flow-view-navigation small {
        white-space: normal;
    }
}

/* ---------- Sidebar sub-links under "Cash Flow" ---------- */
.cash-flow-sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 21px;
    padding-left: 10px;
    border-left: 1px solid rgba(184, 203, 226, .22);
}

/* Only show the sub-links while Cash Flow is the open page */
.nav button[data-page="cash-flow"]:not(.active) + .cash-flow-sidebar-navigation {
    display: none;
}

.cash-flow-sidebar-navigation > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    color: #b8cbe2;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.cash-flow-sidebar-navigation > a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.cash-flow-sidebar-navigation > a > span {
    display: grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    font-size: 9px;
    font-weight: 800;
}

.cash-flow-sidebar-navigation > a.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.cash-flow-sidebar-navigation > a.active > span {
    background: #2c6bed;
    color: #fff;
}

/* ---------- Movements view: period opening strip ---------- */
.cash-flow-opening-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #e6edf6;
    border-bottom: 1px solid #e6edf6;
    background: #f8fbff;
}

.cash-flow-opening-strip > div {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid #d9e3ef;
    border-radius: 12px;
    background: #fff;
}

.cash-flow-opening-strip > div small {
    color: #5f718a;
    font-size: 11px;
    font-weight: 600;
}

.cash-flow-opening-strip > div strong {
    color: #15233a;
    font-size: 13px;
    font-weight: 800;
}

.cash-flow-opening-strip > p {
    margin: 0 0 0 auto;
    color: #5f718a;
    font-size: 11px;
}

/* ---------- Movements view: pagination ---------- */
.cash-flow-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 14px 16px;
}

.cash-flow-pagination > a,
.cash-flow-pagination > span,
.cash-flow-pagination > strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #d9e3ef;
    border-radius: 10px;
    background: #fff;
    color: #2c6bed;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.cash-flow-pagination > a:hover {
    background: #f3f7fd;
}

.cash-flow-pagination > strong {
    border-color: #2c6bed;
    background: #2c6bed;
    color: #fff;
}

.cash-flow-pagination > span {
    background: #f5f7fa;
    color: #9aa9bd;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .cash-flow-opening-strip > p {
        margin-left: 0;
    }

    .cash-flow-pagination {
        justify-content: center;
    }
}
