:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-soft: #f9fbfd;
    --text: #172033;
    --muted: #637083;
    --line: #dce4ee;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --blue: #2563eb;
    --blue-soft: #eaf3ff;
    --amber: #b45309;
    --green: #15803d;
    --gray: #64748b;
    --shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

/* PDE - Autorização de atleta */
.pde-form { display: grid; gap: 1.25rem; }
.pde-section { overflow: hidden; }
.pde-section .table-panel__header { border-bottom: 1px solid var(--line); }
.pde-step { float: left; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-right: .75rem; border-radius: 999px; background: #0b6b3a; color: #fff; font-weight: 800; }
.pde-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: 1.25rem; }
.pde-span-2 { grid-column: span 2; }
.pde-field-short { max-width: 8rem; }
.pde-company-select,
.pde-company-select + .select2-container .select2-selection--single { background: #dcfce7 !important; border-color: #65b884 !important; }
.pde-company-select + .select2-container .select2-selection__rendered { color: #14532d !important; font-weight: 800; }
.pde-city-select + .select2-container .select2-selection--single { background: #ecfdf5; border-color: #86c9a2; }
.table-cell-note { display: block; margin-top: .25rem; color: var(--muted); font-size: .78rem; }
.pde-medical-list { display: grid; gap: 1rem; padding: 1.25rem; }
.pde-question { margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; }
.pde-question legend, .pde-signer-choice legend { padding: 0 .35rem; font-weight: 750; }
.pde-choice-row, .pde-signer-choice { display: flex; flex-wrap: wrap; gap: 1rem; }
.pde-choice-row label, .pde-signer-choice label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.pde-conditional { margin-top: 1rem; }
.pde-signer-choice { margin: 1.25rem 1.25rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; }
.pde-declaration { margin: 0 1.25rem 1.25rem; padding: 1.15rem; border-left: 4px solid #0b6b3a; border-radius: .4rem; background: #f2f8f5; line-height: 1.55; }
.pde-accept { display: flex; align-items: flex-start; gap: .65rem; margin-top: 1rem; font-weight: 700; }
.pde-accept input { margin-top: .3rem; }
.pde-submit-bar { position: sticky; bottom: .75rem; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: .9rem; background: rgba(255,255,255,.96); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
@media (max-width: 800px) { .pde-grid { grid-template-columns: 1fr; } .pde-span-2 { grid-column: auto; } .pde-submit-bar { align-items: stretch; flex-direction: column; } }

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 24px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.brand__mark {
    display: grid;
    width: 65px;
    height: 65px;
    place-items: center;
    border-radius: 13px;
    background: var(--brand-strong);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
}

.brand__text {
    display: grid;
    gap: 1px;
}

.brand__text strong {
    font-size: 1rem;
}

.brand__text small {
    color: var(--muted);
    font-size: 0.82rem;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.nav form {
    margin: 0;
}

.nav__link,
.nav__pill,
.nav__button,
.button,
.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 0 14px;
    font-size: 0.92rem;
    font-weight: 600;
}

.nav__button {
    cursor: pointer;
    background: var(--panel);
    color: var(--text);
}

.nav__icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid var(--brand);
    border-radius: 8px;
    background: #ecfdf5;
    color: var(--brand-strong);
    cursor: pointer;
}

.nav__icon-button:hover {
    border-color: var(--brand-strong);
    background: #dff7ec;
}

.nav__icon-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

.nav__icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.nav__link--active,
.button {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
}

.button--danger {
    border-color: #dc2626;
    background: #dc2626;
}

.button--blue {
    border-color: var(--blue);
    background: var(--blue);
    color: #ffffff;
}

.button--blue:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
}

.button--warning {
    border-color: var(--amber);
    background: var(--amber);
}

.form-card--quick-preset {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #ffffff;
}

.form-card--quick-preset .form-card__header,
.form-card--quick-preset .form-card__header strong {
    color: #ffffff;
}

.button.button--quick-preset {
    width: fit-content;
    border-color: #facc15;
    background: #facc15;
    color: #422006;
    font-weight: 800;
}

.button.button--quick-preset:hover {
    border-color: #eab308;
    background: #eab308;
}

.button--subtle {
    border-color: var(--line);
    background: #ffffff;
    color: var(--text);
}

.button--subtle:hover {
    background: #f8fafc;
}

.button:hover,
.nav__button:hover,
.pagination__link:hover {
    filter: brightness(0.96);
}

.button:disabled,
.table-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.bulk-action-tooltip {
    display: inline-flex;
}

.button--wide {
    width: 100%;
}

.nav__pill {
    background: var(--panel-soft);
    color: var(--muted);
}

.page {
    flex: 1 0 auto;
    padding: 32px 0 48px;
}

.app-footer {
    flex: 0 0 auto;
    border-top: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
}

.app-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    gap: 24px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.app-footer__meta {
    display: grid;
    min-width: 0;
    gap: 3px;
    font-size: 0.82rem;
}

.app-footer__meta strong {
    color: var(--text);
    font-size: 0.9rem;
}

.app-footer__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.app-footer__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 0 12px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 650;
    cursor: pointer;
}

.app-footer__button:hover {
    border-color: #b8c5d4;
    background: #eef3f8;
}

.app-footer__button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

.app-footer__button--primary {
    border-color: var(--brand);
    background: #ecfdf5;
    color: var(--brand-strong);
}

.app-footer__button--primary:hover {
    border-color: var(--brand-strong);
    background: #dff7ec;
}

.app-footer__icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.page-subtitle {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.login-shell {
    display: grid;
    min-height: calc(100vh - 152px);
    place-items: center;
}

.auth-card {
    display: grid;
    width: min(440px, 100%);
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 24px;
    box-shadow: var(--shadow);
}

.field {
    display: grid;
    gap: 8px;
}

.field span,
.check-field {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    padding: 0 12px;
    outline: none;
}

.input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.select2-container {
    width: 100% !important;
    color: var(--text);
    font-size: 0.92rem;
}

.select2-container--default .select2-selection--single {
    display: flex;
    align-items: center;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    width: 100%;
    color: var(--text);
    line-height: 40px;
    padding-left: 12px;
    padding-right: 34px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--muted);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 8px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.select2-dropdown {
    border-color: var(--line);
    border-radius: 8px;
    color: var(--text);
    overflow: hidden;
}

.select2-search--dropdown {
    padding: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    padding: 0 10px;
}

.select2-search-green-page .select2-search--dropdown .select2-search__field {
    border-color: #65b884;
    background: #dcfce7;
    color: #14532d;
    font-weight: 700;
}

.select2-search-green-page .select2-search--dropdown .select2-search__field:focus {
    border-color: #16834b;
    box-shadow: 0 0 0 3px rgba(22, 131, 75, 0.18);
}

.select2-results__option {
    padding: 8px 12px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--brand);
}

.filter-field--statement-account {
    min-width: 0;
}

.filter-field--statement-account .select2-container,
.filter-field--statement-account .select2-selection--single {
    min-width: 0;
    max-width: 100% !important;
}

.filter-field--statement-account .select2-selection__rendered {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ether-header {
    background: #123f3c;
    color: #fff;
    padding: 24px;
    border-radius: 8px;
}

.ether-header .eyebrow,
.ether-header .page-subtitle {
    color: #d5e8e6;
}

.ether-filter-grid {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.ether-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.ether-summary--compact {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.ether-stat--debit {
    border-left-color: #c0392b;
}

.ether-stat--debit strong,
.ether-debit {
    color: #a5281d;
}

.ether-credit {
    color: #137343;
    font-weight: 700;
}

.ether-reference {
    max-width: 320px;
    overflow-wrap: anywhere;
}

.ether-reconciliation {
    margin-bottom: 16px;
}

.ether-match-panel {
    margin: 0 16px 16px;
    overflow: hidden;
    border: 1px solid #bbdfc9;
    border-radius: 8px;
    background: #f2fbf5;
}

.ether-match-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    color: #116338;
}

.ether-match-panel > summary span {
    font-size: 0.86rem;
    font-weight: 700;
}

.ether-match-panel[open] > summary {
    border-bottom: 1px solid #bbdfc9;
}

.ether-missing-panel {
    margin: 0 16px 16px;
    overflow: hidden;
    border: 1px solid #f2c36b;
    border-radius: 8px;
    background: #fff9e8;
}

.ether-missing-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    color: #8a4b08;
}

.ether-missing-panel > summary span {
    font-size: 0.86rem;
    font-weight: 700;
}

.ether-missing-panel[open] > summary {
    border-bottom: 1px solid #f2c36b;
}

.ether-launch-action {
    display: grid;
    width: min(420px, 42vw);
    min-width: 280px;
    gap: 8px;
}

.ether-launch-action .select2-container,
.ether-launch-action .select2-selection--single,
.ether-launch-action .select2-selection__rendered {
    width: 100% !important;
    max-width: 100% !important;
}

.ether-launch-action .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ether-launch-action .button {
    width: 100%;
}

.ether-launch-action[aria-busy="true"] {
    opacity: 0.72;
}

.ether-launch-feedback {
    color: #991b1b;
    font-weight: 700;
}

.ether-launch-result {
    display: grid;
    gap: 6px;
    min-width: 190px;
}

.ether-launch-result small {
    color: #116338;
    font-weight: 700;
}

.data-table tbody tr.ether-launch-row--complete > td {
    background: #f2fbf5;
}

@media (max-width: 720px) {
    .ether-launch-action {
        width: min(300px, 76vw);
        min-width: 240px;
    }
}

.ether-button--success {
    border-color: #137343;
    background: #137343;
}

.ether-badge--danger {
    border-color: #fecaca;
    background: #fee2e2;
    color: #991b1b;
}

.ether-reconciliation .table-wrap,
.table-panel > .table-wrap {
    overflow-x: auto;
}

.ether-reconciliation .table-number,
.table-panel .table-number {
    text-align: right;
    white-space: nowrap;
}

.table-empty {
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1100px) {
    .ether-filter-grid,
    .ether-summary,
    .ether-summary--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ether-filter-grid,
    .ether-summary,
    .ether-summary--compact {
        grid-template-columns: 1fr;
    }
}

.import-counterpart-field {
    width: 340px;
    max-width: 34vw;
    min-width: 240px;
    margin-top: 10px;
}

.import-counterpart-field .input,
.import-counterpart-field .select2-container {
    max-width: 100% !important;
}

.import-counterpart-field .select2-selection--single {
    max-width: 100%;
}

.import-counterpart-field .select2-selection__rendered {
    overflow: hidden;
    padding-right: 28px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.input--compact {
    min-height: 38px;
}

.input--amount-strong {
    font-size: 1.08rem;
    font-weight: 800;
}

.input--company-highlight,
.input--company-highlight + .select2-container .select2-selection--single {
    background: #fef3c7 !important;
}

.input--company-highlight + .select2-container .select2-selection__rendered {
    color: #854d0e !important;
    font-weight: 800;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-box {
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    padding: 12px;
    font-size: 0.92rem;
}

.warning-box {
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    padding: 12px;
    font-size: 0.92rem;
    font-weight: 700;
}

.message-list {
    display: grid;
    gap: 4px;
    margin: 10px 0 0;
    padding-left: 18px;
}

.error-page {
    display: grid;
    min-height: calc(100vh - 152px);
    place-items: center;
}

.error-panel {
    display: grid;
    width: min(680px, 100%);
    gap: 16px;
    border: 1px solid var(--line);
    border-left: 5px solid #b91c1c;
    border-radius: 8px;
    background: var(--panel);
    padding: 28px;
    box-shadow: var(--shadow);
}

.error-code {
    width: fit-content;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    padding: 6px 10px;
    font-size: 0.84rem;
    font-weight: 800;
}

.error-panel p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.error-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
}

.confirm-modal[hidden] {
    display: none;
}

.confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
}

.confirm-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(460px, 100%);
    gap: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    outline: none;
}

.confirm-modal__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.confirm-modal__dialog p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.confirm-modal__dialog--import-warning {
    width: min(680px, 100%);
    max-height: min(80vh, 720px);
    border-color: #f59e0b;
    overflow-y: auto;
}

.import-lock-warning__list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.import-lock-warning__list li {
    border-left: 4px solid #d97706;
    border-radius: 6px;
    background: #fffbeb;
    padding: 12px 14px;
}

.import-lock-warning__list strong,
.import-lock-warning__list span {
    display: block;
}

.import-lock-warning__list span {
    margin-top: 4px;
    color: #78350f;
    line-height: 1.45;
}

.confirm-modal__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.home-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.4fr) repeat(3, minmax(220px, 1fr));
    gap: 14px;
}

