/* Shared action semantics: native buttons and link-buttons use the same states.
   Keep module-specific primary colors and compact icon layouts intact. */
body main :is(button, .button) {
    gap: .4rem;
    line-height: 1.35;
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: background-color 120ms ease, border-color 120ms ease;
}
/* Standard form actions share a compact baseline; specialized controls can override it. */
body main :where(form :is(button[type="submit"], .button[href]):not(.icon-link)) {
    font-size: .875rem;
}

main :where(.actions, .form-actions, .config-form-actions, .finance-actions, .claim-action-buttons) {
    align-items: center;
    column-gap: .5rem;
    row-gap: .5rem;
}

body main :is(button, .button) > svg { flex-shrink: 0; }
body main :is(.page-title, .page-hero) > * { min-inline-size: 0; }
body main :is(.page-actions, .hero-actions, .form-actions) {
    flex-wrap: wrap;
    min-inline-size: 0;
}
body main dialog {
    max-inline-size: calc(100% - 2rem);
    max-block-size: calc(100dvh - 2rem);
    overflow: auto;
}
body main :is(button, .button).secondary {
    background: var(--soft, #eef4f7);
    color: var(--primary-dark, #1e40af);
    border: 1px solid var(--line, #d9dee7);
    box-shadow: none;
}
body main :is(button, .button).secondary:not(:disabled):hover {
    background: #e2e6f3;
    border-color: #9bbfcd;
    color: var(--primary-dark, #1e40af);
}
body main :is(button, .button).danger {
    background: #fff1f0;
    color: var(--danger, #b42318);
    border: 1px solid #efc4c0;
    box-shadow: none;
}
body main :is(button, .button).danger:not(:disabled):hover {
    background: #ffe4e1;
    color: #8f2119;
    border-color: #dd9c94;
}
body main :is(button, .button):focus-visible {
    outline: 3px solid #73b7cc;
    outline-offset: 3px;
}
body main button:disabled {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
}
body main button[aria-busy="true"] { cursor: progress; }
@media (prefers-reduced-motion: reduce) {
    body main :is(button, .button) { transition: none; }
}
@media (max-width: 768px) {
    /* Match the rest of the form's 44px touch targets, including icon actions. */
    body main .leave-create button.leave-remove {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }
}
