```python
def _why_refused(cap, left: int, amount: int) -> str:
    if cap is None:
        return "unknown"
    if amount > cap[1]:
        return "single"
    return "cap" if amount > left else ""


def apply_charges(caps: dict, charges: list) -> dict:
    left = {name: cap[0] for name, cap in caps.items()}
    refused = []
    for charge_id, bucket, amount in charges:
        if not isinstance(amount, int) or amount <= 0:
            raise ValueError("Amount must be a positive whole number")
        
        cap = caps.get(bucket)
        current_left = left.get(bucket, 0)
        
        reason = _why_refused(cap, current_left, amount)
        
        if reason:
            refused.append((charge_id, reason))
        else:
            left[bucket] = current_left - amount
            
    return {"left": left, "refused": refused}
```