.home-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-card {
    display: flex;
    min-height: 168px;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 20px;
    box-shadow: var(--shadow);
}

.home-card--primary {
    background: var(--brand-strong);
    color: #ffffff;
}

.home-card__label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.home-card--primary .home-card__label,
.home-card--primary p {
    color: rgba(255, 255, 255, 0.76);
}

.home-card h2,
.home-card strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
}

.home-card p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.home-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 38px;
    border-radius: 8px;
    background: #ffffff;
    color: var(--brand-strong);
    padding: 0 14px;
    font-size: 0.92rem;
    font-weight: 700;
}

.text-link {
    width: fit-content;
    color: var(--brand-strong);
    font-size: 0.92rem;
    font-weight: 700;
}

.button-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.tree-level-card {
    border: 1px solid #d97706;
    border-radius: 8px;
    background: #fcd34d;
    padding: 10px;
    box-shadow: 0 12px 24px rgba(180, 83, 9, 0.16);
}

.tree-level-card .button--subtle {
    border-color: #ca8a04;
}

.inline-form {
    display: inline-flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.inline-field {
    display: grid;
    gap: 5px;
}

.inline-field span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.filter-panel {
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 16px;
    box-shadow: var(--shadow);
}

.filter-panel--lancamentos-search {
    border-color: #2f6847;
    background: #397a52;
    box-shadow: 0 16px 32px rgba(22, 101, 52, 0.18);
}

.filter-panel--lancamentos-search .filter-field > span {
    color: #ffffff;
}

.filter-panel--lancamentos-search .filter-action-card {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.14);
}

