.closing-shell {
    --closing-border: color-mix(in srgb, var(--bs-border-color) 85%, transparent);
    --closing-soft: color-mix(in srgb, var(--bs-primary) 10%, transparent);
    --closing-row-odd: color-mix(in srgb, var(--bs-secondary-bg) 78%, transparent);
    --closing-row-even: color-mix(in srgb, var(--bs-secondary-bg) 58%, transparent);
    --closing-row-divider: color-mix(in srgb, var(--bs-border-color) 76%, transparent);
    --closing-auto-parent-bg: color-mix(in srgb, var(--bs-primary) 14%, transparent);
    --closing-auto-child-bg: color-mix(in srgb, var(--bs-primary) 5%, var(--bs-secondary-bg) 95%);
    --closing-focus: color-mix(in srgb, var(--bs-primary) 24%, transparent);
    padding: .1rem 0;
}

.closing-loading {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    color: var(--bs-secondary-color);
}

.closing-main-column,
.closing-right-column {
    min-width: 0;
}

.closing-control-card,
.closing-vouchers-card,
.closing-funds-card,
.closing-actions-card {
    border-color: var(--closing-border) !important;
}

.closing-control-caption {
    color: var(--bs-secondary-color);
    font-size: .72rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    line-height: 1;
}

.closing-refresh-row {
    width: 100%;
    margin: 0 0 .75rem 0;
}

.closing-refresh-row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.closing-refresh-tools {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
    gap: .55rem;
    margin: 0;
    width: 100%;
    text-align: right;
}

.closing-main-layout {
    margin-top: 0 !important;
}

.closing-refresh-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .42rem;
    text-align: right;
    white-space: nowrap;
}

.closing-refresh-meta .small {
    line-height: 1.15;
}

.closing-refresh-timestamp {
    color: var(--bs-body-color);
    white-space: nowrap;
}

.closing-control-table-wrap {
    border: 1px solid var(--closing-border);
    border-radius: .72rem;
    overflow: hidden;
    background: color-mix(in srgb, var(--bs-secondary-bg) 70%, transparent);
    width: min(100%, 940px);
    margin-inline: auto;
}

.closing-control-table,
.closing-control-table tbody,
.closing-control-table tr {
    border-color: transparent !important;
}

.closing-control-table {
    width: 100%;
    table-layout: fixed;
}

.closing-control-table > :not(caption) > * > * {
    border-bottom: 1px solid var(--closing-row-divider);
    padding: .48rem .62rem;
    vertical-align: middle;
}

.closing-control-table tbody tr:last-child > * {
    border-bottom: 0;
}

.closing-control-table th {
    width: calc(100% - 13.8rem);
    font-size: .84rem;
    font-weight: 600;
    color: var(--bs-body-color);
    min-width: 0;
}

.closing-control-table .closing-control-amount {
    width: 13.8rem;
    min-width: 13.8rem;
    text-align: right;
    font-size: .92rem;
    font-weight: 800;
    color: var(--bs-body-color);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    border-left: 1px dashed color-mix(in srgb, var(--bs-border-color) 65%, transparent);
    letter-spacing: .01em;
    background: color-mix(in srgb, var(--bs-body-bg) 62%, transparent);
}

.closing-row-main {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    width: 100%;
}

.closing-row-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.closing-row-leader {
    flex: 1 1 auto;
    min-width: 1.25rem;
    border-bottom: 1px dotted color-mix(in srgb, var(--bs-border-color) 72%, transparent);
    opacity: .65;
    transform: translateY(.07rem);
}

.closing-control-table tbody tr:nth-child(odd) {
    background: var(--closing-row-odd);
}

.closing-control-table tbody tr:nth-child(even) {
    background: var(--closing-row-even);
}

.closing-control-table tbody tr:hover {
    background: color-mix(in srgb, var(--bs-primary) 9%, transparent);
}

.closing-control-row.is-section {
    background: color-mix(in srgb, var(--bs-primary) 14%, transparent) !important;
}

