/*-----------------------------------------------------------------*/
/*---------------------------- ROOT ------------------------------*/
/*-----------------------------------------------------------------*/
:root {
    --color_BG_Body: #efefef;
    --color_BG_Header: #f8f9f4;
    --color_BG_H_Painel: #0B4675;
    --color_H_Painel: #F0F6FA;
    --color_BG_main: #F0F6FA;
    --color_Border: #efefef;

    --color_Card_coringa: #0f4c59;
    --color_Card_convenio: #8DE8DC;
    --color_Card_saldo: #E5CDD1;
    --color_Card_faf: #CEE5EF;
    --color_Card_covid: #FFE19B;
    --color_Card_instrumentos: #68ACE3;
    --color_Card_ted: #E5CC7B;
    --color_Card_emendas: #B87481;
    --color_Card_equipamentos: #DEF78D;
    --color_Card_obras: #A89A6A;
    --color_Card_gestao: #808080;

    --color_Card_Shadow: #d5d5d5;
    --color_Card_BG: #f8f9f4;
    --color_Card_BG_Button: #FDD303;
    --color_Card_Titulo: #fff;
    --color_Card_Text: #808080;

    --color_BG_Object: #fff;
    --color_BG_Filtro: #fff;
    --color_BG_KPI: #F8F9FA;

    --color_KPI_01: #0B4675;
    --color_KPI_02: #535353;

    --color_BG_KPI_Escuro: #0B4675;
    --color_KPI_Escuro01: #BFDDF3;
    --color_KPI_Escuro02: #fff;

    --color_BG_KPI_Claro: #e1eaf0;
    --color_KPI_Claro01: #0B4675;
    --color_KPI_Claro02: #353535;

    --color_BG_Export_Button: #0B4675;
    --color_Export_Button: #fff;
    --color_amarelo_fns: #FDD303;

    --fns-navy: #0d2144;
    --fns-blue-mid: #2456a4;
    --fns-blue-light: #e8f0fa;
    --fns-white: #ffffff;

    --fns-header-bg: #eef3fb;
    --fns-header-text: #1a3060;
    --fns-header-border: #b0c8e8;

    --fns-total-bg: #dde8f6;
    --fns-total-text: #0d2144;

    --fns-hover: #cfdff5;
    --fns-selected: #ffd966;
    --fns-selected-text: #0d2144;

    --fns-text: #1e2d3d;
    --fns-text-muted: #4a6080;
    --fns-border: #d0dff0;
    --fns-font: 'Segoe UI', 'Source Sans Pro', Calibri, sans-serif;
}

/*-----------------------------------------------------------------*/
/*---------------------------- GERAL -----------------------------*/
/*-----------------------------------------------------------------*/
html,
body {
    overflow: hidden !important;
}

#loading {
    z-index: 2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

body {
    background: var(--color_BG_Body);
    min-height: 100vh;
    width: 100%;
    position: static;
    background-image: url('background_body.png');
    background-repeat: no-repeat;
    background-size: cover;
    padding-bottom: 30px;
    margin: 0;
}

#div_section,
#div_section * {
    -webkit-user-select: text !important;
    user-select: text !important;
}

#page-frame {
    max-width: 1900px;
    width: 100%;
    margin: 0 auto;
}

/*-----------------------------------------------------------------*/
/*--------------------------- IMPRESSÃO --------------------------*/
/*-----------------------------------------------------------------*/
@media print {
    .conteudo {
        margin-top: 5px !important;
    }

    .topo-fixo,
    .main_header,
    #menu_abas,
    #div_footer,
    .scrollbar-track,
    button.export_data,
    .atualizado_em {
        display: none !important;
    }

    #div_main section.hide {
        display: none !important;
    }

    html,
    body,
    main,
    #div_section,
    #div_main,
    section,
    .conteudo {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        position: static !important;
    }

    @page {
        transform: scale(0.5);
        width: 100%;
    }
}

/*-----------------------------------------------------------------*/
/*----------------------- CABEÇALHO DO PAINEL --------------------*/
/*-----------------------------------------------------------------*/
div#div_header {
    margin: 15px 10px 0px 10px;
}

