['Free', '#f3f4f6', '#374151'], 'plus' => ['Plus', '#ddd6fe', '#5b21b6'], 'pro' => ['Pro', '#bfdbfe', '#1e40af'], 'caveau' => ['CaveauAI', '#d1fae5', '#065f46'], ]; $tierLabel = $tierLabels[$tier] ?? $tierLabels['free']; $monthlyAllowance = $detail ? FreeTier::monthlyAllowance($tier) : 0; $creditsUsed = $detail ? max(0, $monthlyAllowance - (int)$detail['balance']) : 0; // Team (Caveau sessions only) $teamMembers = []; if (!$isSso && !empty($authUser['client_id'])) { try { $db = dbnToolsDb(); $stmt = $db->prepare( "SELECT cu.email, cu.role, cu.created_at FROM client_users cu WHERE cu.client_id = ? ORDER BY FIELD(cu.role,'owner','admin','editor','viewer'), cu.created_at ASC" ); $stmt->execute([(int)$authUser['client_id']]); $teamMembers = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (Throwable $e) { // non-fatal } } // Renewal date label $renewalLabel = ''; if ($detail) { if (!empty($detail['trial_active']) && !empty($detail['trial_expires_at'])) { $renewalLabel = date('d M Y', strtotime((string)$detail['trial_expires_at'])) . ' (' . (int)$detail['trial_days_remaining'] . ' ' . dbnToolsT('trial_days_left', $uiLang) . ')'; } elseif (!empty($detail['subscription_period_end'])) { $renewalLabel = date('d M Y', strtotime((string)$detail['subscription_period_end'])); } } ?> <?= htmlspecialchars(dbnToolsT('account_title', $uiLang)) ?> — Do Better Norge

Connect Claude, Cursor, and other AI tools to all 19 DBN legal preparation tools via MCP.

0): ?> 0): $storagePct = min(100, round((int)$detail['storage_used_bytes'] / (int)$detail['storage_quota_bytes'] * 100)); $usedMb = round((int)$detail['storage_used_bytes'] / 1048576, 1); $quotaMb = round((int)$detail['storage_quota_bytes'] / 1048576, 0); ?>