* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }
body, html { height: 100%; }

.background-gradient { background: #eef3e8; min-height: 100vh; }

/* Header */
.top-header {
    background-color: #d8e5d8; padding: 15px 5%; display: flex;
    justify-content: space-between; align-items: center;
    border-bottom: 2px solid #c5dcc5; margin-bottom: 30px;
}
.logo-area { cursor: pointer; display: flex; flex-direction: column; }
.badge-orange {
    background-color: #fa8231; color: white; padding: 5px 15px;
    border-radius: 15px; font-size: 12px; font-weight: bold; margin-right: 10px;
}
.status-text { font-size: 12px; color: #25665b; font-weight: bold; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; padding-bottom: 40px; }

/* Título e Botão Voltar */
.page-header { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; }
.header-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.page-title { color: #0f3d36; font-size: 26px; display: flex; align-items: center; gap: 10px; }
.page-subtitle { font-size: 16px; color: #25665b; font-weight: normal; margin-top: 5px; }

.btn-voltar {
    background: none; border: 1px solid #25665b; color: #25665b;
    padding: 8px 15px; border-radius: 20px; cursor: pointer;
    font-weight: bold; transition: 0.3s;
}
.btn-voltar:hover { background: #25665b; color: white; }

/* Barra de Filtros e Erros */
.search-container { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-bar select {
    padding: 10px 15px; border-radius: 20px; border: 1px solid #aebfaa; 
    min-width: 200px; background-color: #d8e5d8; color: #0f3d36; outline: none;
}
.search-bar select:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-orange {
    background-color: #fa8231; border: none; padding: 10px 20px;
    border-radius: 20px; color: white; cursor: pointer; font-weight: bold; transition: 0.3s;
}
.btn-orange:hover { background-color: #e06915; }
.btn-orange:disabled { background-color: #ccc; cursor: not-allowed; opacity: 0.7; }

.erro-msg { color: #d63031; font-size: 13px; font-weight: bold; height: 15px; margin-right: 10px;}

/* Resumo Numérico (Cards pequenos) */
.resumo-numerico { display: flex; gap: 15px; margin-bottom: 20px; width: 100%; }
.resumo-card {
    background: #fff; border-left: 4px solid #25665b; padding: 15px;
    border-radius: 8px; flex: 1; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.resumo-card.alert { border-left-color: #fa8231; }
.resumo-card h5 { color: #7f8c8d; font-size: 12px; text-transform: uppercase; margin-bottom: 5px; }
.resumo-card span { font-size: 22px; font-weight: bold; color: #0f3d36; }

/* Home Nav (Cards) */
.welcome-title { text-align: center; color: #0f3d36; margin-bottom: 30px; font-size: 28px; }
.cards-nav { display: flex; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.card {
    background-color: #c5dcc5; border-radius: 12px; padding: 25px 20px;
    flex: 1; min-width: 200px; text-align: center; box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex; flex-direction: column; justify-content: space-between; align-items: center;
}
.card h3 { font-size: 16px; color: #0f3d36; margin-bottom: 15px; height: 40px; }
.card-icon { font-size: 24px; margin-bottom: 10px; }

/* Grid de Gráficos e Tooltips */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 20px; margin-bottom: 20px; }
.chart-box {
    background-color: #c5dcc5; border-radius: 12px; padding: 20px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    min-height: 220px; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.chart-box-large {
    grid-column: 1 / -1; background-color: #f4f7ed; min-height: 350px;
    border: 2px solid #c5dcc5; align-items: flex-start; padding: 25px;
}
.chart-title { 
    color: #25665b; margin-bottom: 15px; font-size: 16px; align-self: flex-start; 
    width: 100%; border-bottom: 1px solid #aebfaa; padding-bottom: 8px;
    display: flex; justify-content: space-between; align-items: center;
}
.tooltip-icon {
    font-size: 12px; background: #25665b; color: white; border-radius: 50%;
    width: 18px; height: 18px; display: inline-flex; justify-content: center;
    align-items: center; cursor: help; font-weight: normal;
}

canvas { width: 100% !important; max-height: 280px; }
.dashboard-grid canvas { max-height: 180px; }

/* Responsividade */
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
    .top-header { flex-direction: column; gap: 15px; text-align: center; }
    .header-top { flex-direction: column; gap: 15px; align-items: flex-start; }
    .search-container { width: 100%; align-items: stretch; }
    .search-bar { flex-direction: column; width: 100%; }
    .search-bar select, .search-bar button { width: 100%; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .resumo-numerico { flex-direction: column; }
}