:root, [data-bs-theme=light] {
    --bs-primary: #146c72;
    --bs-primary-rgb: 20, 108, 114;
}
.btn-primary {
    --bs-btn-bg: #146c72;
    --bs-btn-border-color: #146c72;
    --bs-btn-hover-bg: #10585d;
    --bs-btn-hover-border-color: #10585d;
}
.menu-inner .menu-item.active > .menu-link {
    color: #146c72;
    background: #e3f2f1;
}
.content-wrapper .card { margin-bottom: 1rem; }

.content-wrapper .form-select option,
.content-wrapper .form-select optgroup {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
}

.layout-page, .content-wrapper, main .card, main .card-body, main .table-responsive {
    min-width: 0;
    max-width: 100%;
}
main .table-responsive { overflow: visible; }
main .table-responsive > table { width: 100%; table-layout: fixed; }
main .table-responsive :is(th, td) {
    white-space: normal;
    overflow-wrap: anywhere;
    padding-inline: .5rem;
}
main summary { cursor: pointer; overflow-wrap: anywhere; }

@media (max-width: 1499px) {
    main .responsive-records-wide thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    main .responsive-records-wide tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        padding: .75rem;
        border-bottom: 1px solid var(--bs-border-color);
    }
    main .responsive-records-wide tbody td { border: 0; min-width: 0; }
    main .responsive-records-wide td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: .75rem;
        color: var(--bs-secondary-color);
    }
}
@media (max-width: 991px) {
    main .responsive-records thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    main .responsive-records tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
        padding: .75rem;
        border-bottom: 1px solid var(--bs-border-color);
    }
    main .responsive-records tbody td { border: 0; min-width: 0; }
    main .responsive-records td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: .75rem;
        color: var(--bs-secondary-color);
    }
}

main canvas { max-width: 100%; }

/* Keep the Sneat shell and list hierarchy used by the Penprint backoffice. */
#layout-menu .app-brand.demo { position: relative; min-height: 5rem; }
.aviate-brand { gap: .55rem; color: var(--bs-primary); font-size: 2rem; font-weight: 800; letter-spacing: -.06em; }
.aviate-brand .bx { font-size: 1.65rem; }
#layout-menu .aviate-menu-toggle {
    position: absolute;
    inset-inline-end: -.9rem;
    z-index: 2;
    box-sizing: border-box;
    inline-size: 2.5rem;
    block-size: 2.5rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: .25rem solid var(--bs-body-bg);
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
}
.layout-menu-collapsed #layout-menu:not(:hover) .aviate-menu-toggle i { transform: rotate(180deg); }
#layout-menu .menu-inner .menu-item.active > .menu-link { background: rgba(var(--bs-primary-rgb), .13); }
.overview-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.overview-stat { flex-direction: row; align-items: center; gap: 1rem; min-height: 8rem; }
.overview-stat-text { min-width: 0; overflow-wrap: anywhere; }
.overview-icon { display: grid; place-items: center; flex: 0 0 3.25rem; height: 3.25rem; border-radius: .55rem; font-size: 1.35rem; }
.overview-chart { height: 20rem; min-width: 0; }
.listing-filter-grid { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.listing-filter-field { flex: 1 1 8rem; min-width: 0; }
.listing-filter-search { flex-grow: 2; flex-basis: 13rem; }
main .table thead th { background-color: var(--bs-tertiary-bg); }
main .overview-purchases th:first-child { width: 24%; }
main .overview-purchases th:nth-child(2) { width: 19%; }
@media (max-width: 575px) {
    .overview-chart { height: 15rem; }
    .listing-filter-field { flex-basis: calc(50% - .75rem); }
    .listing-filter-search { flex-basis: 100%; }
}

#edit-compra-modal [data-edit-content],
#edit-compra-modal [data-edit-content] > form { display: contents; }

.purchases-list-table tbody td,
.backoffice-list-table tbody td { font-size: .75rem; }

.purchases-list-table .purchase-secondary,
.purchases-list-table .badge,
.backoffice-list-table :is(.badge, .listing-secondary) { font-size: .6875rem; }

main .purchase-observation-row[hidden] { display: none !important; }
main .purchase-observation-row:not([hidden]) { display: table-row; }
main .purchase-observation-row td {
    padding: .75rem 1rem;
    background-color: var(--bs-tertiary-bg);
    white-space: pre-wrap;
}
