.fechamento-index .proposal-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem;
    padding-top: .75rem;
}

.fechamento-detail-index .proposal-page > .fechamento-overview { order: 1; }
.fechamento-detail-index .proposal-page > .fechamento-structure,
.fechamento-detail-index .proposal-page > .proposal-list { order: 2; }
.fechamento-detail-index .proposal-page > .fechamento-related-invoices { order: 3; }
.fechamento-detail-index .proposal-page > .fechamento-diagnostics { order: 4; }

.fechamento-index .proposal-header__aside {
    flex-wrap: wrap;
}

.fechamento-primary-action,
.fechamento-secondary-action,
.fechamento-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    min-height: 2.25rem;
    border-radius: .5rem;
    font-size: .74rem;
    font-weight: 750;
}

.fechamento-primary-action {
    padding: 0 .8rem;
    border: 1px solid #2677b4;
    background: #2677b4;
    color: #fff;
}

.fechamento-secondary-action {
    padding: 0 .75rem;
    border: 1px solid #d6e0e7;
    background: #fff;
    color: #315a74;
    text-decoration: none;
}

.fechamento-icon-action {
    width: 2.25rem;
    border: 1px solid #d6e0e7;
    background: #fff;
    color: #637481;
}

.fechamento-icon-action.is-danger { color: #a84541; }

.fechamento-primary-action:disabled,
.fechamento-secondary-action:disabled,
.fechamento-icon-action:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.fechamento-header {
    min-height: 4.35rem;
    padding: .65rem .9rem;
}

.fechamento-header .proposal-header__icon {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.05rem;
}

.fechamento-header h1 {
    font-size: 1.3rem;
}

.fechamento-header p {
    margin-top: .12rem;
    font-size: .75rem;
}

.fechamento-filter-panel {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(12rem, .65fr) auto;
    align-items: end;
    gap: .75rem;
}

.fechamento-filter-field {
    display: grid;
    gap: .3rem;
    min-width: 0;
}

.fechamento-filter-field label {
    margin: 0;
    color: #526979;
    font-size: .68rem;
    font-weight: 750;
}

.fechamento-clear-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    min-height: 2.55rem;
    padding: 0 .75rem;
    border: 1px solid #d6e0e7;
    border-radius: .5rem;
    background: #fff;
    color: #526979;
    font-size: .7rem;
    font-weight: 700;
}

.fechamento-structure,
.fechamento-error {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1rem;
    border: 1px solid #cfe1ea;
    border-radius: .75rem;
    background: #f3f9fc;
    color: #34566a;
}

.fechamento-structure > i,
.fechamento-error > i {
    flex: 0 0 auto;
    font-size: 1.35rem;
}

.fechamento-structure > div,
.fechamento-error > div {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.fechamento-structure strong,
.fechamento-error strong {
    color: #17364a;
}

.fechamento-structure span,
.fechamento-error span {
    font-size: .78rem;
}

.fechamento-structure,
.fechamento-error {
    min-height: 9rem;
    justify-content: center;
    border-color: #ead7a2;
    background: #fffaf0;
    color: #74591b;
}

.fechamento-error {
    border-color: #efc9c7;
    background: #fff6f5;
    color: #9a3934;
}

.fechamento-error button {
    margin-left: auto;
    border: 0;
    border-radius: .5rem;
    padding: .55rem .8rem;
    background: #9a3934;
    color: #fff;
    font-weight: 700;
}

.fechamento-overview {
    overflow: hidden;
    border: 1px solid #e1e8ef;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 7px 22px rgba(22, 45, 65, .04);
}

.fechamento-overview__context {
    display: grid;
    grid-template-columns: minmax(9rem, .7fr) minmax(10rem, .85fr) minmax(11rem, 1fr) auto;
    align-items: center;
}

.fechamento-overview__context--client {
    grid-template-columns: minmax(13rem, 1.25fr) repeat(2, minmax(9rem, .75fr));
}

.fechamento-overview__item,
.fechamento-overview__audit > div,
.fechamento-list-value {
    display: grid;
    gap: .15rem;
}

.fechamento-overview__item {
    min-width: 0;
    padding: .62rem .9rem;
}

.fechamento-overview__item + .fechamento-overview__item {
    border-left: 1px solid #edf1f4;
}

.fechamento-overview__item span,
.fechamento-overview__item small,
.fechamento-overview__audit span,
.fechamento-overview__audit small,
.fechamento-list-value small {
    color: #71808d;
    font-size: .68rem;
}

.fechamento-overview__item span,
.fechamento-overview__audit span {
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fechamento-overview__item strong,
.fechamento-overview__audit strong {
    color: #1d3444;
}

.fechamento-overview__link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    align-self: stretch;
    padding: 0 .9rem;
    border-left: 1px solid #e7edf2;
    color: #246fa7;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
}

.fechamento-overview__link:hover {
    background: #f7fafc;
    color: #185b8d;
}

.fechamento-overview__audit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    border-top: 1px solid #e7edf2;
    background: #f8fafb;
}