.closing-control-row.is-section th,
.closing-control-row.is-section .closing-control-amount {
    color: var(--bs-primary-text-emphasis);
    font-weight: 700;
}

.closing-control-row.is-section .closing-row-leader {
    border-bottom-color: color-mix(in srgb, var(--bs-primary) 38%, var(--bs-border-color));
    opacity: .85;
}

.closing-control-row.is-automatic-parent {
    background: var(--closing-auto-parent-bg) !important;
}

.closing-parent-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    letter-spacing: .01em;
    font-weight: 700;
}

.closing-parent-label .closing-auto-toggle {
    margin-left: .15rem;
}

.closing-control-row.is-automatic-parent th {
    font-size: .93rem;
}

.closing-control-row.is-automatic-parent .closing-control-amount {
    font-size: 1rem;
    font-weight: 800;
    color: var(--bs-primary-text-emphasis);
}

.closing-control-row.is-detail {
    background: var(--closing-auto-child-bg) !important;
}

.closing-control-row.is-detail th {
    padding-left: 1.15rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    border-left: 3px solid color-mix(in srgb, var(--bs-primary) 28%, transparent);
}

.closing-control-row.is-automatic-child th {
    padding-left: 1.35rem;
    font-size: .78rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.closing-control-row.is-automatic-child .closing-auto-detail-title {
    font-size: .78rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.closing-auto-detail-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.15rem;
    padding: 0 .3rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 45%, transparent);
    background: color-mix(in srgb, var(--bs-primary) 16%, transparent);
    color: var(--bs-primary-text-emphasis);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
}

