/*Css para as listas */

.form-group ul {
    list-style: none;
    padding: 0;
}

/*Fim do css para as listas */

.gap-small {
    gap: 0.5rem;
}

.gap-medium {
    gap: 1rem;
}

.gap-large {
    gap: 2rem;
}

.flex-buttons-end {
    display: flex;
    flex-direction: row;
    justify-content: end;
}

.flex-buttons-start {
    display: flex;
    flex-direction: row;
    justify-content: start;
}

.flex-buttons-between {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.flex-buttons-center {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.flex-buttons-stretch {
    display: flex;
    flex-direction: row;
    justify-content: stretch;
}

@media (max-width: 991px) {

    .flex-buttons-end,
    .flex-buttons-start,
    .flex-buttons-between,
    .flex-buttons-center,
    .flex-buttons-stretch {
        flex-direction: column;
    }
}

.white {
    filter: brightness(0) invert(1);
}

.deleted {
    background-color: var(--red-vivid-10);
}

.payment-ok{
    background-color: #C5EE93FF !important;
}

.payment-delayed{
    background-color: #e0af78 !important;
}

.table-actions {
    width: 9rem;
    text-align: center !important;
}

.table-delete {
    width: 5rem;
    text-align: center !important;
}

.go-to-top {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 999;
}

/* Menu lateral persistente (evolução do menu overlay do GovBR-DS).
   Usa o modo nativo `.br-menu.push`: acima de 992px o menu vira uma
   coluna fixa que empurra o conteúdo; abaixo disso continua em overlay,
   igual ao comportamento original. */
:root {
    --admin-sidebar-width: 280px;
}

.admin-shell {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 100vh;
}

.admin-shell-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 0%;
    min-width: 0;
}

.admin-sidebar-width {
    width: var(--admin-sidebar-width);
    max-width: 85vw;
}

@media (min-width: 992px) {
    .admin-shell .br-menu.push.admin-sidebar-width {
        flex: 0 0 var(--admin-sidebar-width);
    }

    .admin-shell .br-menu.push .menu-container {
        height: 100%;
    }

    .admin-shell .br-menu.push .menu-panel {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }

    #menu-vertical.br-menu.active .menu-container {
        animation: menu-lateral-fade-in .15s ease;
    }
}

@media (max-width: 991.98px) {
    .admin-shell .br-menu.admin-sidebar-width {
        flex: 0 0 0;
        width: 0;
    }

    /* Abaixo de 992px o menu volta a ser um overlay (comportamento
       original), em vez de empurrar o conteúdo. */
    #menu-vertical.br-menu.active .menu-container {
        position: fixed !important;
    }
}

