:root {
    --primary-blue: #1351B4;
    --secondary-blue: #2670E8;
    --dark-blue: #071D41;
    --light-gray: #F8F8F8;
    --text-gray: #555555;
    --white: #FFFFFF;
}

/* Estilos Gerais */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.qvobject, .qv-object, .qv-inner-object, .qv-object-wrapper, .qv-panel {
    border: none !important;
    box-shadow: none !important;
  }

.header {
    padding: 5px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding-left: 85px;
    height: 85px;
    margin-top: 20px;
}

.logo {
    height: 70px;
    width: auto;
    padding-left: 25px;
}

.logo2 {
    height: 55px;
    width: auto;
}

/* -------------------- */

/* Estilo para cada filtro individual */
.fltr {
    height: 40px;
    margin-bottom: 8px;
}

/* Estilo para a coluna que contém os filtros */
.col-sm-12.col-lg-2.pt-2.px-2{
    margin-left: 120px;
}

/* Estilo do cabeçalho gov.br */
.gov-header {
    background-color: #1A8785;
    width: 100%;
    margin: 0;
    padding: 0;
}

.logo-header {
    padding: 10px 110px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: flex-start;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 100px;
    height: 45px;
}

.gov-logo {
    height: 35px;
    width: 100px;
    object-fit: contain;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-content,
.left-content {
    display: flex;
    gap: 5px;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.col-md-2, .col-md-4 {
    padding-left: 0;
}

.home-icon {
    color: #FFFFFF;
    font-size: 18px;
    text-decoration: none;
    padding: 7px 10px;
}

.home-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #FFFFFF;
}

.nav-buttons {
    display: flex;
    gap: 5px;
}

.nav-button {
    background: none;
    border: none;
    color: #FFFFFF;
    padding: 7px 10px;
    font-size: 15px;
    font-family: 'Rawline', sans-serif;
    cursor: pointer;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-button.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.right-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.right-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 180px;
}

#header-kpi {
    color: var(--white);
    height: 45px;
    min-width: 180px;
    display: flex;
    align-items: center;
    margin-left: auto;
}

#header-kpi .qv-object {
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    height: 100% !important;
}

#header-kpi .qv-object * {
    color: var(--white) !important;
    font-size: 13px !important;
    font-family: 'Rawline', sans-serif !important;
    background-color: #1A8785;
}

.sn-kpi .sn-kpi-data {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* ---------------------------- */

.qv-global-selections {
    left: 0;
    top: 275px !important;
    width: 100% !important;
    height: 800px !important;
    margin: 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    background: #FFFFFF;
}

.qvt-selections {
    padding-left: 110px;
    padding-right: 70px;
    margin-bottom: 30px;
}

.bright.qv-panel-current-selections {
    background: #ffffff;
    background-image: none;
}

/* ------- PROGRAMA ---------- */

#lbl-quantidade-programa,
#qtd-programas-situacao,
#qtd-programas-qualificacao-beneficiario {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

#lbl-descricao-programa,
#lbl-descricao-parceria,
#lbl-descricao-gestao {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    min-height: 143px; 
    margin-left: 45px;
    margin-right: 15px;
    width: auto;
    font-family: 'Rawline', sans-serif;
    display: flex;
    align-items: center;
}

#lbl-descricao-programa .qv-object-content *,
#lbl-descricao-parceria .qv-object-content *,
#lbl-descricao-gestao .qv-object-content * {
    font-size: 16px !important; 
    line-height: 1.6 !important; 
    white-space: normal !important; 
    overflow: visible !important; 
    height: auto !important; 
}
/* ---------------------------*/

/* -------- PARCERIA -------- */

#qtd-parcerias-situacao,
#qtd-parcerias-ente-superior {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.mt-3, .my-3 {
    margin-top: 0rem !important;
}

/* -------------------------- */

/* Estilos específicos para os cards dos GRÁFICOS */

.qlik-chart-card {
    min-height: 400px;
    width: 100%;
    height: 100%;
    padding: 20px;
    background-color: var(--white);
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    position: relative;
}

/* ------------------------------------------------------------ */

/* ABA PROGRAMAS */

#tabela-programas {
    min-height: 500px;
    margin-bottom: 20px;
}

