:root {
    --cor-principal: #0b2f54;
    --cor-principal-escura: #061b31;
    --cor-secundaria: #0d6efd;
    --cor-secundaria-escura: #0759c7;
    --cor-secundaria-clara: #eaf3ff;
    --cor-fundo: #f4f7fb;
    --cor-card: #ffffff;
    --cor-texto: #17233c;
    --cor-texto-claro: #718096;
    --cor-borda: #e4eaf2;
    --sidebar-largura: 320px;
    --topbar-altura: 74px;
    --sombra-card: 0 8px 24px rgba(15, 42, 72, 0.07);
    --sombra-card-hover: 0 14px 35px rgba(15, 42, 72, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--cor-fundo);
    color: var(--cor-texto);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--cor-texto);
    font-weight: 700;
}

.text-muted {
    color: var(--cor-texto-claro) !important;
}

.app-layout {
    min-height: 100vh;
}

.app-conteudo {
    min-height: 100vh;
    margin-left: var(--sidebar-largura);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    width: var(--sidebar-largura);
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 14px 16px 18px;
    overflow: hidden;
    color: white;
    background: linear-gradient(180deg, var(--cor-principal) 0%, var(--cor-principal-escura) 100%);
    box-shadow: 8px 0 30px rgba(3, 19, 34, .14);
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    margin-bottom: 10px;
    padding: 0 8px 12px;
    color: white;
    text-align: center;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .11);
}

.sidebar-logo:hover {
    color: white;
}

.sidebar-logo-imagem {

    width: 320px;
    height: 240px;

    max-width: 100%;

    flex-shrink: 0;

    object-fit: contain;
    object-position: center;

    filter:
        drop-shadow(0 10px 18px rgba(0, 0, 0, .25));
}

.sidebar-logo-texto strong {
    display: block;
    color: white;
    font-size: 1.08rem;
    line-height: 1.2;
}

.sidebar-logo-texto small {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .63);
    font-size: .74rem;
}

.sidebar-menu {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 3px 5px 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .26) transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .22);
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .38);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 48px;
    padding: 11px 14px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, .79);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 11px;
}

.sidebar-link i {
    width: 22px;
    flex-shrink: 0;
    font-size: 1.08rem;
    text-align: center;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, .09);
    transform: translateX(3px);
}

.sidebar-link.active {
    color: white;
    background: linear-gradient(135deg, #0875d1 0%, #0961aa 100%);
    box-shadow: 0 8px 18px rgba(0, 89, 165, .35);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: var(--topbar-altura);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 30px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--cor-borda);
    box-shadow: 0 4px 18px rgba(15, 42, 72, .04);
    backdrop-filter: blur(10px);
}

.topbar-usuario {
    display: flex;
    align-items: center;
    gap: 11px;
}

.topbar-avatar {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--cor-secundaria);
    font-weight: 700;
    background: var(--cor-secundaria-clara);
    border: 1px solid rgba(13, 110, 253, .15);
    border-radius: 50%;
}

.topbar-dados {
    line-height: 1.25;
}

.topbar-dados strong,
.topbar-dados small {
    display: block;
}

.topbar-dados strong {
    color: var(--cor-texto);
    font-size: .88rem;
}

.topbar-dados small {
    margin-top: 3px;
    color: var(--cor-texto-claro);
    font-size: .72rem;
}

.btn-sair {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-left: 8px;
    padding: 9px 14px;
    color: #dc3545;
    background: white;
    border: 1px solid #f1bdc2;
    border-radius: 9px;
}

.btn-sair:hover {
    color: white;
    background: #dc3545;
    border-color: #dc3545;
}

.btn-menu-mobile {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cor-principal);
    background: #eef3f8;
    border: 1px solid var(--cor-borda);
    border-radius: 9px;
    font-size: 1.35rem;
}

.pagina-conteudo {
    min-height: calc(100vh - var(--topbar-altura));
    padding: 28px 30px 40px;
}

.pagina-conteudo>.container,
.pagina-conteudo>.container-fluid {
    max-width: 1500px;
}

.painel-admin {
    padding: 0;
}

.painel-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.painel-subtitulo {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--cor-secundaria);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.card-resumo {
    min-height: 148px;
    border: 1px solid var(--cor-borda) !important;
    box-shadow: 0 7px 24px rgba(15, 42, 72, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.card-resumo:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 42, 72, .11);
}

.resumo-conteudo {
    display: flex;
    align-items: center;
    gap: 18px;
}

.resumo-icone {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    font-size: 1.55rem;
}

.resumo-titulo {
    display: block;
    margin-bottom: 3px;
    color: var(--cor-texto-claro);
    font-size: .82rem;
    font-weight: 600;
}

.resumo-valor {
    margin: 0 0 2px;
    color: var(--cor-texto);
    font-size: 2rem;
    line-height: 1.1;
}

.resumo-azul {
    color: #0d6efd;
    background: #eaf3ff;
}

.resumo-verde {
    color: #198754;
    background: #e8f7ef;
}

