/* ===== BOOTGRID COMPATIBILITY FIX (BS4+) ===== */

.bootgrid-header,
.bootgrid-footer {
    padding: 10px 0;
}

.bootgrid-header .actionBar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Botões da action bar */
.bootgrid-header .btn {
    margin-right: 4px;
}

/* Dropdown corrigido */
.bootgrid-header .dropdown-menu {
    font-size: 14px;
    min-width: 120px;
}

/* ===== TABLE ===== */
.bootgrid-table {
    width: 100%;
    background: #fff;
    border: 1px solid #dee2e6;
}

.bootgrid-table th,
.bootgrid-table td {
    vertical-align: middle !important;
    padding: 0.5rem;
}

.bootgrid-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* ===== COMMAND BUTTONS ===== */
.bootgrid-table .command-edit,
.bootgrid-table .command-delete {
    margin-right: 4px;
}

/* ===== PAGINATION (FIX BS4+) ===== */
.bootgrid-footer .pagination {
    margin: 0;
    justify-content: flex-start;
}

.bootgrid-footer .pagination li {
    display: inline-block;
}

.bootgrid-footer .pagination li a {
    position: relative;
    display: block;
    padding: 6px 12px;
    margin-left: -1px;
    line-height: 1.25;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
    cursor: pointer;
}

.bootgrid-footer .pagination li.active a {
    z-index: 1;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.bootgrid-footer .pagination li.disabled a {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Ícones anteriores/próximos */
.bootgrid-footer .pagination li.first a,
.bootgrid-footer .pagination li.last a,
.bootgrid-footer .pagination li.prev a,
.bootgrid-footer .pagination li.next a {
    font-weight: bold;
}

/* ===== INFO BAR ===== */
.bootgrid-footer .infoBar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 14px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .bootgrid-header .actionBar {
        flex-direction: column;
        align-items: flex-start;
    }

    .bootgrid-footer {
        text-align: center;
    }

    .bootgrid-footer .infoBar {
        justify-content: center;
        margin-top: 8px;
    }
}

/* ===== ACTIONS À DIREITA (BOOTGRID HEADER) ===== */
.bootgrid-header .actionBar {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Empurra a div .actions para a direita */
.bootgrid-header .actionBar .actions {
    margin-left: auto;
}

/* FORÇA BOTÕES DE AÇÃO NA MESMA LINHA */
.bootgrid-table td:last-child {
    white-space: nowrap;
    text-align: center;
}

/* Botões editar / excluir */
.bootgrid-table .command-edit,
.bootgrid-table .command-delete {
    display: inline-block;
    margin: 0 4px;
    vertical-align: middle;
}