function copyToken(token) {
    navigator.clipboard.writeText(token).then(() => {
        const el = event.target;
        const orig = el.textContent;
        el.textContent = '✓ Copied!';
        setTimeout(() => el.textContent = orig, 1500);
    });
}

// Flask jinja doesn't have min() built-in, use JS for template
function min(a, b) { return Math.min(a, b); }