div#div_header div#logos {
    padding: 0 !important;
    min-height: 80px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

div#div_header div#logos #marca_painel {
    height: 60px;
}

div#div_header div#logos #marca_fns {
    height: 40px;
    margin-right: 10px;
}

div#div_header div.header_header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    width: fit-content;
    float: left;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

div#div_header div.header_header .titulo {
    color: #00315a;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.1;
    margin: 0;
    padding: 0;
}

div#div_header div.header_header .subtitulo {
    color: #555555;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: normal;
    margin-top: 6px;
    display: block;
    text-align: left;
    width: 100%;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/*-----------------------------------------------------------------*/
/*---------------------------- MODAIS ----------------------------*/
/*-----------------------------------------------------------------*/
.modal-header {
    background-color: #f5f5f5;
    border: none;
}

.modal-header img {
    height: 85px;
    margin: auto;
}

.modal-body {
    background-color: var(--color_BG_KPI_Claro);
    border: none;
}

.modal-content {
    position: fixed;
    width: 400px;
    top: 189px;
    left: 10px;
}

/*-----------------------------------------------------------------*/
/*---------------------- CONTEÚDO PRINCIPAL ----------------------*/
/*-----------------------------------------------------------------*/
div#div_main {
    margin: 0px 10px 10px 10px !important;
    height: calc(100vh - 130px);
    background-color: #ffff;
    border-radius: 0px 0px 25px 25px;
    box-shadow: 10px 10px 10px var(--color_Card_Shadow);
    padding-top: 0 !important;
    overflow: hidden !important;
}

div#div_section {
    height: 100%;
    padding: 15px 15px 80px 15px;
    overflow-y: auto;
}

div.main_header {
    margin: 0 10px -1px 10px !important;
    height: 10px;
    background-color: var(--color_BG_H_Painel);
    border-radius: 15px 15px 0 0;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

div#div_main div.main_header .titulo {
    color: var(--color_H_Painel);
    font-weight: bold;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    line-height: 1.1;
    margin-right: 50px;
    height: inherit;
}

div#div_main div.main_header .titulo i {
    margin-left: 70px;
    cursor: pointer;
    padding: 3px;
}

div#div_main div.main_header .titulo i:hover {
    border: 2px solid var(--color_H_Painel);
}

div#div_main div.main_header .titulo i.fa_hide {
    display: none;
}

div#div_main div.main_header .titulo img {
    margin: 0 20px;
    height: 75px;
}

/*-----------------------------------------------------------------*/
/*----------------------- ABAS / SEÇÕES --------------------------*/
/*-----------------------------------------------------------------*/
div#div_main section.hide {
    max-height: 0;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
}

div#div_main section {
    text-align: center;
    overflow: hidden;
    max-height: 999999;
    visibility: visible;
    opacity: 1;
}

#menu_abas {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 0 !important;
    margin: -30px 10px -1px 10px !important;
    position: relative;
    z-index: 10;
}

#menu_abas a {
    border-radius: 5px 5px 0 0;
    padding: 2px 10px;
    margin: 10px 1px 0px 1px;
    font-size: 12px;
    color: var(--color_BG_Export_Button);
    background-color: rgba(0, 0, 0, 0.08);
    height: 21px;
    font-weight: bold;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
}

#menu_abas a.AbaSelecionada {
    font-size: 12px;
    height: 30px;
    color: #ffff;
    background-color: #0B4675;
}

/*-----------------------------------------------------------------*/
/*--------------------------- SCROLLBAR --------------------------*/
/*-----------------------------------------------------------------*/
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px #4d4d4d;
    border-radius: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 10px;
    border: 3px solid #cccccc;
}

::-webkit-scrollbar-thumb:hover {
    background: #4d4d4d;
}

.scrollbar-track {
    opacity: 1 !important;
}

