:root {
    --app-primary: #123a63;
    --app-primary-dark: #0b2845;
    --app-sidebar-width: 16rem;
}

body {
    min-height: 100vh;
    background: #f5f7f8;
}

.pix-portal-body {
    background: linear-gradient(145deg, rgba(18, 58, 99, .08), transparent 28rem), #f5f7f8;
}

.fake-qr {
    display: grid;
    grid-template-columns: repeat(15, .75rem);
    width: max-content;
    padding: .75rem;
    border: .35rem solid #fff;
    box-shadow: 0 0 0 1px var(--bs-border-color);
    background: #fff;
}

.fake-qr span {
    width: .75rem;
    height: .75rem;
    background: #fff;
}

.fake-qr span.on {
    background: #111;
}

.pix-qr {
    width: 264px;
    min-height: 264px;
    padding: 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
}

.pix-qr img,
.pix-qr canvas {
    display: block;
    width: 240px !important;
    height: 240px !important;
}

.login-body {
    background:
        radial-gradient(circle at top left, rgba(18, 58, 99, .14), transparent 38rem),
        #f5f7f8;
}

.brand-mark {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border-radius: .9rem;
    color: #fff;
    background: var(--app-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-mark-sm {
    width: 2rem;
    height: 2rem;
    border-radius: .55rem;
    font-size: 1rem;
}

.brand-logo-wrap {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    overflow: hidden;
    border-radius: .55rem;
    padding: .2rem;
}

.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-company-logo {
    display: grid;
    width: 4.5rem;
    height: 4.5rem;
    place-items: center;
    padding: .5rem;
    border-radius: 1rem;
}

.login-company-logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.login-registration-callout {
    padding: 18px;
    text-align: center;
    border: 2px solid #ffdf19;
    border-radius: 16px;
    background: #fffbea;
}

.login-registration-callout > span,
.login-registration-callout > small {
    display: block;
}

.login-registration-callout > span {
    font-weight: 700;
}

.login-registration-callout > small {
    margin-top: 8px;
    color: #5e6d84;
}

.registration-cta {
    color: #09224b;
    border-color: #ffdf19;
    background: #ffdf19;
    font-weight: 800;
}

.registration-cta:hover,
.registration-cta:focus {
    color: #fff;
    border-color: #073b9b;
    background: #073b9b;
}

.password-toggle {
    min-width: 52px;
}

.password-match-feedback {
    min-height: 1.25rem;
    font-size: .875rem;
    font-weight: 700;
}

.registration-success-icon {
    display: grid;
    width: 5rem;
    height: 5rem;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #198754;
    box-shadow: 0 12px 30px rgba(25, 135, 84, .24);
    font-size: 2.25rem;
}

.registration-email {
    padding: .85rem 1rem;
    overflow-wrap: anywhere;
    border: 1px solid #cfe2ff;
    border-radius: .8rem;
    color: #073b9b;
    background: #f3f8ff;
    font-weight: 800;
}

.app-help-button {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 50%;
    font-size: 1.25rem;
}

.help-card {
    padding: 1rem;
    border: 1px solid #d9e6f7;
    border-radius: 1rem;
    background: #fff;
}

.help-card img {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: .8rem;
    background: #eef6ff;
}

.help-card h3 {
    margin-bottom: .5rem;
    color: #09224b;
    font-size: 1.05rem;
}

.help-card p {
    margin: 0;
    color: #5e6d84;
    font-size: .92rem;
}

.app-tour-overlay {
    position: fixed;
    z-index: 1080;
    inset: 0;
    background: rgba(5, 20, 45, .68);
}

.app-tour-highlight {
    position: relative !important;
    z-index: 1081 !important;
    border-radius: .75rem;
    box-shadow: 0 0 0 5px #ffdf19, 0 0 0 10px rgba(255, 223, 25, .3) !important;
    pointer-events: none;
}

.app-tour-tooltip {
    position: fixed;
    z-index: 1082;
    width: min(340px, calc(100vw - 24px));
    padding: 1.15rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .32);
}

.app-tour-tooltip h2 {
    margin: .2rem 0 .45rem;
    color: #09224b;
    font-size: 1.15rem;
}

.app-tour-tooltip p {
    margin: 0 0 1rem;
    color: #5e6d84;
    font-size: .92rem;
}

.app-tour-count {
    color: #0a5be8;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.personal-quick-modal-dialog {
    align-items: flex-start;
}

@media (max-width: 575.98px) {
    .personal-quick-modal-dialog {
        height: auto;
        min-height: 0;
        margin: .5rem;
    }

    .personal-quick-modal {
        max-height: calc(100dvh - 1rem);
    }

    .personal-quick-modal .modal-header,
    .personal-quick-modal .modal-body,
    .personal-quick-modal .modal-footer {
        padding: .75rem 1rem;
    }

    .personal-quick-modal .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: #fff;
    }
}