.filter-panel--medium-blue {
    border-color: #60a5fa;
    background: #bfdbfe;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.14);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-field {
    display: grid;
    gap: 6px;
}

.filter-field--wide {
    grid-column: span 2;
}

.filter-field--search-compact {
    max-width: 80%;
    width: 100%;
}

.filter-field--company-offset {
    margin-left: -20%;
    min-width: 0;
}

.filter-field--import-account {
    justify-self: start;
    margin-left: 20%;
    width: min(320px, 100%);
    min-width: 0;
}

.filter-field--import-account .input,
.filter-field--import-account .select2-container {
    max-width: min(320px, 100%) !important;
}

.filter-field--import-account .select2-selection--single,
.filter-field--import-account .select2-selection__rendered {
    max-width: 100%;
}

.filter-field--import-account .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-field span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.filter-action-card {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 12px;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.spacing-top {
    margin-top: 18px;
}

.spacing-bottom {
    margin-bottom: 18px;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.summary-list {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.summary-list strong {
    color: var(--text);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--brand);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 2rem;
    line-height: 1.15;
}

h2 {
    font-size: 1.1rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    min-height: 108px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--brand);
    border-radius: 8px;
    background: var(--panel);
    padding: 18px;
    box-shadow: var(--shadow);
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 1.55rem;
    line-height: 1.1;
}

.stat-card--success {
    border-left-color: var(--green);
}

.stat-card--warning {
    border-left-color: var(--amber);
}

.stat-card--accent {
    border-left-color: var(--blue);
}

.table-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.table-panel__context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: #eff6ff;
}