/*-----------------------------------------------------------------*/
/*----------------------- TABELAS (IDs) --------------------------*/
/*-----------------------------------------------------------------*/
#tabelaMunicipiosAba2 th:first-child,
#tabelaEstadosAba10 th:first-child,
#tabelaAcompanhamentoEnvioEntesAba1 th:first-child {
    border-top-left-radius: 5px;
}

#tabelaMunicipiosAba2 th:last-child,
#tabelaEstadosAba10 th:last-child,
#tabelaAcompanhamentoEnvioEntesAba1 th:last-child {
    border-top-right-radius: 5px;
}

#tabelaMunicipiosAba2,
#tabelaEstadosAba10,
#tabelaAcompanhamentoEnvioEntesAba1 {
    table-layout: fixed !important;
    padding-bottom: 2rem;
    height: 400px;
}

/*-----------------------------------------------------------------*/
/*------------------- CARDS E SELEÇÕES --------------------------*/
/*-----------------------------------------------------------------*/
.card-object {
    position: relative;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
}

.card-title h3 {
    font-size: 18px;
    color: #6d7883;
    margin-bottom: 12px;
}

.card-object .footer {
    border-top: none !important;
    padding: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

.topo-fixo {
    position: relative;
    top: 40px;
    align-items: center;
    justify-content: space-between;
    width: 98%;
    left: 10px;
    background-color: #fff;
    z-index: 100;
}

div.pos_main_header {
    padding: 0 15px;
    background-color: #fff;
}

/*-----------------------------------------------------------------*/
/*------------------- BARRA DE FILTROS ATIVOS -------------------*/
/*-----------------------------------------------------------------*/
#custom-selections {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 7px 14px;
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f0fa 100%);
    border: 1px solid #c8daf0;
    border-radius: 8px;
    margin: 4px 15px 0 15px;
    animation: fadeInDown 0.18s ease;
}

#custom-selections.has-selections {
    display: flex;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filtros-label {
    font-size: 10px;
    font-weight: 700;
    color: #6b8aad;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    margin-right: 4px;
    flex-shrink: 0;
}

.filtros-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    align-items: center;
}

