/* Sidebar: esconder texto e info quando minimizada, evitar overflow */
.sidebar-mini .main-sidebar .brand-link .sidebar-logo-text {
    display: none !important;
}
.sidebar-mini .main-sidebar .sidebar-logo-img {
    margin-right: 0 !important;
}
.sidebar-mini .main-sidebar .sidebar-avatar-img {
    width: 40px !important;
    height: 40px !important;
}
.sidebar-mini .main-sidebar .sidebar-user-info,
.sidebar-mini .main-sidebar .sidebar-user-name,
.sidebar-mini .main-sidebar .sidebar-user-register {
    display: none !important;
}
.sidebar-mini .main-sidebar .sidebar-avatar-responsive {
    margin-bottom: 0 !important;
}

/* Sidebar colapsada: ocultar texto SISPATRI, foto e info do usuário */
.sidebar-collapse .brand-text-premium {
    display: none !important;
}

.sidebar-collapse .user-panel {
    display: none !important;
}

.sidebar-collapse .brand-image {
    opacity: 0.8 !important;
}

/* Dashboard charts: 2 colunas em telas grandes */
.dashboard-charts-flex {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1480px) {
    .dashboard-charts-flex {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        justify-content: center;
        align-items: flex-start;
    }
    .dashboard-charts-flex > .card {
        max-width: 100%;
    }
}

/* DataTable: Busca e botões na mesma linha horizontalmente */
div.dataTables_wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    flex-direction: row;
}

div.dataTables_wrapper div.dt-buttons {
    float: none !important;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    order: 1;
}

div.dataTables_wrapper div.dataTables_filter {
    float: none !important;
    display: flex;
    align-items: center;
    order: 2;
    margin-bottom: 0 !important;
}

div.dataTables_wrapper div.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

div.dataTables_wrapper div.dataTables_filter input[type="search"] {
    margin: 0 !important;
    min-width: 200px;
}

div.dataTables_wrapper table {
    flex-basis: 100%;
    order: 3;
}

div.dataTables_wrapper div.dataTables_info {
    flex-basis: 100%;
    order: 4;
}

div.dataTables_wrapper div.dataTables_paginate {
    flex-basis: 100%;
    order: 5;
}

/* Hover vermelho para botão de logout */
.navbar-nav .nav-link[href$="logout"] {
    transition: color 0.2s, background 0.2s;
}
.navbar-nav .nav-link[href$="logout"]:hover {
    color: #e16773 !important;
}
/* Custom override: sidebar background color */
[class*="sidebar-dark-"] {
    background-color: #151515 !important;
}

/* DataTable header: fundo escuro e texto claro para contraste */
table.dataTable thead th {
    background: #23272b !important; /* tom escuro, quase preto */
    color: #f2f2f3 !important;      /* texto claro */
    border-bottom: 2.5px solid #444 !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.13);
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    background: #23272b !important;
    color: #f2f2f3 !important;
}

table.dataTable thead th:focus,
table.dataTable thead th:active {
    outline: 2px solid #d4af37 !important; /* destaque dourado no foco */
    outline-offset: -2px;
}
/* Card Gold - Versão Premium */

.card-gold:not(.card-outline)>.card-header {
    background: #23272B !important;
    color: #fff;
}