.table-panel__context span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.table-panel__context strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
}

.table-panel__context small {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.table-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 74px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-soft);
}

.table-panel__header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.table-panel__header--danger {
    background: #dc2626;
    color: #ffffff;
}

.table-panel__header--danger p {
    color: #ffffff;
}

.table-panel--collapsible > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.table-panel--collapsible > summary::-webkit-details-marker {
    display: none;
}

.table-panel--collapsible > summary::after {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    content: "Expandir";
    font-size: 0.82rem;
    font-weight: 800;
}

.table-panel--collapsible[open] > summary::after {
    content: "Recolher";
}

.table-panel--collapsible > summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.24);
    outline-offset: -3px;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 1280px;
    border-collapse: collapse;
}

.table-auto {
    min-width: 720px;
}

th,
td {
    padding: 15px 20px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

th {
    background: var(--blue-soft);
    color: #1d4f91;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

tfoot td {
    background: #f8fafc;
    color: var(--text);
    font-weight: 900;
    border-top: 2px solid var(--line);
}

.sort-button {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    cursor: pointer;
    color: inherit;
    font: inherit;
    text-transform: inherit;
}

.sort-button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

.sort-button:hover .sort-label {
    text-decoration: underline;
}

.sort-indicator::before {
    content: "-";
    display: inline-block;
    min-width: 10px;
    color: #1d4f91;
    font-size: 0.72rem;
    opacity: 0.65;
}

th[aria-sort="ascending"] .sort-indicator::before {
    content: "^";
    opacity: 1;
}

th[aria-sort="descending"] .sort-indicator::before {
    content: "v";
    opacity: 1;
}

.text-right .sort-button {
    justify-content: flex-end;
}

td {
    font-size: 0.94rem;
}

td strong,
td span {
    display: block;
}

td span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.84rem;
}

.account-code-cell {
    box-shadow: inset 4px 0 0 rgba(15, 23, 42, 0.08);
}

.account-code-cell--blue {
    background: #dbeafe !important;
}

.account-code-cell--blue strong {
    color: #1d4ed8;
}

.account-code-cell--red {
    background: #fee2e2 !important;
}

.account-code-cell--red strong {
    color: #b91c1c;
}

.account-code-field--blue,
.account-code-field--blue .select2-selection--single {
    background: #dbeafe !important;
}

.account-code-field--blue .select2-selection__rendered {
    color: #1d4ed8 !important;
    font-weight: 800;
}

.account-code-field--red,
.account-code-field--red .select2-selection--single {
    background: #fee2e2 !important;
}

.account-code-field--red .select2-selection__rendered {
    color: #b91c1c !important;
    font-weight: 800;
}

.tree-description {
    padding-left: calc(20px + (var(--tree-level, 0) * 28px));
}

.tree-description strong,
.tree-description__button {
    position: relative;
}

.tree-description--small strong {
    font-size: 0.84rem;
    font-weight: 400;
}

.tree-description__button {
    all: unset;
    display: inline-block;
    color: var(--brand-strong);
    cursor: pointer;
    font-weight: 800;
}

.tree-description__button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.tree-description__button:hover {
    text-decoration: underline;
}

.tree-description[data-tree-level="1"] strong::before,
.tree-description[data-tree-level="2"] strong::before,
.tree-description[data-tree-level="3"] strong::before,
.tree-description[data-tree-level="4"] strong::before,
.tree-description[data-tree-level="5"] strong::before,
.tree-description[data-tree-level="6"] strong::before,
.tree-description[data-tree-level="7"] strong::before,
.tree-description[data-tree-level="8"] strong::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -16px;
    width: 9px;
    border-top: 1px solid #94a3b8;
}