.personal-period-form .form-control,
.personal-period-form .form-select {
    min-width: 130px;
}

.personal-expenses-table {
    width: 100%;
    table-layout: fixed;
    font-size: .88rem;
}

.personal-expenses-table th,
.personal-expenses-table td {
    padding: .55rem .45rem;
    overflow-wrap: anywhere;
}

.personal-expenses-table th:nth-child(1) { width: 11%; }
.personal-expenses-table th:nth-child(2) { width: 23%; }
.personal-expenses-table th:nth-child(3) { width: 24%; }
.personal-expenses-table th:nth-child(4) { width: 20%; }
.personal-expenses-table th:nth-child(5) { width: 22%; }

.personal-expense-actions .btn {
    --bs-btn-padding-x: .42rem;
    --bs-btn-padding-y: .24rem;
    --bs-btn-font-size: .78rem;
}

#categorias-pessoais > summary {
    list-style: none;
}

#categorias-pessoais > summary::-webkit-details-marker {
    display: none;
}

#categorias-pessoais > summary::after {
    content: "Abrir";
    float: right;
    color: var(--app-primary);
    font-size: .82rem;
}

#categorias-pessoais[open] > summary::after {
    content: "Fechar";
}

@media (max-width: 575.98px) {
    .personal-period-form {
        width: 100%;
    }

    .personal-period-form > div {
        flex: 1 1 125px;
    }

    .personal-period-form .btn {
        flex: 1 1 100%;
    }

    .personal-expenses-table {
        width: 100%;
        font-size: .72rem;
    }

    .personal-expenses-table th,
    .personal-expenses-table td {
        padding: .42rem .22rem;
        white-space: normal;
    }

    .personal-expenses-table th:first-child,
    .personal-expenses-table td:first-child,
    .personal-expenses-table th:nth-last-child(-n+2),
    .personal-expenses-table td:nth-last-child(-n+2) {
        white-space: nowrap;
    }
}

.navbar-system-name {
    max-width: 34%;
    overflow: hidden;
    color: var(--bs-body-color);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary-dark);
    --bs-btn-hover-border-color: var(--app-primary-dark);
    --bs-btn-active-bg: var(--app-primary-dark);
    --bs-btn-active-border-color: var(--app-primary-dark);
}

.text-primary {
    color: var(--app-primary) !important;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--app-primary);
}

.nav-pills .nav-link:not(.active) {
    color: #3d4b49;
}

.nav-pills .nav-link:not(.active):hover {
    background: rgba(18, 58, 99, .08);
}

.app-sidebar {
    background: #fff;
}

.empty-mark {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border-radius: 50%;
    color: var(--app-primary);
    background: rgba(18, 58, 99, .1);
    font-size: 1.75rem;
}

.section-description {
    max-width: 36rem;
}

.page-title-link,
.page-title-link:visited,
.page-title-link:hover,
.page-title-link:focus,
.page-title-link:active {
    color: var(--bs-heading-color, #212529) !important;
    text-decoration: none !important;
}

.color-swatch {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 50%;
    vertical-align: middle;
    background: var(--category-color);
}

.color-swatch + .text-body-secondary {
    display: none !important;
}

.reversal-reason {
    min-width: 12rem;
}

.user-avatar {
    width: 1.625rem;
    height: 1.625rem;
    flex: 0 0 1.625rem;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    background: #fff;
    border: 1px solid var(--bs-border-color);
}

.user-avatar-fallback {
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: var(--app-primary);
    font-weight: 500;
}

.user-avatar-lg {
    width: 4rem;
    height: 4rem;
    flex-basis: 4rem;
}

.select2-container .select2-selection--single {
    height: calc(1.5em + .75rem + 2px);
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + .75rem);
    padding-left: .75rem;
    padding-right: 2.25rem;
    color: var(--bs-body-color);
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + .75rem);
    right: .35rem;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}

.select2-dropdown {
    border-color: var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: .375rem .75rem;
    outline: 0;
}

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

.tooltip-inner {
    max-width: 26rem;
    text-align: left;
    white-space: pre-wrap;
}

@media (min-width: 992px) {
    .app-sidebar {
        position: fixed;
        top: 57px;
        bottom: 0;
        left: 0;
        width: var(--app-sidebar-width);
        border-right: 1px solid var(--bs-border-color);
    }

    .app-sidebar .offcanvas-body {
        width: 100%;
    }

    .app-main {
        margin-left: var(--app-sidebar-width);
    }
}

@media print {
    @page {
        size: landscape;
        margin: 10mm;
    }

    body {
        background: #fff;
    }

    .navbar,
    .app-sidebar,
    .report-print-button,
    .table-pagination,
    form,
    .btn {
        display: none !important;
    }

    .app-main {
        margin-left: 0 !important;
    }

    .app-main .container-fluid {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        break-inside: avoid;
    }

    .table {
        font-size: 10pt;
    }
}