.card-gold:not(.card-outline)>.card-header,
.card-gold:not(.card-outline)>.card-header a {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.card-gold:not(.card-outline)>.card-header a.active {
    color: #5c430d;
    /* Tom café/ouro escuro para contraste */
}

/* Versão Outline (Borda Superior) */
.card-gold.card-outline {
    border-top: 3px solid #d4af37;
}

.card-gold.card-outline-tabs>.card-header a:hover {
    border-top: 3px solid #f1d56e;
}

.card-gold.card-outline-tabs>.card-header a.active,
.card-gold.card-outline-tabs>.card-header a.active:hover {
    border-top: 3px solid #d4af37;
}

/* Botões de Ferramentas (Minimize/Close) */
.bg-gold>.card-header .btn-tool,
.bg-gradient-gold>.card-header .btn-tool,
.card-gold:not(.card-outline)>.card-header .btn-tool {
    color: rgba(255, 255, 255, 0.8);
}

.bg-gold>.card-header .btn-tool:hover,
.bg-gradient-gold>.card-header .btn-tool:hover,
.card-gold:not(.card-outline)>.card-header .btn-tool:hover {
    color: #fff;
}

.content-header {
    margin-bottom: -25px;
    padding-top: 8px;
}

h5 .nav-link {
    padding-top: 0px;
}

.breadcrumb {
    position: relative;
    z-index: 10;
    padding: 8px 18px;
    margin-bottom: 1.5rem;
    display: inline-flex;
    list-style: none;
    font-size: 0.97rem;
    box-shadow: 0 2px 8px rgba(212,175,55,0.04);
    min-width: 0;
    max-width: 100%;
}

.content-header .breadcrumb {
}

/* Remove float e garante alinhamento à esquerda */
.breadcrumb.float-sm-right, .breadcrumb.float-right {
    float: none !important;
    justify-content: flex-start;
}

.content-header .container-fluid .row.mb-2 {
    margin-bottom: 0.25rem !important;
}
.content-header {
    margin-bottom: 0;
    padding-top: 8px;
    padding-bottom: 0px;
}

/* Garante que o conteúdo venha abaixo do breadcrumb */
.content {
    clear: both;
    margin-top: 0.5rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    display: inline-block;
    margin: 0 6px;
    color: #d4af37;
    opacity: 0.7;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: 0.2s;
}

.breadcrumb-item {
    padding: 0 2px;
}

.breadcrumb-item+.breadcrumb-item::before {
    display: inline-block;
    padding: 0 0px;
}

.breadcrumb-item+.breadcrumb-item {
    padding: 0 2px;
}

.breadcrumb-item a:hover {
    color: #d4af37;
}

.breadcrumb-item.active {
    color: #444;
    font-weight: 600;
}

.card-primary:not(.card-outline)>.card-header {
    background-color: #fff1cc;
    border-left: 5px solid #e0d1a9;
    border-bottom: none;
    color: rgb(58, 43, 0);
}

.card-header h4 {
    margin-bottom: 0px !important;
    font-weight: bold;
}



.btn-info {
    color: #382a00 !important;
    background-color: #fff2d8 !important;
    border-color: #b38b3b !important;
    box-shadow: none !important;
}

.btn-info:focus,
.btn-info:hover {
    color: #382a00 !important;
    background-color: #ffdb94 !important;
    border-color: #b38b3b !important;
    box-shadow: none !important;
}

/* Sobrescreve o clique (active) e mantém o dourado */
.btn-info:active,
.btn-info.active,
.show>.btn-info.dropdown-toggle {
    color: #382a00 !important;
    background-color: #e6c27a !important;
    /* Um dourado um pouco mais escuro para o clique */
    border-color: #b38b3b !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    /* Sombra interna sutil de clique */
}

/* Remove aquele contorno azul de foco que alguns navegadores colocam */
.btn-info:focus {
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
}

/* Estilo para botão desabilitado */
.btn-info:disabled,
.btn-info.disabled {
    background-color: #f8f9fa !important;
    border-color: #ddd !important;
    color: #aaa !important;
    cursor: not-allowed;
    opacity: 0.7;
}






/* Botão Warning - Amarelo Ouro Solar */
.btn-warning {
    color: #453500;
    background-color: #fff9c4;
    /* Amarelo bem clarinho e suave */
    border-color: #d4af37;
    /* Borda dourada clássica */
    box-shadow: none;
}

.btn-warning:focus,
.btn-warning:hover {
    color: #453500;
    background-color: #fff176;
    /* Amarelo mais vivo ao passar o mouse */
    border-color: #b38b3b;
    box-shadow: none;
}

/* Estado de Clique (Active) */
.btn-warning:active,
.btn-warning.active,
.show>.btn-warning.dropdown-toggle {
    color: #453500 !important;
    background-color: #fdd835 !important;
    /* Amarelo "gema" para o clique */
    border-color: #a6892a !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1) !important;
}

/* Foco amarelado sutil */
.btn-warning:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 241, 118, 0.5) !important;
}






/* Botão Danger - Rubi Premium */
.btn-danger {
    color: #310e0e;
    background-color: #f3dbdd;
    /* Fundo rosado suave */
    border-color: #dc3545;
    /* Borda vermelha viva */
    box-shadow: none;
}

.btn-danger:focus,
.btn-danger:hover {
    color: #782929;
    background-color: #efd0d3;
    /* Vermelho mais intenso no hover */
    border-color: #bd2130;
    box-shadow: none;
}

.btn-danger:active,
.btn-danger.active {
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #a52834 !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.2) !important;
}

.btn-danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}






