/* Importando fonte moderna (Inter) do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    /* Cores de Estrutura */
    --bg-color: #F4F6F9;
    --sidebar-width: 280px;
    
    /* Paleta Oficial FUNASA */
    --primary: #1B5098;       /* Azul principal (Logo/Número 3) */
    --dark-blue: #0E2A52;     /* Azul escuro (Sombra do número 3) */
    --light-blue: #4081C4;    /* Azul claro (Contorno do mapa) */
    --brand-red: #9C272B;     /* Vermelho principal (Letras FUNASA/Número 5) */
    --gray-text: #808080;     /* Cinza (Texto 'ANOS') */

    /* Cores de Feedback (Mantidas para usabilidade) */
    --success: #9C272B; 
    --warning: #0E2A52;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* --- ÁREA PRINCIPAL --- */
.content-wrapper {
    flex-grow: 1;
    margin-left: 0; 
    display: flex;
    flex-direction: column;
}

.main-content-padding {
    padding: 2rem 3rem;
}

/* --- NOVA BARRA DE FILTROS --- */
.filters-row {
    display: flex;
    gap: 20px;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    align-items: center; 
}

.filter-group {
    flex: 1;
}

/* --- TOPBAR --- */
.site-header {
    background: rgba(250,250,249,0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-bottom: 1px solid #e7e5e4;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.header-h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #082f49;
    line-height: 1.2;
    margin: 0;
}
.header-sub {
    font-size: 0.7rem;
    color: #78716c;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.topbar {
    background-color: transparent;
    padding: 1.5rem 3rem;
}

.search-container {
    background-color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    width: 300px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.search-bar {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.9rem;
}

.user-title {
    font-size: 0.85rem;
    color: var(--primary); /* Azul FUNASA */
}

.user-subtitle {
    font-size: 0.65rem;
    color: var(--gray-text); /* Cinza FUNASA */
    font-weight: 600;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* --- CARDS & KPIs --- */
.kpi-card {
    border-radius: 12px !important;
    position: relative;
}

.border-bottom-success { border-bottom: 4px solid var(--success) !important; }
.border-bottom-warning { border-bottom: 4px solid var(--warning) !important; }
.border-bottom-brand { border-bottom: 4px solid var(--primary) !important; } /* Nova classe para borda azul */

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
}

/* Fundos claros para os ícones */
.bg-light-primary { background-color: #E8F0FE; color: var(--primary); }
.bg-light-success { background-color: #DCFCE7; color: var(--success); }
.bg-light-warning { background-color: #FEF3C7; color: var(--warning); }
.bg-light-red { background-color: #FDE8E8; color: var(--brand-red); } /* Substituiu o bg-light-olive */

.trend-badge {
    position: absolute;
    right: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-top: 50px !important;
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}

/* Classes utilitárias com as novas cores */
.bg-dark-blue { background-color: var(--dark-blue) !important; }
.bg-brand-red { background-color: var(--brand-red) !important; } /* Substituiu o bg-olive */
.bg-light-blue { background-color: var(--light-blue) !important; } /* Substituiu o bg-dark-green */

.progress-bar-custom {
    height: 6px;
    border-radius: 3px;
}

.progress-segment {
    height: 6px;
    border-radius: 3px;
}

.bar-bg {
    background-color: #F1F5F9;
    height: 12px;
    border-radius: 6px;
    width: 100%;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    background-color: var(--primary); /* Azul da FUNASA na barra de progresso */
}

.v-bar {
    width: 15%;
    border-radius: 4px 4px 0 0;
    background-color: var(--light-blue);
}

/* Banner Nacional */
.map-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--dark-blue)); /* Degradê Azul FUNASA */
    border: 1px dashed rgba(255,255,255,0.3);
}

/* --- LISTA DE DOCUMENTOS (ESTILO DRIVE) --- */
.doc-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.doc-item {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.doc-item:hover {
    border-color: var(--primary); /* Azul FUNASA no hover */
    background-color: #F8FAFC;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.doc-icon {
    font-size: 1.5rem;
    margin-right: 20px;
    color: var(--brand-red); /* Vermelho FUNASA para o ícone de PDF */
}

.doc-info {
    flex-grow: 1;
}

.doc-title {
    font-weight: 600;
    color: #1E293B;
    margin: 0;
    font-size: 1rem;
}

.doc-meta {
    font-size: 0.8rem;
    color: #64748B;
    margin: 0;
}

.doc-btn {
    padding: 8px 16px;
    background-color: #E8F0FE;
    color: var(--primary); /* Azul FUNASA */
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    transition: background 0.2s;
}

.doc-item:hover .doc-btn {
    background-color: var(--primary);
    color: white;
}
