export function normalizeNextPath(value: string | null | undefined, fallback = '/app') {
  const next = String(value || '').trim()
  if (!next || !next.startsWith('/') || next.startsWith('//')) {
    return fallback
  }
  return next
}