/* Botão Search - Azul Metálico Suave */
.btn-search {
    color: #003366;
    /* Texto azul marinho profundo para contraste */
    background-color: #e3f2fd;
    /* Azul clarinho "gelo" */
    border-color: #64b5f6;
    /* Borda azul média */
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-search:focus,
.btn-search:hover {
    color: #002147;
    background-color: #bbdefb;
    /* Azul um pouco mais vivo no hover */
    border-color: #42a5f5;
    box-shadow: none;
}

.btn-search:active,
.btn-search.active {
    color: #ffffff !important;
    background-color: #1e88e5 !important;
    /* Azul forte no clique */
    border-color: #1565c0 !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15) !important;
}

.btn-search:focus {
    box-shadow: 0 0 0 0.2rem rgba(100, 181, 246, 0.3) !important;
}

/* Caso queira o tamanho fixo que usamos antes */
.btn-search {
    width: 38px;
    height: 38px;
    padding: 0;
}




/* Botão Success - Verde Menta / Esmeralda */
.btn-success {
    color: #064420;
    /* Verde floresta profundo para leitura */
    background-color: #e8f5e9;
    /* Verde menta bem clarinho */
    border-color: #81c784;
    /* Borda verde suave */
    box-shadow: none;
}

.btn-success:focus,
.btn-success:hover {
    color: #000000;
    background-color: #c8e6c9;
    /* Escurece levemente no hover */
    border-color: #66bb6a;
    box-shadow: none;
}

.btn-success:active,
.btn-success.active {
    color: #ffffff !important;
    background-color: #43a047 !important;
    /* Verde sólido no clique */
    border-color: #2e7d32 !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15) !important;
}

.btn-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(129, 199, 132, 0.3) !important;
}





/* Botão Secondary - Cinza Quente / Champagne */
.btn-secondary {
    color: #232323;
    background-color: #f2f2f2;
    /* Cinza bem claro e neutro */
    border-color: #868686;
    box-shadow: none;
}

.btn-secondary:focus,
.btn-secondary:hover {
    color: #000000;
    background-color: #adadad;
    border-color: #535353;
    box-shadow: none;
}

.btn-secondary:active,
.btn-secondary.active {
    color: #222 !important;
    background-color: #d4d4d4 !important;
    border-color: #acacac !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1) !important;
}

.btn-secondary:focus {
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.15) !important;
}







:root {
    /* Tons de Dourado Light - Ajustados para o padrão de contraste */
    --gold-bg-light: #fff2d8;
    /* Fundo suave (mesmo do seu btn-info) */
    --gold-primary: #e5c05b;
    /* Dourado base */
    --gold-hover: #d5b54e;
    /* Dourado metálico */
    --gold-active: #c5a02d;
    /* Ouro denso para clique */
    --gold-shadow: rgba(229, 192, 91, 0.4);
    --gold-text-dark: #382a00;
    /* Texto café para fundo claro */
    --gold-text-light: #ffffff;
    /* Texto branco para clique forte */
}

.btn-primary {
    color: var(--gold-text-dark);
    background-color: var(--gold-bg-light);
    /* Começa suave */
    border-color: var(--gold-primary);
    box-shadow: none;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    color: var(--gold-text-dark);
    background-color: var(--gold-primary);
    /* Ganha cor no hover */
    border-color: var(--gold-hover);
}

.btn-primary:focus,
.btn-primary.focus {
    color: var(--gold-text-dark);
    background-color: var(--gold-primary);
    border-color: var(--gold-hover);
    box-shadow: 0 0 0 0.2rem var(--gold-shadow);
}

.btn-primary.disabled,
.btn-primary:disabled {
    color: var(--gold-text-dark);
    background-color: var(--gold-bg-light);
    border-color: var(--gold-primary);
    opacity: 0.65;
}

/* Estado Ativo (Clique) - Aqui ele assume o dourado "Premium" */
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show>.btn-primary.dropdown-toggle {
    color: var(--gold-text-light) !important;
    /* Texto vira branco no clique forte */
    background-color: var(--gold-hover) !important;
    border-color: var(--gold-active) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}

.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.show>.btn-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem var(--gold-shadow);
}






/* Garante que o ícone dentro não herde larguras estranhas */
.btn-info span,
.btn-warning span,
.btn-danger span,
.btn-secondary span {
    width: 100%;
    text-align: center;
}

.nav-sidebar .nav-link .nav-icon.fa-chevron-right {
    color: #d4af37 !important;
    /* Dourado */
    font-size: 0.5rem !important;
    /* Bem pequeno */
    width: auto !important;
    /* Remove a largura fixa de ícone de menu */
    margin-right: 5px;
    /* Espaço para o texto não colar */
    transform: translateY(-2px);
    /* Ajuste vertical para centralizar melhor */
}

/* Ajuste caso ele precise ficar mais centralizado verticalmente */
.nav-sidebar .nav-link .nav-icon.fa-chevron-right::before {
    vertical-align: middle;
}

.navbar-white,
.main-footer {
    background-color: #151515;
    color: #f2f2f3 !important;
}

.nav-link {
    color: #f2f2f3 !important;
}

/* Container da Logo - Centralização Total */
.brand-link {
    border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
    padding: 15px 10px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    /* Centraliza Vertical (Y) */
    justify-content: center !important;
    /* Centraliza HORIZONTAL (X) */
    text-decoration: none !important;
    line-height: 1 !important;
    overflow: hidden;
    /* Garante que nada escape do container */
}

