/*
*****************************************************
HEADER
*****************************************************
*/

:root {
    --primary: #006635;
    --text-primary-template: #006635;
    --primary-hover: #006635;
    --back-hover: #ffb014;
    --dark-text: #1e293b;
    --light-text: #64748b;
    --bg-body: #f1f5f9;
    --card-bg: #ffffff;
}

/* --- SCROLL SMOOTH (ROLAGEM SUAVE) --- */
html {
    scroll-behavior: smooth;
}

/* Acessibilidade: Respeita usuários que desativaram animações no sistema */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.text-primary-template {
    color: var(--text-primary-template) !important;
}

.btn-primary-template {
    background-color: var(--text-primary-template) !important;
    color: white;
    border-color: var(--text-primary-template) !important;
}

.btn-primary-template:hover {
    background-color: var(--back-hover) !important;
    color: black;
    border-color: var(--back-hover) !important;
}

.btn-outline-primary {
    background-color: transparent !important;
    color: var(--text-primary-template) !important;
    border-color: var(--text-primary-template) !important;
}


.btn-outline-primary-cidadao {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--text-primary-template) !important;
}

.bg-primary-template-admin {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--text-primary-template) !important;
}


.btn-outline-primary-cidadao:hover {
    background-color: var(--back-hover) !important;
    color: black !important;
    border-color: var(--back-hover) !important;
}

.btn-outline-primary:hover {
    background-color: var(--back-hover) !important;
    color: black !important;
    border-color: var(--back-hover) !important;
}

.btn-white-home {
    background-color: white;
}