.filtro-tag {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #b0c8e8;
    border-radius: 20px;
    padding: 3px 6px 3px 10px;
    font-size: 11px;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.filtro-tag:hover {
    border-color: #2456a4;
    box-shadow: 0 2px 6px rgba(36, 86, 164, 0.14);
}

.tag-field {
    color: #6b8aad;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.tag-sep {
    color: #b8d0e8;
    flex-shrink: 0;
}

.tag-value {
    color: #0d2144;
    font-weight: 500;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #a0bcd8;
    font-size: 15px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    margin-left: 2px;
}

.tag-remove:hover {
    background: #e8293a;
    color: #fff;
}

.btn-limpar-todos {
    background: none;
    border: 1px solid #c0d4e8;
    border-radius: 20px;
    color: #6b8aad;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    padding: 3px 12px;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-limpar-todos:hover {
    background: #e8293a;
    border-color: #e8293a;
    color: #fff;
}

/*-----------------------------------------------------------------*/
/*--------------------------- FILTROS ----------------------------*/
/*-----------------------------------------------------------------*/
div.LinhaFiltro {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 15px;
    margin-top: 15px;
    gap: 10px;
    flex-wrap: wrap;
}

.LinhaFiltro .qvobject {
    flex: 1 1 100px;
    height: 45px !important;
    background-color: var(--color_BG_Filtro);
    border-radius: 4px;
}

.LinhaFiltro .row .qvobject .qv-collapsed-listbox .title-wrapper .title {
    text-align: center !important;
}

/*-----------------------------------------------------------------*/
/*------------------------------ KPIs ---------------------------*/
/*-----------------------------------------------------------------*/
div.LinhaKPI * {
    font-weight: bold;
}

div.LinhaKPI {
    margin: 0 !important;
    margin-bottom: 10px !important;
    height: auto;
}

div.LinhaKPI .qvobject {
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    width: 100%;
    height: 110px;
    background-color: var(--color_BG_KPI);
}

div.LinhaKPI div.qvobject .sn-kpi-measure-title.sn-kpi-ellips-text span {
    color: var(--color_KPI_01);
    font-size: 16px !important;
    white-space: normal;
}

div.LinhaKPI div.qvobject .sn-kpi-value .sn-kpi-ellips-text {
    color: var(--color_KPI_02);
    font-size: 18px !important;
}

div.LinhaKPI div.kpi_escuro.qvobject {
    background-color: var(--color_BG_KPI_Escuro);
}

div.LinhaKPI div.kpi_escuro.qvobject .sn-kpi-measure-title.sn-kpi-ellips-text span {
    color: var(--color_KPI_Escuro01);
    font-size: 18px !important;
    white-space: normal;
}

div.LinhaKPI div.kpi_escuro.qvobject .sn-kpi-value .sn-kpi-ellips-text {
    color: var(--color_KPI_Escuro02);
    font-size: 20px !important;
}

div.LinhaKPI div.kpi_claro.qvobject {
    background-color: var(--color_BG_KPI_Claro);
}

div.LinhaKPI div.kpi_claro.qvobject .sn-kpi-measure-title.sn-kpi-ellips-text span {
    color: var(--color_KPI_Claro01);
    font-size: 18px !important;
    white-space: normal;
}

div.LinhaKPI div.kpi_claro.qvobject .sn-kpi-value .sn-kpi-ellips-text {
    color: var(--color_KPI_Claro02);
    font-size: 20px !important;
}

div.LinhaKPI .kpi_size_01 .qvobject {
    height: 80px;
}

div.LinhaKPI .kpi_size_02 .qvobject {
    height: 100px;
}

div.LinhaKPI .kpi_size_02 .sn-kpi-measure-wrapper.sn-kpi-center span {
    font-size: 22px;
}

div.LinhaKPI .kpi_size_02 .sn-kpi-value .sn-kpi-ellips-text span {
    font-size: 21px;
}

/*-----------------------------------------------------------------*/
/*----------------------- LINHA OBJETOS --------------------------*/
/*-----------------------------------------------------------------*/
div.Linha_Obj {
    padding: 15px 0;
    height: auto;
    min-height: 100px;
    margin: 30px 0;
}

.Linha_Obj .qvobject {
    background-color: var(--color_BG_Object);
    box-shadow: 2px 2px 2px 2px #cccccc;
    border-radius: 10px;
}

.Linha_Obj .qvobject .qv-object-wrapper.ng-scope.ng-isolate-scope {
    padding: 5px 10px 10px 10px;
}

.Linha_Obj .qv-object .qv-object-header .qv-object-title-text.ng-binding.ng-scope {
    color: #535353 !important;
    border-bottom: 1px solid #a8a7a7 !important;
    font-family: 'Open Sans', sans-serif !important;
    font-weight: bold !important;
    font-size: 120%;
}

.Obj_400px .qvobject {
    height: 400px;
}

.Obj_500px .qvobject {
    height: 500px;
}

.Obj_600px .qvobject {
    height: 600px;
}

/*-----------------------------------------------------------------*/
/*--------------------------- RODAPÉ ----------------------------*/
/*-----------------------------------------------------------------*/
div#div_footer {
    display: grid;
    justify-content: center;
}

div#div_footer div {
    height: 20px;
    background: var(--color_BG_H_Painel);
    border-radius: 25px 25px 0 0;
    width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    left: 50%;
    position: fixed;
    transform: translateX(-50%);
    bottom: 0;
}

img#footer_fns {
    height: 18px;
    margin: -5px;
}

div#div_footer p {
    color: var(--color_H_Painel);
    font-size: 10px;
    font-weight: bold;
    margin: 0;
}

/*-----------------------------------------------------------------*/
/*----------------------- ATUALIZADO EM --------------------------*/
/*-----------------------------------------------------------------*/
.atualizado_em {
    height: 40px;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40vw;
    margin-right: 15px;
    z-index: 10000;
    pointer-events: none;
}