@keyframes menu-lateral-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.menu-search {
    border-bottom: 1px solid var(--border-color, #e6e6e6);
}

.menu-search .br-input button {
    pointer-events: none;
}

.menu-busca-vazio {
    padding: 1rem;
    text-align: center;
    font-size: .875rem;
    color: var(--color-fainted, #757575);
}

.menu-folder[data-menu-busca-oculto],
.menu-folder li[data-menu-busca-oculto] {
    display: none !important;
}

/* Cabeçalho fixo com compactação suave ao rolar a página. Reaproveita o
   modificador nativo `.br-header.small` (já usado pelo GovBR-DS para
   reduzir o padding vertical) apenas adicionando a transição e mantendo
   o cabeçalho visível no topo. */
.br-header {
    position: sticky;
    top: 0;
    z-index: 10;
    transition: padding .25s ease;
}

/* Painel de indicadores da home (cartões + gráfico). */
.dash-kpis {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .dash-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
    .dash-kpis { grid-template-columns: repeat(3, 1fr); }
}

.dash-kpi {
    --kpi-cor: #1351b4;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem 3rem;
    background: #fff;
    border: 1px solid var(--border-color, #e6e6e6);
    border-left: 4px solid var(--kpi-cor);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.dash-kpi:hover,
.dash-kpi:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    text-decoration: none;
    color: inherit;
}

.dash-kpi--primary { --kpi-cor: #1351b4; }
.dash-kpi--success { --kpi-cor: #168821; }
.dash-kpi--warning { --kpi-cor: #e0a800; }
.dash-kpi--danger { --kpi-cor: #e52207; }
.dash-kpi--info { --kpi-cor: #155bcb; }
.dash-kpi--secondary { --kpi-cor: #636363; }

.dash-kpi__icone {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--kpi-cor) 14%, #fff);
    color: var(--kpi-cor);
    font-size: 1.25rem;
}

.dash-kpi__corpo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-kpi__valor {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--kpi-cor);
}

.dash-kpi__titulo {
    font-weight: 600;
    color: #333;
}

.dash-kpi__rotulo {
    font-size: .8rem;
    color: #757575;
}

.dash-kpi__variacao {
    position: absolute;
    left: 1.25rem;
    bottom: .9rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .1rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}

.dash-kpi__variacao--up { color: #0f6b1c; background: #e3f4e6; }
.dash-kpi__variacao--down { color: #b51a04; background: #fde8e4; }
.dash-kpi__variacao--flat { color: #636363; background: #f0f0f0; }

.dash-kpi__periodo {
    margin-left: .25rem;
    font-weight: 400;
    color: #9a9a9a;
}

.dash-indicadores {
    margin: 2.5rem 0 3rem;
    padding: 1.5rem;
    background: #f8f9fb;
    border: 1px solid var(--border-color, #e6e6e6);
    border-radius: 12px;
}

.dash-indicadores__cabecalho {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, #e6e6e6);
}

.dash-indicadores__icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #1351b4;
    color: #fff;
    font-size: 1.15rem;
}

.dash-grafico {
    margin-top: 1.25rem;
    background: #fff;
    border: 1px solid var(--border-color, #e6e6e6);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    overflow: hidden;
}

.dash-grafico__resumo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.dash-grafico__resumo::-webkit-details-marker { display: none; }
.dash-grafico__resumo::marker { content: ""; }

.dash-grafico__resumo:hover { background: #f4f7fd; }

.dash-grafico__resumo:focus-visible {
    outline: 2px solid #1351b4;
    outline-offset: -2px;
}

.dash-grafico__titulo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    color: #1351b4;
}

.dash-grafico__dica {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .8rem;
    color: #757575;
}

.dash-grafico__seta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eaf0fb;
    color: #1351b4;
    transition: transform .25s ease;
}

.dash-grafico[open] .dash-grafico__seta { transform: rotate(180deg); }

.dash-grafico__corpo {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color, #e6e6e6);
    padding-top: 1rem;
}

.dash-grafico__canvas {
    position: relative;
    height: 280px;
}

/* Brasao do Municipio no topo da sidebar (substitui a logo completa, que
   fica so no header) - ver vertical_menu_panel.html. O botao de
   minimizar sai da linha do brasao (fica absoluto no canto) para que o
   brasao possa ocupar a largura toda e ficar realmente centralizado. */
.menu-header--brasao {
    position: relative;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.menu-header--brasao .menu-title {
    margin-left: 0;
    justify-content: center;
}

.menu-close--brasao {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.app-brand--brasao {
    width: 100%;
}

.app-brand--brasao .app-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Especificidade maior que ".br-menu .menu-header .menu-title img"
   (max-height: 40px), que do contrario limitaria o tamanho do brasao. */
.br-menu .menu-header .menu-title .sidebar-brasao {
    max-height: 60px;
    height: 60px;
    width: auto;
}

/* Dica dos botões dos módulos (página inicial e índice de cada app): o que a tela faz.
   Fica na caixa em volta do botão, porque o .br-button do gov.br corta o que sai dele
   (overflow: hidden). Texto em data-dica (DESCRICOES_MODELOS em core/views/constants.py);
   o leitor de tela lê a mesma frase num sr-only dentro do link. */
.botao-com-dica {
    position: relative;
}

.botao-com-dica::after {
    content: attr(data-dica);
    position: absolute;
    z-index: 1060;
    top: calc(100% + 0.25rem);
    left: 50%;
    width: max-content;
    max-width: min(18rem, 90vw);
    padding: 0.375rem 0.625rem;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    background: #333;
    border-radius: 0.25rem;
    opacity: 0;
    transform: translate(-50%, -0.25rem);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.botao-com-dica:hover::after,
.botao-com-dica:focus-within::after {
    opacity: 1;
    transform: translate(-50%, 0);
    transition-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
    .botao-com-dica::after {
        transition: none;
    }
}