#img-tabela-programas {
    min-height: 10px;
    margin-bottom: 40px;
    width: 100%;
    padding-right: 20px;
}

.col-12 {
    min-height: 10px;
    margin-bottom: 20px;
    width: 150%;
}


/* ABA PARCERIAS */

#tabela-parcerias{
    min-height: 500px;
    margin-bottom: 10px;
}

#qtd-parcerias-ano-mes {
    min-height: 200px;
    height: 200px;
    margin-bottom: 20px;
}

/* ABA GESTÃO FINANCEIRA */

#tabela-resumo-gestao-financeira{
    min-height: 500px;
    margin-bottom: 20px;
}

/* Estilos específicos para o cards do GRÁFICO da aba Parceria */

#grafico-parcerias-mes-ano {
min-height: 500px;
margin-bottom: 20px;
}

.content-area {
    padding-right: 100px;
}

/* Estilo específico para o card do KPI */

.qlik-kpi-card {
    height: 150px;
    min-height: 150px;
    max-width: 510px; 
    padding: 20px;
    background-color: var(--white);
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
}

.col-md-6.d-flex {
    align-items: stretch !important;
}

.col-md-6.d-flex > div[id^="qtd-programas"] {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* --- ESTILOS PARA A ABA CONSULTA PERSONALIZADA --- */

#seletor-dimensoes,
#seletor-metricas {
    min-height: 500px;
    height: 100%;
}

#info-consulta-personalizada {
    width: 100%;
    max-width: none;
    min-height: 150px;
}

.qlik-chart-card-personalizada {
    min-height: 500px;
    width: 100%;
    height: 100%;
    padding: 20px;
    background-color: var(--white);
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    position: relative;
    margin-bottom: 40px;
}

#tabela-consulta-personalizada {
    height: 100% !important;
    width: 100% !important;
}

.col-12 {
    min-height: 10px;
}

/* --- ESTILO PARA O BOTÃO DE EXPORTAÇÃO PERSONALIZADO --- */

.export-button-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.export-btn {
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #555555;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
}

.export-btn:hover {
    background-color: #e0e0e0;
}

/* --- ESTILOS PARA AS ABAS DA TABELA DE GESTÃO (INÍCIO) --- */
.table-tabs {
    border-bottom: 1px solid #D9D9D9;
    padding-left: 5px;
    margin-bottom: 5px;
    display: flex;
}

.table-tab-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    margin-bottom: -1px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Rawline', sans-serif;
    color: var(--text-gray);
    border-bottom: 3px solid transparent;
    font-weight: 600;
}

.table-tab-btn:hover {
    color: #000;
}

.table-tab-btn.active {
    color: #1A8785;
    border-bottom-color: #1A8785;
}

.table-container-content.active {
    display: block;
}

.table-container-content {
    display: none;
}



