@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700,800&display=swap');
@import url('https://fonts.googleapis.com/css?family=Material+Icons:400&display=swap');


/* BETHA LAYOUT - CSS PRINCIPAL */

body {
    font-family: 'Open Sans', Arial, sans-serif;
}

.main-body, body {
    background-color: #EDEDEE;
}

/* Container principal */
.betha-container {
    margin-right: auto;
    margin-left: auto;
    margin-top: 5px;
    padding: 0 15px;
    padding-bottom: 20px;
    width: calc(100% - 16px);
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

    .betha-container .card {
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .betha-container .card-body {
        padding: 0;
    }

    .betha-container hr {
        border-top: 1px solid #ededee;
        margin: 10px 0;
    }

/* Header Betha */
.betha-header {
    background: #ffffff;
    height: 40px;
    position: sticky;
    top: 0;
    z-index: 1050;
    border-bottom: 1px solid #e3e3e3;
    padding: 0 !important;
}

.bth-subtitle {
    margin: 2px 0 0;
    font-size: 11px;
    color: #888;
    font-weight: 400;
}

.betha-header-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    color: #59595a;
}

    .betha-header-link:hover {
        background: #ededee;
        color: #242424;
        text-decoration: none;
    }

.betha-avatar {
    height: 22px !important;
    width: 22px;
    object-fit: cover;
}

.betha-avatar-sm {
    height: 20px;
    border-radius: 50%;
    margin-right: 6px;
}

.betha-entity-name {
    font-size: 14px;
    font-weight: 500;
}

.bth-page-header {
    border-bottom: none;
    margin: 0;
    padding: 14px 11px 0 11px;
}

    .bth-page-header .row {
        margin-bottom: 10px;
        padding: 0;
    }

    .bth-page-header h1,
    .betha-container h1 {
        font-family: 'Open Sans', Arial, sans-serif;
        font-size: 22px;
        font-weight: 500;
        line-height: 1.1;
        color: #242424;
        margin: 0;
    }

.bth-page-title {
    padding: 14px 0;
}

/* HEADER FIXO */

.betha-header-inner {
    width: calc(100% - 16px);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
}

/*  BREADCRUMB */
.bth-breadcrumb {
    float: right;
    background: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .bth-breadcrumb li {
        display: inline-block;
        color: #757576;
        font-size: 12px;
        line-height: 22px;
    }

        .bth-breadcrumb li + li::before {
            content: "\f105";
            font-family: FontAwesome;
            font-size: 13px;
            font-weight: 600;
            color: #757576;
            padding: 0 5px;
        }

/* BARRA DE AÇÕES */
.bth-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 11px;
}

/* BOTÕES PADRÃO BETHA */
.bth-btn-group {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

    .bth-btn-group > .bth-btn-add {
        position: relative;
        float: left;
        margin-left: 0;
    }


.bth-btn-add {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    text-align: center;
    touch-action: manipulation;
    cursor: pointer;
    background-image: none;
    border: none;
    white-space: nowrap;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 1.55;
    border-radius: 4px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    user-select: none;
    overflow: hidden;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

    .bth-btn-add::before {
        content: "\E145";
        font-family: 'Material Icons', Arial, sans-serif;
        font-size: 16px;
        font-weight: 400;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        flex-shrink: 0;
        margin-right: 4px;
        transform-origin: center center;
        transition: transform 0.25s ease;
    }

    .bth-btn-add.bth-no-icon::before {
        content: none;
    }

    /* --- success (verde) --- */
    .bth-btn-add.bth-btn-success {
        background-color: #329a72;
        border: 1px solid #329a72;
        color: #fff;
    }

        .bth-btn-add.bth-btn-success:hover {
            background-color: #257456;
            border-color: #257456;
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
        }

            .bth-btn-add.bth-btn-success:hover::before {
                transform: rotate(90deg);
            }

        .bth-btn-add.bth-btn-success:active {
            background-color: #1f6349;
            border-color: #1f6349;
            transform: translateY(0);
            box-shadow: none;
        }

        .bth-btn-add.bth-btn-success:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(50, 154, 114, 0.3);
        }


@keyframes bth-modal-elastic {
    0% {
        opacity: 0;
        transform: scale(0.75);
    }

    60% {
        opacity: 1;
        transform: scale(1.04);
    }

    80% {
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

    /* --- primary (azul) --- */
    .bth-btn-add.bth-btn-primary {
        background-color: #3374db;
        border: 1px solid #3374db;
        color: #fff;
    }

        .bth-btn-add.bth-btn-primary:hover {
            background-color: #2860b8;
            border-color: #2860b8;
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
        }

            .bth-btn-add.bth-btn-primary:hover::before {
                transform: rotate(90deg);
            }

        .bth-btn-add.bth-btn-primary:active {
            background-color: #1e4a8a;
            border-color: #1e4a8a;
            transform: translateY(0);
            box-shadow: none;
        }

        .bth-btn-add.bth-btn-primary:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(51, 116, 219, 0.3);
        }

    .bth-btn-add.bth-btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }

    .bth-btn-add.bth-btn-md {
        padding: 6px 12px;
        font-size: 13px;
    }

    .bth-btn-add.bth-btn-lg {
        padding: 8px 16px;
        font-size: 14px;
    }
 

/* CAMPO DE PESQUISA */
.bth-search-input {
    width: 342px;
    height: 30px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid #bfbfc0;
    border-radius: 4px;
    box-shadow: none;
    color: #242424;
    font-family: 'Open Sans', Arial, sans-serif;
    transition: border-color 0.15s ease-in-out;
}

    .bth-search-input:focus {
        border-color: #3374db;
        outline: none;
        box-shadow: 0 0 0 2px rgba(51, 116, 219, 0.15);
    }

    .bth-search-input::placeholder {
        color: #bfbfc0;
    }

.betha-container input[type="search"]:not(.bth-search *),
.betha-container #pesquisar:not(.bth-search *) {
    width: 250px;
    height: 34px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
}

    .betha-container input[type="search"]:not(.bth-search *):focus,
    .betha-container #pesquisar:not(.bth-search *):focus {
        border-color: #3374db;
        outline: none;
        box-shadow: 0 0 0 2px rgba(51, 116, 219, 0.15);
    }