tbody tr:nth-child(odd) {
    background: #fff1f2;
}

tbody tr:nth-child(even) {
    background: #fffbeb;
}

tbody tr:hover {
    background: #eef6ff;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.text-right {
    text-align: right;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid var(--brand);
    border-radius: 8px;
    color: var(--brand-strong);
    padding: 0 12px;
    font-size: 0.86rem;
    font-weight: 700;
}

.table-action:hover {
    background: #ecfdf5;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.table-actions--stacked {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 160px;
}

.table-actions--stacked .table-action,
.table-actions--stacked form {
    width: 100%;
}

.table-actions--stacked .table-action {
    justify-content: center;
}

.table-transfer-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 6px;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    background: #eff6ff;
    padding: 8px;
}

.table-transfer-card__title {
    margin: 0;
    color: #1e3a8a;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.table-lancamento-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    padding: 8px;
}

.table-lancamento-card__title {
    margin: 0;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.bulk-selection {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.bulk-selection input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.balance-selection {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
}

.balance-selection input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.selection-summary {
    margin-top: 4px;
    color: var(--brand-strong);
    font-weight: 800;
}

.table-check-form {
    margin: 0;
}

.table-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    padding: 4px 9px;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.table-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.table-check--success {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #166534;
}

.table-check--success input {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

.table-check--danger {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.table-check--danger input {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

.table-check--disabled {
    cursor: not-allowed;
    opacity: 0.68;
}

button.table-action {
    cursor: pointer;
    background: #ffffff;
    font-family: inherit;
}

.table-action--danger {
    border-color: #dc2626;
    color: #b91c1c;
}

.table-action--danger:hover {
    background: #fef2f2;
}

.table-action--warning {
    border-color: var(--amber);
    color: #92400e;
}

.table-action--warning:hover {
    background: #fffbeb;
}

.table-action.table-action--pix-sent {
    border-color: #ca8a04;
    background: #facc15;
    color: #422006;
}

.table-action.table-action--pix-sent:hover {
    border-color: #a16207;
    background: #eab308;
    color: #422006;
}

.table-action.table-action--pix {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.table-action.table-action--pix:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #ffffff;
}

.form-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.form-panel__top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.form-panel__top-actions form {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 22px;
}

.form-grid__full {
    grid-column: 1 / -1;
}

.form-card {
    display: grid;
    gap: 16px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--blue);
    border-radius: 8px;
    background: #f8fbff;
    padding: 16px;
}

.form-card__header strong {
    color: var(--text);
    font-size: 1rem;
    font-weight: 900;
}

.form-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-card__full {
    grid-column: 1 / -1;
}

.success-box {
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    padding: 12px;
    font-size: 0.92rem;
}

.receipt-shell {
    border-radius: 8px;
    background: #e5e7eb;
    padding: 34px;
}

.receipt-sheet {
    overflow: hidden;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
}

.receipt-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 86px;
    background: #000000;
    color: #ffffff;
    padding: 22px 28px;
}

.receipt-topbar div {
    display: grid;
    gap: 2px;
}

.receipt-topbar strong {
    color: #ffffff;
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: 0;
}

.receipt-topbar span {
    color: #ffffff;
    font-size: 1.1rem;
}

.receipt-body {
    display: grid;
    gap: 24px;
    padding: 36px 48px 42px;
}

.receipt-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.receipt-title-row h2,
.receipt-section h3 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
}

.receipt-title-row strong {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 900;
}

.receipt-section {
    display: grid;
    gap: 18px;
}

.receipt-divider {
    height: 1px;
    background: #e5e7eb;
}

.receipt-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #111827;
    font-size: 0.98rem;
}

.receipt-line strong {
    flex: 0 0 auto;
    color: #111827;
    font-weight: 900;
}

.receipt-line span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #7a7f87;
    font-weight: 700;
}

