/* Estilos para Relatórios */
.charts-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap:20px; }
.card h3{ font-size:16px; margin-bottom:10px; color:#1F2937; }
canvas{ width:100%; height:320px; }

/* Dark Mode para Relatórios */
body[data-theme="dark"] .card h3 {
    color: #FFFFFF !important;
}

body[data-theme="dark"] .filters-section {
    background-color: #1F2937 !important;
    color: #FFFFFF;
}

body[data-theme="dark"] .filter-group label {
    color: #FFFFFF !important;
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select {
    background-color: #1F2937 !important;
    border-color: #4B5563 !important;
    color: #FFFFFF !important;
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus {
    background-color: #374151 !important;
    border-color: #3B82F6 !important;
    color: #FFFFFF !important;
}

body[data-theme="dark"] .table-container {
    background-color: #1F2937 !important;
}

body[data-theme="dark"] .table th {
    background-color: #374151 !important;
    color: #FFFFFF !important;
    border-bottom-color: #4B5563 !important;
}

body[data-theme="dark"] .table td {
    background-color: #1F2937 !important;
    color: #E5E7EB !important;
    border-bottom-color: #374151 !important;
}

body[data-theme="dark"] .table tbody tr:hover {
    background-color: #374151 !important;
}

body[data-theme="dark"] .stats-grid .summary-card {
    background-color: #1F2937 !important;
    color: #FFFFFF;
}

body[data-theme="dark"] .stats-grid .summary-card h3 {
    color: #FFFFFF !important;
}

body[data-theme="dark"] .stats-grid .summary-card .card-number {
    color: #E5E7EB !important;
}

body[data-theme="dark"] .btn-export {
    background-color: rgb(36, 35, 35) !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

body[data-theme="dark"] .btn-export:hover {
    background-color: rgb(40, 39, 39) !important;
    border-color: #007bff !important;
}

body[data-theme="dark"] #paginacao-chamadas,
body[data-theme="dark"] #paginacao-ocorrencias,
body[data-theme="dark"] #paginacao-criancas,
body[data-theme="dark"] #paginacao-denuncias,
body[data-theme="dark"] #paginacao-encaminhadas {
    color: #e0e0e0;
}

body[data-theme="dark"] #paginacao-chamadas button,
body[data-theme="dark"] #paginacao-ocorrencias button,
body[data-theme="dark"] #paginacao-criancas button,
body[data-theme="dark"] #paginacao-denuncias button,
body[data-theme="dark"] #paginacao-encaminhadas button {
    background-color: rgb(36, 35, 35) !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

body[data-theme="dark"] #paginacao-chamadas button:hover,
body[data-theme="dark"] #paginacao-ocorrencias button:hover,
body[data-theme="dark"] #paginacao-criancas button:hover,
body[data-theme="dark"] #paginacao-denuncias button:hover,
body[data-theme="dark"] #paginacao-encaminhadas button:hover {
    background-color: rgb(40, 39, 39) !important;
    border-color: #007bff !important;
}

body[data-theme="dark"] #paginacao-chamadas button.active,
body[data-theme="dark"] #paginacao-ocorrencias button.active,
body[data-theme="dark"] #paginacao-criancas button.active,
body[data-theme="dark"] #paginacao-denuncias button.active,
body[data-theme="dark"] #paginacao-encaminhadas button.active {
    background-color: #007bff !important;
    color: white !important;
}

/* Tabs de navegação */
body[data-theme="dark"] .tabs-nav {
    border-bottom-color: #444 !important;
}

body[data-theme="dark"] .tab-btn {
    color: #c9c9c9 !important;
}

body[data-theme="dark"] .tab-btn:hover {
    color: #007bff !important;
    background: rgb(36, 35, 35) !important;
}

body[data-theme="dark"] .tab-btn.active {
    color: #007bff !important;
    border-bottom-color: #007bff !important;
    background: rgb(36, 35, 35) !important;
}

/* Scrollbar para dark mode */
body[data-theme="dark"] ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

body[data-theme="dark"] ::-webkit-scrollbar-track {
    background: rgb(26, 25, 25);
    border-radius: 6px;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgb(60, 60, 60);
    border-radius: 6px;
    border: 2px solid rgb(26, 25, 25);
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgb(80, 80, 80);
}

/* Firefox scrollbar */
body[data-theme="dark"] {
    scrollbar-width: thin;
    scrollbar-color: rgb(60, 60, 60) rgb(26, 25, 25);
}

/* Estilos inline da página */
body[data-theme="dark"] .relatorios-container {
    color: #e0e0e0;
}

body[data-theme="dark"] .page-header {
    color: #e0e0e0;
}

body[data-theme="dark"] .table-container {
    background: rgb(26, 25, 25) !important;
}

body[data-theme="dark"] table {
    color: #e0e0e0;
}

body[data-theme="dark"] th {
    background: rgb(29, 28, 28) !important;
    color: #ffffff !important;
    border-bottom-color: #444 !important;
}

body[data-theme="dark"] td {
    color: #e4e4e4 !important;
    border-bottom-color: #333 !important;
}

body[data-theme="dark"] tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

/* Paginação */
body[data-theme="dark"] .pagination button {
    background-color: rgb(36, 35, 35) !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

body[data-theme="dark"] .pagination button:hover {
    background-color: rgb(40, 39, 39) !important;
    border-color: #007bff !important;
}

body[data-theme="dark"] .pagination button.active {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

body[data-theme="dark"] .pagination button:disabled {
    opacity: 0.5;
    background-color: rgb(30, 30, 30) !important;
}

/* Badges - manter cores mas ajustar contraste */
body[data-theme="dark"] .badge {
    color: white !important;
}

body[data-theme="dark"] .badge-success {
    background-color: #10B981 !important;
}

body[data-theme="dark"] .badge-warning {
    background-color: #F59E0B !important;
}

body[data-theme="dark"] .badge-danger {
    background-color: #EF4444 !important;
}

body[data-theme="dark"] .badge-info {
    background-color: #3B82F6 !important;
}

body[data-theme="dark"] .badge-secondary {
    background-color: #6B7280 !important;
}

/* Stats Grid */
body[data-theme="dark"] .stats-grid {
    color: #e0e0e0;
}

body[data-theme="dark"] .stats-grid .summary-card {
    background-color: rgb(26, 25, 25) !important;
    border-color: #444 !important;
}

body[data-theme="dark"] .stats-grid .summary-card .card-icon {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
}

body[data-theme="dark"] .stats-grid .summary-card h3 {
    color: #e2e2e2 !important;
}

body[data-theme="dark"] .stats-grid .summary-card .card-number {
    color: #c9c9c9 !important;
}