/* RESET E CONFIGURAÇÕES GERAIS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    padding: 20px;
}

/* CONTAINER PRINCIPAL */
.dashboard-container {
    margin: 30px 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* HEADER */
.header-top {
	    position: relative;
}

.header-voltar {
	position: absolute;
	top: 10px;
	right: 20px;
	background: rgba(255, 255, 255, 0.2);
	color: white;
	padding: 8px 16px;
	border-radius: 20px;
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	transition: all 0.3s ease;
	border: 1px solid rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(5px);
}

.header-voltar:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
	.header-voltar {
		position: static;
		display: inline-block;
		margin-bottom: 15px;
		font-size: 13px;
		padding: 6px 12px;
	}
}

.dashboard-header {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: white;
    padding: 30px 35px;
    border-radius: 16px 16px 0 0;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.3);
}

.dashboard-header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dashboard-header p {
    margin: 12px 0 0 0;
    opacity: 0.95;
    font-size: 17px;
    font-weight: 400;
}

/* CONTROLES */
.controls-row {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 250px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
}

.control-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.control-select:hover {
    border-color: #1a73e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
}

.control-select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.2);
}

/* INFORMAÇÃO DA SEMANA */
.semana-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 15px;
    border-left: 6px solid #1a73e8;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* ESTATÍSTICAS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #1a73e8, #4caf50);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.2);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    color: #1a73e8;
    display: block;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 15px;
    color: #5f6368;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* CONTEÚDO PRINCIPAL */
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    margin-bottom: 35px;
}

.dashboard-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dashboard-section:hover {
    transform: translateY(-5px);
}

.dashboard-section h2 {
    margin: 0 0 25px 0;
    font-size: 22px;
    color: #2c3e50;
    padding-bottom: 18px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #1a73e8, #4caf50) 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-section h2 i {
    font-size: 28px;
}

/* GRÁFICO */
.grafico-container {
    height: 420px;
    position: relative;
    background: white;
    border-radius: 10px;
    padding: 15px;
}

/* HEATMAP */
.heatmap-container {
    height: 520px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#mosquito-heatmap {
    width: 100%;
    height: 100%;
}

.heatmap-legend {
    position: absolute;
    bottom: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.98);
    padding: 18px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 220px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-title {
    font-weight: 700;
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 13px;
}

.legend-color-box {
    width: 20px;
    height: 12px;
    margin-right: 12px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* INFO ARQUIVOS */
.file-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.file-info h3 {
    margin: 0 0 18px 0;
    font-size: 17px;
    color: #2c3e50;
}

.file-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    background: white;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    transition: background 0.2s;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
}

.file-date {
    color: #6c757d;
    font-size: 12px;
}

/* LOADING */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
    font-size: 17px;
    color: #1a73e8;
    flex-direction: column;
    gap: 15px;
    border-radius: 12px;
    backdrop-filter: blur(3px);
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1a73e8;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVIDADE */
@media (max-width: 1200px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }
    
    .dashboard-header {
        padding: 25px;
    }
    
    .dashboard-header h1 {
        font-size: 26px;
    }
    
    .dashboard-header p {
        font-size: 15px;
    }
    
    .controls-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .control-group {
        min-width: 100%;
    }
    
    .stat-card {
        padding: 25px;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-section {
        padding: 20px;
    }
    
    .dashboard-section h2 {
        font-size: 18px;
    }
    
    .heatmap-legend {
        bottom: 15px;
        right: 15px;
        padding: 12px 15px;
        max-width: 180px;
    }
}

/* SCROLLBAR PERSONALIZADA */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #08306b 100%);
}