.atualizado_em * {
    color: var(--color_BG_H_Painel) !important;
    text-align: right !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

/*-----------------------------------------------------------------*/
/*---------------------- BOTÃO EXPORTAR --------------------------*/
/*-----------------------------------------------------------------*/
.tabela-wrapper {
    position: relative;
    width: 100%;
    padding-top: 45px !important;
}

.tabela-wrapper .qvobject {
    height: 400px;
}

.btn_exportar_custom,
#btnExportarTabelaAba1,
#btnExportarTabelaAba2 {
    position: absolute !important;
    top: 5px !important;
    right: 15px !important;
    height: 32px !important;
    width: auto !important;
    min-width: 100px !important;
    padding: 0 15px !important;
    background-color: #0B4675 !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    border: none !important;
    z-index: 9999 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
}

.btn_exportar_custom:hover {
    background-color: #083558 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.btn_exportar_custom i {
    font-size: 14px !important;
}

/*-----------------------------------------------------------------*/
/*------------------- TABELAS QLIK (FNS) ------------------------*/
/*-----------------------------------------------------------------*/
.qlik-table-fns,
.qlik-pivot-fns {
    font-family: var(--fns-font);
    font-size: 13px;
    color: var(--fns-text);
}

/* Cabeçalho — Straight Table e Pivot Table */
.qlik-table-fns .qv-st-header-cell,
.qlik-table-fns .sn-table-head-cell,
.qlik-table-fns thead th,
.qlik-pivot-fns .qv-pt-dimension-cell.header,
.qlik-pivot-fns .qv-pt-measure-cell.header,
.qlik-pivot-fns .sn-pivot-table-head-cell,
.qlik-pivot-fns thead th {
    background-color: var(--fns-header-bg) !important;
    color: var(--fns-header-text) !important;
    font-weight: 600 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 2px solid var(--fns-header-border) !important;
    border-top: 1px solid var(--fns-header-border) !important;
    border-right: 1px solid var(--fns-header-border) !important;
    border-left: none !important;
    padding: 9px 12px !important;
    white-space: nowrap;
    text-align: center !important;
}

/* Centralização do conteúdo interno dos cabeçalhos */
.qlik-table-fns .qv-st-header-cell .qv-st-header-cell-content,
.qlik-table-fns .sn-table-head-cell-content,
.qlik-table-fns .sn-table-head-cell > *,
.qlik-table-fns .qv-st-header-cell > *,
.qlik-pivot-fns .sn-pivot-table-head-cell-content,
.qlik-pivot-fns .sn-pivot-table-head-cell > *,
.qlik-pivot-fns .qv-pt-dimension-cell.header > *,
.qlik-pivot-fns .qv-pt-measure-cell.header > * {
    text-align: center !important;
    justify-content: center !important;
}

/* Ícones de sort/expand */
.qlik-table-fns .qv-st-header-cell svg,
.qlik-table-fns .sn-table-head-cell svg,
.qlik-pivot-fns .sn-pivot-table-head-cell svg {
    fill: var(--fns-blue-mid) !important;
    opacity: 0.7;
}

/* Zebra — Straight Table */
.qlik-table-fns .qv-st-data-cell-wrapper:nth-child(odd),
.qlik-table-fns .sn-table-row:nth-child(odd) td,
.qlik-table-fns tbody tr:nth-child(odd) td {
    background-color: var(--fns-white) !important;
}

.qlik-table-fns .qv-st-data-cell-wrapper:nth-child(even),
.qlik-table-fns .sn-table-row:nth-child(even) td,
.qlik-table-fns tbody tr:nth-child(even) td {
    background-color: var(--fns-blue-light) !important;
}

/* Zebra — Pivot Table */
.qlik-pivot-fns .qv-pt-row:nth-child(odd) .qv-pt-data-cell,
.qlik-pivot-fns .qv-pt-row:nth-child(odd) .qv-pt-dimension-cell,
.qlik-pivot-fns .sn-pivot-table-row:nth-child(odd) td,
.qlik-pivot-fns tbody tr:nth-child(odd) td {
    background-color: var(--fns-white) !important;
}