.resumo-amarelo {
    color: #d88900;
    background: #fff5dc;
}

.resumo-roxo {
    color: #7651d6;
    background: #f1edff;
}

.resumo-vermelho {
    color: #dc3545;
    background: #fdecef;
}

.resumo-ciano {
    color: #078b9d;
    background: #e5f8fa;
}

.card {
    overflow: hidden;
    background: var(--cor-card);
    border-color: var(--cor-borda) !important;
    border-radius: 15px;
    box-shadow: var(--sombra-card);
}

.card-header {
    padding: 17px 20px;
    background: white;
    border-bottom: 1px solid var(--cor-borda);
}

.card-body {
    padding: 21px;
}

.btn {
    font-weight: 600;
    border-radius: 9px;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cor-secundaria), var(--cor-secundaria-escura));
    border-color: var(--cor-secundaria);
    box-shadow: 0 6px 14px rgba(13, 110, 253, .18);
}

.form-label {
    color: #334155;
    font-size: .88rem;
    font-weight: 600;
}

.form-control,
.form-select {
    min-height: 44px;
    color: var(--cor-texto);
    background-color: white;
    border-color: #dce4ee;
    border-radius: 9px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #7eb5f8;
    box-shadow: 0 0 0 .22rem rgba(13, 110, 253, .12);
}

.table-responsive {
    border-radius: 12px;
}

.table {
    --bs-table-bg: transparent;
    color: var(--cor-texto);
}

.table>thead>tr>th {
    padding: 13px 12px;
    color: #56657a;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .025em;
    background: #f7f9fc;
    border-bottom: 1px solid var(--cor-borda);
}

.table>tbody>tr>td {
    padding: 14px 12px;
    border-color: #edf1f6;
}

.table-hover>tbody>tr:hover>* {
    background: #f8fbff;
}

.badge {
    padding: 6px 9px;
    font-weight: 600;
    border-radius: 7px;
}

.alert {
    border-radius: 11px;
}

.mensagens-container {
    margin-bottom: 20px;
}

.layout-publico {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(13, 110, 253, .08), transparent 35%),
        var(--cor-fundo);
}

.topbar-publica {
    min-height: 118px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: white;
    border-bottom: 1px solid var(--cor-borda);
    box-shadow: 0 4px 18px rgba(15, 42, 72, .05);
}

.logo-publica {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--cor-texto);
    text-decoration: none;
}

.logo-publica img {
    width: 108px;
    height: 96px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(15, 42, 72, .12));
}

.logo-publica strong,
.logo-publica small {
    display: block;
}

.logo-publica strong {
    color: var(--cor-principal);
    font-size: 1.05rem;
}

.logo-publica small {
    margin-top: 3px;
    color: var(--cor-texto-claro);
    font-size: .75rem;
}

.conteudo-publico {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 50px;
}

.menu-mobile {
    color: white;
    background: linear-gradient(180deg, var(--cor-principal) 0%, var(--cor-principal-escura) 100%);
}

.menu-mobile .offcanvas-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .11);
}

.menu-mobile .offcanvas-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 14px 16px 18px;
}

.menu-mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-mobile-logo img {
    width: 92px;
    height: 78px;
    object-fit: contain;
}

.menu-mobile-logo strong,
.menu-mobile-logo small {
    display: block;
}

.menu-mobile-logo strong {
    color: white;
}

.menu-mobile-logo small {
    color: rgba(255, 255, 255, .62);
    font-size: .72rem;
}

@media (max-height: 860px) and (min-width: 992px) {
    .sidebar-logo-imagem {
        width: 205px;
        height: 135px;
    }

    .sidebar-link {
        min-height: 44px;
        padding-top: 9px;
        padding-bottom: 9px;
    }
}

@media (max-height: 720px) and (min-width: 992px) {
    .sidebar-logo-imagem {
        width: 180px;
        height: 105px;
    }

    .sidebar-logo-texto {
        display: none;
    }

    .sidebar-logo {
        margin-bottom: 7px;
        padding-bottom: 9px;
    }
}

@media (max-width: 991.98px) {
    .app-conteudo {
        margin-left: 0;
    }

    .topbar {
        justify-content: space-between;
        padding: 0 18px;
    }

    .pagina-conteudo {
        padding: 22px 18px 35px;
    }
}

@media (max-width: 575.98px) {
    .topbar {
        min-height: 66px;
    }

    .pagina-conteudo {
        padding: 18px 12px 30px;
    }

    .topbar-publica {
        min-height: 92px;
        padding: 8px 14px;
    }

    .logo-publica img {
        width: 68px;
        height: 68px;
    }

    .conteudo-publico {
        padding: 20px 12px 35px;
    }

    .card-body {
        padding: 17px;
    }

    .resumo-icone {
        width: 54px;
        height: 54px;
        border-radius: 13px;
        font-size: 1.3rem;
    }

    .resumo-valor {
        font-size: 1.7rem;
    }
}