.bg-primary-template {
    background-color: var(--text-primary-template) !important;
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', sans-serif;
    color: var(--dark-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body, html {
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Poppins', sans-serif;
}

.navbar-clean {
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.nav-link {
    color: var(--light-text) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.text-header {
    font-size: 1.3rem;
    letter-spacing: -0.5px
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background-color: #eff6ff;
}

.btn-admin-nav {
    background-color: #eff6ff;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    transition: all 0.3s;
}

.btn-admin-nav:hover {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

/* Ajustes de DataTables e Timeline mantidos */
.timeline-modern {
    border-left: 2px solid #e2e8f0;
    padding-left: 25px;
    margin-left: 10px;
    margin-top: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--primary);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.timeline-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

table.dataTable.no-footer {
    border-bottom: 1px solid #e2e8f0 !important;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 5px 10px;
}

main {
    flex: 1;
}

.icon-sic {
    width: 80px;
    height: 80px;
}

@media screen and (max-width: 768px) {
    .text-header {
        font-size: .9rem;
    }

}


/*
*****************************************************
FIM HEADER
*****************************************************
*/


/*
*****************************************************
PAINEL ADMIN
*****************************************************
*/

/* DASHBOARD */

/* --- ESTILOS EXCLUSIVOS DO DASHBOARD --- */

/* Cards com efeito Hover suave */
.card-hover {
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border-color: #e2e8f0;
}

/* Avatar com Iniciais */
.avatar-circle {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Coluna de Ações Fixa (Evita quebra de botões) */
.col-actions {
    width: 160px;
    text-align: right;
    white-space: nowrap;
}

/* Badges de Status Personalizadas (Visual mais limpo que o padrão) */
.status-badge {
    padding: 0.35em 0.8em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50rem;
}

.st-registrado {
    background-color: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.st-analise {
    background-color: #ede9fe;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.st-recurso {
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.st-respondido {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* DASHBOARD */

/* LOGIN */

/* FUNDO E ESTRUTURA */


.login-container {
    min-height: calc(100vh - 250px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* CARD DE LOGIN */
.card-login {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: none;
    border-radius: 20px;
    /* Bordas bem arredondadas */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    /* Sombra difusa e elegante */
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

/* BARRA DECORATIVA NO TOPO */
.card-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--back-hover) 100%);
}

/* CONTROLE DA LOGO (O Segredo para não ficar enorme) */
.brand-wrapper {
    height: 60px;
    /* Altura fixa para a área da logo */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.brand-img {
    max-height: 100%;
    /* Nunca passa de 60px */
    max-width: 100%;
    /* Nunca estoura a largura */
    object-fit: contain;
    /* Mantém a proporção perfeita */
}

.brand-icon-fallback {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* INPUTS MODERNOS */
.form-floating>.form-control {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding-left: 1rem;
}

.form-floating>.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-floating>label {
    padding-left: 1rem;
    color: #94a3b8;
}

/* BOTÃO */
.btn-login {
    height: 50px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 1rem;
    transition: transform 0.2s;
}

.btn-login:active {
    transform: scale(0.98);
}

/* TOGGLE SENHA */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    z-index: 5;
    padding: 5px;
}

.password-toggle:hover {
    color: var(--primary);
}

/* LOGIN */

/*
*****************************************************
FIM PAINEL ADMIN
*****************************************************
*/


/*
*****************************************************
HOME
*****************************************************
*/


/* COMPENSAÇÃO DO HEADER */
.home-offset-fix {
    /* O header tem um container com mt-5 (3rem). 
           Isso puxa a home para cima para anular esse espaço. */
    margin-top: -3rem !important;
    width: 100%;
    overflow-x: hidden;
}

/* HERO SECTION */
.hero-system {
    position: relative;
    background: linear-gradient(180deg, var(--primary) 0%, #0f172a 100%);
    color: white;
    padding-top: 6rem;
    padding-bottom: 12rem;
}

/* CARD FLUTUANTE */
.floating-container {
    position: relative;
    z-index: 10;
    margin-top: -4rem;
    margin-bottom: 4rem;
}

.status-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* DEADLINE CARDS */
.deadline-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease;
}

.deadline-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.deadline-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin: 1rem 0;
    color: #1e293b;
}

/* BOTÕES */
.btn-action-white {
    background: white;
    color: var(--primary);
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 50px;
    transition: 0.3s;
    border: 2px solid white;
}

.btn-action-white:hover {
    background: var(--back-hover);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-action-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-action-outline:hover {
    background: white;
    color: var(--primary);
}

/*
*****************************************************
FIM HOME
*****************************************************
*/


/*
*****************************************************
BOTAO VOLTAR AO TOPO
*****************************************************
*/
/* --- BOTÃO VOLTAR AO TOPO --- */
.btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    /* Fica na direita */
    z-index: 1040;
    /* Abaixo do menu mobile e topos */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary);
    /* Cor do tema */
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    /* Invisível por padrão */
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back-to-top:hover {
    background-color: #0f172a;
    /* Cor mais escura no hover */
    transform: translateY(-3px);
}

/* Classe para mostrar o botão (adicionada via JS) */
.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ajuste para Alto Contraste */
body.high-contrast .btn-back-to-top {
    background-color: #000 !important;
    border: 2px solid #ffff00 !important;
    color: #ffff00 !important;
}

/*
*****************************************************
FIM BOTAO VOLTAR AO TOPO
*****************************************************
*/


/*
*****************************************************
LOADING
*****************************************************
*/
/* Tela de Carregamento */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Fundo escuro */
    display: none;
    /* Escondido por padrão */
    z-index: 9999;
    /* Fica acima de tudo */
    justify-content: center;
    align-items: center;
    color: #fff;
    flex-direction: column;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 15px;
}

/*
*****************************************************
LOADING
*****************************************************
*/


/*
*****************************************************
DETALHES SOLICITAÇÃO (CIDADAO E ADMIN)
*****************************************************
*/

.bg-respondido {
    background-color: var(--primary) !important;
    color: white !important;
}


.bg-recurso {
    background-color: red !important;
    color: white !important;
}


.bg-analise {
    background-color: var(--back-hover) !important;
    color: black !important;
}


/*
*****************************************************
DETALHES SOLICITAÇÃO (CIDADAO E ADMIN)
*****************************************************
*/