/* GRID CONTAINER */
.bth-grid-container {
    padding: 0 11px;
}

.bth-empty-message {
    margin-bottom: 20px;
    font-size: 21px;
    font-weight: 300;
    line-height: 1.4;
    text-align: center;
    color: #757576;
}

/* DROPDOWN */
.dropdown-menu {
    z-index: 2000 !important;
}

.betha-dropdown {
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,.16);
    padding: 5px 0;
}

    .betha-dropdown .dropdown-item {
        padding: 6px 14px;
        font-size: 14px;
    }

        .betha-dropdown .dropdown-item:hover {
            background-color: #f5f5f5;
        }

/* CARDS - VISÃO GERAL */
.betha-container .betha-page-header {
    border-bottom: none;
    margin: 14px 0;
    padding-bottom: 0;
}

    .betha-container .betha-page-header h3 {
        font-family: 'Open Sans', Arial, sans-serif;
        font-size: 20px;
        font-weight: 500;
        color: #242424;
        margin-top: 0;
        margin-bottom: 10px;
    }

.betha-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    margin-right: -10px;
    padding: 0;
    position: relative;
}

    .betha-list li {
        box-sizing: border-box;
        display: inline-flex;
        margin-bottom: 10px;
        padding-right: 10px;
        width: 33.33333%;
    }

