body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    margin: 0;
    color: #1f2933;
    background: #f6f8fa;
}

.modal-carregando {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f8fa;
}

.modal-carregando[hidden] {
    display: none;
}

.modal-carregando-conteudo {
    min-width: 180px;
    padding: 24px 30px;
    text-align: center;
    background: #fff;
    border: 1px solid #d7dde3;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

.modal-carregando-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 12px;
    border: 4px solid #d7dde3;
    border-top-color: #2f6f9f;
    border-radius: 50%;
    animation: girar-carregando 0.9s linear infinite;
}

.modal-carregando-texto {
    color: #14243a;
    font-size: 15px;
    font-weight: 600;
}

.modal-carregando-texto.erro {
    color: #991b1b;
}

@keyframes girar-carregando {
    to {
        transform: rotate(360deg);
    }
}

.cabecalho-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px;
}

.cabecalho-logo img {
    height: 48px;
    max-width: 100%;
    width: auto;
    display: block;
}

.cabecalho-textos {
    flex: 1;
    min-width: 0;
}

.cabecalho-titulo {
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.cabecalho-dados {
    margin-top: 4px;
    color: #52616f;
    font-size: 13px;
    font-weight: normal;
}

.page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 12px 36px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #d7dde3;
    padding: 12px;
    box-sizing: border-box;
    font-size: 13px;
}

.tabela-gestores-fiscais {
    width: 100%;
}

table.dataTable thead th {
    background: #eef2f5;
    color: #202933;
    font-weight: 600;
    white-space: nowrap;
}

table.dataTable tbody td {
    vertical-align: top;
}

.status-vigente {
    color: #166534;
    font-weight: 600;
}

.status-nao-vigente {
    color: #991b1b;
    font-weight: 600;
}

.grupo-exportacao .dt-button {
    background: #f0f0f0;
    border: 1px solid #a9a9a9;
    color: #14243a;
    border-radius: 4px;
    margin: 0 4px;
    min-height: 36px;
    padding: 7px 16px;
}

.grupo-exportacao .dt-button:hover {
    background: #e4e4e4;
    border-color: #8f8f8f;
    color: #14243a;
}

.barra-controles-relatorio {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    justify-content: space-between;
    width: 100%;
}

.grupo-controle {
    box-sizing: border-box;
    margin: 0;
    min-height: 72px;
    padding: 0 10px;
}

.grupo-titulo,
.filtro-campo label {
    color: #14243a;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.filtro-pesquisa input {
    box-sizing: border-box;
    min-height: 34px;
    width: 100%;
}

.grupo-filtros {
    flex: 1 1 auto;
}

.grupo-exportacao {
    flex: 0 0 300px;
    text-align: center;
}

.filtros-relatorio {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.filtro-campo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
}

.filtro-campo select {
    min-height: 32px;
    border: 1px solid #b9c3cc;
    border-radius: 4px;
    color: #1f2933;
    font-size: 13px;
    padding: 5px 8px;
    background: #fff;
}

.btn-limpar-filtros {
    min-height: 32px;
    border: 1px solid #8fa1b2;
    border-radius: 4px;
    color: #263442;
    font-size: 13px;
    padding: 5px 10px;
    background: #eef2f5;
    cursor: pointer;
}

.btn-limpar-filtros:hover {
    background: #dfe6ec;
}

@media (max-width: 700px) {
    .page {
        padding: 16px 10px 28px;
    }

    .table-wrap {
        padding: 10px;
    }

    .filtro-campo {
        min-width: 100%;
    }

    .barra-controles-relatorio {
        flex-direction: column;
    }

    .grupo-controle {
        width: 100%;
    }

    .grupo-exportacao {
        flex-basis: auto;
    }
}

@media (max-width: 640px) {
    .cabecalho-wrap {
        align-items: flex-start;
        gap: 10px;
    }

    .cabecalho-logo img {
        height: 40px;
    }

    .cabecalho-titulo {
        font-size: 18px;
    }
}