.receipt-line--strong span {
    color: #6b7280;
    font-weight: 900;
}

.field-feedback {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 700;
}

.field-feedback--error {
    color: #b91c1c;
}

.field-feedback--success {
    color: #166534;
}

.field-feedback--muted {
    color: var(--muted);
}

.input--invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.input--danger-editable {
    border-color: #dc2626;
    background: #dc2626;
    color: #ffffff;
}

.input--danger-editable::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.input--danger-editable:focus {
    border-color: #991b1b;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22);
}

.input--valid {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.muted-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--muted);
    padding: 12px;
    font-size: 0.92rem;
}

.muted-box strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.muted-box p {
    margin: 0;
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.check-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 0 12px;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
}

.check-card input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.check-card--featured {
    min-height: 70px;
    border-left: 5px solid var(--brand);
    padding: 14px 16px;
    cursor: pointer;
}

.check-card--featured input {
    width: 20px;
    height: 20px;
}

.check-card--featured span {
    font-size: 1rem;
    font-weight: 800;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.form-actions--start {
    justify-content: flex-start;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge--success {
    background: #dcfce7;
    color: #166534;
}

.badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.badge--muted {
    background: #e2e8f0;
    color: #475569;
}

.badge--neutral {
    background: #dbeafe;
    color: #1d4ed8;
}

.empty-row {
    height: 96px;
    color: var(--muted);
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--line);
}

.pagination__link {
    background: var(--panel);
    color: var(--text);
}

.pagination__link--disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.pagination__status {
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-grid,
    .form-grid,
    .toggle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 14px;
    }

    .topbar__inner,
    .home-header,
    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar__inner {
        padding: 14px 0;
    }

    .nav {
        justify-content: flex-start;
    }

    .app-footer__inner {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .app-footer__meta {
        text-align: center;
    }

    .app-footer__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-footer__button {
        min-width: 0;
        padding: 0 8px;
    }

    .app-footer__button--primary {
        grid-column: 1 / -1;
    }

    h1 {
        font-size: 1.55rem;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .home-grid,
    .home-grid--three {
        grid-template-columns: 1fr;
    }

    .filter-grid,
    .form-grid,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .filter-field--wide {
        grid-column: auto;
    }

    .filter-field--search-compact {
        max-width: none;
    }

    .filter-field--company-offset {
        margin-left: 0;
    }

    .filter-actions {
        justify-content: stretch;
    }

    .filter-actions .button,
    .filter-actions .pagination__link {
        flex: 1;
    }

    .table-panel__context,
    .table-panel__header,
    th,
    td {
        padding-left: 14px;
        padding-right: 14px;
    }

    .receipt-shell {
        padding: 12px;
    }

    .receipt-topbar,
    .receipt-title-row,
    .receipt-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .receipt-body {
        padding: 24px 18px 28px;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .topbar,
    .app-footer,
    .receipt-actions {
        display: none !important;
    }

    .page {
        padding: 0;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .receipt-shell {
        border-radius: 0;
        background: #ffffff;
        padding: 0;
    }

    .receipt-sheet {
        border: 0;
        border-radius: 0;
    }

    .receipt-body {
        padding: 32px 42px 38px;
    }
}
