```python
from typing import Dict, List, Tuple, Optional

def _why_refused(cap: Optional[Tuple[int, int]], 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[str, Tuple[int, int]], charges: List[Tuple[int, str, int]]) -> Dict[str, Dict[str, int]]:
    left = {name: cap[0] for name, cap in caps.items()}
    refused = []
    
    for charge_id, bucket, amount in charges:
        if amount <= 0:
            raise ValueError("Amount must be a positive whole number")
        
        why = _why_refused(caps.get(bucket), left.get(bucket), amount)
        if why:
            refused.append((charge_id, why))
        else:
            left[bucket] -= amount
    
    return {"left": left, "refused": refused}
```