diff --git a/app/main.py b/app/main.py
index ba00bbc..3c11212 100644
--- a/app/main.py
+++ b/app/main.py
@@ -373,6 +373,7 @@ PAGE_HTML = """
.pill.org { background: #e7edf5; color: #4a6a8a; }
.pill.grace { background: #fdf3e3; color: #a97a2a; }
.pill.guest { background: #efe7f2; color: #7a5a92; }
+ .pill.invited { background: #e7edf5; color: #4a6a8a; }
/* Standard guest-invite form (shared with the member dashboard): ONE field,
plain labels, fits a narrow frame. */
.guest-invite-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-top: 20px; }
@@ -1346,9 +1347,16 @@ function renderMembers() {
const emailLine = g.username ? '
' + esc(g.email) + '
' : '';
const credits = Number(g.credits_remaining ?? g.credit_balance ?? 0);
const exp = g.guest_expires_at ? String(g.guest_expires_at).slice(0, 10) : '—';
- const st = String(g.guest_status || (g.active ? 'active' : 'inactive'));
- const stClass = st === 'active' ? 'active' : (st === 'converted' ? 'org' : 'inactive');
- const stTitle = { active: 'Guest access live', converted: 'Guest became a member', expired: 'Time box elapsed', depleted: 'Credits spent' }[st] || '';
+ // The portal derives the display state: 'invited' while the guest has
+ // not accepted their setup invite (provisioned but cannot log in yet —
+ // never 'active' before that), else the ledger status.
+ const st = g.state === 'invited' ? 'invited'
+ : String(g.guest_status || (g.active ? 'active' : 'inactive'));
+ const stClass = { invited: 'invited', active: 'active', converted: 'org' }[st] || 'inactive';
+ const stTitle = {
+ invited: 'Invited — awaiting setup (the guest has not accepted their invite yet)',
+ active: 'Guest access live', converted: 'Guest became a member',
+ expired: 'Time box elapsed', depleted: 'Credits spent' }[st] || '';
return '' +
'| ' + esc(top) + '' + emailLine + ' | ' +
'' + esc(g.guest_inviter || '—') + ' | ' +