.closing-control-row.is-automatic-child .closing-auto-detail-amount {
    font-size: .82rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.closing-auto-detail-main {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    min-width: 0;
    flex: 1 1 auto;
}

.closing-auto-detail-title {
    font-size: .8rem;
    color: var(--bs-body-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.closing-auto-detail-bullet {
    color: color-mix(in srgb, var(--bs-primary) 62%, var(--bs-secondary-color));
    font-size: 1rem;
    line-height: 1;
    margin-top: -.04rem;
}

.closing-auto-detail-amount {
    display: inline-block;
    width: 100%;
    font-size: .84rem;
    font-weight: 700;
    color: var(--bs-secondary-color);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.closing-control-row.is-income {
    background: transparent;
}

.closing-control-row.is-income th,
.closing-control-row.is-income .closing-control-amount {
    color: var(--bs-success-text-emphasis);
}

.closing-control-row.is-expense {
    background: transparent;
}

.closing-control-row.is-expense th,
.closing-control-row.is-expense .closing-control-amount {
    color: var(--bs-danger-text-emphasis);
}

.closing-control-row.is-manual-out th,
.closing-control-row.is-manual-out .closing-control-amount {
    color: var(--bs-danger) !important;
    font-weight: 700;
}

.closing-control-row.is-change th,
.closing-control-row.is-change .closing-control-amount {
    color: var(--bs-warning-text-emphasis);
    font-weight: 700;
}

.closing-control-row.is-rounding-positive .closing-control-amount {
    color: var(--bs-success-text-emphasis);
    font-weight: 700;
}

.closing-control-row.is-rounding-negative .closing-control-amount {
    color: var(--bs-danger-text-emphasis);
    font-weight: 700;
}

.closing-control-row.is-rounding-neutral .closing-control-amount {
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.closing-control-row.is-total {
    background: color-mix(in srgb, var(--bs-info) 12%, transparent) !important;
}

.closing-control-row.is-total th,
.closing-control-row.is-total .closing-control-amount {
    color: var(--bs-info-text-emphasis);
    font-weight: 700;
}

.closing-control-row.is-expected-total .closing-control-amount {
    color: var(--bs-info-text-emphasis);
    font-weight: 800;
}

.closing-control-row.is-actual-total .closing-control-amount {
    color: var(--bs-primary-text-emphasis);
    font-weight: 800;
}

.closing-control-row.is-exact {
    background: color-mix(in srgb, var(--bs-success) 16%, transparent) !important;
}

.closing-control-row.is-exact th,
.closing-control-row.is-exact .closing-control-amount {
    color: var(--bs-success-text-emphasis);
    font-weight: 700;
}

.closing-control-row.is-minor {
    background: color-mix(in srgb, var(--bs-warning) 16%, transparent) !important;
}

.closing-control-row.is-minor th,
.closing-control-row.is-minor .closing-control-amount {
    color: var(--bs-warning-text-emphasis);
    font-weight: 700;
}

.closing-control-row.is-major {
    background: color-mix(in srgb, var(--bs-danger) 16%, transparent) !important;
}

.closing-control-row.is-major th,
.closing-control-row.is-major .closing-control-amount {
    color: var(--bs-danger-text-emphasis);
}

.closing-control-row.is-break-top > * {
    border-top: 1px solid color-mix(in srgb, var(--bs-border-color) 72%, transparent) !important;
}

.closing-control-amount-wrap {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
}

.closing-auto-toggle {
    min-width: 1.95rem;
    width: 1.95rem;
    height: 1.95rem;
    border-radius: .45rem;
    border: 1px solid var(--closing-border);
    background: color-mix(in srgb, var(--bs-body-bg) 88%, transparent);
    color: var(--bs-secondary-color);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .12s ease;
}

.closing-auto-toggle:hover {
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--closing-border));
    background: color-mix(in srgb, var(--bs-primary) 18%, transparent);
    color: var(--bs-primary-text-emphasis);
    transform: scale(1.03);
}

.closing-auto-toggle:focus-visible {
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--closing-border));
    box-shadow: 0 0 0 .14rem var(--closing-focus);
}

.closing-vouchers-card.is-collapsed .card-header {
    min-height: 3.05rem;
}

.closing-vouchers-collapsed-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.closing-vouchers-grid-wrap {
    max-height: calc(100vh - 19rem);
    overflow: auto;
    border: 0 !important;
    outline: 0;
    box-shadow: none;
    border-radius: 0 !important;
}

.closing-shell .closing-vouchers-grid-wrap.table-responsive {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.closing-vouchers-table,
.closing-vouchers-table thead,
.closing-vouchers-table tbody,
.closing-vouchers-table tr {
    border-color: transparent !important;
}

.closing-vouchers-table thead th {
    border-bottom: 0;
    font-size: .72rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

.closing-vouchers-table > :not(caption) > * > * {
    border-bottom-width: 0;
    padding: .42rem .48rem;
}

.closing-vouchers-table tbody td {
    border-top: 0;
    font-size: .86rem;
    vertical-align: middle;
}

.closing-vouchers-table tbody tr:hover td {
    background: color-mix(in srgb, var(--bs-primary) 10%, transparent);
}

.closing-vouchers-table tbody tr.is-voided {
    opacity: .62;
    text-decoration: line-through;
}

.closing-concept-cell {
    display: flex;
    flex-direction: column;
    gap: .08rem;
}

.closing-transaction-number {
    font-size: .7rem;
    color: var(--bs-primary-text-emphasis);
    font-weight: 700;
}

.closing-empty-state {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    color: var(--bs-secondary-color);
}

.closing-empty-state i {
    font-size: 2.3rem;
    opacity: .4;
}

.closing-funds-card .input-group-text {
    background: color-mix(in srgb, var(--bs-secondary-bg) 60%, transparent);
    border-color: var(--closing-border);
}

.closing-actions-card textarea {
    min-height: 98px;
}

.closing-confirm-btn {
    min-height: 2.4rem;
    font-weight: 600;
    letter-spacing: .01em;
}

.closing-modal .modal-header {
    background: linear-gradient(135deg, var(--bs-danger) 0%, color-mix(in srgb, var(--bs-danger) 70%, black) 100%);
    color: #fff;
    border-bottom: 0;
}

.closing-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.closing-confirm-intro {
    color: var(--bs-body-color);
    line-height: 1.35;
}

.closing-confirm-summary {
    border: 1px solid var(--closing-border);
    border-radius: .72rem;
    background: color-mix(in srgb, var(--bs-secondary-bg) 65%, transparent);
    padding: .25rem .6rem;
}

.closing-confirm-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .48rem 0;
    border-bottom: 1px dashed color-mix(in srgb, var(--bs-border-color) 70%, transparent);
}

.closing-confirm-row:last-child {
    border-bottom: 0;
}

.closing-confirm-label {
    font-size: .69rem;
    text-transform: uppercase;
    letter-spacing: .045em;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    font-weight: 700;
}

.closing-confirm-leader {
    flex: 1 1 auto;
    min-width: 1rem;
    border-bottom: 1px dotted color-mix(in srgb, var(--bs-border-color) 72%, transparent);
    opacity: .6;
    transform: translateY(.07rem);
}

.closing-confirm-row strong {
    font-size: .96rem;
    font-weight: 800;
    color: var(--bs-body-color);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.closing-confirm-row.is-expected strong {
    color: var(--bs-info-text-emphasis);
}

.closing-confirm-row.is-actual strong {
    color: var(--bs-primary-text-emphasis);
}

.closing-confirm-row.is-exact strong {
    color: var(--bs-success-text-emphasis);
}

.closing-confirm-row.is-minor strong {
    color: var(--bs-warning-text-emphasis);
}

.closing-confirm-row.is-major strong {
    color: var(--bs-danger-text-emphasis);
}

.closing-confirm-row.is-opening-fund strong {
    color: var(--bs-secondary-color);
}

.closing-confirm-render {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 22%, var(--closing-border));
    border-radius: .72rem;
    padding: .58rem .68rem;
    background: color-mix(in srgb, var(--bs-primary) 9%, transparent);
}

.closing-confirm-render-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.closing-confirm-render-value {
    font-size: 1.06rem;
    font-weight: 900;
    color: var(--bs-primary-text-emphasis);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

@media (min-width: 1200px) {
    .closing-sticky-column {
        position: sticky;
        top: .15rem;
        max-height: calc(100vh - 4.2rem);
        overflow: auto;
        padding-right: .05rem;
    }
}

@media (min-width: 1366px) {
    .closing-main-column {
        flex: 0 0 66%;
        max-width: 66%;
    }

    .closing-right-column {
        flex: 0 0 34%;
        max-width: 34%;
    }
}

@media (min-width: 1920px) {
    .closing-main-column {
        flex: 0 0 68%;
        max-width: 68%;
    }

    .closing-right-column {
        flex: 0 0 32%;
        max-width: 32%;
    }
}

@media (max-width: 1199.98px) {
    .closing-vouchers-grid-wrap {
        max-height: 420px;
    }
}

@media (max-width: 991.98px) {
    .closing-control-table th {
        font-size: .8rem;
        width: calc(100% - 10.4rem);
    }

    .closing-control-table .closing-control-amount {
        font-size: .88rem;
        width: 10.4rem;
        min-width: 10.4rem;
    }

    .closing-row-leader {
        display: none;
    }

    .closing-confirm-label {
        font-size: .66rem;
    }

    .closing-confirm-row strong {
        font-size: .9rem;
    }

    .closing-confirm-render-value {
        font-size: .98rem;
    }
}

@media (max-width: 575.98px) {
    .closing-refresh-tools {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: .35rem;
    }

    .closing-refresh-timestamp {
        max-width: calc(100% - 7.5rem);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .closing-control-table > :not(caption) > * > * {
        padding: .4rem .48rem;
    }

    .closing-vouchers-table thead {
        display: none;
    }

    .closing-vouchers-table tbody tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: .2rem;
        padding: .35rem .4rem;
        margin-bottom: .35rem;
        border-radius: .5rem;
        background: color-mix(in srgb, var(--bs-secondary-bg) 58%, transparent);
    }

    .closing-vouchers-table > :not(caption) > * > * {
        padding: .1rem 0 !important;
    }
}
