.btn-voltar {
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 160px;
    transition: background-color 0.2s;
}

.btn-voltar:hover {
    background-color: #5a6268;
}

.btn-novo {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 160px;
    transition: background-color 0.2s;
}

.btn-novo:hover {
    background-color: #0056b3;
}


.tabela-categoria {
    width: 100%;
    display: table;
    border-collapse: collapse;
    min-width: 600px;
    border: none;
    font-size: 0.9rem;
}

.tabela-categoria thead {
    background-color: #333;
    color: #fff;
}

.tabela-categoria th {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    /* white-space: nowrap;*/
}

.tabela-categoria tbody tr {
    transition: all 0.2s;
    background-color: #fff;
}

.tabela-categoria tbody tr:hover {
    background-color: rgba(255, 204, 0, 0.05);
    transform: scale(1.002);
}

.tabela-categoria td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #444;
    font-size: 0.95rem;
    vertical-align: middle;
    text-align: center;
    /*white-space: nowrap;*/
}

.linha-filtros {
    background-color: #f9f9f9;
}

.linha-filtros td {
    padding: 10px 15px;
    border-bottom: 2px solid #eee;
    text-align: center;
}

.btn-limpar-cinza {
    color: #999;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.btn-limpar-cinza:hover {
    color: #666;
    text-decoration: underline;
}

/* ===== PAGINAÇÃO ESTILO GOOGLE ===== */
#paginacao {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 25px;
    width: 100%;
}

#paginacao .btn-pag {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 36px;
    text-align: center;
    line-height: 1.4;
}

#paginacao .btn-pag:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

#paginacao .btn-pag.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
    font-weight: 600;
    cursor: default;
}

#paginacao .btn-pag:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

#paginacao .info-paginacao {
    font-size: 13px;
    color: #666;
    margin-left: 8px;
    white-space: nowrap;
}

/* Classe .paginacao-simples mantida para compatibilidade com estruturas antigas */
.paginacao-simples {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    width: 100%;
}

.paginacao-simples span {
    font-size: 0.9rem;
    color: #666;
}

.paginacao-simples b {
    color: #333;
}

.tabela-responsiva-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    margin-bottom: 20px;
    border-radius: 12px;
    scrollbar-width: thin;
    scrollbar-color: #ffcc00 #f4f4f4;
}

.tabela-responsiva-container::-webkit-scrollbar {
    height: 8px;
}

.tabela-responsiva-container::-webkit-scrollbar-track {
    background: #f4f4f4;
    border-radius: 0 0 12px 12px;
}

.tabela-responsiva-container::-webkit-scrollbar-thumb {
    background-color: #ffcc00;
    border-radius: 10px;
}

.linha-produto {
    text-align: center;
    font-weight: bold;
}

.btn-excluir-grid {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    color: #cc0000;
    font-size: 0.85rem;
    text-decoration: none;
}

.btn-excluir-grid:hover {
    background: #fee2e2;
}

.btn-editar {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    font-size: 0.85rem;
}

.btn-editar:hover {
    background: #e9ecef;
}

.filtro-input {
    width: 100%;
    padding: 8px 12px !important;
    font-size: 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background-color: #fff;
    color: #444;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filtro-input:focus {
    border-color: #ffcc00 !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.1) !important;
}

.acoes-flex {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.badge-ativo {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-inativo {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.coluna-id {
    min-width: 100px;
    max-width: 100px;
    text-align: center;
}

.coluna-nome {
    min-width: 250px;
    max-width: 250px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
}

.coluna-categoria {
    min-width: 250px;
    max-width: 250px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
}

.coluna-descricao {
    min-width: 250px;
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.coluna-situacao {
    min-width: 120px;
    text-align: center;
}

.coluna-acoes {
    min-width: 120px;
    text-align: center;
}

.coluna-preco {
    min-width: 160px;
    text-align: center;
    padding-right: 15px;
}

.coluna-quantidade {
    min-width: 130px;
    text-align: center;
}

.filtro-id-input {
    max-width: 80px;
    text-align: center;
}

/* Estilos para o Column Picker */
.lista-colunas {
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 60px;
    border: 1px dashed #ddd;
    border-radius: 6px;
    padding: 5px;
}

.lista-colunas li {
    padding: 10px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lista-colunas li.coluna-fixa {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.lista-colunas li.coluna-visivel {
    border-left: 3px solid #28a745;
}

.lista-colunas li.coluna-oculta {
    border-left: 3px solid #dc3545;
    opacity: 0.7;
}

/* Estilos para modais (Column Picker e Seleção) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-selecao {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-selecao h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-selecao input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.lista-selecao {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-selecao li {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.lista-selecao li:hover {
    background: #f0f8ff;
}

/* ===== CABEÇALHO DA LISTAGEM ===== */
.cabecalho-listagem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.botoes-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ===== BOTÕES PADRÃO ===== */
.btn-voltar,
.btn-novo,
.btn-colunas,
.btn-dashboard {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.btn-voltar {
    background-color: #6c757d;
    color: #fff;
}

.btn-voltar:hover {
    background-color: #5a6268;
}

.btn-novo {
    background-color: #007bff;
    color: #fff;
}

.btn-novo:hover {
    background-color: #0056b3;
}

.btn-colunas {
    background-color: #6c757d;
    color: #fff;
}

.btn-colunas:hover {
    background-color: #5a6268;
}

.btn-dashboard {
    background-color: #28a745;
    color: #fff;
}

.btn-dashboard:hover {
    background-color: #218838;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .cabecalho-listagem {
        flex-direction: column;
        align-items: stretch;
    }

    .botoes-acoes {
        justify-content: center;
    }

    .btn-voltar,
    .btn-novo,
    .btn-colunas,
    .btn-dashboard {
        flex: 1 1 auto;
        min-width: 80px;
        text-align: center;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* Responsividade da paginação */
    #paginacao .btn-pag {
        padding: 5px 10px;
        font-size: 13px;
        min-width: 32px;
    }
}

@media (max-width: 480px) {
    .botoes-acoes {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-voltar,
    .btn-novo,
    .btn-colunas,
    .btn-dashboard {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 1rem;
    }

    #paginacao {
        gap: 4px;
    }

    #paginacao .btn-pag {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 28px;
    }

    #paginacao .info-paginacao {
        font-size: 11px;
        margin-left: 4px;
    }
}