/* --- Estilos para TABLETS e telas menores (<= 768px) --- */
@media (max-width: 768px) {

    .gov-header {
        position: relative;
    }

    .nav-header .right-content {
        position: absolute;
        top: 9px;
        right: 20px;
        z-index: 2;
        height: auto;
    }
    
    #header-kpi .qv-object * .right-content .nav-header {
        color: var(--white) !important;
        font-size: 11px !important;
        font-family: 'Rawline', sans-serif !important;
        background-color: #1A8785;
    }
    
    .sn-kpi .sn-kpi-data {
        display: flex;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .nav-header,
    .nav-container,
    .left-content {
        overflow: visible !important;
        flex: initial !important;
        min-width: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    .nav-buttons {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        min-width: 100vw;
        width: max-content;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }
    .nav-button {
        min-width: 90px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .main-container {
        margin-left: 20px;
        margin-right: 20px;
    }

    .logo-header {
        padding: 10px 20px;
    }

    .nav-header {
        padding: 0 20px;
        flex-wrap: nowrap;
    }

    .nav-container {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1;
        min-width: 0;
    }

    .home-icon {
        flex-shrink: 0;
    }

    .nav-buttons {
        display: flex;
        flex-direction: row;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        min-width: 100vw;
        width: auto;
        max-width: none;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 2px 0;
    }
    
    .nav-buttons::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .nav-button {
        flex-shrink: 0;
        white-space: nowrap;
        margin-right: 5px;
        min-width: 90px;
        font-size: 14px;
    }

    .logo-container {
        padding-left: 0;
        height: auto;
        gap: 15px;
        flex-wrap: wrap;
    }

    .logo {
        height: 50px;
    }
    
    .logo2 {
        height: 40px;
    }

    .col-sm-12.col-lg-2.pt-2.px-2 {
        margin-left: 15px;
        margin-right: 15px;
    }

    .content-area {
        padding-right: 15px;
    }

    .qvt-selections {
        padding-left: 0;
        padding-right: 0;
    }
    
    #consulta-content .col-sm-12.col-lg-3 {
        margin-bottom: 20px;
    }
}

/* --- Estilos para CELULARES (<= 576px) --- */
@media (max-width: 576px) {
    .nav-header,
    .nav-container,
    .left-content {
        overflow: visible !important;
        flex: initial !important;
        min-width: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    .nav-buttons {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        min-width: 100vw;
        width: max-content;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }
    .nav-button {
        min-width: 90px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .main-container {
        margin-left: 15px;
        margin-right: 15px;
    }

    /* --- Ajustes no Cabeçalho Gov.br --- */
    .logo-header, .nav-header {
        padding: 10px 15px;
    }

    .nav-header {
        display: flex;
        align-items: center;
        gap: 10px;
        height: auto;
    }

    .left-content {
        display: flex;
        align-items: center;
        flex-grow: 1;
    }
    
    .home-icon {
        flex-shrink: 0;
    }

    .nav-buttons {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        min-width: 100vw;
        width: auto;
        max-width: none;
        padding-right: 15px;
        scrollbar-width: none;
    }

    .nav-buttons::-webkit-scrollbar {
        display: none;
    }

    .nav-button {
        flex-shrink: 0;
        min-width: 90px;
    }
    
    /* --- Ajustes no Container dos Logos --- */
    .logo-container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding-left: 0;
        gap: 20px;
        margin-bottom: 20px;
    }

    .logo {
        height: 50px;
    }
    .logo2 {
        height: 40px;
    }

    /* --- Ajustes Gerais de Layout --- */
    .content-area {
        padding-right: 0;
    }

    .qvt-selections {
        padding-left: 0;
        padding-right: 0;
    }
    
    .px-2 {
        margin-bottom: 20px !important;
    }

    .qlik-chart-card,
    .qlik-chart-card-personalizada {
        min-height: 300px;
        overflow-x: auto; 
    }

    #tabela-programas,
    #tabela-parcerias,
    #tabela-resumo-gestao-financeira,
    #tabela-consulta-personalizada {
        min-height: 350px;
    }

    #info-consulta-personalizada {
        min-height: auto;
    }
    
    .export-button-container {
        top: 10px;
        right: 10px;
    }
    
    #lbl-descricao-programa,
    #lbl-descricao-parceria,
    #lbl-descricao-gestao {
        margin-left: -10px;
        margin-right: 0;
        min-height: 200px;
        width: 350px;
    }
    
    /* Centraliza o logo do rodapé */
    #footer-logo-obj {
        text-align: center;
        padding-left: 60px;
    }
}

/* --- Estilos para telas médias e menores (<= 992px) --- */
@media (max-width: 992px) {

    .nav-header {
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .nav-container {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .home-icon {
        flex-shrink: 0;
    }

    .nav-buttons {
        display: flex;
        flex-direction: row;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        min-width: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 2px 0;
    }
    
    .nav-buttons::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .nav-button {
        flex-shrink: 0;
        white-space: nowrap;
        margin-right: 5px;
    }

    .col-sm-12.col-lg-2.pt-2.px-2 {
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 30px;
    }

    .content-area {
        padding-left: 15px;
        padding-right: 15px;
    }

    .row .col-md-6.d-flex {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* --- Ajustes específicos para a aba de Consulta Personalizada --- */
    #consulta-content .col-sm-12.col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 30px;
    }
}

/* --- ESTILOS PARA O RODAPÉ --- */
.footer-row {
    height: 60px;
    background-color: #1A8785;
}

#footer-logo-obj {
    width: 100%;
    height: 40px; 
    margin-left: 50px;
    margin-top: 10px;
    background-color: #1A8785;
}