.betha-card {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 24px;
    background-color: rgba(166, 184, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    color: #1c1a23;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    border: 1px solid rgba(166, 184, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

    .betha-card:hover {
        background-color: rgba(166, 184, 255, 0.6);
        text-decoration: none;
        color: #1c1a23;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
        border-color: rgba(166, 184, 255, 0.6);
    }

    .betha-card .betha-card-title {
        padding-right: 50px;
        cursor: pointer;
        font-size: 20px;
        font-family: 'Open Sans', Arial, sans-serif;
        font-weight: 400;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
        color: #1c1a23;
    }

    .betha-card .betha-card-icon {
        position: absolute;
        width: 42px;
        height: 42px;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        padding: 0;
        cursor: default;
        pointer-events: none;
        text-align: center;
        background-color: rgba(166, 184, 255, 0.6);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .betha-card .betha-card-icon i {
            color: #1c1a23 !important;
            font-size: 22px !important;
        }

    /* Loading state do card */
    .betha-card.loading .card-value {
        position: relative;
        color: transparent !important;
        background: #e9ecef;
        border-radius: 6px;
        height: 22px;
        overflow: hidden;
    }

        .betha-card.loading .card-value::after {
            content: "";
            position: absolute;
            inset: 0;
            transform: translateX(-100%);
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
            animation: shimmer 1.2s infinite;
        }

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* CAMPO DE VISUALIZAÇÃO */
.bth-field-view {
    margin-bottom: 10px;
}

    .bth-field-view .bth-label {
        font-size: 12px;
        color: #757576;
        margin-bottom: 2px;
        display: block;
    }

    .bth-field-view p {
        font-size: 14px;
        color: #242424;
        margin: 0;
        padding: 4px 0;
        font-weight: 500;
    }

/* ALERTAS E MODAIS  */
#alert-container {
    position: fixed !important;
    top: 60px !important;
    right: 20px !important;
    z-index: 2147483647 !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}

body > #alert-container {
    z-index: 2147483647 !important;
}

/* MULTI-SELECT (CHOICES.JS) */
.bth-scope .choices[data-type*="select-multiple"] .choices__inner,
.bth-body .choices[data-type*="select-multiple"] .choices__inner {
    min-height: 34px !important;
    max-height: 68px !important;
    overflow-y: auto !important;
    padding: 4px 8px !important;
}

.bth-scope .choices__list--multiple,
.bth-body .choices__list--multiple {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
}

    .bth-scope .choices__list--multiple .choices__item,
    .bth-body .choices__list--multiple .choices__item {
        background-color: #3374db !important;
        border: none !important;
        border-radius: 4px !important;
        padding: 3px 8px !important;
        font-size: 13px !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        color: #fff !important;
        flex-shrink: 0 !important;
    }

        .bth-scope .choices__list--multiple .choices__item .choices__button,
        .bth-body .choices__list--multiple .choices__item .choices__button {
            border-left: none !important;
            padding-left: 6px !important;
            margin-left: 6px !important;
            opacity: 0.8;
        }

            .bth-scope .choices__list--multiple .choices__item .choices__button:hover,
            .bth-body .choices__list--multiple .choices__item .choices__button:hover {
                opacity: 1;
            }

.bth-scope .choices[data-type*="select-multiple"]:has(.choices__item) .choices__input--cloned,
.bth-body .choices[data-type*="select-multiple"]:has(.choices__item) .choices__input--cloned {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* Estilo para valores na visualização */
.bth-value {
    margin: 0;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    min-height: 38px;
    word-wrap: break-word;
}

@media (max-width: 991px) {
    .betha-list li {
        width: 50%;
    }

    .bth-search-input {
        width: auto;
    }
}

@media (max-width: 767px) {
    .betha-container {
        width: 100%;
    }

    .bth-breadcrumb {
        float: left;
    }

    .bth-search-input {
        width: 100%;
    }

    .bth-actions-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .betha-list li {
        width: 100%;
    }
}


/* Corrigi algum outro CSS global mudando a fonte */

.betha-container h1,
.betha-container h2,
.betha-container h3,
.betha-container h4,
.betha-container h5,
.betha-container h6 {
    font-family: 'Open Sans', Arial, sans-serif !important;
}

/* Botão padrão sem o sinal de + do bth-add (usado para action de importar XML em servidores) */
.bth-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    /* Primary (azul) */
    .bth-btn-action.bth-btn-primary {
        background-color: #1976d2;
        color: #fff;
        border: 1px solid #1976d2;
    }

        .bth-btn-action.bth-btn-primary:hover {
            background-color: #1565c0;
        }

    /* Success (verde) */
    .bth-btn-action.bth-btn-success {
        background-color: #329a72;
        color: #fff;
        border: 1px solid #329a72;
    }

        .bth-btn-action.bth-btn-success:hover {
            background-color: #257456;
        }

    /* Danger (vermelho) */
    .bth-btn-action.bth-btn-danger {
        background-color: #c62828;
        color: #fff;
        border: 1px solid #c62828;
    }

        .bth-btn-action.bth-btn-danger:hover {
            background-color: #b71c1c;
        }

    /* Warning (amarelo) */
    .bth-btn-action.bth-btn-warning {
        background-color: #f9a825;
        color: #212121;
        border: 1px solid #f9a825;
    }

        .bth-btn-action.bth-btn-warning:hover {
            background-color: #f57f17;
        }

/* ANEXO/IMPORT DE ARQUIVOS  */

/* Dropzone de arquivo */
.bth-file-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

    .bth-file-dropzone:hover {
        border-color: #1e88e5;
        background-color: #e3f2fd;
    }

    .bth-file-dropzone.has-file {
        border-color: #4caf50;
        background-color: #e8f5e9;
    }

    .bth-file-dropzone.dropzone-error {
        border-color: #ef4444;
        background-color: #fef2f2;
    }

.bth-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #666;
}

    .bth-file-label i {
        font-size: 32px;
        color: #dc3545;
    }

    .bth-file-label span {
        font-size: 14px;
    }

.bth-file-dropzone.has-file .bth-file-label {
    color: #2e7d32;
}

    .bth-file-dropzone.has-file .bth-file-label i {
        color: #4caf50;
    }

/* Custom infox */

.bth-info-box {
    background-color: #ededee;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #757576;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #e9ecef;
}

.bth-info-box-info {
    background-color: #e8f4fd;
    border-left: 4px solid #1976d2;
    border-radius: 0 4px 4px 0;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #1565c0;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.bth-info-box-warning {
    background-color: #fefae6;
    border-left: 4px solid #f0a500;
    border-radius: 0 4px 4px 0;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #b87d00;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.bth-info-box-danger {
    background-color: #fdecea;
    border-left: 4px solid #c62828;
    border-radius: 0 4px 4px 0;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #c62828;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Tooltip informativo reutilizável (.bth-tooltip-info) */

/*.bth-tooltip-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    vertical-align: middle;
}

    .bth-tooltip-info i {
        font-size: 14px;
        color: #9e9e9e;
        cursor: help;
        transition: color 0.15s ease;
        line-height: 1;
    }

    .bth-tooltip-info:hover i,
    .bth-tooltip-info.ativo i {
        color: #1976d2;
    }

    .bth-tooltip-info .bth-tooltip-info-box {
        display: none;
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        background-color: #ededee;
        color: #757576 !important;
        border: 1px solid #e9ecef;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.5;
        padding: 8px 12px;
        border-radius: 6px;
        width: 260px;
        white-space: normal;
        z-index: 9999;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        pointer-events: none;
    }

        .bth-tooltip-info .bth-tooltip-info-box strong {
            color: #757576 !important;
        }*/

        /* Setinha embaixo */
        /*.bth-tooltip-info .bth-tooltip-info-box::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #e9ecef;
        }*/

    /* Aparece no hover */
    /*.bth-tooltip-info:hover .bth-tooltip-info-box {
        display: block;
    }*/

    /* Aparece quando clicado (classe .ativo) */
    /*.bth-tooltip-info.ativo .bth-tooltip-info-box {
        display: block;
        pointer-events: auto;
    }

    .bth-tooltip-info.tooltip-nowrap .bth-tooltip-info-box {
        width: auto !important;
        white-space: nowrap !important;
    }

    .bth-tooltip-info.tooltip-esquerda .bth-tooltip-info-box {
        left: auto;
        right: -35rem;
        transform: none;
    }

        .bth-tooltip-info.tooltip-esquerda .bth-tooltip-info-box::after {
            left: auto;
            right: 12px;
            transform: none;
        }*/

/* Animação bounce ao atualizar conteúdo */
/*@keyframes bth-tooltip-bounce {
    0%, 100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-2px);
    }

    75% {
        transform: translateY(2px);
    }
}

.bth-tooltip-info.atualizado i {
    animation: bth-tooltip-bounce 1s ease;
    color: #1976d2;
}*/

/* Tooltip informativo reutilizável (.bth-tooltip-info) */

.bth-tooltip-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    vertical-align: middle;
}

    .bth-tooltip-info i {
        font-size: 14px;
        color: #9e9e9e;
        cursor: help;
        transition: color 0.15s ease;
        line-height: 1;
    }

    .bth-tooltip-info:hover i,
    .bth-tooltip-info.ativo i {
        color: #1976d2;
    }

    .bth-tooltip-info .bth-tooltip-info-box {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 6px;
        background: rgb(255, 255, 255);
        border: 0.5px solid rgb(200, 200, 200);
        border-radius: 8px;
        padding: 8px 12px;
        min-width: 220px;
        max-width: 320px;
        max-height: 280px;
        overflow-y: auto;
        color: #59595a !important;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.5;
        white-space: normal;
        z-index: 9999;
        box-shadow: rgba(0, 0, 0, 0.12) 0px 4px 12px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-3px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
        pointer-events: none;
    }

        .bth-tooltip-info .bth-tooltip-info-box strong {
            color: #59595a !important;
        }

    /* Aparece no hover */
    .bth-tooltip-info:hover .bth-tooltip-info-box {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Aparece quando clicado (classe .ativo) - necessário para touch, sem :hover */
    .bth-tooltip-info.ativo .bth-tooltip-info-box {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .bth-tooltip-info.tooltip-nowrap .bth-tooltip-info-box {
        width: auto !important;
        white-space: nowrap !important;
    }

    .bth-tooltip-info.tooltip-esquerda .bth-tooltip-info-box {
        left: auto;
        right: 0;
    }

/* Animação bounce ao atualizar conteúdo */
@keyframes bth-tooltip-bounce {
    0%, 100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-2px);
    }

    75% {
        transform: translateY(2px);
    }
}

.bth-tooltip-info.atualizado i {
    animation: bth-tooltip-bounce 1s ease;
    color: #1976d2;
}



/* Corrigi pesquisar do choices sendo cortado */

.choices__list--dropdown .choices__input--cloned {
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

.choices__list--dropdown {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* FILTRO DOT  */

.btn-filtro-status {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

    .btn-filtro-status:hover {
        border-color: #aaa;
        color: #333;
        transform: scale(1.025);
    }

    .btn-filtro-status.active {
        background: rgb(51, 116, 219);
        border-color: rgb(40, 96, 185);
        color: #fff;
        transform: scale(0.97);
    }

        .btn-filtro-status.active .filtro-dot {
            background: #fff;
        }

.filtro-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

/* Cards de resumo de valores */

.metric-resumo {
    flex: 1;
    background: var(--color-background-secondary, #f5f5f5);
    border-radius: 6px;
    padding: 10px 12px;
    border: 0.5px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .metric-resumo:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    }

    .metric-resumo-com-dropdown:hover {
        z-index: 1060;
    }

.metric-resumo-label {
    font-size: 11px;
    color: #757575;
    margin-bottom: 4px;
}

.metric-resumo-value {
    font-size: 14px;
    font-weight: 500;
    color: #1976d2;
}

/* Tela de avaliação de prestação financeira */

.metric-card-aval {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 16px;
    min-width: 170px;
    flex: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.metric-card-aval__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.metric-card-aval__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-card-aval__label {
    font-size: 11px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.metric-card-aval__value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}


.parcela-card {
    background: var(--color-background-primary, #fff);
    border: 0.5px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: 32px 1fr 1fr 1fr 1fr 160px;
    gap: 12px;
    align-items: center;
}

    .parcela-card:last-child {
        margin-bottom: 0;
    }

    .parcela-card.pendente {
        background: #fffdf5;
        border-color: #FAC775;
    }

.parcela-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    color: #757575;
    flex-shrink: 0;
}

    .parcela-num.pendente {
        background: #f8eed7;
        color: #843c20;
    }

.p-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.p-label {
    font-size: 10px;
    color: #757575;
}

.p-value {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .p-value.muted {
        color: #aaa;
        font-weight: 400;
    }

.parcela-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0.5px solid transparent;
}

    .parcela-badge.efetivado {
        background: #E1F5EE;
        color: #085041;
        border-color: #9FE1CB;
    }

    .parcela-badge.pendente {
        background: #FAEEDA;
        color: #633806;
        border-color: #FAC775;
    }

.parcela-card.pendente {
    background: #FAEEDA;
    border-color: #FAC775;
}

.parcela-num.pendente {
    background: #EF9F27;
    color: #412402;
}

.parcela-btn-ef {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #633806;
    color: #FAEEDA;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

    .parcela-btn-ef:hover {
        background: #412402;
        color: #FAEEDA;
    }

.parcela-badge.efetivado {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #EF9F27;
    color: #412402;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
}

.parcela-icon-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 0.5px solid #e0e0e0;
    background: #fff;
    color: #757575;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s, color 0.15s;
}

    .parcela-icon-btn:hover {
        background: #f5f5f5;
        color: #333;
        border-color: #c0c0c0;
    }

.parcela-card.pendente .p-value.muted {
    color: #854F0B;
}

.parcela-card.pendente .p-label {
    color: #854F0B;
}

/* Correção para grid de anexos */
#modalAnexos .modal-dialog {
    max-width: 600px;
}

#modalAnexos table {
    table-layout: fixed;
    width: 100%;
}

/* Tooltip informativo no header [Disponibilidade e outras receitas] */

.disp-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 500;
    cursor: help;
    position: relative;
    flex-shrink: 0;
    vertical-align: middle;
    margin-top: 5px;
}

.disp-tooltip-box {
    visibility: hidden;
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: #fff;
    border: 0.5px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 14px;
    width: 320px;
    font-size: 12px;
    font-weight: 400;
    color: #374151;
    line-height: 1.6;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    white-space: normal;
    /* animação */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.30s ease, transform 0.30s ease, visibility 0s linear 0.30s;
}

.disp-tooltip-trigger:hover .disp-tooltip-box {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
    transition: opacity 0.30s ease, transform 0.30s ease, visibility 0s linear 0s;
}

/* Metric cards para documentos fiscais */

.df-resumo-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 1rem;
}

    .df-resumo-bar .acc-resumo-card {
        background: #fff;
        border: 0.5px solid #e0e0e0;
        border-radius: 6px;
        padding: 14px 16px;
    }

    .df-resumo-bar .acc-resumo-label {
        font-size: 12px;
        color: #757575;
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 4px;
    }

    .df-resumo-bar .acc-resumo-val {
        font-size: 22px;
        font-weight: 500;
        line-height: 1.1;
        margin-bottom: 4px;
    }

    .df-resumo-bar .acc-resumo-sub {
        font-size: 11px;
        color: #9e9e9e;
    }


@keyframes bthShake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.bth-shake {
    animation: bthShake 0.6s ease;
}

/* Estados de hover/active dos botões de ação do Tabulator (TabulatorActionButtons.js).
   !important necessário porque o estilo base é inline. */

.tab-action-btn:hover:not(:disabled) {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
}

.tab-action-btn:active:not(:disabled) {
    background: #e5e7eb !important;
}

/* Contador char */

.char-counter-amber {
    color: #f9a825 !important;
}

.text-danger {
    color: #c62828 !important;
}

@keyframes bth-input-shake-anim {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-4px);
    }

    40%, 80% {
        transform: translateX(4px);
    }
}

.bth-input-shake {
    animation: bth-input-shake-anim 0.4s ease-in-out;
}