```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:
    if any(not isinstance(amount, (int, float)) or amount <= 0 for _, _, amount in charges):
        raise ValueError("Amount must be a positive whole number.")

    left = {name: cap[0] for name, cap in caps.items()}
    refused = []

    for charge_id, bucket, amount in charges:
        if bucket not in caps:
            refused.append((charge_id, "unknown"))
        elif amount > caps[bucket][1]:
            refused.append((charge_id, "single"))
        elif amount > left[bucket]:
            refused.append((charge_id, "cap"))
        else:
            left[bucket] -= amount

    return {"left": left, "refused": refused}
```