:root {
    --primary-blue: #3b82f6;
    --dark-blue: #1e3a8a;
    --bg-light: #f1f5f9;
    --text-color: #334155;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    /* Gradiente linear: Começa num azul bem clarinho e vai para o cinza gelo */
    background: linear-gradient(135deg, #bfc1c4 0%, #f1f5f9 50%, #ffffff 100%) !important;
    

    background-attachment: fixed; /* Mantém o fundo fixo ao rolar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Garantir que o container não esconda o fundo */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: transparent; /* Certifica que o fundo do container é invisível */
}

.header-text h1 {
    color: #1e3a8a;
    font-size: 1.5rem;
}

.header-text p {
    color: #64748b; /* Cinza para o subtexto */
}

/* Container focado em centralização vertical */
.header-container-central {
    display: flex;
    flex-direction: column; /* Coloca a logo em cima e o texto embaixo */
    align-items: center;    /* Centraliza horizontalmente */
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.header-logo-central img {
    height: 150px; /* Tamanho levemente maior já que está sozinha */
    width: auto;
    margin-bottom: 15px; /* Espaço entre a logo e o título */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); /* Sombra para dar profundidade */
}

.main-header {
    background-color: #F0F8FF;
    color: var(--dark-blue);
    padding: 25px 0;
    border-radius: 0 0 25px 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.header-content-row {
    position: relative;
    display: flex;
    flex-direction: row; /* Coloca lado a lado */
    align-items: center;    /* Centraliza verticalmente a logo com o texto */
    justify-content: center; /* Centraliza o conjunto todo no meio da tela */
    gap: 20px;              /* Espaço entre a logo e o texto */
    padding: 0 20px;
}

.btn-logout-sigcreas {
    position: absolute;
    right: 20px;
    top: 20px;
    padding: 10px 18px;
    border: 1px solid #d63031;
    background: #fff5f5;
    color: #d63031;
    cursor: pointer;
    font-weight: 700;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.btn-logout-sigcreas:hover,
.btn-logout-sigcreas:focus-visible {
    background: #d63031;
    color: white;
    transform: translateY(-1px);
}

.btn-logout-sigcreas:focus-visible {
    outline: 3px solid rgba(214, 48, 49, .25);
    outline-offset: 2px;
}

.header-logo-side img {
    height: 150px; /* Tamanho da logo */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.header-text-side {
    text-align: center; /* Alinha o texto à esquerda para combinar com a logo ao lado */
}

.header-text-side h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.header-text-side p {
    margin: 2px 0 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Ajuste para celulares (coloca um em cima do outro se a tela for pequena) */
@media (max-width: 600px) {
    .header-content-row {
        flex-direction: column;
        text-align: center;
        padding-top: 58px;
    }
    .header-text-side {
        text-align: center;
    }
    .btn-logout-sigcreas {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        top: 0;
        white-space: nowrap;
    }

    .btn-logout-sigcreas:hover,
    .btn-logout-sigcreas:focus-visible {
        transform: translateX(-50%) translateY(-1px);
    }
}

/* Área de Busca - Ajustada para descer */
.search-area {
    max-width: 500px;
    margin: 50px auto 30px; /* 50px de espaço superior em relação ao header */
    padding: 0 15px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    color: #94a3b8;
}

.search-area input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-area input:focus {
    border-color: #3b82f6;
}

.header-logo img {
    height: 65px; /* Altura ideal para não quebrar o cabeçalho */
    width: auto;
    display: block;
    filter: drop-shadow(0px 2px 2px rgba(0,0,0,0.3)); /* Dá destaque às logos */
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px; /* Espaço nas laterais das logos */
}

.header-text {
    text-align: center;
    flex-grow: 1;
}

.header-text h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.header-text p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Ajuste para telas de celular */
@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    .header-logo img {
        height: 50px;
    }
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.service-card {
    background: white;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    background-color: var(--primary-blue);
    transform: translateY(-5px);
}

.icon-box { font-size: 40px; color: var(--primary-blue); margin-bottom: 15px; }
.service-card span {
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;       /* Diminuímos de 14px para 12px */
    text-align: center;
    line-height: 1.3;      /* Melhora o espaçamento entre as linhas da quebra */
    padding: 01 10px;       /* Evita que o texto encoste nas bordas do card */
    display: block;        /* Garante que o span se comporte como bloco para quebrar */
    word-wrap: break-word; /* Força a quebra de palavras muito longas se necessário */
}

/* Ajuste opcional no card para dar mais espaço ao texto */
.service-card {
    padding: 15px 10px;    /* Aumenta um pouco o respiro interno */
    justify-content: center;
}
.service-card:hover .icon-box, .service-card:hover span { color: white; }

/* MODAL */
.modal {
    display: none;
    position: fixed; z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white; padding: 30px; border-radius: 15px;
    width: 90%; max-width: 450px; position: relative;
    animation: slideUp 0.3s ease;
    
}
.modal-content {
    max-height: 85vh; /* Limita a altura a 85% da tela */
    overflow-y: auto; /* Adiciona scroll se as opções passarem da altura */
    /* ... mantenha o restante das suas regras ... */
}

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.close-btn { position: absolute; right: 20px; top: 15px; font-size: 24px; cursor: pointer; color: #94a3b8; }

.modal-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.modal-option {
    display: flex; align-items: center; padding: 15px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; text-decoration: none;
    color: var(--text-color); font-weight: 600;
}

.modal-option i { margin-right: 15px; color: var(--primary-blue); width: 25px; text-align: center; }
.modal-option:hover { background: var(--primary-blue); color: white; }
.modal-option:hover i { color: white; }

/* --- ESTILO PARA O CARD RMA PULSAR --- */

/* Esta é a classe que o seu JS adiciona quando rmaPendente = true */
.alerta-vencido {
    position: relative;
    border: 2px solid #ef4444 !important; /* Borda vermelha forte */
    animation: pulso-rma 2s infinite;      /* Chama a animação abaixo */
    background-color: #fff1f2 !important; /* Fundo levemente avermelhado */
}

/* Criando a animação do pulso */
@keyframes pulso-rma {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
        transform: scale(1.02); /* Aumenta levemente o tamanho */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

/* Opcional: Estilo para a Badge (etiqueta) dentro do modal */
.badge-pendente {
    background-color: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    text-transform: uppercase;
    font-weight: bold;
}
.btn-atualizar {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-atualizar:hover {
    background-color: var(--dark-blue);
    transform: scale(1.05);
}

/* Efeito de girar o ícone ao clicar */
.btn-atualizar:active i {
    transform: rotate(180deg);
    transition: 0.2s;
}
/* Adicione isso ao seu style.css da Gestão Integrada */
.card-almox {
    background-color: #f0f7ff; /* Um azul bem clarinho */
    border: 1px solid #cce3ff;
}

.card-almox i {
    color: #2563eb; /* Ícone azul destacado */
}

/* Novo design para o modal de Judicial */

.judicial-controls { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
#inputBuscaJudicial { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid #ddd; }

.btn-filtro { background: none; border: none; padding: 10px; cursor: pointer; font-weight: 600; opacity: 0.6; }
.btn-filtro.active { opacity: 1; transform: scale(1.05); }

.tabela-judicial-wrapper { max-height: 90vh; overflow-y: auto; border: 1px solid #eee; border-radius: 8px; }
#tabelaJudicialReal { width: 100%; border-collapse: collapse; background: white; }
#tabelaJudicialReal th { position: sticky; top: 0; background: #f8f9fa; padding: 15px; text-align: left; z-index: 10; }
#tabelaJudicialReal td { padding: 12px 15px; border-bottom: 1px solid #eee; font-size: 14px; }

/* As Cores da sua Planilha */
.linha-respondido { background-color: #d4edda !important; } /* Verde */
.linha-periodico { background-color: #fff3cd !important; }  /* Amarelo */
.linha-protetiva { background-color: #e2d9f3 !important; }  /* Roxo */
.linha-prazo { background-color: #f8d7da !important; }      /* Laranja/Vermelho */

.btn-pasta-judicial { 
    background: #4285f4; color: white; padding: 5px 10px; border-radius: 4px; 
    text-decoration: none; font-size: 12px; display: inline-flex; align-items: center; gap: 5px;
}

/* CSS para permitir que o modal cresça na horizontal */
/* Força a largura total na tela judicial */
.modal-content.extra-largo {
    width: 98vw !important;
    max-width: 1600px !important;
    margin: 1% auto !important;
    padding: 20px !important;
}

.tabela-judicial-wrapper {
    overflow-x: auto;
    width: 100%;
}

#tabelaJudicialReal {
    width: 100%;
    min-width: 1100px; /* Isso impede que as colunas fiquem espremidas */
    border-collapse: collapse;
}

.badge-status-respondido { background: #d4edda; color: #155724; padding: 2px 5px; border-radius: 4px; border: 1px solid #c3e6cb; }
.badge-status-periodico { background: #fff3cd; color: #856404; padding: 2px 5px; border-radius: 4px; border: 1px solid #ffeeba; }
.badge-status-protetiva { background: #e2d9f3; color: #512da8; padding: 2px 5px; border-radius: 4px; border: 1px solid #d1c4e9; }
.badge-status-normal { background: #f8f9fa; color: #333; padding: 2px 5px; border-radius: 4px; border: 1px solid #ddd; }


/* Multi-CREAS */
#modal-seletor-creas select:focus { outline: 2px solid #93c5fd; }

/* ================================
   DASHBOARD INICIAL POR CREAS
================================ */
.home-dashboard {
    background: rgba(255,255,255,0.92);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px;
    margin: 22px 0 28px;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
}
.home-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.home-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #3b82f6;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.home-dashboard h2 {
    margin: 0;
    color: #1e3a8a;
    font-size: 1.35rem;
    font-weight: 800;
}
.home-dashboard p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}
.home-refresh {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    padding: 9px 13px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.home-refresh:hover { background:#eaf2ff; color:#1e3a8a; }
.home-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}
.home-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 120px;
}
.home-card i { color:#3b82f6; font-size: 24px; }
.home-card span { color:#64748b; font-size: 13px; font-weight: 700; }
.home-card strong { color:#0f172a; font-size: 26px; font-weight: 900; }
.home-card .dash-rma-municipios {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}
.home-card.rma-dashboard-pendente .dash-rma-municipios {
    color: #991b1b !important;
}

.home-card.destaque { background: linear-gradient(135deg, #eff6ff, #ffffff); border-color:#bfdbfe; }
/* Destaque exclusivo do card "RMA do mês" no painel inicial */
.home-card.rma-dashboard-pendente {
    position: relative;
    border: 2px solid #ef4444 !important;
    background: #fff1f2 !important;
    animation: pulso-rma-dashboard 2s infinite;
}
.home-card.rma-dashboard-pendente::after {
    content: "!";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}
.home-card.rma-dashboard-pendente strong,
.home-card.rma-dashboard-pendente span { color: #7f1d1d !important; }
@keyframes pulso-rma-dashboard {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); transform: scale(1); }
    70% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); transform: scale(1.01); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); transform: scale(1); }
}

.home-dashboard-bottom {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
    margin-top: 14px;
}
.home-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
}
.home-panel h3 {
    margin: 0 0 12px;
    color: #1e293b;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-alertas {
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}
.dash-alertas .alerta-item {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 10px;
    padding: 9px 10px;
    margin-bottom: 8px;
    font-weight: 700;
}
.dash-alertas .ok-item {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 10px;
    padding: 9px 10px;
    font-weight: 700;
}
.dash-acessos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dash-acesso-btn {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 9px 11px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    font-size: 13px;
}
.dash-acesso-btn:hover { background:#dbeafe; }
@media (max-width: 900px) {
    .home-dashboard-header { flex-direction: column; }
    .home-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-dashboard-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .home-dashboard-grid { grid-template-columns: 1fr; }
}


/* v2.9.3 - Ajustes de cards do Dashboard */
#dash-ultima-card small { font-size: 12px; color: #64748b; font-weight: 700; }
@media (max-width: 1100px) { .home-dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }


/* v2.9.4 - Card Municípios Vinculados com lista nominal */
.home-card.municipios-card {
    gap: 8px;
}
.home-card.municipios-card strong {
    font-size: 20px;
    line-height: 1.15;
}
.dash-municipios-lista {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 4px;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 4px;
}
.municipio-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 800;
    color: #1e3a8a;
    background: rgba(59,130,246,.08);
    border: 1px solid rgba(59,130,246,.18);
    border-radius: 999px;
    padding: 5px 8px;
    width: fit-content;
    max-width: 100%;
}
.municipio-chip i {
    font-size: 10px !important;
    color: #16a34a !important;
}
.municipio-chip.vazio {
    color: #64748b;
    background: #f8fafc;
    border-color: #e2e8f0;
}
@media (max-width: 900px) {
    .dash-municipios-lista { max-height: none; }
}


/* SIGCREAS v3.0 - Identidade visual oficial CREAS Regional */
.header-logo-side img.js-creas-logo,
.header-logo-side img.js-logo-padrao-creas {
    max-height: 120px;
    max-width: 360px;
    object-fit: contain;
    background: #fff;
    border-radius: 18px;
    padding: 8px 12px;
}
.card-login-creas .header-logo-side {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.card-login-creas .header-logo-side img.js-logo-padrao-creas {
    max-height: 96px;
    max-width: 280px;
    padding: 0;
    border-radius: 0;
    filter: none;
}
@media (max-width: 700px) {
    .header-logo-side img.js-creas-logo,
    .header-logo-side img.js-logo-padrao-creas {
        max-width: 280px;
        max-height: 96px;
    }
}

/* SIGCREAS v3.0.1 - Correções de alinhamento visual das logos oficiais */
body {
    background: #f1f5f9 !important;
}
.main-header {
    background: #ffffff !important;
    border-radius: 0 0 24px 24px;
}
.header-content-row {
    min-height: 120px;
}
.header-logo-side img.js-creas-logo,
.header-logo-side img.js-logo-padrao-creas {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    filter: none !important;
    object-fit: contain;
}
.header-logo-side img.js-creas-logo {
    max-height: 110px !important;
    max-width: 340px !important;
}
.card-login-creas {
    background: #ffffff !important;
}
.card-login-creas .header-logo-side img.js-logo-padrao-creas {
    max-height: 78px !important;
    max-width: 250px !important;
    width: auto !important;
}
@media (max-width: 700px) {
    .header-logo-side img.js-creas-logo {
        max-width: 280px !important;
        max-height: 88px !important;
    }
    .card-login-creas .header-logo-side img.js-logo-padrao-creas {
        max-width: 220px !important;
        max-height: 70px !important;
    }
}


/* =========================================================
   SIGCREAS v3.0.2 - Polimento visual institucional
   Objetivo: reduzir altura do cabeçalho, equilibrar brasão/logo,
   compactar área de busca, padronizar hover dos cards e institucionalizar rodapé.
========================================================= */
:root {
    --sigcreas-blue: #0b3b8c;
    --sigcreas-blue-dark: #062b6f;
    --sigcreas-green: #2f5f2f;
    --sigcreas-orange: #d97922;
    --sigcreas-white: #ffffff;
}
body {
    background: #eef3f8 !important;
}
.container {
    max-width: 1500px;
    margin: 0 auto;
}
.main-header {
    background: var(--sigcreas-white) !important;
    border-radius: 0 0 18px 18px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10) !important;
    margin-bottom: 18px !important;
    border-bottom: 4px solid var(--sigcreas-blue) !important;
}
.header-content-row {
    min-height: 96px !important;
    padding: 14px 28px !important;
    gap: 20px !important;
}
.header-logo-side {
    flex: 0 0 auto;
}
.header-logo-side img.js-creas-logo {
    max-height: 92px !important;
    max-width: 305px !important;
    width: auto !important;
}
.header-logo-side img.js-logo-padrao-creas {
    max-height: 86px !important;
    max-width: 285px !important;
    width: auto !important;
}
.header-text-side h1 {
    font-size: 2.1rem !important;
    line-height: 1.05 !important;
    letter-spacing: .2px;
}
.header-text-side p {
    margin: 2px 0 !important;
    line-height: 1.2 !important;
}
.card-login-creas .header-logo-side img.js-logo-padrao-creas {
    max-height: 66px !important;
    max-width: 220px !important;
}
.card-login-creas {
    border-radius: 16px !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.20) !important;
}
.search-area {
    margin: 18px auto 18px !important;
}
.search-wrapper {
    max-width: 520px !important;
}
.search-area input {
    height: 42px !important;
    padding: 10px 14px 10px 42px !important;
}
.home-dashboard {
    margin-top: 18px !important;
    padding: 20px !important;
}
.home-card,
.service-card,
.home-panel {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.home-card:hover,
.service-card:hover,
.home-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.13) !important;
    border-color: rgba(59, 130, 246, .35) !important;
}
.home-card.municipios-card .dash-municipios-lista {
    max-height: 112px;
}
.sigcreas-footer {
    margin: 26px auto 0;
    background: linear-gradient(135deg, #342e81 0%, #0a07e7 100%);
    color: #ffffff;
    border-radius: 16px 16px 0 0;
    border-top: 3px solid #f4f5f7;
    padding: 14px 22px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
    gap: 14px;
    align-items: center;
    font-size: 13px;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
}
.sigcreas-footer strong {
    display:block;
    font-size: 14px;
    margin-bottom: 2px;
}
.sigcreas-footer span { opacity: .92; }
@media (max-width: 900px) {
    .header-content-row {
        min-height: auto !important;
        padding: 14px 18px !important;
    }
    .header-logo-side img.js-creas-logo { max-width: 240px !important; max-height: 78px !important; }
    .header-text-side h1 { font-size: 1.75rem !important; }
    .sigcreas-footer { grid-template-columns: 1fr; text-align: center; }
}

/* SIGCREAS v3.1.1 - Dashboard Executivo e card Municípios Vinculados */
:root {
    --sigcreas-accent-green: #16a34a;
    --sigcreas-muted-card: #f8fafc;
}
.search-area-v311 {
    max-width: 760px !important;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 16px auto 16px !important;
}
.search-wrapper-v311 {
    width: 100%;
}
.search-actions-v311 {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn-search-v311,
.btn-clear-v311 {
    border: 0;
    border-radius: 10px;
    height: 42px;
    padding: 0 14px;
    font-weight: 800;
    font-family: 'Inter', Arial, sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    white-space: nowrap;
}
.btn-search-v311 {
    color: #fff;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}
.btn-clear-v311 {
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
}
.btn-search-v311:hover,
.btn-clear-v311:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
}
.home-dashboard-grid {
    align-items: stretch;
}
.home-card {
    cursor: default;
}
.home-card:not(.municipios-card-v311) {
    justify-content: center;
}
.home-card.municipios-card-v311 {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 18px 18px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 62%, #eef6ff 100%) !important;
    border: 1px solid #dbeafe !important;
    grid-column: span 2;
}
.municipios-card-header-v311 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e3a8a;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: .1px;
    position: relative;
    z-index: 2;
}
.municipios-card-header-v311 i {
    color: #2563eb !important;
    font-size: 18px !important;
}
.home-card.municipios-card-v311 strong {
    color: var(--sigcreas-accent-green);
    font-size: 28px;
    line-height: 1;
    margin: 4px 0 8px;
    position: relative;
    z-index: 2;
}
.home-card.municipios-card-v311 .dash-municipios-lista {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    max-height: none;
    overflow: visible;
    padding: 0 100px 0 0;
    margin-top: 2px;
    position: relative;
    z-index: 2;
}
.home-card.municipios-card-v311 .municipio-chip {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    width: auto;
    max-width: 100%;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    gap: 8px;
    line-height: 1.25;
}
.home-card.municipios-card-v311 .municipio-chip i {
    font-size: 8px !important;
    color: var(--sigcreas-accent-green) !important;
    filter: drop-shadow(0 0 4px rgba(22, 163, 74, .25));
}
.home-card.municipios-card-v311 .municipio-chip:hover {
    color: #1e3a8a;
}
.home-card.municipios-card-v311 .municipio-chip.vazio {
    background: transparent;
    color: #64748b;
}
.mapa-minas-v311 {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 76px;
    height: 86px;
    border-radius: 52% 48% 45% 55% / 42% 40% 60% 58%;
    border: 2px solid rgba(30, 58, 138, .10);
    background: linear-gradient(135deg, rgba(30,58,138,.06), rgba(37,99,235,.02));
    color: rgba(30, 58, 138, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -1px;
    transform: rotate(-9deg);
    z-index: 1;
    pointer-events: none;
}
.home-dashboard-header {
    padding-bottom: 4px;
}
.home-eyebrow {
    color: #2563eb !important;
    font-weight: 900 !important;
    letter-spacing: .08em;
}
.sigcreas-footer {
    grid-template-columns: 1.3fr 1fr 1.2fr 1fr !important;
}
@media (max-width: 1100px) {
    .home-card.municipios-card-v311 { grid-column: span 3; }
}
@media (max-width: 820px) {
    .search-area-v311 {
        grid-template-columns: 1fr;
    }
    .search-actions-v311 {
        justify-content: stretch;
    }
    .btn-search-v311,
    .btn-clear-v311 {
        flex: 1;
        justify-content: center;
    }
    .home-card.municipios-card-v311 { grid-column: span 2; }
    .home-card.municipios-card-v311 .dash-municipios-lista {
        padding-right: 0;
    }
    .mapa-minas-v311 { opacity: .35; }
}
@media (max-width: 560px) {
    .home-card.municipios-card-v311 { grid-column: span 1; }
    .home-card.municipios-card-v311 .dash-municipios-lista {
        grid-template-columns: 1fr;
    }
    .mapa-minas-v311 { display: none; }
}

/* SIGCREAS v3.1.2 - Painel executivo com identidade cartografica */
:root {
    --sigcreas-panel-border: #d7e1ee;
    --sigcreas-panel-text: #16243a;
    --sigcreas-panel-muted: #5c6c82;
    --sigcreas-panel-soft: #f6f9fc;
    --sigcreas-panel-green: #159947;
}

.home-dashboard {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    border: 1px solid var(--sigcreas-panel-border) !important;
    border-radius: 8px !important;
    padding: 24px !important;
    box-shadow: 0 18px 42px rgba(15, 35, 70, .09) !important;
}

.home-dashboard-header {
    align-items: center !important;
    border-bottom: 1px solid #e6edf5;
    margin-bottom: 18px !important;
    padding-bottom: 16px !important;
}

.home-eyebrow {
    color: #1d4ed8 !important;
    letter-spacing: .12em !important;
}

.home-dashboard h2 {
    color: #12327a !important;
    font-size: clamp(1.35rem, 1.8vw, 1.8rem) !important;
    letter-spacing: 0;
}

.home-dashboard p {
    color: var(--sigcreas-panel-muted) !important;
    font-size: 14px !important;
}

.home-refresh {
    background: #ffffff !important;
    border: 1px solid #c7d4e5 !important;
    border-radius: 8px !important;
    color: #183253 !important;
    box-shadow: 0 8px 18px rgba(15, 35, 70, .06);
}

.home-dashboard-grid {
    gap: 14px !important;
}

.home-card,
.home-panel {
    background: var(--sigcreas-panel-soft) !important;
    border: 1px solid #dce6f2 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.home-card:not(.municipios-card-v311) {
    min-height: 150px !important;
    padding: 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%) !important;
}

.home-card:not(.municipios-card-v311) i {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb !important;
    background: #eaf2ff;
    font-size: 18px !important;
}

.home-card span {
    color: #52647b !important;
    font-size: 12px !important;
    letter-spacing: .01em;
}

.home-card strong {
    color: #0b1220 !important;
    font-size: 28px !important;
    line-height: 1.05;
}

.home-card.municipios-card-v311 {
    min-height: 230px !important;
    padding: 20px 298px 20px 20px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 52%, #edf8f1 100%) !important;
    border-color: #cfe0f4 !important;
}

.municipios-card-header-v311 {
    color: #183253 !important;
}

.municipios-card-header-v311 i {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8 !important;
    background: #eaf2ff;
}

.home-card.municipios-card-v311 strong {
    color: var(--sigcreas-panel-green) !important;
    font-size: 30px !important;
    margin: 8px 0 14px !important;
}

.home-card.municipios-card-v311 .dash-municipios-lista {
    padding: 0 !important;
    gap: 10px 18px !important;
}

.home-card.municipios-card-v311 .municipio-chip {
    display: inline-flex;
    align-items: center;
    color: #26374d !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

.home-card.municipios-card-v311 .municipio-chip i {
    color: var(--sigcreas-panel-green) !important;
}

.trajeto-cartografico-v312 {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 270px;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(71, 85, 105, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 14px 30px rgba(15, 35, 70, .08);
    z-index: 1;
    pointer-events: none;
}

.trajeto-cartografico-v312 img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.trajeto-cartografico-v312 figcaption {
    margin-top: 4px;
    color: #52647b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}

.home-card.rma-dashboard-pendente {
    background: linear-gradient(180deg, #fff7f7 0%, #fff0f0 100%) !important;
    border: 2px solid #ef4444 !important;
    box-shadow: 0 16px 30px rgba(239, 68, 68, .10) !important;
}

.home-card.rma-dashboard-pendente i {
    color: #dc2626 !important;
    background: #fee2e2 !important;
}

.home-panel {
    background: #ffffff !important;
    padding: 16px !important;
}

.home-panel h3 {
    color: var(--sigcreas-panel-text) !important;
}

.dash-alertas .alerta-item,
.dash-alertas .ok-item,
.dash-acesso-btn {
    border-radius: 8px !important;
}

.dash-acesso-btn {
    background: #f4f7fb !important;
    border-color: #d8e3f1 !important;
    color: #1640b0 !important;
}

.dash-acesso-btn:hover {
    background: #e8f0ff !important;
}

@media (max-width: 1100px) {
    .home-card.municipios-card-v311 {
        padding-right: 258px !important;
    }
    .trajeto-cartografico-v312 {
        width: 230px;
    }
}

@media (max-width: 820px) {
    .home-dashboard {
        padding: 18px !important;
    }
    .home-card.municipios-card-v311 {
        padding: 18px !important;
    }
    .trajeto-cartografico-v312 {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(260px, 100%);
        margin-top: 16px;
    }
}

@media (max-width: 560px) {
    .home-dashboard-header {
        align-items: flex-start !important;
    }
    .home-refresh {
        width: 100%;
        justify-content: center;
    }
    .home-card:not(.municipios-card-v311) {
        min-height: 126px !important;
    }
}

/* SIGCREAS v3.1.3 - Dashboard inicial em formato institucional */
.home-dashboard {
    padding: 0 24px 22px !important;
    overflow: hidden;
}

.home-institutional-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 22px 0 18px;
    border-bottom: 4px solid #0b3b8c;
    margin-bottom: 20px;
}

.home-institutional-left {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.home-institutional-left img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    flex: 0 0 auto;
}

.home-institutional-left strong {
    display: block;
    color: #071d63;
    font-size: clamp(18px, 2vw, 25px);
    line-height: 1.15;
    text-transform: uppercase;
    max-width: 660px;
}

.home-institutional-left span {
    display: block;
    color: #1d2940;
    font-size: clamp(14px, 1.4vw, 18px);
    margin-top: 6px;
}

.home-institutional-right img {
    max-width: 310px;
    max-height: 94px;
    object-fit: contain;
}

.home-dashboard-header {
    border-bottom: 0 !important;
    padding: 0 0 8px !important;
    margin-bottom: 18px !important;
}

.home-dashboard-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 22px !important;
}

.home-card:not(.municipios-card-v311) {
    min-height: 178px !important;
    padding: 20px 18px 16px !important;
    background: #ffffff !important;
    border-color: #dfe7f1 !important;
    box-shadow: 0 10px 26px rgba(15, 35, 70, .07) !important;
}

.home-card:not(.municipios-card-v311) span {
    color: #071d63 !important;
    font-size: clamp(11px, .8vw, 13px) !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.home-card:not(.municipios-card-v311) strong {
    font-size: clamp(24px, 2.4vw, 34px) !important;
    margin-top: 2px;
}

.home-card:not(.municipios-card-v311)::after {
    content: "Ver detalhes  →";
    display: block;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e7edf5;
    color: #0b4fc4;
    font-size: 13px;
    font-weight: 800;
}

#dash-rma-card .dash-rma-municipios,
#dash-ultima-card .dash-rma-municipios,
#dash-agenda-card .dash-rma-municipios {
    font-size: 12px !important;
    color: #1d2940 !important;
}

.home-dashboard-bottom {
    grid-template-columns: 1.05fr .9fr 1.25fr !important;
    gap: 22px !important;
    align-items: stretch;
    margin-top: 22px !important;
}

.home-dashboard-bottom .home-card.municipios-card-v311 {
    grid-column: auto !important;
    min-height: 214px !important;
    padding: 18px 142px 18px 18px !important;
    background: #ffffff !important;
    border-color: #dfe7f1 !important;
    box-shadow: 0 10px 26px rgba(15, 35, 70, .07) !important;
}

.home-dashboard-bottom .home-card.municipios-card-v311 strong {
    font-size: 22px !important;
    margin: 8px 0 16px !important;
}

.home-dashboard-bottom .home-card.municipios-card-v311 .dash-municipios-lista {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px !important;
}

.home-dashboard-bottom .home-card.municipios-card-v311 .municipio-chip {
    font-size: 13px !important;
    line-height: 1.25;
}

.home-dashboard-bottom .trajeto-cartografico-v312 {
    right: 18px;
    top: 58px;
    bottom: auto;
    width: 110px;
    padding: 5px;
    opacity: .78;
    box-shadow: none;
}

.home-dashboard-bottom .trajeto-cartografico-v312 figcaption {
    display: none;
}

.home-panel {
    border-radius: 10px !important;
    box-shadow: 0 10px 26px rgba(15, 35, 70, .07) !important;
}

.home-panel h3 {
    font-size: 18px !important;
    color: #071d63 !important;
    margin-bottom: 14px !important;
}

.dash-alertas .alerta-item {
    display: block;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #eef2f7 !important;
    border-radius: 0 !important;
    padding: 9px 0 !important;
    color: #1d2940 !important;
}

.dash-alertas .ok-item {
    background: transparent !important;
    border: 0 !important;
    color: #166534 !important;
    padding: 8px 0 !important;
}

.dash-acessos {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px !important;
}

.dash-acesso-btn {
    justify-content: center;
    min-height: 58px;
    background: #ffffff !important;
    border-color: #dfe7f1 !important;
    color: #071d63 !important;
}

@media (max-width: 1200px) {
    .home-dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .home-dashboard-bottom {
        grid-template-columns: 1fr !important;
    }
    .home-dashboard-bottom .home-card.municipios-card-v311 {
        padding-right: 180px !important;
    }
    .home-dashboard-bottom .trajeto-cartografico-v312 {
        width: 150px;
    }
}

@media (max-width: 820px) {
    .home-institutional-band {
        align-items: flex-start;
        flex-direction: column;
    }
    .home-institutional-right img {
        max-width: 240px;
    }
    .home-dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    .home-dashboard-bottom .home-card.municipios-card-v311 {
        padding: 18px !important;
    }
    .home-dashboard-bottom .trajeto-cartografico-v312 {
        position: relative;
        top: auto;
        right: auto;
        width: min(260px, 100%);
        margin-top: 16px;
    }
    .dash-acessos {
        grid-template-columns: 1fr !important;
    }
}

/* SIGCREAS v3.1.4 - Ajustes de alinhamento, cards e pendencias */
.home-institutional-band {
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) 330px;
    align-items: center !important;
}

.home-institutional-left {
    display: contents !important;
}

.home-institutional-left img {
    grid-column: 1;
    justify-self: start;
}

.home-institutional-left > div {
    grid-column: 2;
    text-align: center;
    justify-self: center;
}

.home-institutional-left strong {
    max-width: 760px !important;
    margin: 0 auto;
}

.home-institutional-right {
    grid-column: 3;
    justify-self: end;
}

.home-card:not(.municipios-card-v311) {
    overflow: hidden;
    min-width: 0;
    cursor: default !important;
}

.home-card:not(.municipios-card-v311) span,
.home-card:not(.municipios-card-v311) small {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.home-card:not(.municipios-card-v311)::after {
    content: none !important;
    display: none !important;
}

.home-card:not(.municipios-card-v311) strong {
    margin-bottom: 4px;
}

#dash-rma-card {
    position: relative;
}

#dash-rma-card.rma-dashboard-pendente {
    border: 2px solid #ef4444 !important;
    background: #fff3f3 !important;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, .45), 0 18px 34px rgba(127, 29, 29, .13) !important;
    animation: pulso-rma-card-principal 1.65s ease-out infinite !important;
}

#dash-rma-card.rma-dashboard-pendente::after {
    content: "!";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    padding: 0;
    border: 0;
    margin: 0;
}

#dash-rma-card.rma-dashboard-pendente strong,
#dash-rma-card.rma-dashboard-pendente span,
#dash-rma-card.rma-dashboard-pendente small {
    color: #7f1d1d !important;
}

@keyframes pulso-rma-card-principal {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .44), 0 18px 34px rgba(127, 29, 29, .13); }
    70% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0), 0 18px 34px rgba(127, 29, 29, .13); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 18px 34px rgba(127, 29, 29, .13); }
}

.dash-acesso-btn {
    overflow-wrap: anywhere;
    line-height: 1.15;
}

#dash-agenda-card.agenda-dashboard-tem-compromisso {
    border-color: #09b309 !important;
    cursor: pointer !important;
}

#dash-agenda-card {
    padding: 14px 16px 10px !important;
}

#dash-agenda-card > i {
    width: 30px !important;
    height: 30px !important;
    font-size: 15px !important;
}

#dash-agenda-card > span {
    font-size: 10px !important;
    line-height: 1.05 !important;
}

#dash-agenda-card > strong {
    font-size: 26px !important;
    line-height: .95 !important;
    margin-top: 0 !important;
}

#dash-agenda-card.agenda-dashboard-tem-compromisso:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(124, 58, 237, .16) !important;
}

#dash-agenda-card.agenda-dashboard-tem-compromisso #dash-agenda-resumo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #0f172a !important;
    font-weight: 800;
    line-height: 1;
    max-height: 82px;
    overflow: hidden;
}

.dash-agenda-item {
    display: block;
    min-width: 0;
}

.dash-agenda-cidade {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-bottom: 1px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #2E75B6;
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-agenda-detalhe {
    display: block;
    width: 100%;
    padding: 2px 6px;
    border: 1px dashed rgba(100, 116, 139, .32);
    border-radius: 5px;
    background: rgba(255, 255, 255, .82);
    color: #1e293b;
    font-size: 9px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-agenda-mais {
    color: #4c1d95;
    font-size: 9px;
    font-weight: 900;
}

.sigcreas-search-hidden {
    display: none !important;
}

.resultado-busca-sigcreas {
    grid-column: 1 / -1;
    display: none;
    margin-top: 2px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 1100px) {
    .home-institutional-band {
        grid-template-columns: 96px minmax(0, 1fr) 250px;
    }
    .home-institutional-left img {
        width: 76px;
        height: 76px;
    }
    .home-institutional-right img {
        max-width: 235px;
    }
}

@media (max-width: 760px) {
    .home-institutional-band {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    .home-institutional-left {
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }
    .home-institutional-left img,
    .home-institutional-left > div,
    .home-institutional-right {
        grid-column: auto;
        justify-self: center;
    }
}

/* =========================================================
   SIG-CREAS - Painel Administrativo de Usuários
   ========================================================= */
.somente-admin { display: none; }
body.usuario-admin .somente-admin { display: flex; }
.admin-modal-sigcreas {
    position: fixed;
    inset: 0;
    z-index: 30000;
    background: rgba(15, 23, 42, .78);
    align-items: center;
    justify-content: center;
    padding: 22px;
    font-family: 'Inter', Arial, sans-serif;
}
.admin-modal-card-sigcreas {
    width: min(1180px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #f8fafc;
    border-radius: 18px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .38);
    border: 1px solid #dbeafe;
    padding: 24px;
    position: relative;
}
.admin-close-sigcreas {
    position: absolute;
    right: 18px;
    top: 14px;
    border: 0;
    background: #fee2e2;
    color: #991b1b;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    font-size: 25px;
    cursor: pointer;
    font-weight: 800;
}
.admin-header-sigcreas {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-right: 48px;
}
.admin-header-sigcreas h2 { margin: 4px 0 6px; color: #1e3a8a; }
.admin-header-sigcreas p { margin: 0; color: #64748b; }
.admin-tabs-sigcreas {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid #dbeafe;
    margin-bottom: 16px;
}
.admin-tabs-sigcreas button {
    border: 1px solid #dbeafe;
    border-bottom: 0;
    background: #fff;
    color: #1e3a8a;
    padding: 11px 16px;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    font-weight: 800;
}
.admin-tabs-sigcreas button.active { background: #1e3a8a; color: #fff; }
.admin-tab-content-sigcreas { display: none; }
.admin-tab-content-sigcreas.active { display: block; }
.admin-toolbar-sigcreas {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.admin-toolbar-sigcreas input,
.admin-form-sigcreas input,
.admin-form-sigcreas select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font: inherit;
}
.admin-toolbar-sigcreas input { max-width: 520px; }
.admin-btn {
    border: 1px solid #bfdbfe;
    background: #fff;
    color: #1e3a8a;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}
.admin-btn-primary { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }
.admin-btn-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.admin-btn-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.admin-table-wrap-sigcreas { overflow: auto; background: #fff; border-radius: 14px; border: 1px solid #dbeafe; }
.admin-table-sigcreas { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table-sigcreas th,
.admin-table-sigcreas td { padding: 12px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.admin-table-sigcreas th { background: #eff6ff; color: #1e3a8a; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.admin-table-sigcreas tr:hover td { background: #f8fafc; }
.admin-badge-sigcreas { display:inline-flex; align-items:center; gap:5px; border-radius:999px; padding:4px 9px; font-weight:800; font-size:11px; }
.admin-badge-ativo { background:#dcfce7; color:#166534; }
.admin-badge-inativo { background:#fee2e2; color:#991b1b; }
.admin-grid-sigcreas { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.admin-form-sigcreas label { font-weight:800; color:#1e3a8a; font-size:12px; display:block; }
.admin-form-sigcreas small { color:#64748b; font-weight:600; }
.admin-creas-box-sigcreas,
.admin-note-sigcreas,
.admin-permissoes-sigcreas { margin-top:16px; background:#fff; border:1px solid #dbeafe; border-radius:14px; padding:16px; }
.admin-checks-sigcreas { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; margin-top:12px; }
.admin-checks-sigcreas label { display:flex; align-items:center; gap:8px; font-size:13px; color:#0f172a; }
.admin-checks-sigcreas input { width:auto; }
.admin-actions-sigcreas { display:flex; justify-content:flex-end; gap:10px; margin-top:16px; }
.admin-note-sigcreas { color:#475569; line-height:1.45; }
.admin-note-sigcreas code { background:#e2e8f0; padding:2px 5px; border-radius:6px; }
.admin-auditoria-lista-sigcreas { display:grid; gap:10px; }
.admin-audit-item-sigcreas { background:#fff; border:1px solid #dbeafe; border-left:5px solid #1e3a8a; border-radius:12px; padding:12px; }
.admin-audit-item-sigcreas strong { color:#1e3a8a; }
.admin-audit-item-sigcreas small { display:block; color:#64748b; margin-top:4px; }
@media (max-width: 760px) {
    .admin-grid-sigcreas, .admin-checks-sigcreas { grid-template-columns: 1fr; }
    .admin-header-sigcreas, .admin-toolbar-sigcreas { flex-direction: column; }
    .admin-toolbar-sigcreas input { max-width: none; }
}

/* SIGCREAS v4.0 - Diagnóstico */
.diag-box-sigcreas { padding: 16px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; max-height: 70vh; overflow: auto; }
.diag-box-sigcreas h3 { margin: 16px 0 8px; color: #0f172a; }
.diag-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; border-radius: 999px; padding: 4px 8px; font-weight: 800; font-size: 12px; margin-right: 6px; }
.diag-badge.ok { background: #dcfce7; color: #166534; }
.diag-badge.erro { background: #fee2e2; color: #991b1b; }
.diag-table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; }
.diag-table th, .diag-table td { border-bottom: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; font-size: 13px; }
.diag-table th { background: #e2e8f0; color: #0f172a; }
.diag-erro { color: #991b1b; font-weight: 600; }

/* SIGCREAS 4.0.0-alpha.2 - Diagnóstico e performance */
.diag-badge { display:inline-block; padding:3px 8px; border-radius:999px; font-size:12px; font-weight:900; }
.diag-badge.ok { background:#dcfce7; color:#166534; }
.diag-badge.erro { background:#fee2e2; color:#991b1b; }
.diag-table { width:100%; border-collapse:collapse; margin-top:8px; font-size:13px; }
.diag-table th, .diag-table td { border:1px solid #dbe4f0; padding:8px 10px; text-align:left; }
.diag-table th { background:#eff6ff; color:#0b2d83; }
.diag-erro { color:#991b1b; font-weight:700; }
/* ==========================================================
   SIG-CREAS — identidade profissional dos cards de resumo
   Mantém a estrutura existente e aplica bordas superiores coloridas.
   ========================================================== */

.home-dashboard-grid > .home-card{
    position:relative;
    overflow:hidden;
    background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
    border:1px solid #dbe4ee!important;
    border-radius:15px!important;
    box-shadow:0 8px 22px rgba(15,23,42,.055)!important;
    transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease!important;
}

.home-dashboard-grid > .home-card:hover{
    transform:translateY(-3px)!important;
    box-shadow:0 15px 32px rgba(15,23,42,.10)!important;
}

/* PAF — azul */
.home-dashboard-grid > .home-card:nth-child(1){
    border-top:4px solid #2563eb!important;
}
.home-dashboard-grid > .home-card:nth-child(1) > i{
    color:#2563eb!important;
    background:#eff6ff!important;
}

/* Judicial — violeta */
.home-dashboard-grid > .home-card:nth-child(2){
    border-top:4px solid #5b4ce6!important;
}
.home-dashboard-grid > .home-card:nth-child(2) > i{
    color:#5b4ce6!important;
    background:#f3f0ff!important;
}

/* Agenda — verde; o acabamento específico permanece em 11-dashboard-home.css */
.home-dashboard-grid > #dash-agenda-card{
    border-top:4px solid #16a34a!important;
}

/* RMA — ciano institucional */
.home-dashboard-grid > .home-card:nth-child(4){
    border-top:4px solid #0891b2!important;
}
.home-dashboard-grid > .home-card:nth-child(4) > i{
    color:#0891b2!important;
    background:#ecfeff!important;
}

/* Última atualização — cinza azulado */
.home-dashboard-grid > #dash-ultima-card,
.home-dashboard-grid > .home-card:nth-child(5){
    border-top:4px solid #64748b!important;
}
.home-dashboard-grid > #dash-ultima-card > i,
.home-dashboard-grid > .home-card:nth-child(5) > i{
    color:#526277!important;
    background:#f1f5f9!important;
}

/* Padronização dos blocos de ícone */
.home-dashboard-grid > .home-card > i{
    width:40px!important;
    height:40px!important;
    flex:0 0 40px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:11px!important;
    font-size:18px!important;
    margin-bottom:8px!important;
}

/* Mantém a sinalização crítica do RMA acima da cor normal. */
.home-dashboard-grid > .home-card.rma-dashboard-pendente{
    border:2px solid #ef4444!important;
    border-top:4px solid #ef4444!important;
}

/* Painéis inferiores com a mesma linguagem visual. */
.home-dashboard-bottom .home-panel{
    border:1px solid #dbe4ee!important;
    border-radius:15px!important;
    box-shadow:0 8px 22px rgba(15,23,42,.045)!important;
}

.home-dashboard-bottom .home-panel:first-child{
    border-top:4px solid #16a34a!important;
}

.home-dashboard-bottom .home-panel:nth-child(2){
    border-top:4px solid #2563eb!important;
}

.home-dashboard-bottom .home-panel:nth-child(3){
    border-top:4px solid #5b4ce6!important;
}
/* SIG-CREAS v3.2.0 — Administração por CREAS, função e perfil */
.admin-creas-tabs-sigcreas{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 12px;margin-bottom:4px}.admin-creas-tabs-sigcreas button{flex:0 0 auto;border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:999px;padding:8px 12px;font-weight:800;cursor:pointer}.admin-creas-tabs-sigcreas button.active{background:#1e3a8a;border-color:#1e3a8a;color:#fff}.admin-creas-tabs-sigcreas button span{display:inline-grid;place-items:center;min-width:21px;height:21px;margin-left:5px;padding:0 6px;border-radius:999px;background:rgba(148,163,184,.18);font-size:10px}.admin-toolbar-filtros-sigcreas{display:grid;grid-template-columns:minmax(240px,1.6fr) repeat(3,minmax(150px,.7fr)) auto;align-items:center}.admin-toolbar-filtros-sigcreas input,.admin-toolbar-filtros-sigcreas select{width:100%;min-height:42px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;padding:9px 11px}.admin-regional-title-sigcreas{margin:4px 0 10px;color:#1e3a8a;font-size:13px;font-weight:900}.admin-badge-master{background:#ede9fe;color:#5b21b6}.admin-badge-regional{background:#dbeafe;color:#1d4ed8}.admin-badge-usuario{background:#f1f5f9;color:#475569}.admin-auth-ok{color:#15803d;font-weight:800}.admin-auth-pendente{color:#b45309;font-weight:800}@media(max-width:1100px){.admin-toolbar-filtros-sigcreas{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.admin-toolbar-filtros-sigcreas{grid-template-columns:1fr}}


/* SIG-CREAS v4 — matriz individual de permissões */
.admin-permissoes-usuario-sigcreas{margin-top:16px;padding:16px;border:1px solid #dbe4f0;border-radius:14px;background:#f8fafc}
.admin-permissoes-cabecalho{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.admin-permissoes-cabecalho small{display:block;margin-top:4px;color:#64748b;font-weight:500}
.admin-matriz-table th:not(:first-child),.admin-matriz-table td:not(:first-child){text-align:center;min-width:92px}
.admin-matriz-table input[type="checkbox"]{width:18px;height:18px;accent-color:#1e3a8a;cursor:pointer}
@media(max-width:760px){.admin-permissoes-cabecalho{align-items:stretch;flex-direction:column}.admin-matriz-table{min-width:720px}}

/* =========================================================
   SIG-CREAS — UI RMA v2
   Polimento visual da Home, modal universal e acesso ao RMA.
   Alterações estritamente visuais.
========================================================= */
:root{
    --sig-ui-navy:#102a56;
    --sig-ui-blue:#2563eb;
    --sig-ui-blue-dark:#1d4ed8;
    --sig-ui-surface:#ffffff;
    --sig-ui-surface-soft:#f8fafc;
    --sig-ui-line:#dbe5f0;
    --sig-ui-muted:#64748b;
    --sig-ui-shadow:0 14px 38px rgba(15,35,70,.09);
    --sig-ui-shadow-hover:0 20px 46px rgba(15,35,70,.14);
    --sig-ui-radius:18px;
    --sig-ui-transition:180ms ease;
}

body{
    background:
        radial-gradient(circle at 12% 0%,rgba(37,99,235,.08),transparent 28%),
        linear-gradient(135deg,#eef3f8 0%,#f8fafc 52%,#ffffff 100%) !important;
}

.main-header{
    position:relative;
    overflow:hidden;
    border:1px solid rgba(219,229,240,.9);
    border-radius:0 0 26px 26px;
    background:rgba(255,255,255,.90) !important;
    box-shadow:0 10px 30px rgba(15,35,70,.08);
    backdrop-filter:blur(14px);
}
.main-header::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        radial-gradient(circle at 10% 10%,rgba(37,99,235,.10),transparent 30%),
        radial-gradient(circle at 88% 0%,rgba(22,163,74,.08),transparent 25%);
}
.header-content-row{position:relative;z-index:1;min-height:126px}
.header-logo-side img{height:118px !important;filter:drop-shadow(0 8px 14px rgba(15,35,70,.16)) !important}
.header-text-side h1{color:var(--sig-ui-navy);letter-spacing:-.04em;font-size:2rem}
.header-text-side small,.header-text-side p{color:var(--sig-ui-muted) !important}

.btn-logout-sigcreas{
    border:1px solid #fecaca;
    border-radius:12px;
    background:rgba(255,255,255,.9);
    color:#b91c1c;
    box-shadow:0 6px 16px rgba(185,28,28,.08);
    transition:transform var(--sig-ui-transition),box-shadow var(--sig-ui-transition),background var(--sig-ui-transition);
}
.btn-logout-sigcreas:hover,.btn-logout-sigcreas:focus-visible{
    background:#fff1f2;
    color:#991b1b;
    transform:translateY(-2px);
    box-shadow:0 10px 22px rgba(185,28,28,.14);
}

.portal-grid{gap:16px}
.service-card{
    position:relative;
    overflow:hidden;
    border:1px solid var(--sig-ui-line);
    border-radius:18px;
    background:rgba(255,255,255,.94);
    box-shadow:0 10px 26px rgba(15,35,70,.07);
    transition:transform var(--sig-ui-transition),box-shadow var(--sig-ui-transition),border-color var(--sig-ui-transition),background var(--sig-ui-transition);
}
.service-card::after{
    content:"";
    position:absolute;
    inset:auto 18px 12px 18px;
    height:3px;
    border-radius:999px;
    background:linear-gradient(90deg,#2563eb,#22c55e);
    opacity:0;
    transform:scaleX(.45);
    transition:opacity var(--sig-ui-transition),transform var(--sig-ui-transition);
}
.service-card:hover{
    background:#fff;
    border-color:#bfdbfe;
    transform:translateY(-5px);
    box-shadow:var(--sig-ui-shadow-hover);
}
.service-card:hover::after{opacity:1;transform:scaleX(1)}
.service-card .icon-box{
    width:52px;
    height:52px;
    display:grid;
    place-items:center;
    border-radius:16px;
    background:#eff6ff;
    color:#2563eb;
    font-size:22px;
    box-shadow:inset 0 0 0 1px #dbeafe;
    transition:transform var(--sig-ui-transition),background var(--sig-ui-transition),color var(--sig-ui-transition);
}
.service-card:hover .icon-box{transform:scale(1.05);background:#2563eb;color:#fff}
.service-card > span{color:#1e293b;font-weight:800;line-height:1.35}
.service-card:hover > span{color:var(--sig-ui-navy)}

/* Destaque específico e discreto para o módulo RMA. */
.service-card[data-modulo="rma"]{
    border-color:#bfdbfe;
    background:linear-gradient(145deg,#fff 0%,#f7fbff 100%);
}
.service-card[data-modulo="rma"] .icon-box{
    color:#1d4ed8;
    background:linear-gradient(135deg,#dbeafe,#eff6ff);
}

/* Modal universal modernizado sem alterar IDs ou eventos existentes. */
#modalUniversal{
    background:rgba(15,23,42,.46) !important;
    backdrop-filter:blur(5px);
    animation:sig-ui-fade-in .16s ease both;
}
#modalUniversal .modal-content,
#modalUniversal > div{
    border:1px solid rgba(219,229,240,.95);
    border-radius:22px !important;
    background:rgba(255,255,255,.97) !important;
    box-shadow:0 26px 80px rgba(15,23,42,.25) !important;
}
#modalTitle{color:var(--sig-ui-navy) !important;letter-spacing:-.025em}
#modalOptions{gap:10px !important}
.modal-option{
    min-height:66px;
    border:1px solid #e2e8f0 !important;
    border-radius:14px !important;
    background:#fff !important;
    color:#334155 !important;
    box-shadow:0 5px 14px rgba(15,35,70,.045);
    transition:transform var(--sig-ui-transition),box-shadow var(--sig-ui-transition),border-color var(--sig-ui-transition),background var(--sig-ui-transition);
}
.modal-option:hover{
    transform:translateY(-2px);
    border-color:#bfdbfe !important;
    background:#f8fbff !important;
    box-shadow:0 12px 26px rgba(15,35,70,.09);
}
.modal-option i{
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:#eff6ff;
    color:#2563eb;
    font-size:17px;
}
.modal-option span{font-weight:800}

@keyframes sig-ui-fade-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){
    .service-card,.service-card::after,.service-card .icon-box,.modal-option,.btn-logout-sigcreas{transition:none !important}
    #modalUniversal{animation:none !important}
}
@media(max-width:760px){
    .main-header{border-radius:0 0 18px 18px}
    .header-content-row{min-height:auto}
    .header-logo-side img{height:92px !important}
    .portal-grid{gap:12px}
    .service-card{border-radius:15px}
}

/* =========================================================
   SIG-CREAS — Auditoria administrativa avançada
   ========================================================= */
.admin-auditoria-resumo-sigcreas{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-bottom:16px;
}
.admin-auditoria-resumo-sigcreas article{
    position:relative;
    overflow:hidden;
    min-height:108px;
    padding:16px;
    border:1px solid #dbeafe;
    border-radius:14px;
    background:linear-gradient(145deg,#fff,#f8fbff);
    box-shadow:0 7px 20px rgba(30,58,138,.06);
}
.admin-auditoria-resumo-sigcreas article::before{
    content:"";
    position:absolute;
    inset:0 auto 0 0;
    width:4px;
    background:linear-gradient(#2563eb,#1e3a8a);
}
.admin-auditoria-resumo-sigcreas span,
.admin-auditoria-resumo-sigcreas small{display:block;color:#64748b}
.admin-auditoria-resumo-sigcreas span{font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.55px}
.admin-auditoria-resumo-sigcreas strong{display:block;margin:8px 0 4px;color:#0f2f68;font-size:28px;line-height:1}
.admin-auditoria-resumo-sigcreas small{font-size:11px}

.admin-auditoria-filtros-sigcreas{
    display:grid;
    grid-template-columns:minmax(240px,1.5fr) repeat(3,minmax(150px,.75fr)) auto;
    gap:10px;
    align-items:end;
    margin-bottom:13px;
    padding:14px;
    border:1px solid #dbeafe;
    border-radius:14px;
    background:#fff;
}
.admin-auditoria-filtros-sigcreas label{display:flex;flex-direction:column;gap:6px;min-width:0}
.admin-auditoria-filtros-sigcreas label>span{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.45px;color:#475569}
.admin-auditoria-filtros-sigcreas input,
.admin-auditoria-filtros-sigcreas select{
    width:100%;
    min-height:41px;
    border:1px solid #cbd5e1;
    border-radius:10px;
    background:#fff;
    color:#0f172a;
    padding:9px 11px;
    font:600 12px Inter,Arial,sans-serif;
    outline:none;
}
.admin-auditoria-filtros-sigcreas input:focus,
.admin-auditoria-filtros-sigcreas select:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.admin-audit-search>div{position:relative}
.admin-audit-search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#64748b;font-size:12px}
.admin-audit-search input{padding-left:34px}
.admin-auditoria-acoes-sigcreas{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.admin-auditoria-meta-sigcreas{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:4px 2px 10px;color:#64748b;font-size:11px}
.admin-auditoria-meta-sigcreas strong{color:#1e3a8a}

.admin-auditoria-lista-sigcreas{display:flex;flex-direction:column;gap:10px}
.admin-audit-item-sigcreas{
    position:relative;
    display:grid;
    grid-template-columns:46px minmax(0,1fr) auto;
    gap:12px;
    align-items:start;
    padding:14px;
    border:1px solid #dbeafe;
    border-left:5px solid #2563eb;
    border-radius:14px;
    background:#fff;
    box-shadow:0 5px 15px rgba(15,23,42,.045);
    cursor:pointer;
    transition:.18s ease;
}
.admin-audit-item-sigcreas:hover{transform:translateY(-1px);border-color:#bfdbfe;box-shadow:0 9px 22px rgba(15,23,42,.08)}
.admin-audit-item-sigcreas.audit-criou{border-left-color:#16a34a}
.admin-audit-item-sigcreas.audit-editou{border-left-color:#2563eb}
.admin-audit-item-sigcreas.audit-bloqueou{border-left-color:#dc2626}
.admin-audit-item-sigcreas.audit-ativou{border-left-color:#7c3aed}
.admin-audit-item-sigcreas.audit-outro{border-left-color:#64748b}
.admin-audit-icone-sigcreas{
    width:42px;height:42px;border-radius:12px;display:grid;place-items:center;
    background:#eff6ff;color:#1d4ed8;font-size:16px
}
.audit-criou .admin-audit-icone-sigcreas{background:#ecfdf5;color:#15803d}
.audit-bloqueou .admin-audit-icone-sigcreas{background:#fef2f2;color:#b91c1c}
.audit-ativou .admin-audit-icone-sigcreas{background:#f5f3ff;color:#6d28d9}
.admin-audit-conteudo-sigcreas{min-width:0}
.admin-audit-topo-sigcreas{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:5px}
.admin-audit-topo-sigcreas strong{color:#123b7a;font-size:13px}
.admin-audit-modulo-sigcreas{padding:3px 7px;border-radius:999px;background:#eef4ff;color:#1e40af;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.4px}
.admin-audit-alvo-sigcreas{display:block;color:#0f172a;font-size:12px;font-weight:700;overflow-wrap:anywhere}
.admin-audit-meta-linha-sigcreas{display:flex;gap:10px;flex-wrap:wrap;margin-top:7px;color:#64748b;font-size:10px}
.admin-audit-meta-linha-sigcreas span{display:inline-flex;align-items:center;gap:4px}
.admin-audit-hora-sigcreas{text-align:right;white-space:nowrap;color:#64748b;font-size:10px;line-height:1.45}
.admin-audit-hora-sigcreas strong{display:block;color:#1e3a8a;font-size:12px}
.admin-audit-detalhes-sigcreas{
    grid-column:2/-1;
    display:none;
    margin-top:2px;
    padding:12px;
    border:1px dashed #bfdbfe;
    border-radius:11px;
    background:#f8fbff;
}
.admin-audit-item-sigcreas.aberto .admin-audit-detalhes-sigcreas{display:block}
.admin-audit-detalhes-grid-sigcreas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.admin-audit-detalhes-grid-sigcreas div{padding:9px;border-radius:9px;background:#fff;border:1px solid #e2e8f0}
.admin-audit-detalhes-grid-sigcreas span{display:block;color:#64748b;font-size:9px;font-weight:900;text-transform:uppercase;margin-bottom:3px}
.admin-audit-detalhes-grid-sigcreas strong{display:block;color:#0f172a;font-size:11px;overflow-wrap:anywhere}
.admin-audit-json-sigcreas{margin-top:9px;padding:10px;border-radius:9px;background:#0f172a;color:#dbeafe;font:10px/1.5 Consolas,monospace;white-space:pre-wrap;overflow:auto;max-height:220px}
.admin-audit-vazio-sigcreas{padding:32px 18px;text-align:center;border:1px dashed #cbd5e1;border-radius:14px;background:#fff;color:#64748b}

@media(max-width:980px){
    .admin-auditoria-resumo-sigcreas{grid-template-columns:repeat(2,minmax(0,1fr))}
    .admin-auditoria-filtros-sigcreas{grid-template-columns:repeat(2,minmax(0,1fr))}
    .admin-audit-search{grid-column:1/-1}
    .admin-auditoria-acoes-sigcreas{grid-column:1/-1}
}
@media(max-width:620px){
    .admin-auditoria-resumo-sigcreas,.admin-auditoria-filtros-sigcreas{grid-template-columns:1fr}
    .admin-audit-item-sigcreas{grid-template-columns:38px minmax(0,1fr)}
    .admin-audit-hora-sigcreas{grid-column:2;text-align:left}
    .admin-audit-detalhes-sigcreas{grid-column:1/-1}
    .admin-audit-detalhes-grid-sigcreas{grid-template-columns:1fr}
    .admin-auditoria-meta-sigcreas{align-items:flex-start;flex-direction:column}
}

/* =========================================================
   Auditoria — refinamento final antes do commit
   ========================================================= */
.admin-auditoria-cabecalho-sigcreas{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-bottom:14px;
    padding:16px 18px;
    border:1px solid #dbeafe;
    border-radius:16px;
    background:linear-gradient(135deg,#f8fbff 0%,#fff 58%,#eef4ff 100%);
    box-shadow:0 8px 22px rgba(30,58,138,.055);
}
.admin-auditoria-cabecalho-titulo>span{display:block;margin-bottom:4px;color:#2563eb;font-size:10px;font-weight:900;letter-spacing:.75px;text-transform:uppercase}
.admin-auditoria-cabecalho-titulo>span i{margin-right:5px}
.admin-auditoria-cabecalho-titulo h3{margin:0;color:#0f2f68;font-size:18px}
.admin-auditoria-cabecalho-titulo p{margin:4px 0 0;color:#64748b;font-size:11px}
.admin-auditoria-contexto-sigcreas{display:grid;grid-template-columns:repeat(3,minmax(125px,1fr));gap:9px}
.admin-auditoria-contexto-sigcreas>div{min-width:0;padding:9px 11px;border:1px solid #dbeafe;border-radius:11px;background:rgba(255,255,255,.85)}
.admin-auditoria-contexto-sigcreas span{display:block;margin-bottom:4px;color:#64748b;font-size:8px;font-weight:900;letter-spacing:.45px;text-transform:uppercase}
.admin-auditoria-contexto-sigcreas strong{display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173f7b;font-size:10px}
.admin-audit-online{color:#15803d!important}.admin-audit-online i{font-size:7px;margin-right:4px}

.admin-audit-grupo-sigcreas{display:flex;flex-direction:column;gap:9px}
.admin-audit-grupo-sigcreas+.admin-audit-grupo-sigcreas{margin-top:8px}
.admin-audit-dia-sigcreas{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 10px;border:1px solid #dbeafe;border-radius:10px;background:rgba(239,246,255,.96);backdrop-filter:blur(7px);color:#173f7b}
.admin-audit-dia-sigcreas span{font-size:10px;font-weight:900;text-transform:capitalize}
.admin-audit-dia-sigcreas small{color:#64748b;font-size:9px;font-weight:800}

.admin-audit-item-sigcreas.audit-permissao{border-left-color:#f59e0b}
.admin-audit-item-sigcreas.audit-login{border-left-color:#0891b2}
.admin-audit-item-sigcreas.audit-logout{border-left-color:#64748b}
.audit-editou .admin-audit-icone-sigcreas{background:#eff6ff;color:#1d4ed8}
.audit-permissao .admin-audit-icone-sigcreas{background:#fffbeb;color:#b45309}
.audit-login .admin-audit-icone-sigcreas{background:#ecfeff;color:#0e7490}
.audit-logout .admin-audit-icone-sigcreas{background:#f1f5f9;color:#475569}
.admin-audit-item-sigcreas.aberto{border-color:#93c5fd;box-shadow:0 12px 28px rgba(30,58,138,.11)}
.admin-audit-item-sigcreas.aberto .admin-audit-hora-sigcreas i{color:#2563eb}
.admin-audit-detalhes-titulo-sigcreas{display:flex;align-items:center;gap:6px;margin-top:11px;color:#173f7b;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.4px}

@media(max-width:980px){
    .admin-auditoria-cabecalho-sigcreas{align-items:flex-start;flex-direction:column}
    .admin-auditoria-contexto-sigcreas{width:100%}
}
@media(max-width:620px){
    .admin-auditoria-contexto-sigcreas{grid-template-columns:1fr}
    .admin-auditoria-contexto-sigcreas strong{max-width:none}
    .admin-audit-dia-sigcreas{position:static}
}


/* =========================================================
   Auditoria administrativa — paginação
   ========================================================= */
.admin-audit-paginacao-sigcreas{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top:14px;
    padding:11px 13px;
    border:1px solid #dbeafe;
    border-radius:14px;
    background:linear-gradient(145deg,#fff,#f8fbff);
    box-shadow:0 6px 18px rgba(30,58,138,.05);
}
.admin-audit-paginacao-sigcreas[hidden]{display:none!important}
.admin-audit-paginacao-info-sigcreas{
    color:#64748b;
    font-size:11px;
    font-weight:700;
    white-space:nowrap;
}
.admin-audit-paginacao-controles-sigcreas,
.admin-audit-paginacao-paginas-sigcreas{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
}
.admin-audit-paginacao-controles-sigcreas button,
.admin-audit-paginacao-paginas-sigcreas button{
    min-height:36px;
    padding:8px 11px;
    border:1px solid #bfdbfe;
    border-radius:10px;
    background:#fff;
    color:#1e3a8a;
    font:800 11px Inter,Arial,sans-serif;
    cursor:pointer;
    transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.admin-audit-paginacao-paginas-sigcreas button{
    width:36px;
    padding:0;
}
.admin-audit-paginacao-controles-sigcreas button:hover:not(:disabled),
.admin-audit-paginacao-paginas-sigcreas button:hover:not(:disabled){
    transform:translateY(-1px);
    border-color:#60a5fa;
    background:#eff6ff;
    box-shadow:0 5px 12px rgba(37,99,235,.10);
}
.admin-audit-paginacao-paginas-sigcreas button.active{
    border-color:#1e3a8a;
    background:#1e3a8a;
    color:#fff;
    box-shadow:0 6px 14px rgba(30,58,138,.18);
}
.admin-audit-paginacao-controles-sigcreas button:disabled{
    cursor:not-allowed;
    opacity:.45;
    background:#f8fafc;
    color:#94a3b8;
}
.admin-audit-paginacao-reticencias{
    min-width:16px;
    color:#64748b;
    text-align:center;
    font-size:12px;
    font-weight:900;
}
@media(max-width:720px){
    .admin-audit-paginacao-sigcreas{align-items:stretch;flex-direction:column}
    .admin-audit-paginacao-info-sigcreas{text-align:center}
    .admin-audit-paginacao-controles-sigcreas{flex-wrap:wrap}
}
@media(max-width:460px){
    .admin-audit-paginacao-paginas-sigcreas{order:3;width:100%}
    .admin-audit-paginacao-controles-sigcreas>button{flex:1}
}

/* =========================================================
   Administração — Configuração do CREAS Público Multi-CREAS
   ========================================================= */
.admin-creas-publico-header-sigcreas{
    display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
    padding:18px 20px;margin-bottom:14px;border:1px solid #dbeafe;border-radius:16px;
    background:linear-gradient(135deg,#f8fbff,#eef5ff)
}
.admin-creas-publico-header-sigcreas h3{margin:5px 0 4px;color:#0b3b8c;font-size:20px}
.admin-creas-publico-header-sigcreas p{margin:0;color:#64748b;font-size:13px;line-height:1.45}
.admin-creas-publico-alerta-sigcreas{display:flex;align-items:center;gap:9px;margin-bottom:14px;padding:11px 13px;border:1px solid #fde68a;border-radius:12px;background:#fffbeb;color:#92400e;font-size:12px;font-weight:700}
.admin-creas-publico-resumo-sigcreas{margin-bottom:12px;padding:10px 13px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;color:#475569;font-size:12px}
.admin-creas-publico-resumo-sigcreas strong{color:#0b3b8c;font-size:15px}
.admin-creas-publico-grid-sigcreas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding-bottom:8px}
.admin-creas-publico-card-sigcreas{border:1px solid #dbe5ef;border-left:5px solid #94a3b8;border-radius:16px;background:#fff;box-shadow:0 8px 22px rgba(15,23,42,.06);overflow:hidden}
.admin-creas-publico-card-sigcreas.is-configurado{border-left-color:#16a34a}
.admin-creas-publico-card-sigcreas.is-pendente{border-left-color:#f59e0b}
.admin-creas-publico-card-sigcreas>header{display:flex;align-items:center;gap:11px;padding:15px;border-bottom:1px solid #e2e8f0;background:#f8fafc}
.admin-creas-publico-icon-sigcreas{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#eff6ff;color:#1d4ed8;font-size:18px;flex:0 0 auto}
.admin-creas-publico-card-sigcreas header div{min-width:0;flex:1}
.admin-creas-publico-card-sigcreas header small{display:block;color:#2563eb;font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.admin-creas-publico-card-sigcreas h4{margin:3px 0 0;color:#0f172a;font-size:14px;line-height:1.3}
.admin-creas-publico-status-sigcreas{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:900;white-space:nowrap}
.admin-creas-publico-status-sigcreas i{font-size:7px}
.admin-creas-publico-status-sigcreas.ativo{background:#dcfce7;color:#166534}
.admin-creas-publico-status-sigcreas.pendente{background:#fef3c7;color:#92400e}
.admin-creas-publico-form-sigcreas{display:grid;grid-template-columns:1fr 1fr;gap:11px;padding:15px}
.admin-creas-publico-form-sigcreas label{display:flex;flex-direction:column;gap:5px;color:#475569;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.03em}
.admin-creas-publico-form-sigcreas input,.admin-creas-publico-form-sigcreas select,.admin-creas-publico-form-sigcreas textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:9px;padding:9px 10px;background:#fff;color:#0f172a;font:600 12px Inter,Arial,sans-serif;outline:none;text-transform:none;letter-spacing:0;resize:vertical}
.admin-creas-publico-form-sigcreas input:focus,.admin-creas-publico-form-sigcreas select:focus,.admin-creas-publico-form-sigcreas textarea:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.12)}
.admin-creas-publico-url-sigcreas,.admin-creas-publico-observacao-sigcreas{grid-column:1/-1}
.admin-creas-publico-toggle-sigcreas{grid-column:1/-1;display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;padding:9px 10px;border:1px solid #dbeafe;border-radius:10px;background:#eff6ff;color:#1e3a8a!important}
.admin-creas-publico-toggle-sigcreas input{width:17px!important;height:17px;margin:0}
.admin-creas-publico-card-sigcreas>footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 15px;border-top:1px solid #e2e8f0;background:#f8fafc}
.admin-creas-publico-card-sigcreas>footer>span{color:#64748b;font-size:9px;font-weight:700}
.admin-creas-publico-card-sigcreas>footer>div{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.admin-creas-publico-vazio-sigcreas{grid-column:1/-1;padding:30px;text-align:center;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc;color:#64748b;font-weight:700}
.admin-creas-publico-vazio-sigcreas.erro{border-color:#fecaca;background:#fff1f2;color:#991b1b}
@media(max-width:950px){.admin-creas-publico-grid-sigcreas{grid-template-columns:1fr}}
@media(max-width:620px){.admin-creas-publico-header-sigcreas,.admin-creas-publico-card-sigcreas>footer{flex-direction:column;align-items:stretch}.admin-creas-publico-form-sigcreas{grid-template-columns:1fr}.admin-creas-publico-url-sigcreas,.admin-creas-publico-observacao-sigcreas,.admin-creas-publico-toggle-sigcreas{grid-column:auto}.admin-creas-publico-card-sigcreas>footer>div{justify-content:stretch}.admin-creas-publico-card-sigcreas>footer .admin-btn{flex:1}}

/* Gestão de módulos por CREAS */
.admin-modulos-header-sigcreas{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px;border:1px solid #dbeafe;border-radius:16px;background:#eff6ff;margin-bottom:14px}.admin-modulos-header-sigcreas h3{margin:6px 0 4px;color:#0b3b87;font-size:1.25rem}.admin-modulos-header-sigcreas p{margin:0;color:#64748b}.admin-modulos-alerta-sigcreas{display:flex;gap:10px;align-items:center;padding:12px 14px;border:1px solid #bfdbfe;background:#f8fbff;color:#1e3a8a;border-radius:12px;font-size:.88rem;margin-bottom:14px}.admin-modulos-resumo-sigcreas{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 14px;border:1px solid #dbe4f0;border-radius:12px;background:#fff;color:#475569;margin-bottom:12px}.admin-modulos-resumo-sigcreas strong{color:#123d88}.admin-modulos-creas-tabs-sigcreas{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px}.admin-modulos-creas-tabs-sigcreas button{flex:0 0 auto;border:1px solid #cbd5e1;background:#fff;color:#173b7a;border-radius:999px;padding:9px 13px;font-weight:800;cursor:pointer;display:flex;gap:9px;align-items:center}.admin-modulos-creas-tabs-sigcreas button small{background:#eef2f7;border-radius:999px;padding:3px 7px}.admin-modulos-creas-tabs-sigcreas button.active{background:#21439a;color:#fff;border-color:#21439a}.admin-modulos-creas-tabs-sigcreas button.active small{background:rgba(255,255,255,.18)}.admin-modulos-toolbar-sigcreas{display:grid;grid-template-columns:minmax(260px,1fr) 220px;gap:10px;margin-bottom:14px}.admin-modulos-toolbar-sigcreas label{display:flex;align-items:center;gap:9px;border:1px solid #cbd5e1;border-radius:10px;padding:0 12px;background:#fff}.admin-modulos-toolbar-sigcreas input,.admin-modulos-toolbar-sigcreas select{width:100%;border:1px solid #cbd5e1;border-radius:10px;padding:11px;background:#fff}.admin-modulos-toolbar-sigcreas label input{border:0;outline:0;padding-left:0}.admin-modulos-grid-sigcreas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.admin-modulo-card-sigcreas{display:grid;grid-template-columns:48px 1fr auto;gap:12px;align-items:center;padding:15px;border:1px solid #dbe4f0;border-left:5px solid #16a34a;border-radius:14px;background:#fff;transition:.18s}.admin-modulo-card-sigcreas.is-inativo{border-left-color:#ef4444;background:#fffafa}.admin-modulo-card-icon-sigcreas{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:#eff6ff;color:#2563eb;font-size:1.1rem}.admin-modulo-card-conteudo-sigcreas small{font-size:.68rem;color:#2563eb;font-weight:900;text-transform:uppercase}.admin-modulo-card-conteudo-sigcreas h4{margin:3px 0;color:#0f2f6b}.admin-modulo-card-conteudo-sigcreas p{margin:0 0 8px;color:#64748b;font-size:.82rem}.admin-modulo-badges-sigcreas{display:flex;gap:6px;flex-wrap:wrap}.admin-modulo-badges-sigcreas span{font-size:.68rem;font-weight:800;padding:4px 7px;border-radius:999px;background:#eef2f7;color:#475569}.admin-modulo-badges-sigcreas .obrigatorio{background:#dbeafe;color:#1d4ed8}.admin-modulo-switch-sigcreas input{position:absolute;opacity:0}.admin-modulo-switch-sigcreas span{display:block;width:46px;height:26px;border-radius:999px;background:#cbd5e1;position:relative;cursor:pointer;transition:.2s}.admin-modulo-switch-sigcreas span:after{content:"";position:absolute;width:20px;height:20px;border-radius:50%;background:#fff;left:3px;top:3px;box-shadow:0 2px 5px rgba(0,0,0,.2);transition:.2s}.admin-modulo-switch-sigcreas input:checked+span{background:#16a34a}.admin-modulo-switch-sigcreas input:checked+span:after{transform:translateX(20px)}.admin-modulo-switch-sigcreas input:disabled+span{opacity:.55;cursor:not-allowed}.admin-modulos-vazio-sigcreas{grid-column:1/-1;padding:30px;text-align:center;border:1px dashed #cbd5e1;border-radius:14px;color:#64748b}.admin-modulos-vazio-sigcreas.erro{color:#b91c1c;background:#fef2f2;border-color:#fecaca}@media(max-width:850px){.admin-modulos-grid-sigcreas{grid-template-columns:1fr}.admin-modulos-toolbar-sigcreas{grid-template-columns:1fr}.admin-modulos-header-sigcreas{flex-direction:column}.admin-modulos-resumo-sigcreas{align-items:flex-start;flex-direction:column}}

/* =========================================================
   SIG-CREAS — Administração / Backup lógico
   ========================================================= */
.admin-backup-header-sigcreas{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px;border:1px solid #dbeafe;border-radius:16px;background:linear-gradient(135deg,#eff6ff,#f8fbff);margin-bottom:14px}.admin-backup-header-sigcreas h3{margin:6px 0 4px;color:#0b3b87;font-size:1.25rem}.admin-backup-header-sigcreas p{margin:0;color:#64748b;line-height:1.45}.admin-backup-badge-sigcreas{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border-radius:999px;background:#dbeafe;color:#1e3a8a;font-size:.75rem;font-weight:900;white-space:nowrap}.admin-backup-alerta-sigcreas{display:flex;gap:12px;align-items:flex-start;padding:13px 15px;border:1px solid #fde68a;border-radius:13px;background:#fffbeb;color:#92400e;margin-bottom:14px}.admin-backup-alerta-sigcreas>i{margin-top:2px}.admin-backup-alerta-sigcreas div{display:flex;flex-direction:column;gap:3px}.admin-backup-alerta-sigcreas strong{font-size:.84rem}.admin-backup-alerta-sigcreas span{font-size:.78rem;line-height:1.45}.admin-backup-resumo-grid-sigcreas{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}.admin-backup-resumo-grid-sigcreas article{padding:15px;border:1px solid #dbe4f0;border-radius:14px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.04)}.admin-backup-resumo-grid-sigcreas article>span{display:block;color:#64748b;font-size:.68rem;font-weight:900;text-transform:uppercase;letter-spacing:.05em}.admin-backup-resumo-grid-sigcreas article>strong{display:block;margin:5px 0 3px;color:#0f2f6b;font-size:1.12rem;line-height:1.25}.admin-backup-resumo-grid-sigcreas article>small{display:block;color:#64748b;font-size:.72rem;line-height:1.35}.admin-backup-conteudo-sigcreas{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(420px,1.2fr);gap:14px}.admin-backup-painel-sigcreas,.admin-backup-tabelas-sigcreas{padding:17px;border:1px solid #dbe4f0;border-radius:15px;background:#fff}.admin-backup-painel-titulo-sigcreas{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}.admin-backup-painel-titulo-sigcreas>i{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#e0e7ff;color:#3730a3;font-size:1.05rem}.admin-backup-painel-titulo-sigcreas h4,.admin-backup-tabelas-titulo-sigcreas h4{margin:0 0 4px;color:#0f2f6b}.admin-backup-painel-titulo-sigcreas p,.admin-backup-tabelas-titulo-sigcreas p{margin:0;color:#64748b;font-size:.78rem;line-height:1.4}.admin-backup-btn-sigcreas{width:100%;justify-content:center;margin-top:14px}.admin-backup-progresso-sigcreas{padding:12px;border:1px solid #bfdbfe;border-radius:12px;background:#f8fbff}.admin-backup-progresso-sigcreas>div{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;color:#1e3a8a;font-size:.75rem;font-weight:800}.admin-backup-progresso-sigcreas progress{width:100%;height:10px;accent-color:#2563eb}.admin-backup-tabelas-titulo-sigcreas{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.admin-backup-tabelas-titulo-sigcreas>span{padding:5px 8px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:.68rem;font-weight:900;white-space:nowrap}.admin-backup-tabelas-grid-sigcreas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.admin-backup-tabela-item-sigcreas{display:grid;grid-template-columns:24px 1fr 18px;align-items:center;gap:7px;padding:9px 10px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;color:#334155;font-size:.75rem;font-weight:750}.admin-backup-tabela-item-sigcreas>i:first-child{color:#2563eb}.admin-backup-tabela-item-sigcreas>i:last-child{color:#16a34a}.admin-backup-tabela-item-sigcreas span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:900px){.admin-backup-resumo-grid-sigcreas{grid-template-columns:1fr}.admin-backup-conteudo-sigcreas{grid-template-columns:1fr}.admin-backup-header-sigcreas{flex-direction:column}.admin-backup-tabelas-grid-sigcreas{grid-template-columns:1fr}}