/* O Texto "Sispatri" */
.brand-text-premium {
    color: #d4af37 !important;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1.1rem !important;
    font-weight: 300 !important;
    margin-left: 10px !important;
    /* Espaço entre imagem e texto */
    margin-right: 10px !important;
    /* Margem direita para equilibrar o centro */
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    line-height: normal !important;
    font-family: 'Poppins', 'Source Sans Pro', sans-serif;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    /* Impede que o nome quebre linha */
}

/* Ajuste da Imagem (Brasão) */
.brand-link .brand-image {
    float: none !important;
    margin: 0 !important;
    /* Removemos a margem fixa da esquerda */
    max-height: 33px !important;
    width: auto !important;
    position: static !important;
    transition: transform 0.3s ease;
}

.brand-link:hover .brand-image {
    transform: scale(1.05);
}


h5 .nav-link {
    color: var(--gold-text-dark);
    background-color: var(--gold-bg-light);
    border: 1px solid var(--gold-primary);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1rem;
    color:rgb(58, 43, 0) !important;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    max-width: fit-content;
    text-align: center;
    text-decoration: none !important;
}

h5 .nav-link:hover {
    color: var(--gold-text-dark);
    background-color: #FFDB94;
    border-color: var(--gold-hover);
}

h5 .nav-link.active,
h5 .nav-link:active {
    color: var(--gold-text-light) !important;
    background-color: var(--gold-hover) !important;
    border-color: var(--gold-active) !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) !important;
}













/* Container da Paginação */
.pagination {
    margin: 10px 0;
}

/* Estilo geral dos links (Números inativos) */
.page-item .page-link {
    color: #382a00 !important;
    /* Texto café */
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* Efeito Hover nos números */
.page-item:not(.active) .page-link:hover {
    background-color: #fff2d8 !important;
    /* Fundo champagne */
    color: #d4af37 !important;
    /* Texto dourado */
    border-color: #d4af37 !important;
}

/* Item Ativo (Página atual) */
.page-item.active .page-link {
    z-index: 3;
    color: #ffffff !important;
    /* Texto branco */
    background-color: #d4af37 !important;
    /* Dourado metálico */
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
    border-color: #d4af37 !important;
}

/* Botões Anterior e Próximo */
.page-item.previous .page-link,
.page-item.next .page-link {
    font-weight: 500;
    padding-left: 15px;
    padding-right: 15px;
}

/* Itens Desativados (Ex: "Anterior" na primeira página) */
.page-item.disabled .page-link {
    color: #ccc !important;
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
    cursor: not-allowed;
}

/* Ajuste para o foco (remover o contorno azul) */
.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(229, 192, 91, 0.25) !important;
    outline: none;
}

/* Arredondamento das pontas */
.page-item:first-child .page-link {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.page-item:last-child .page-link {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}


@keyframes rise-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: rise-up 0.6s cubic-bezier(0.23, 1, 0.32, 1) !important;
}


footer.main-footer {
    margin-top: 0.5px;
    height: 2.4rem !important;
    padding: 0.5rem 1.2rem !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

footer.main-footer > p,
footer.main-footer > .float-right,
footer.main-footer > div {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.2;
}

footer.main-footer .float-right {
    margin-left: auto;
}

nav.main-header.navbar.navbar-expand.navbar-white.navbar-light {
    height: 2.4rem !important;
}

/* SweetAlert2 - Estilização Premium Dourada */
.swal2-popup {
    border-radius: 8px !important;
    background-color: #fff !important;
    border-top: 5px solid #d4af37 !important;
}

.swal2-title {
    color: #382a00 !important;
    font-size: 1.4rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.swal2-input {
    border: 1px solid #d4af37 !important;
    box-shadow: none !important;
    border-radius: 4px !important;
}

.swal2-input:focus {
    border-color: #b38b3b !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
}

/* Botão Confirmar (Dourado/Standard da aplicação) */
.swal2-confirm.swal2-styled {
    background-color: #fff2d8 !important;
    color: #382a00 !important;
    border: 1px solid #d4af37 !important;
    font-weight: 600 !important;
}

.swal2-confirm.swal2-styled:hover {
    background-color: #e5c05b !important;
    color: #fff !important;
}

/* Botão Cancelar (Cinza Quente/Secondary) */
.swal2-cancel.swal2-styled {
    background-color: #f2f2f3 !important;
    color: #232323 !important;
    border: 1px solid #868686 !important;
}

.swal2-cancel.swal2-styled:hover {
    background-color: #adadad !important;
}

.swal2-loader {
    border-color: #d4af37 transparent #d4af37 transparent !important;
}





.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    margin-bottom: .25rem;
}


.nav-sidebar .nav-link .nav-icon {
    color: #dec880 !important;
}