/* Estilos para o Dashboard */

.dashboard-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-controls {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-controls label {
    margin-right: 10px;
    font-weight: bold;
}

.dashboard-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.dashboard-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

.dashboard-error {
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* KPIs */
.dashboard-kpi-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-kpi {
    flex: 1;
    min-width: 180px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-kpi h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #555;
}

.kpi-value {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

/* Charts Layout */
.dashboard-charts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-chart, .dashboard-list {
    flex: 1;
    min-width: 300px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-chart h4, .dashboard-list h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Top List */
.top-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.top-list-item {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 5px;
}

.top-list-label {
    flex: 1;
    font-size: 14px;
    margin-right: 10px;
}

.top-list-value {
    width: 40px;
    text-align: right;
    font-weight: bold;
    color: #3498db;
}

.top-list-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: #3498db;
    opacity: 0.5;
    border-radius: 2px;
}

/* Responsividade */
@media (max-width: 768px) {
    .dashboard-kpi-container {
        flex-direction: column;
    }

    .dashboard-kpi {
        width: 100%;
    }

    .dashboard-charts-row {
        flex-direction: column;
    }

    .dashboard-chart, .dashboard-list {
        width: 100%;
    }
}