.qlik-pivot-fns .qv-pt-row:nth-child(even) .qv-pt-data-cell,
.qlik-pivot-fns .qv-pt-row:nth-child(even) .qv-pt-dimension-cell,
.qlik-pivot-fns .sn-pivot-table-row:nth-child(even) td,
.qlik-pivot-fns tbody tr:nth-child(even) td {
    background-color: var(--fns-blue-light) !important;
}

/* Linha de totais / subtotais (pivot) */
.qlik-pivot-fns .qv-pt-row.total .qv-pt-data-cell,
.qlik-pivot-fns .qv-pt-row.total .qv-pt-dimension-cell,
.qlik-pivot-fns .sn-pivot-table-row.total td {
    background-color: var(--fns-total-bg) !important;
    color: var(--fns-total-text) !important;
    font-weight: 600 !important;
}

/* Células de dados */
.qlik-table-fns .qv-st-data-cell,
.qlik-table-fns .sn-table-cell,
.qlik-table-fns tbody td,
.qlik-pivot-fns .qv-pt-data-cell,
.qlik-pivot-fns .qv-pt-dimension-cell,
.qlik-pivot-fns .sn-pivot-table-cell,
.qlik-pivot-fns tbody td {
    color: var(--fns-text) !important;
    border-bottom: 1px solid var(--fns-border) !important;
    border-right: 1px solid var(--fns-border) !important;
    border-left: none !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
}

/* Sem borda na última coluna */
.qlik-table-fns .qv-st-data-cell:last-child,
.qlik-table-fns .sn-table-cell:last-child,
.qlik-table-fns tbody td:last-child,
.qlik-pivot-fns .qv-pt-data-cell:last-child,
.qlik-pivot-fns .sn-pivot-table-cell:last-child,
.qlik-pivot-fns tbody td:last-child {
    border-right: none !important;
}

/* Hover */
.qlik-table-fns .qv-st-data-cell-wrapper:hover,
.qlik-table-fns .sn-table-row:hover td,
.qlik-table-fns tbody tr:hover td,
.qlik-pivot-fns .qv-pt-row:hover .qv-pt-data-cell,
.qlik-pivot-fns .qv-pt-row:hover .qv-pt-dimension-cell,
.qlik-pivot-fns .sn-pivot-table-row:hover td,
.qlik-pivot-fns tbody tr:hover td {
    background-color: var(--fns-hover) !important;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

/* Estados Qlik — selecionado */
.qlik-table-fns .qv-st-data-cell.selected,
.qlik-table-fns .sn-table-cell.selected,
.qlik-pivot-fns .qv-pt-data-cell.selected,
.qlik-pivot-fns .sn-pivot-table-cell.selected {
    background-color: var(--fns-selected) !important;
    color: var(--fns-selected-text) !important;
    font-weight: 600 !important;
}

/* Estados Qlik — excluído */
.qlik-table-fns .qv-st-data-cell.excluded,
.qlik-table-fns .sn-table-cell.excluded,
.qlik-pivot-fns .qv-pt-data-cell.excluded,
.qlik-pivot-fns .sn-pivot-table-cell.excluded {
    opacity: 0.4 !important;
}

/* Scrollbar das tabelas */
.qlik-table-fns ::-webkit-scrollbar,
.qlik-pivot-fns ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.qlik-table-fns ::-webkit-scrollbar-track,
.qlik-pivot-fns ::-webkit-scrollbar-track {
    background: #eef3fb;
}

.qlik-table-fns ::-webkit-scrollbar-thumb,
.qlik-pivot-fns ::-webkit-scrollbar-thumb {
    background: var(--fns-header-border);
    border-radius: 3px;
}

.qlik-table-fns ::-webkit-scrollbar-thumb:hover,
.qlik-pivot-fns ::-webkit-scrollbar-thumb:hover {
    background: var(--fns-blue-mid);
}

/* Rodapé / paginação */
.qlik-table-fns .qv-st-page-footer,
.qlik-table-fns .sn-table-footer,
.qlik-pivot-fns .qv-pt-page-footer,
.qlik-pivot-fns .sn-pivot-table-footer {
    background-color: var(--fns-header-bg) !important;
    color: var(--fns-text-muted) !important;
    border-top: 1px solid var(--fns-header-border) !important;
    font-size: 11.5px !important;
    padding: 5px 12px !important;
}

.qlik-table-fns .qv-st-page-footer button,
.qlik-table-fns .sn-table-footer button,
.qlik-pivot-fns .qv-pt-page-footer button,
.qlik-pivot-fns .sn-pivot-table-footer button {
    color: var(--fns-blue-mid) !important;
    border: none !important;
}

/* Ícone de copiar valor — coluna Nº Instrumento */
.qlik-table-fns [role="gridcell"],
.qlik-table-fns .qv-st-data-cell,
.qlik-table-fns .sn-table-cell,
.qlik-table-fns tbody td {
    position: relative;
}

.qlik-table-fns .fns-copiar-valor {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10.5px;
    color: var(--fns-blue-mid);
    opacity: 0.28;
    cursor: pointer;
    transition: opacity 0.15s ease, color 0.15s ease;
    z-index: 2;
    line-height: 1;
}

.qlik-table-fns .fns-copiar-valor:hover {
    opacity: 1 !important;
    color: var(--fns-blue-mid);
}

/*-----------------------------------------------------------------*/
/*---------------------- SKELETON LOADING ------------------------*/
/*-----------------------------------------------------------------*/
@keyframes skeleton-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.skeleton {
    position: relative !important;
    background-color: #dce8f0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.62) 50%, transparent 100%);
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 9999;
}

.skeleton > * {
    opacity: 0 !important;
    pointer-events: none !important;
}

/*-----------------------------------------------------------------*/
/*------------------- NOTA METODOLÓGICA -------------------------*/
/*-----------------------------------------------------------------*/
details.nota-metodologica {
    margin: 20px 0 10px 0;
    border: 1px solid #C5D7E6;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fbfe;
    text-align: left;
}

details.nota-metodologica summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #C5D7E6;
    cursor: pointer;
    color: #0B4675;
    font-weight: bold;
    font-size: 13px;
    user-select: none;
}