.fechamento-overview__audit > div {
    min-width: 0;
    padding: .58rem .9rem .58rem 1rem;
    border-left: 3px solid #7e91a2;
}

.fechamento-overview__audit > div + div {
    border-top: 0;
}

.fechamento-overview__audit > div.is-ready { border-left-color: #258a64; }
.fechamento-overview__audit > div.is-manual { border-left-color: #d09232; }
.fechamento-overview__audit > div.is-legacy { border-left-color: #6576b8; }
.fechamento-overview__audit > div.is-blocked { border-left-color: #bd504b; }

.fechamento-overview__audit strong {
    font-size: .96rem;
}

.fechamento-list-value {
    justify-items: end;
}

.fechamento-item-value {
    display: grid;
    justify-items: end;
    gap: .12rem;
}

.fechamento-item-value small {
    color: #8c6a37;
    font-size: .65rem;
}

.fechamento-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 700;
}

.fechamento-status > span {
    width: .48rem;
    height: .48rem;
    border-radius: 50%;
    background: #7d8b98;
}

.fechamento-status.is-ready > span { background: #258a64; }
.fechamento-status.is-manual > span { background: #d09232; }
.fechamento-status.is-blocked > span { background: #bd504b; }

.fechamento-origin-sections {
    display: grid;
    gap: 1.25rem;
}

.fechamento-origin-counts,
.fechamento-origin-key,
.fechamento-origin-description,
.fechamento-comparison {
    display: grid;
    gap: .12rem;
}

.fechamento-origin-counts small,
.fechamento-origin-key small,
.fechamento-origin-description small,
.fechamento-comparison small {
    color: #788793;
    font-size: .67rem;
}

.fechamento-origin-key small {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.fechamento-origin-description small {
    color: #9b6630;
    white-space: normal;
}

.fechamento-difference,
.fechamento-comparison .is-different {
    color: #b44843;
}

.fechamento-comparison .is-equal { color: #267858; }
.fechamento-comparison .is-neutral { color: #7b8791; }

.fechamento-origin-badge {
    display: inline-flex;
    width: fit-content;
    padding: .25rem .48rem;
    border-radius: 999px;
    background: #edf1f4;
    color: #536270;
    font-size: .66rem;
    font-weight: 750;
}

.fechamento-origin-badge.is-ready { background: #e7f5ef; color: #236b51; }
.fechamento-origin-badge.is-manual { background: #fff3df; color: #8a5c18; }
.fechamento-origin-badge.is-blocked { background: #fbe9e8; color: #9a3934; }
.fechamento-origin-badge.is-materialized { background: #eef0fa; color: #5363a3; }
.fechamento-origin-badge.is-billed { background: #e6f2f8; color: #2d6987; }

.fechamento-grid-row.is-inconsistent {
    --full-data-grid-row-accent: #c65a55;
}

.fechamento-grid-row.is-selected {
    --full-data-grid-row-accent: #2677b4;
}

.fechamento-grid-row.is-cancelled {
    --full-data-grid-row-accent: #9a3934;
    opacity: .72;
}

.fechamento-billing-overview .fechamento-overview__context {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fechamento-billing-heading {
    align-items: center;
    gap: .75rem;
    margin-bottom: .55rem;
    padding: .55rem .72rem;
    border: 1px solid #e1e8ef;
    border-radius: .65rem;
    background: #f5f8fa;
}

.fechamento-billing-heading > div:first-child {
    gap: .04rem;
    min-width: 0;
}

.fechamento-billing-heading h2 {
    font-size: .92rem;
    line-height: 1.15;
}

.fechamento-billing-heading p {
    font-size: .68rem;
    line-height: 1.25;
}

.fechamento-section-heading > .fechamento-billing-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: .4rem;
}

.fechamento-section-heading > .fechamento-billing-actions > button {
    white-space: nowrap;
}

.fechamento-billing-clients,
.fechamento-billing-items {
    overflow: visible;
}

.fechamento-billing-items {
    scroll-margin-top: 5rem;
}

.fechamento-billing-status-cell,
.fechamento-billing-composition,
.fechamento-billing-payment,
.fechamento-billing-date {
    display: grid;
    gap: .14rem;
    min-width: 0;
}

.fechamento-billing-status-cell small,
.fechamento-billing-composition small,
.fechamento-billing-payment small,
.fechamento-billing-date small {
    color: #778691;
    font-size: .65rem;
    line-height: 1.25;
    white-space: normal;
}

.fechamento-billing-status-cell > a {
    color: #246fa7;
    font-size: .67rem;
    font-weight: 700;
    text-decoration: none;
}

.fechamento-billing-composition > span {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    color: #647682;
    font-size: .68rem;
}

.fechamento-billing-composition strong,
.fechamento-billing-payment strong {
    color: #263e4e;
}

.fechamento-billing-date {
    min-width: 9rem;
}

.fechamento-billing-date.is-review .ui-date__input {
    border-color: #d8a44b;
    background: #fffaf1;
}

.fechamento-billing-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .6rem .9rem;
    border-bottom: 1px solid #e8edf1;
    background: #fafcfd;
}

.fechamento-billing-alerts > span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .5rem;
    border: 1px solid #ead8b8;
    border-radius: .4rem;
    background: #fff9ee;
    color: #795817;
    font-size: .68rem;
}

.fechamento-billing-alerts > span.is-blocked {
    border-color: #edcecc;
    background: #fff5f4;
    color: #963e39;
}

.fechamento-billing-selection {
    position: sticky;
    bottom: .65rem;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 1.4rem;
    padding: .7rem .9rem;
    border: 1px solid #d7e2e9;
    border-radius: .7rem;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 24px rgba(25, 49, 67, .1);
    backdrop-filter: blur(8px);
}

.fechamento-billing-selection__action {
    justify-items: end;
}

.fechamento-billing-selection__action .fechamento-primary-action {
    min-width: 10.5rem;
}

.fechamento-billing-selection > div {
    display: grid;
    gap: .08rem;
}

.fechamento-billing-selection > div > span {
    color: #71808d;
    font-size: .65rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fechamento-billing-selection > div > strong {
    color: #1e394b;
    font-size: .82rem;
}

.fechamento-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid #e7edf2;
}

.fechamento-section-heading > div {
    display: grid;
    gap: .12rem;
}

.fechamento-section-heading span {
    color: #71808d;
    font-size: .66rem;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fechamento-section-heading h2 {
    margin: 0;
    color: #1c3444;
    font-size: 1rem;
}

.fechamento-section-heading p {
    margin: 0;
    color: #71808d;
    font-size: .72rem;
}

.fechamento-section-heading > button {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #dde5eb;
    border-radius: .45rem;
    background: #fff;
    color: #61717e;
    font-size: 1.1rem;
}

.fechamento-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .3rem;
}

.fechamento-check {
    display: grid;
    width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    cursor: pointer;
}

.fechamento-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.fechamento-check span {
    display: grid;
    width: 1.08rem;
    height: 1.08rem;
    place-items: center;
    border: 1px solid #bdcbd5;
    border-radius: .28rem;
    background: #fff;
    color: transparent;
    font-size: .82rem;
}

.fechamento-check input:checked + span {
    border-color: #2677b4;
    background: #2677b4;
    color: #fff;
}

.fechamento-check input:focus-visible + span {
    outline: 2px solid rgb(38 119 180 / .24);
    outline-offset: 2px;
}

.fechamento-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: .28rem;
}

.fechamento-row-actions button,
.fechamento-row-actions a {
    display: grid;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border: 1px solid #dce4ea;
    border-radius: .4rem;
    background: #fff;
    color: #45677d;
    font-size: .9rem;
    text-decoration: none;
}

.fechamento-row-actions button:hover,
.fechamento-row-actions a:hover {
    border-color: #b8ccd9;
    background: #f3f8fb;
}

.fechamento-row-actions button.is-danger { color: #a84541; }

.fechamento-dialog-backdrop { z-index: 1200; }

.ui-dialog.fechamento-dialog {
    grid-template-columns: minmax(0, 1fr);
    width: min(94vw, 36rem);
    max-height: calc(100vh - 2rem);
}

.ui-dialog.fechamento-dialog--creation {
    width: min(94vw, 48rem);
}

.ui-dialog.fechamento-dialog--add-clients {
    width: min(94vw, 62rem);
}

.fechamento-add-clients__grid {
    min-height: 18rem;
    min-width: 0;
}

.fechamento-add-clients__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    margin-bottom: .65rem;
}

.fechamento-add-clients__actions > span {
    margin-right: auto;
    color: #657681;
    font-size: .72rem;
}

.fechamento-add-clients__post-action {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(18rem, 26rem);
    align-items: center;
    gap: 1rem;
    padding: .7rem .8rem;
    border: 1px solid #dce7ed;
    border-radius: .65rem;
    background: #f7fafc;
}

.fechamento-add-clients__post-action > div:first-child {
    display: grid;
    gap: .12rem;
}

.fechamento-add-clients__post-action strong {
    color: #243845;
    font-size: .78rem;
}

.fechamento-add-clients__post-action small {
    color: #6b7e89;
    font-size: .7rem;
}

.fechamento-dialog__heading {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
}

.fechamento-dialog__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    min-width: 0;
    overflow: visible;
}

.fechamento-dialog__wide,
.fechamento-dialog__total,
.fechamento-dialog__form > .ui-dialog__actions {
    grid-column: 1 / -1;
}

.fechamento-dialog .proposal-field {
    min-width: 0;
}

.fechamento-dialog .proposal-field > label span {
    color: #8a969f;
    font-weight: 500;
}

.fechamento-dialog .proposal-field > input,
.fechamento-dialog .proposal-field > select,
.fechamento-dialog .proposal-field > textarea {
    width: 100%;
    min-height: 2.45rem;
    padding: .55rem .65rem;
    border: 1px solid #d8e1e7;
    border-radius: .45rem;
    background: #fff;
    color: #253b4a;
    font-size: .76rem;
}

.fechamento-dialog .proposal-field > select {
    appearance: auto;
}

.fechamento-dialog .proposal-field > textarea {
    min-height: 4.7rem;
    resize: vertical;
}

.fechamento-dialog__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem .75rem;
    border: 1px solid #e0e7ec;
    border-radius: .45rem;
    background: #f7f9fa;
    color: #657783;
    font-size: .74rem;
}

.fechamento-dialog__total strong {
    color: #1e3a4d;
    font-size: .9rem;
}

.fechamento-creation-clients {
    min-height: 12rem;
}

.fechamento-creation-clients > .fdg {
    margin-block-end: 0;
}

.fechamento-creation-clients > .fdg .fdg-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.fechamento-creation-clients > .fdg .fdg-toolbar-top {
    min-height: 42px;
    padding: .38rem 0 .38rem .72rem;
    flex-wrap: nowrap;
}

.fechamento-creation-clients > .fdg .fdg-toolbar-main {
    flex: 0 0 auto;
}

.fechamento-creation-clients > .fdg .fdg-toolbar-bottom {
    min-height: 42px;
    padding: .38rem .72rem;
    background: #fff;
    border-top: 0;
}

.fechamento-creation-clients > .fdg .fdg-search {
    width: 100%;
    margin-left: 0;
}

.fechamento-creation-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: .75rem;
    padding: .75rem;
    border: 1px solid #e0e7ec;
    border-radius: .55rem;
    background: #f8fafb;
}

.fechamento-creation-range > span {
    grid-column: 1 / -1;
    color: #657783;
    font-size: .72rem;
}

.fechamento-creation-summary {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.8rem;
    padding: .65rem .75rem;
    border: 1px solid #dce6ec;
    border-radius: .55rem;
    background: #f5f9fb;
    color: #4e6879;
    font-size: .74rem;
}

.fechamento-creation-summary i {
    color: #2677b4;
    font-size: 1rem;
}

.fechamento-related-invoices {
    overflow: hidden;
    border: 1px solid #e1e8ef;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 7px 22px rgba(22, 45, 65, .04);
}

.fechamento-related-invoices > .fdg {
    --fdg-radius: 0;
    margin-block-end: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    box-shadow: none;
}

.fechamento-related-invoices > .fdg .fdg-toolbar {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) auto;
    align-items: center;
}

.fechamento-related-invoices > .fdg .fdg-toolbar-top {
    grid-row: 1;
    grid-column: 2;
    min-height: 42px;
    padding: .38rem .72rem;
    flex-wrap: nowrap;
}

.fechamento-related-invoices > .fdg .fdg-toolbar-main {
    display: none;
}

.fechamento-related-invoices > .fdg .fdg-toolbar-actions {
    margin-left: 0;
    flex-wrap: nowrap;
}

.fechamento-related-invoices > .fdg .fdg-toolbar-bottom {
    grid-row: 1;
    grid-column: 1;
    min-height: 42px;
    padding: .38rem .72rem;
    background: #fff;
    border-top: 0;
}

.fechamento-related-invoices > .fdg .fdg-search {
    width: min(28rem, 100%);
    margin-left: 0;
}

.fechamento-related-invoices__heading {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid #e7edf2;
}

.fechamento-related-invoices__heading > div:first-child {
    display: grid;
    gap: .05rem;
}

.fechamento-related-invoices__heading > div:first-child span {
    color: #71808d;
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fechamento-related-invoices__heading h2 {
    margin: 0;
    color: #1d3444;
    font-size: .95rem;
}

.fechamento-related-invoices__totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem .9rem;
    color: #71808d;
    font-size: .68rem;
}

.fechamento-related-invoices__totals strong {
    margin-left: .2rem;
    color: #1d3444;
}

.fechamento-association-bar {
    display: grid;
    gap: .65rem;
    padding: .65rem .9rem;
    border-bottom: 1px solid #e7edf2;
    background: #f7fafc;
}

.fechamento-association-bar__heading,
.fechamento-association-bar__selection,
.fechamento-association-bar__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.fechamento-association-bar__selection {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.fechamento-association-bar__selection button {
    border: 0;
    background: transparent;
    color: #246fa7;
    font-size: .68rem;
    font-weight: 700;
}

.fechamento-association-bar__selection button:disabled {
    cursor: default;
    opacity: .45;
}

.fechamento-association-bar__actions {
    justify-content: flex-end;
}

.fechamento-association-bar__description {
    display: grid;
    gap: .05rem;
}

.fechamento-association-bar strong {
    color: #1d3444;
    font-size: .76rem;
}

.fechamento-association-bar span {
    color: #71808d;
    font-size: .66rem;
}

.fechamento-batch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .42rem .75rem;
    border-bottom: 1px solid #e7edf2;
    background: #fbfcfd;
}

.fechamento-batch-toolbar__selection,
.fechamento-batch-toolbar__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .42rem;
}

.fechamento-batch-toolbar__selection strong {
    margin-right: .15rem;
    color: #314b5c;
    font-size: .72rem;
}

.fechamento-batch-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    min-height: 2rem;
    padding: .35rem .58rem;
    border: 1px solid #d3dfe7;
    border-radius: .48rem;
    background: #fff;
    color: #315368;
    font-size: .7rem;
    font-weight: 700;
}

.fechamento-batch-toolbar__selection button {
    min-height: auto;
    padding: .15rem .25rem;
    border: 0;
    background: transparent;
    color: #246fa7;
}

.fechamento-batch-toolbar button:hover:not(:disabled) {
    border-color: #afc7d6;
    background: #f3f8fb;
}

.fechamento-batch-toolbar__actions button.is-overdue {
    border-color: #efc0bd;
    background: #fff7f6;
    color: #b0443d;
}

.fechamento-batch-toolbar__actions button.is-overdue:hover:not(:disabled) {
    border-color: #df9d98;
    background: #fff0ee;
}

.fechamento-batch-toolbar button:disabled {
    cursor: default;
    opacity: .48;
}

.fechamento-batch-review {
    display: grid;
    gap: .62rem;
    padding: .72rem .9rem;
    border-bottom: 1px solid #dce7ee;
    background: #f5f9fc;
}

.fechamento-batch-review__summary,
.fechamento-batch-review__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.fechamento-batch-review__summary > div {
    display: grid;
    gap: .05rem;
}

.fechamento-batch-review__summary span {
    color: #657988;
    font-size: .67rem;
}

.fechamento-batch-review__summary strong {
    color: #1d3444;
    font-size: .84rem;
}

.fechamento-batch-review__summary .is-warning {
    color: #9a6412;
    font-weight: 700;
}

.fechamento-batch-review__issues {
    display: grid;
    max-height: 12rem;
    overflow: auto;
    border: 1px solid #ead9b9;
    border-radius: .55rem;
    background: #fffdf8;
}

.fechamento-batch-review__issues > div {
    display: grid;
    gap: .08rem;
    padding: .48rem .62rem;
    border-bottom: 1px solid #f0e7d6;
}

.fechamento-batch-review__issues > div:last-child { border-bottom: 0; }
.fechamento-batch-review__issues strong { color: #5f4a2a; font-size: .7rem; }
.fechamento-batch-review__issues span { color: #79694e; font-size: .66rem; }
.fechamento-batch-review__actions { justify-content: flex-end; }

.fechamento-batch-result {
    border-bottom: 1px solid #e7edf2;
    background: #fff;
}

.fechamento-batch-result summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .58rem .9rem;
    cursor: pointer;
    color: #516978;
    font-size: .7rem;
}

.fechamento-batch-result summary strong { color: #263f50; }

.fechamento-batch-result__items {
    display: grid;
    max-height: 14rem;
    overflow: auto;
    border-top: 1px solid #edf1f4;
}

.fechamento-batch-result__items > div {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .48rem .9rem;
    border-bottom: 1px solid #edf1f4;
}

.fechamento-batch-result__items > div:last-child { border-bottom: 0; }
.fechamento-batch-result__items > div.is-success > i { color: #198754; }
.fechamento-batch-result__items > div.is-error > i { color: #b94a48; }
.fechamento-batch-result__items span { display: grid; gap: .04rem; }
.fechamento-batch-result__items strong { color: #263f50; font-size: .69rem; }
.fechamento-batch-result__items small { color: #687b88; font-size: .65rem; }

.fechamento-invoice-link {
    color: #246fa7;
    font-weight: 750;
    text-decoration: none;
}

.fechamento-invoice-link:hover {
    color: #185b8d;
    text-decoration: underline;
}

.fechamento-links a,
.fechamento-diagnostic-links a {
    color: #246fa7;
    font-size: .68rem;
    font-weight: 700;
    text-decoration: none;
}

.fechamento-diagnostics {
    overflow: hidden;
    border: 1px solid #e1e8ee;
    border-radius: .75rem;
    background: #fff;
}

.fechamento-diagnostic-list {
    display: grid;
}

.fechamento-diagnostic-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: .75rem;
    padding: .8rem 1rem;
    border-top: 1px solid #edf1f4;
}

.fechamento-diagnostic-list article > i {
    margin-top: .08rem;
    color: #ba8630;
    font-size: 1.1rem;
}

.fechamento-diagnostic-list article.is-error > i { color: #b84b46; }

.fechamento-diagnostic-list article > div:nth-child(2) {
    display: grid;
    gap: .1rem;
}

.fechamento-diagnostic-list article span {
    color: #7c8994;
    font-size: .63rem;
    text-transform: uppercase;
}

.fechamento-diagnostic-list article strong {
    color: #263d4d;
    font-size: .8rem;
}

.fechamento-diagnostic-list article p {
    margin: 0;
    color: #657681;
    font-size: .72rem;
}

.fechamento-diagnostic-list article p.fechamento-diagnostic-client {
    color: #315a74;
}

.fechamento-diagnostic-list article p.fechamento-diagnostic-client strong {
    color: inherit;
    font-size: inherit;
}

.fechamento-diagnostic-links {
    display: grid;
    justify-items: end;
    gap: .2rem;
}

.fechamento-empty-diagnostics {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 5rem;
    color: #397a60;
    font-size: .78rem;
}

.fechamento-skeleton {
    display: grid;
    gap: .6rem;
    padding: 1rem;
}

.fechamento-skeleton span {
    height: 3.15rem;
    border-radius: .55rem;
    background: linear-gradient(90deg, #eef2f5 25%, #f7f9fa 50%, #eef2f5 75%);
    background-size: 200% 100%;
    animation: fechamento-shimmer 1.25s infinite linear;
}

@keyframes fechamento-shimmer {
    to { background-position: -200% 0; }
}

@media (max-width: 1050px) {
    .fechamento-related-invoices__heading {
        grid-template-columns: minmax(10rem, 1fr) auto;
    }

    .fechamento-related-invoices__heading > .fechamento-secondary-action {
        grid-column: 1 / -1;
        justify-self: end;
    }

    .fechamento-overview__context {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fechamento-overview__context--client {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fechamento-overview__context--client .fechamento-overview__item:nth-child(3),
    .fechamento-overview__context--client .fechamento-overview__item:nth-child(4) {
        border-top: 1px solid #edf1f4;
    }

    .fechamento-overview__context--client .fechamento-overview__item:nth-child(3) {
        border-left: 0;
    }

    .fechamento-overview__link {
        grid-column: 1 / -1;
        justify-content: center;
        min-height: 2.4rem;
        border-top: 1px solid #e7edf2;
        border-left: 0;
    }

    .fechamento-billing-overview .fechamento-overview__context {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fechamento-billing-overview .fechamento-overview__item:nth-child(3),
    .fechamento-billing-overview .fechamento-overview__item:nth-child(4) {
        border-top: 1px solid #edf1f4;
    }

    .fechamento-billing-overview .fechamento-overview__item:nth-child(3) {
        border-left: 0;
    }
}

@media (max-width: 680px) {
    .fechamento-related-invoices > .fdg .fdg-toolbar {
        grid-template-columns: 1fr;
    }

    .fechamento-related-invoices > .fdg .fdg-toolbar-top {
        grid-row: 1;
        grid-column: 1;
    }

    .fechamento-related-invoices > .fdg .fdg-toolbar-bottom {
        grid-row: 2;
        grid-column: 1;
        border-top: 1px solid #e7edf2;
    }

    .fechamento-related-invoices > .fdg .fdg-search {
        width: 100%;
    }

    .fechamento-header {
        min-height: 4rem;
        flex-direction: column;
        align-items: stretch;
        gap: .65rem;
    }

    .fechamento-overview__context,
    .fechamento-overview__audit {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fechamento-overview__context--client {
        grid-template-columns: 1fr;
    }

    .fechamento-overview__item:nth-child(3) {
        grid-column: 1 / -1;
        border-top: 1px solid #edf1f4;
        border-left: 0;
    }

    .fechamento-overview__context--client .fechamento-overview__item:nth-child(n+2) {
        grid-column: auto;
        border-top: 1px solid #edf1f4;
        border-left: 0;
    }

    .fechamento-overview__audit > div:nth-child(3),
    .fechamento-overview__audit > div:nth-child(4) {
        border-top: 1px solid #e7edf2;
    }

    .fechamento-diagnostic-list article { grid-template-columns: auto minmax(0, 1fr); }
    .fechamento-diagnostic-links { grid-column: 2; justify-items: start; }

    .fechamento-index .proposal-header__aside {
        width: 100%;
    }

    .fechamento-primary-action,
    .fechamento-secondary-action {
        flex: 1 1 auto;
    }

    .fechamento-dialog__form { grid-template-columns: 1fr; }

    .fechamento-add-clients__post-action {
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .fechamento-filter-panel {
        grid-template-columns: 1fr;
    }

    .fechamento-creation-range,
    .fechamento-related-invoices__heading {
        grid-template-columns: 1fr;
    }

    .fechamento-association-bar {
        padding: .65rem;
    }

    .fechamento-association-bar__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .fechamento-association-bar__selection {
        justify-content: flex-start;
    }

    .fechamento-association-bar__actions > button {
        flex: 1 1 0;
    }

    .fechamento-batch-toolbar,
    .fechamento-batch-review__summary {
        align-items: stretch;
        flex-direction: column;
    }

    .fechamento-batch-toolbar__actions > button,
    .fechamento-batch-review__actions > button {
        flex: 1 1 8rem;
    }

    .fechamento-batch-review__actions {
        flex-wrap: wrap;
    }

    .fechamento-related-invoices__totals {
        justify-content: flex-start;
    }

    .fechamento-related-invoices__heading > .fechamento-secondary-action {
        grid-column: auto;
        justify-self: stretch;
    }

    .fechamento-dialog__wide,
    .fechamento-dialog__total,
    .fechamento-dialog__form > .ui-dialog__actions {
        grid-column: auto;
    }

    .fechamento-billing-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .fechamento-section-heading > .fechamento-billing-actions {
        justify-content: stretch;
    }

    .fechamento-section-heading > .fechamento-billing-actions > button {
        flex: 1 1 0;
    }

    .fechamento-billing-selection {
        position: static;
        grid-template-columns: 1fr 1fr;
        gap: .65rem;
    }

    .fechamento-billing-selection > div:first-child {
        grid-column: 1 / -1;
    }

    .fechamento-billing-selection__action {
        grid-column: 1 / -1;
        justify-items: stretch;
    }

    .fechamento-billing-selection__action .fechamento-primary-action {
        width: 100%;
    }
}
