/* =================================================================== */
/* === ARQUIVO DE ESTILO PRINCIPAL - PORTAL DA TRANSPARÊNCIA === */
/* =================================================================== */


/* --- 1. ESTILOS GERAIS E COMPONENTES --- */

/* Botão de Download Personalizado */
.btn-baixar {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    transition: background-color .15s ease-in-out;
}
.btn-baixar:hover {
    color: #fff;
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* --- 2. LAYOUT PRINCIPAL (CABEÇALHO E MENU) --- */

/* Cabeçalho Azul da Página */
.page-header {
    background-color: #2ca444; /* CABEÇALHO QUE ESTA COM A COR VERDE */
    color: #ffffff;
    padding: 1.5rem 0;
}
.page-header .breadcrumb {
    margin-bottom: 0.5rem;
}
.page-header .breadcrumb-item {
    font-size: 0.9rem;
}
.page-header .breadcrumb-item a {
    color: #ffffff; /* Caminho dos link da parte superior */
    text-decoration: none;
}
.page-header .breadcrumb-item a:hover {
    color: #ffffff;
}
.page-header .breadcrumb-item.active {
    color: #ffffff;
    font-weight: 500;
}
.page-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
}

/* Menu Lateral (Sidebar) */
.sidebar {
    background-color: #f8f9fa; /* Fundo cinza claro */
    border-radius: 0;
    overflow-y: auto;           /* MODIFICADO: Permite a rolagem vertical quando necessário */
    margin-top: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    padding-top: 1.5rem;
}

/* Caixa de Busca no Menu */
.search-box {
    background-color: #3a7d0b; /* Fundo do pesquisar */
    padding: 1rem;
    color: white;
}
.search-box h5 {
    margin-bottom: 0.75rem;
}
.search-box .form-control {
    border-radius: 0.25rem 0 0 0.25rem;
    border: none;
}
.search-box .btn {
    border-radius: 0 0.25rem 0.25rem 0;
    background-color: #f8f9fa;
    color: #28a745;
    border: none;
}

/* Títulos e Links dentro do Menu */
.sidebar-heading {
    font-weight: bold;
    font-size: 1.1rem;
    color: #343a40;
    padding: 1rem 1rem 0.5rem 1rem;
}
.sidebar-menu {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.sidebar-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #495057;
    text-decoration: none;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease-in-out;
}
.sidebar-menu li:last-child a {
    border-bottom: none;
}
.sidebar-menu a:hover {
    background-color: #e9ecef;
}
.sidebar-menu a.active {
    background-color: #e9f5ea;
    color: #155724;
    font-weight: bold;
    position: relative;
}
.sidebar-menu a.active::after {
    content: '→';
    position: absolute;
    right: 1rem;
    font-weight: bold;
}

/* --- 3. CONTEÚDO PRINCIPAL --- */

/* Títulos na Área de Conteúdo */
main h1, main .h2, main .display-5 {
    color: #003366;
}

/* Lista de Cards Informativos */
.info-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.info-card {
    display: flex;
    align-items: center;
    position: relative; /* Essencial para o link estendido */
    padding: 1.5rem;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.info-card .icon-container {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.info-card .icon-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.info-card .text-container {
    flex-grow: 1;
}
.info-card .card-titulo {
    font-size: 1.25rem;
    font-weight: bold;
    color: #212529;
    margin-bottom: 0;
}
.info-card .card-subtitulo {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}
.info-card .favorite-icon {
    margin-left: 1.5rem;
    font-size: 1.0rem;
    color: #143064;
    position: relative;
    z-index: 2;
}
.info-card:hover .favorite-icon {
    color: #ffc107;
}


/* --- 4. ÁREA ADMINISTRATIVA E LAYOUT GERAL --- */

/* Barra de Navegação do Admin */
.navbar-admin {
    background-color: #003366;
}
.navbar-admin .navbar-brand,
.navbar-admin .nav-link {
    color: #ffffff;
}
.navbar-admin .nav-link:hover {
    color: #dddddd;
}

/* Espaçamento Lateral Personalizado */
.container-custom-padding {
    padding-left: 8rem;
    padding-right: 8rem;
}

/* --- 5. ESTILOS DE TABELA PERSONALIZADA --- */

/* Estilo geral da tabela */
.table-custom {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9rem;
}

/* Estilo para o cabeçalho da tabela com degradê e cantos arredondados */
.table-custom thead tr th {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 2px solid #dee2e6;
    font-weight: bold;
    font-size: 0.95rem;
    color: #343a40;
    background-color: #f8f9fa;
    background-image: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border: none;
}

/* Arredonda o canto superior esquerdo do PRIMEIRO item do cabeçalho */
.table-custom thead tr th:first-child {
    border-top-left-radius: 8px;
}

/* Arredonda o canto superior direito do ÚLTIMO item do cabeçalho */
.table-custom thead tr th:last-child {
    border-top-right-radius: 8px;
}

/* Estilo para as células do corpo da tabela */
.table-custom tbody tr td {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef; /* Linha um pouco mais suave */
}

/* Remove a borda inferior da última linha da tabela */
.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* Cabeçalho de Tabela Antigo (mantido para compatibilidade) */
.thead-blue th {
    background-color: #f8f9fa;
    color: #212529;
    border-color: #dee2e6;
}


/* --- 8. Estilo do Rodapé --- */
footer {
    background-color: #2c5d0a; /* BARRA INFERIOR DO FOOTER */
    color: #F2F6FB;           /* Texto claro para contraste */
}

/* --- 9. Estilos de Acessibilidade --- */

.accessibility-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.accessibility-bar .btn {
    font-weight: bold;
    padding: .25rem .5rem;
    font-size: .875rem;
    line-height: 1.5;
}

.high-contrast {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.high-contrast a {
    color: #ffff00 !important; /* Amarelo para links */
}

/* Garante que elementos importantes também mudem */
.high-contrast .card,
.high-contrast .list-group-item,
.high-contrast .table,
.high-contrast .thead-blue th,
.high-contrast .sidebar,
.high-contrast .breadcrumb-item a,
.high-contrast .page-header,
.high-contrast footer,
.high-contrast .sidebar .search-box,
.high-contrast .table-dark th,
.high-contrast .table-custom thead tr th { /* ADICIONADO: Contraste para nova tabela */
    background-color: #111111 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    background-image: none !important; /* Remove o degradê no alto contraste */
}

.high-contrast .btn-outline-secondary,
.high-contrast .btn-outline-dark {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

.high-contrast .info-card {
    background-color: #222 !important;
}

.high-contrast .info-card:hover {
    background-color: #333 !important;
}

/* --- ESTILO PARA A BARRA DE TÍTULO DA PREFEITURA --- */
.prefeitura-title-bar {
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    text-align: center;
    font-weight: bold; /* ou 700 */
    color: #212529; /* CORRIGIDO: Cor escura para contrastar com o fundo claro */
    font-size: 0.9rem;
    border-bottom: 1px solid #dee2e6;
    font-family: 'Poppins', sans-serif; /* Adicionado para usar Poppins */
}