details.nota-metodologica summary::-webkit-details-marker { display: none; }

details.nota-metodologica summary .nota-seta {
    margin-left: auto;
    transition: transform 0.3s ease;
}

details.nota-metodologica[open] summary .nota-seta {
    transform: rotate(180deg);
}

details.nota-metodologica summary:hover {
    background: #b5cfe3;
}

.nota-corpo {
    padding: 16px 20px;
}

.nota-corpo p {
    font-size: 12px;
    color: #444;
    line-height: 1.65;
    margin-bottom: 10px;
}

.nota-campos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 12px;
}

.nota-campos th {
    background: #0B4675;
    color: #fff;
    padding: 7px 12px;
    text-align: left;
    font-weight: bold;
}

.nota-campos th:first-child { border-radius: 4px 0 0 0; }
.nota-campos th:last-child  { border-radius: 0 4px 0 0; }

.nota-campos td {
    padding: 6px 12px;
    color: #333;
    border-bottom: 1px solid #e0ecf5;
    vertical-align: top;
}

.nota-campos td:first-child {
    font-family: monospace;
    font-size: 11px;
    color: #0B4675;
    font-weight: bold;
    white-space: nowrap;
    width: 30%;
}

.nota-campos tbody tr:nth-child(even) td { background: #eaf3fb; }
.nota-campos tbody tr:nth-child(odd)  td { background: #fff; }

/*-----------------------------------------------------------------*/
/*----------------------- PÁGINA INÍCIO --------------------------*/
/*-----------------------------------------------------------------*/
.pagina-inicio {
    padding: 16px 24px 24px;
    text-align: center;
}

.inicio-hero {
    margin-bottom: 28px;
}

.inicio-icone {
    height: 56px;
    margin-bottom: 10px;
}

.inicio-hero h2 {
    color: #0B4675;
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 4px;
}

.inicio-subtitulo {
    color: #1381B0;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.inicio-descricao {
    color: #555;
    font-size: 12px;
    line-height: 1.65;
    max-width: 680px;
    margin: 0 auto;
}

.inicio-cards {
    margin: 0 -6px 22px;
}

.inicio-card {
    background: #fff;
    border: 1px solid #C5D7E6;
    border-radius: 10px;
    padding: 22px 18px 14px;
    margin: 6px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: calc(100% - 12px);
}

.inicio-card:hover {
    box-shadow: 0 4px 14px rgba(11, 70, 117, 0.18);
    border-color: #1381B0;
    transform: translateY(-2px);
}

.inicio-card-icone {
    width: 48px;
    height: 48px;
    background: #0B4675;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

.inicio-card h4 {
    color: #0B4675;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
}

.inicio-card p {
    color: #666;
    font-size: 12px;
    line-height: 1.55;
    flex-grow: 1;
    margin-bottom: 14px;
}

.inicio-card-link {
    color: #1381B0;
    font-size: 12px;
    font-weight: bold;
}

.inicio-card:hover .inicio-card-link {
    color: #0B4675;
    text-decoration: underline;
}

.inicio-nota {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #eaf3fb;
    border: 1px solid #C5D7E6;
    border-left: 4px solid #0B4675;
    border-radius: 8px;
    padding: 14px 18px;
    text-align: left;
}

.inicio-nota-icone {
    font-size: 20px;
    color: #0B4675;
    flex-shrink: 0;
    padding-top: 2px;
}

.inicio-nota strong {
    display: block;
    color: #0B4675;
    font-size: 13px;
    margin-bottom: 5px;
}

.inicio-nota p {
    color: #444;
    font-size: 12px;
    line-height: 1.65;
    margin: 0;
}

.inicio-glossario {
    margin-top: 20px;
    text-align: left;
}

/*-----------------------------------------------------------------*/
/*------------------------- RESPONSIVO ---------------------------*/
/*-----------------------------------------------------------------*/
@media (max-width: 768px) {
    .inicio-card  { margin: 6px 0; }
    .inicio-cards { margin: 0 0 16px; }
    .inicio-hero h2 { font-size: 18px; }
    .inicio-nota { flex-direction: column; gap: 8px; }
}

/*-----------------------------------------------------------------*/
/*------------------ FAIXAS DE SALDO EM CONTA --------------------*/
/*-----------------------------------------------------------------*/
.faixas-saldo-container {
    margin: 10px 0 20px 0;
    border: 1px solid #C5D7E6;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fbfe;
}

.faixas-saldo-titulo {
    background: #0B4675;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faixas-saldo-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
}

.faixa-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 10px 12px;
    border-right: 1px solid #d0dff0;
    gap: 5px;
}

.faixa-item:last-child {
    border-right: none;
}

.faixa-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    color: #fff;
    white-space: nowrap;
}

.faixa-nome {
    font-size: 10.5px;
    font-weight: 600;
    color: #1e2d3d;
    line-height: 1.3;
}

.faixa-desc {
    font-size: 9.5px;
    color: #5a7080;
    line-height: 1.4;
}

/* Cores por faixa */
.faixa-quase-integral  .faixa-badge { background: #1a6b3c; }
.faixa-relevante       .faixa-badge { background: #2e8b4f; }
.faixa-residual        .faixa-badge { background: #e6820a; }
.faixa-baixo           .faixa-badge { background: #c0392b; }
.faixa-sem-saldo       .faixa-badge { background: #7f1d1d; }
.faixa-nao-localizado  .faixa-badge { background: #64748b; }

.faixa-quase-integral  { background: #f0faf4; }
.faixa-relevante       { background: #f4fbf6; }
.faixa-residual        { background: #fffbf0; }
.faixa-baixo           { background: #fff5f5; }
.faixa-sem-saldo       { background: #fef2f2; }
.faixa-nao-localizado  { background: #f8fafc; }

@media (max-width: 768px) {
    .faixas-saldo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .faixa-item {
        border-bottom: 1px solid #d0dff0;
    }
}
